Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Chest Rendering invisible


Drai
 Share

Recommended Posts

Hello, I am trying to add a new chest entity but my chests are invisible. Does anyone know why that might be? I would really appreciate any help that I can get. 

GitHub: https://github.com/StijnArts/All-The-Wood

Link to comment
Share on other sites

Either add this to your ATWChestBlock and define a model for it


   public RenderShape getRenderShape(BlockState p_49232_) {
      return RenderShape.Model;
   }

Or you need to create and register a BlockEntityRenderer for it.

See net.minecraft.client.renderer.blockentity.ChestRenderer for the vanilla one.

Link to comment
Share on other sites

So the invalid entity error persists:
 

[16:19:32] [Render thread/WARN] [minecraft/TileEntity]: Block entity invalid: minecraft:dark_oak_chest @ BlockPos{x=131, y=4, z=166}
[16:19:32] [Server thread/WARN] [minecraft/TileEntity]: Block entity invalid: minecraft:dark_oak_chest @ BlockPos{x=131, y=4, z=166}

The material that is registered last has the chest generated last and for some reason the chest entity id for every chest is set to the block that was last generated. Im suspecting theres a static value somewhere but I cant find it. Does anyone know where I could look?

Link to comment
Share on other sites

This isn't a forge question. Its a can you fix my java program question.

You only ever register one chest BlockEntityRenderer in that code. It references the static singleton TileEntities.CHEST_TILE_ENTITIES.

Link to comment
Share on other sites

Where did you see that?

Sorry if I am being a bother, it's just that I have been staring at this mod for a long time and I'm probably looking over a lot of things

Link to comment
Share on other sites

Posted (edited)

Here is your renderer registration, it is not in a loop.

https://github.com/StijnArts/All-The-Wood/blob/85e92326aa52affba3c91ef5a81f7ff87e1e20cc/src/main/java/Net/Drai/AllTheWood/AllTheWood.java#L126

It references this singleton

https://github.com/StijnArts/All-The-Wood/blob/85e92326aa52affba3c91ef5a81f7ff87e1e20cc/src/main/java/Net/Drai/AllTheWood/modules/TileEntities.java#L14

What it should be using I don't know. You have two fields for TILE_ENTITIES here:

https://github.com/StijnArts/All-The-Wood/blob/85e92326aa52affba3c91ef5a81f7ff87e1e20cc/src/main/java/Net/Drai/AllTheWood/modules/SimpleModule.java#L17

One is a static registry, the other is per module but it is of type List<BlockTypes>. Your code looks very confused.

Edited by warjort
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
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.

 Share



×
×
  • Create New...

Important Information

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