Jump to content

[1.8] How to have a custom chest render correctly in inventory?


Recommended Posts

Posted

Hello everyone,

 

I've made a custom chest that extends BlockChest, and the TileEntitySpecialRenderer for it. I used the vanilla "chest.json" for my item texture model, but in-game, it still shows up as a regular chest in my inventory, even though when I place it down, it renders correctly. What should I change in the file to make it show up correctly?

 

My chest's class:

https://github.com/Geforce132/SecurityCraft/blob/master/1.8/src/main/java/org/freeforums/geforce/securitycraft/blocks/BlockKeypadChest.java

 

My TileEntitySpecialRenderer class:

https://github.com/Geforce132/SecurityCraft/blob/master/1.8/src/main/java/org/freeforums/geforce/securitycraft/tileentity/TileEntityKeypadChestRenderer.java

 

Thanks for reading!

~Geforce

Potato's have skin. I have skin. Therefore, i am a potato.

 

Follow me on Twitter!

http://www.twitter.com/I_Mod_Minecraft

Posted

Hi

 

You are extending BlockChest which uses a custom render type hardwired for drawing a normal chest when it's being rendered as an item.  The best way for you is probably to use an ISimpleBlockRenderingHandler, last time I checked (quite a while ago admittedly) there are a few tutorials around.  It has two render methods - one for rendering as an item, and one for the block render when placed (the TileEntitySpecialRenderer is also called in addition to the ISBRH block render method).

 

An IItemRenderer is also possible, just a bit more complicated.  It is used for the "item" views only, not when placed.  Some more info here under the Item Rendering sections

http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html

 

-TGG

Posted

Both of those are gone in 1.8. What I did is make an ordinary item json and copy the shape of a chest, but I think the IronChest mod has gotten it to work.

Check out my mod, Realms of Chaos, here.

 

If I helped you, be sure to press the "Thank You" button!

Posted

Both of those are gone in 1.8. What I did is make an ordinary item json and copy the shape of a chest, but I think the IronChest mod has gotten it to work.

ah yeah, next time I should better read the title huh.

 

Still working on figuring out 1.8 rendering myself, no help from me sorry.

 

-TGG

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I tried do download the essential mod to my mod pack but i didnt work. I paly on 1.21 and it should work. I use neoforge for my modding. The weird things is my friend somehow added the mod to his modpack and many others that I somehow can´t. Is there anything i can do? 
    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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