Jump to content

Chest Rendering invisible


Drai

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.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

The answer is, you are not registering it. You never change newChestEntitiesAdded to true

and even if you did, the chests are never registered when signs are because you are using "else if"

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

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

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.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

Take a break, go for a walk. Then try again. 🙂

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

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

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

note "tile entities" is your name. The game calls them BlockEntityTypes which is not the same as BlockType 

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

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.



×
×
  • Create New...

Important Information

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