Jump to content

sequituri

Forge Modder
  • Posts

    669
  • Joined

  • Last visited

Everything posted by sequituri

  1. That looks proper. I'd suggest adding a few lines with Logger or println in your updateFermenterBlockState() method for the block. See if you can find it calling those methods and print the value of 'isActive'.
  2. Not knowing when to use the proper case is always a source of problems in programming.
  3. You've messed up the logic of the furnace when you rearraigned the code. Try starting back at the basic TileEntityFurnace code without so much rewriting.
  4. MODID and any part of package path should not contain capital letters. Get rid of them and use lower-case only.
  5. First problem: PlayerResearch has to be registered for your player with player.registerExtendedEntityProperties(EXT_PROP_NAME,this); You could do the same more nicely (since your research is an array of ints), by using new NBTTagIntArray(currentResearch). Also, CurrentResearch is not a class, so should not be UpperCamelCase.
  6. No, the real issue is you need to register (and retrieve) your fluid with an all lowercase name, as that is how the key is stored.
  7. I'm going to surmise that your TileEntityFermenter is not properly calling Fermenter.updateFermenterBlockState(...) with the proper arguments or at all.
  8. Can you be more specific? Seriously? You want Diesieben07 to name your package for you? Ughh
  9. You can set event.Result = Result.DENY on any of the ore types you want to not generate.
  10. buttonList.add(id, button); That method is not what you think it is. labelList is a simple ArrayList ... if you add a buton with an index (such as id), then the array already has to have enough elements to fill up to that index. Put the ID in the button it self or start your ids at 0.
  11. You can use EntityPlayer.inventory.GetItemStack() and SetItemStack(stack) to access the picked up item.
  12. There is no need to create a class simply to implement an interface. If your class does nothing else, get rid of it.
  13. ItemSword#getItemAttributeModifiers() can be overridden to alter your swords damage value
  14. So you have created an instance variable in a block. That variable will be shared and exactly duplicated in every block like that in the world. How is that working fine? For future reference: A TileEntity can only be created in World. Not in a block or an item. Every block gets its TE from World.getTileEntity(). not by using an instance variable. Your code will not work when more than one of your blocks is ever placed, if at all.
  15. You cannot call getFluidStack() on an unregistered fluid. You must call FluidRegistry#registerFluid(Fluid f) before that, or you will get a null.
  16. Is this not your code? @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int what, float are, float these, float For) { if(player.inventory.getCurrentItem() == null || player.inventory.getCurrentItem().getItem() == null) { return false; } if(player.inventory.getCurrentItem().getItem() instanceof ItemKnife && >>>>>>!tileEntity.carved<<<<<<) { tileEntity.carved = true; return true; } Where did you set this >>>>>>variable<<<<<<< above?
  17. You are modding for Minecraft 1.7.2, no? Item ids (and block ids) are a no-no. Don't use them for that. Items.itemName and Blocks.blockName are the proper methods to refer to vanilla blocks and items. Also, your recipes are not coded sensibly. You do not need array notation to call a var-args method. GameRegistry.addShapelessRecipe(mushroomStew, new Object[]{bowl, yellowMush, orangeMush}); should be GameRegistry.addShapelessRecipe(mushroomStew, bowl, yellowMush, orangeMush);
  18. Your event method has quite a few references to a nonexistant variable/parameter/property vis-a-vis tileentity. Since you never set that variable, I think you will get NPE's. By the way, variables cannot be saved in items or blocks - except statically. Arguments explained: public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
  19. Then you didn't do the cast in step 4: (ItemArmor)item
  20. 1. Refer to the ItemStack of player with getHeldItem() 2. Use getItem() 3. Check instanceof ItemArmor 4. Cast to ItemArmor and use the armorType property
  21. LTPIJ: Learn to program in Java! You didn't override anything as Diesieben07 told you. Calling a method with some random parameter is just plain wrong. Use you IDE to add the override - then you can get the proper argument types. If you don't know how, then you are going to seriously fail at modding Minecraft. Nothing personal.
  22. One of your main problems is the field tileEntity declared in your BlockWire class. You cannot do that as every wire in the game will share the same tileEntity. That's not what you want and it will cause crashes.
  23. As just about every IInventory handles its own drop event, that may be hard to hook. you'd have to hook every other inventory slot handler in the game. Maybe you can accomplish what you want another way.
  24. Also, in your texture names, remember that the modid portion must be all lower case.
×
×
  • Create New...

Important Information

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