Posted February 28, 201510 yr Hi, so first off, the crash log. http://pastebin.com/FpvuqtU9 Now, I've made the item for the bucket, but it crashes. Here is my init: public class ModItems { public static Item honeyBucket = new ItemHoneyBucket(); public static void init() { //ITEMS GameRegistry.registerItem(honeyComb, "honeyComb"); GameRegistry.registerItem(honeyBucket, "honeyBucket"); //Fluid Container FluidContainerRegistry.registerFluidContainer(ModBlocks.liquidHoney, new ItemStack(honeyBucket), new ItemStack(Items.bucket)); } } And here is my item class: public class ItemHoneyBucket extends ItemBucket { public ItemHoneyBucket() { super(ModBlocks.liquid_honey); this.setContainerItem(Items.bucket); this.setUnlocalizedName("honeyBucket"); this.setCreativeTab(CreativeTabBL.BL_TAB); this.maxStackSize = 1; this.setTextureName("honeyBucket"); } } As soon as I use the bucket to place the liquid in the world it crashes. The only thing I can figure is that I did something wrong with the FluidContainerRegistry. Thanks for any help!
March 1, 201510 yr Author Alright. Thanks for your reply! Although how would I make sure my block was created before the item? Also, how would I create the item without a static init? Because can't init not be referenced from a non static context?
March 1, 201510 yr 1. static init() is fine, you need not change it. 2. Don't create[declare] your bucket item with the (static) definition, because it has to be created after your block is created! So Just do declaration on your init() method, so honeyBucket = new ItemHoneyBucket() would be there. .. It is basic java.. I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
March 1, 201510 yr Author Awesome! Thanks Abastro! Sorry... Yeah it is basic Java, I'm still learning. Again! Thanks!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.