Jump to content

Modify vanilla cauldron


Naosyth

Recommended Posts

Sorry if a similar question has been asked before. I did some searching around and couldn't find anything.

 

Is it possible for me to modify the vanilla cauldron to hold an item stack when right clicked with it? Specifically, I want to be able to right click a cauldron with leather, then have the leather get rendered floating inside of the cauldron.

 

Is it possible to attach all of this behavior to the vanilla cauldron? Or would I have to make my own cauldron from scratch?

 

Thanks!

Link to comment
Share on other sites

If Cauldron was TileEntity - sure you could then, but cauldron is not TE (sadly for you).

 

Everything cauldron block knows is its 16 states (like any other block). And it cannot hold data.

 

Your 2 options are:

* Impement new Cauldron ("BetterCauldron") that will have its own TileEntity with IInventory.

In this case you can also use BlockEvent.PlaceEvent to detect if block is Cauldron - and if so - replace it with your own :D

Pros: Easier, more compatybile, less buggy?

Cons: You still have vanilla cauldron left.

 

* "Hack" into world and whenever Cauldron is loaded/placed - place TileEntity at its BlockPos.

Utilize Forge events to launch interaction (lookup PlayerEvents - there are interaction events like block-clicking).

Pros: You will simulate TileEntity at Cauldron pos, that will work for all vanilla Cauldrons.

Cons: Will be probably HARD to hack your way into it as vanilla takes good care of badly assigned TileEntities (they are removed).

Might even have to ASM.

 

I'd go with 1st one - much safer!

 

EDIT

As to rendering - you will probably want to use TESR (google).

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Maybe a wierd suggestion, but would it be possible to create a tileEntity on right click? You should have the events(and therefore Coords, world, block etc.)

You can for example replace the vanilla cauldron with your own on (the first) right click.

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

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.