neoforged / Documentation

The repository containing Neo's documentation
MIT License
28 stars 53 forks source link

BlockEntityWithoutLevelRenderer rendering block entity in inventory as item #180

Closed CoolerProYT closed 1 week ago

CoolerProYT commented 1 month ago

I am trying to use BlockEntityWithoutLevelRenderer to render my Fluid Tank Block entity when it is inside inventory, but failed, i use

event.registerItem(
    new ModClientItemExtensions(),
    ModBlocks.FLUID_TANK.get().asItem()
);

Nothing is rendering other can default model for it.

ChampionAsh5357 commented 1 month ago

Does your item model have a parent of minecraft:builtin/entity? This is required, or the BakedModel instance for the item must have #isCustomRenderer return true. The code is technically correct, but as there is still an issue, I will keep this open.

CoolerProYT commented 1 month ago

I have updated my item model to

{
  "parent": "minecraft:builtin/entity"
}

But now I am encountering another issue, only the fluid is rendering with BEWLR and the fluid tank texture is not rendering.

ChampionAsh5357 commented 1 month ago

Yes, using a BEWLR on its own will not render an existing block model as well. I'm not sure what you are referring to when you say the fluid tank texture here, however. I would recommend joining the discord and asking for help there as this seems to be more of modder support than a specific issue with the docs, other than the part I've outlined.

CoolerProYT commented 1 month ago

Alright, Thanks.