Jump to content

Recommended Posts

Posted

I am attempting to add flowing acid to the burning war mod( http:/www.planetminecraft.com/mod/burning-war-mod-forge-15-a/ ). This is a custom liquid which erodes blocks it touches. The erosion part is tested and working, as is the texture, but when  I try to pick up the liquid I get a bucket of water instead. How can I make the bucket pick up my liquid? (I already made my custom bucket, and it properly dumps out the liquid.)

Posted

just go trough the classes and u'll find what you need.

For example, thats in the ItemBucket class file:

 

(it's in onItemRightClick)
if (par2World.getBlockMaterial(i, j, k) == Material.water && par2World.getBlockMetadata(i, j, k) == 0)
                    {
                        par2World.setBlockToAir(i, j, k);

                        if (par3EntityPlayer.capabilities.isCreativeMode)
                        {
                            return par1ItemStack;
                        }

                        if (--par1ItemStack.stackSize <= 0)
                        {
                            return new ItemStack(Item.bucketWater);
                        }

                        if (!par3EntityPlayer.inventory.addItemStackToInventory(new ItemStack(Item.bucketWater)))
                        {
                            par3EntityPlayer.dropPlayerItem(new ItemStack(Item.bucketWater.itemID, 1, 0));
                        }

                        return par1ItemStack;
                    }

 

i believe that's the part when player is rightclicking on wather holding a bucket.

Just customize it a lil bit.. replacing bucketwather with ur own liquid.

 

ps: still don't know if it's like this.... jsut guessin' ^^ im quiet new :P

 

 

Cheers,

-East

Posted

I have a mod that has two liquids, so I know exactly what you need. (I had the same water bucket problem). First, I hope you registered your liquid with forges liquid dictionary.

 

 

  Reveal hidden contents

 

 

I figured this out when I looked at the buildcraft source code. The source codes of other mods really help

 

Posted
  On 4/6/2013 at 2:02 AM, jonathantai9 said:

I have a mod that has two liquids, so I know exactly what you need. (I had the same water bucket problem). First, I hope you registered your liquid with forges liquid dictionary.

 

 

  Reveal hidden contents

 

 

I figured this out when I looked at the buildcraft source code. The source codes of other mods really help

 

Thanks. I looked at buildcraft too. Someone really needs to make a tutorial on this, all the help people ever get is "look at buildcraft". (which is helpful, but not as simple as watching a tutorial.)

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.