Jump to content

[Solved] [1.7.10] Mod Bucket "tryPlaceContainedLiquid" Crash.


TheDoomBringer

Recommended Posts

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!

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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