Jump to content

Zgron

Members
  • Posts

    12
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Zgron's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Name fixed but enchanting table not working. In relevans to the creative tab I made a new EnumEnchantmentType that is only for hoes so I don't want to set it to Digger. I just want the tab property for my new enchantmentType. I tries using the EnumEnchantmentType.DIGGER which fixed the book and then I did this in my enchantment: public boolean canApplyAtEnchantingTable(ItemStack stack) { return stack.getItem() instanceof ItemHoe; } and the sam for canApply. However it appears that whatever I do every tool and weapon can be enchanted with replant. What I meant with the unbreaking was that hoes can only be enchanted with unbreaking through books. But I want the hoes to be enchanted through enchantment tables as well. But now I see that in EnchantmentDurability there it uses its super class canApplyAtEnchantingTable which narrows down to see if the item is BREAKABLE which a hoe is so now I don't see why you can't enchant the hoe with unbreaking and perhaps the hoe is unenchantable and that is why enchanting table isn't working for me.
  2. Hi I made an enchantment for hoe that's called replant that looks for IPlantable in the drop of a block and tries to plant it on a farmland under. The enchantment works but there are a couple of things I can't figure out. - The registry name and the name of my enchantment is set to replant, but the in game ID is "enchantment.replant" I supposed I could fix that in a language file like through "enchantment.replant.name=Replant" but it doesn't work, so were do I change that or what syntax did I do wrong? - I get a book in the creativemode inventory but I can't find it in any tab but have to search for it to find it. So how can I specify the tab to be in the tools tab? Also there is a blue text saying Combat or Tools in the info for vanilla enchantment books in creative. How do you add that to be Tools for my replant enchantment? - I can't enchant the hoe through the enchantment table, only by anvil and book. Where do I add such properties? Also can I add so the hoe can be enchanted with unbreaking through enchantment table aswell?
  3. Ok I changed it to mimic vanilla arrows and are using RenderingRegistry now wich worked in preInit (i did it in clientproxy init before) , but now I have a bug were it looks like the arrow bounces of a wall directly when shot but the collider seems to behave correctly, and once the arrow hits something it renders correctly again. I can imagine it happening since the renderer seems to handle stuff depending on what the arrow is doing. But I have no idea how it happens.
  4. Everything works now thank you! however I have one last question. This works: renderManager.entityRenderMap.put(EntityObsidianArrow.class, new RenderObsidianArrow(renderManager)); But this doesn't(Which I believed is the supposed way): RenderingRegistry.registerEntityRenderingHandler(EntityObsidianArrow.class, RenderObsidianArrow::new); Why? Am I doing something wrong with the lambda cunstructor? To be honest I've never seen that such a lambda in java before and really don't see how that would bring an IRenderFactory to the picture to begin with, though I found it online. And lastly I sat the the update time and such this way: EntityRegistry.registerModEntity(new ResourceLocation(ObsidianShardsMod.MODID, "textures/entity/obsidian_arrow.png"), EntityObsidianArrow.class, "obsidian_arrow", 1, ObsidianShardsMod.instance, 80, 3, true); However it would be nice to do it just like in vanilla. I found a register of the tipped arrow in the minecraft code but there were no updatefrequency parameters and such there. So I just wonder what do the vanilla entities use for trackingRange and updateFrequency? Also what is the first ResourceLocation parameter for? It says registryName. Am I using it wrong? Because I have the ResourceLocation that I use in my Renderer class so I don't see what it would be for.
  5. Sorry for the late response. I found the problem. I was doing new ResourceLocation("minecraft", [resource path]); but i found that the first parameter is actually mod id. And I suppose minecraft ain't defined as a forge mod right? so I used new ResourceLocation("minecraft/[the rest of the path]");
  6. Okay I thought I could do it but I can't get it to work. I'm extending the EntityTippedArrow. If I do that it works but I get the white ordinary arrow entity, which is a bit buffling since then my extended class must be registered with a renderer without me doing anything. I've extended the RenderArrow class with the only differens that I'm using my texture instead. I've tried the following in client proxy. ----- RenderingRegistry.registerEntityRenderingHandler(EntityObsidianArrow.class, RenderObsidianArrow::new); ----- RenderManager renderManager = Minecraft.getMinecraft().getRenderManager(); renderManager.entityRenderMap.put(EntityObsidianArrow.class, new RenderObsidianArrow(renderManager)); ----- And now I wonder if I shouldn't use EntityRegistry.registerModEntity(...); But I'm unsure since there already is a entity that I'm using and can you change entity however you want?
  7. Okay thank you that was the information I needed
  8. This is the code for setRepairItem in Item.java public ToolMaterial setRepairItem(ItemStack stack) { if (!this.repairMaterial.isEmpty()) throw new RuntimeException("Repair material has already been set"); if (this == WOOD || this == STONE || this == GOLD || this == IRON || this == DIAMOND) throw new RuntimeException("Can not change vanilla tool repair materials"); this.repairMaterial = stack; return this; } This throws a runtime error. The usage of repairMaterial is done through the direct of the repairMaterial variable in the ToolMaterial (it isn't copied anywere). So I just wonder why this restriction is here? I'm just curious of the reason. I suppose I will be using asm to change cobblestone to flint for now though.
  9. Okey I found the textures. I was looking at the wrong place. However now I don't know how to set the texture of an entity. I can only find tutorials for 1.8 about entities and there they use Render classes for the entities, however I can't seem to find any of those in 1.11.
  10. Hi I've been making an obsidian shard arrow, and as a finishing touch I would like the tip of the arrow to be purple when shoot. There is one occurence of that being done in minecraft and that is the EntitySpectralArrow that has a yellow instead of a white tip. It extends EntityArrow, however there are very fiew changes from its super class the EntityArrow class, the only differense being adding a luminating effect on targets hit and a duration for the effect. But I can't see anything that would change the color of the arrow tip. Does anyone have any idea of were that arrow tip color change might come from? Can it be the registration of another model for the entity somewhere else? I've looked for that and I imagine that I might be able to change the appearance of the arrow entity however I see fit. But I for example still only find one entity arrow texture and I have no experience with entity models and textures so I feel a bit lost here. Any suggestions? Thanks in advance!
  11. Hi I'm trying to make a kind of volcanic lava that will flow differently. To begin with I can't find the water block or lava block class to use extend from or use as a template or refernse point if that is how you implement fluids in forge and if someone could contribute to some informations about how to make fluids, that would be apprecited. Anyway as the topic I would like to use the same texture that is used in vanilla minecraft for the lava block. However I've done some testing and thought that it would be fine using new ResourceLocation("minecraft", "lava_still") and just use the minecraft assets, but that don't seem to work and forge complains. I don't want to copy the resources and put them in my own resource folder since I want it to take the same appearance as lava even if a resourcepack would be used. Are there any simple way to do this or is it possible to copy the resources I want from the net/minecraft at initialization? In that case I'm unsure about the root folder.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.