Jump to content

GotoLink

Members
  • Posts

    2012
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by GotoLink

  1. You should check if that is working as you expect. this == this.grownBlock
  2. I'd say Blocks.wooden_slab isn't the one you'd want.
  3. Setup breakpoints in your client proxy then.
  4. Then if you did nothing wrong, this is working as expected. Seriously. Details.
  5. I can't see any obvious mistake in that code. What values do you call this with ? Bear in mind that in World#setBlockToAir(int,int,int), the middle parameter is the height value. (Just saying this because your "clearColumn" is clearing horizontally) It might also be worth making your world instance a field of this class, so you don't have to pass it through all those methods.
  6. You obviously did something wrong with your build. Man, if you can't provide any detail about what you did, noone can help.
  7. Minecraft mc = Minecraft.getMinecraft(); This is client side only.
  8. You are not keeping the value returned, you keep calling the method, which does what it says. (=Returns a random value each time you call it.)
  9. isItemInInventory doesn't exist. Try onUpdate(ItemStack, World, Entity,..)
  10. EntityJoinWorldEvent will fire for mob spawners, egg, natural spawning, etc. The "name plate" is probably called customNameTag in the code.
  11. Make a class to extend Event. Use an EventBus then #post(event) when the event needs to be sent. Use @Cancelable or @HasResult depending on what you want the event effect to be...
  12. When you throw it, it is a entity. The "Ball". It needs its own renderer too.
  13. If you extend Block, you can override any (non-private or final) method in Block. If you extend BlockFlower....
  14. I made an example, and it worked. Optional removal - found optionals for class com.example.examplemod.TestItem - processing Optional on com.example.examplemod.TestItem triggered - mod missing battlegear2 Optional removal - interface mods.battlegear2.api.weapons.IBattlegearWeapon removed Optional removal - interface mods.battlegear2.api.weapons.IBattlegearWeapon - stripping method signature references Optional removal - interface mods.battlegear2.api.weapons.IBattlegearWeapon - all method signature references @Optional.Interface(iface = "mods.battlegear2.api.weapons.IBattlegearWeapon", modid = "battlegear2", striprefs = true) public class TestItem extends Item implements IBattlegearWeapon{ public TestItem(int id){ super(id); setUnlocalizedName("test:example"); setTextureName("test:example"); } @Override public boolean allowOffhand(ItemStack stack, ItemStack stack2) { return false; } @Override public boolean isOffhandHandDual(ItemStack stack) { return false; } @Override public boolean offhandAttackEntity(PlayerEventChild.OffhandAttackEvent offhandAttackEvent, ItemStack stack, ItemStack stack2) { return false; } @Override public boolean offhandClickAir(PlayerInteractEvent playerInteractEvent, ItemStack stack, ItemStack stack2) { return false; } @Override public boolean offhandClickBlock(PlayerInteractEvent playerInteractEvent, ItemStack stack, ItemStack stack2) { return false; } @Override public void performPassiveEffects(Side side, ItemStack stack, ItemStack stack2) { } @Override public boolean sheatheOnBack(ItemStack stack) { return false; } } Maybe you have a typo somewhere ?
  15. You are not using the FMLPreInitializationEvent, you should, to register everything.
  16. Check that the lwjgl librairies are in build/natives.
  17. switch(0){ What does that mean to you ?
  18. ItemStack#getItem() == itemToCompare Items are initialized only once, you can compare with identity.
  19. setResult(DENY)
  20. You should use PlayerLoggedInEvent / PlayerLoggedOutEvent.
  21. See /build/libs. That is the default output place.
  22. With PopulateChunkEvent.Post you can tell if a village has been created and then search for the structure you want in this area, then place block where you want. See an example.
  23. Did you try with your built jar in game too ? It is possible that the ModAPITransformer won't start in the dev environment (because deobfuscated and all that).
  24. Yes, you can. You need to implement IModGuiFactory. See FMLConfigGuiFactory for an example. Then pass its class name to ModContainer#getGuiClassName() It can replace the config file, since you can't access this menu inside a world. See @Mod guiFactory @Mod canBeDeactivated
  25. owner= modid of the mod making sense of the API provides= name of the API -You might want to use a meaningful name, not a modid
×
×
  • Create New...

Important Information

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