Posted May 8, 20205 yr public class UnderInstrumentsConstructionTileEntity extends ModTileEntity { public static TileEntityType<UnderInstrumentsConstructionTileEntity> TYPE; public BlockState state; public UnderInstrumentsConstructionTileEntity(TileEntityType<?> tileEntityTypeIn) { super(TYPE); } @Override public CompoundNBT writeData(CompoundNBT nbt) { // TODO Auto-generated method stub return null; } @Override public void readData(CompoundNBT nbt) { // TODO Auto-generated method stub } class ThisTER extends TileEntityRenderer<UnderInstrumentsConstructionTileEntity> { public ThisTER(TileEntityRendererDispatcher p_i226006_1_) { super(p_i226006_1_); } @Override public void func_225616_a_(UnderInstrumentsConstructionTileEntity te, float f, MatrixStack matrix, IRenderTypeBuffer buf, int i, int i2) { Minecraft.getInstance().getBlockRendererDispatcher().renderBlock(te.state, matrix, buf, i, OverlayTexture.field_229196_a_, EmptyModelData.INSTANCE); // TODO: Find right 4th param } } } I want to create a block that will store information about another block needed to render it(e.g. this block will store block state of a fence block and then using this block state to render right model of fence). Also I want the block to be layered with some texture. Writing above code I was stuck finding a way to render the texture(I haven't written static field storing it yet) and make it wrap around cube in the world. I thing that using TER in this case probably isn't the right way and I should do something with my own implementation of IBakedModel.
May 8, 20205 yr Hi You might get some clues from this project - it uses a 'camouflage cube' which copies the model + textures from adjacent blocks. https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe04_block_dynamic_block_models -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.