Posted June 20, 201510 yr 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!
June 20, 201510 yr 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 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.
June 20, 201510 yr Author Ah, that sucks that the vanilla cauldron isn't a tile entity... I assumed it would be. Oh well, I guess implementing my own cauldron isn't that bad. Thanks for the help!
June 20, 201510 yr 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
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.