- How can I render separate textures for the sides, top and bottom of a block? (like for TNT)
- I have a class (
CustomTntBlock) that extendsTntBlock, modified to exposeexplosionPowerand handle the use of an accessor for said field behind the scenes. I then have a seperate class (CompressedTntBlock) that extendsCustomTntBlockand runs thesetExplosionPowerfunction to set the power to 10 (the power I've chosen for compressed TNT). The only issue is that theCustomTntBlockis still summoning the builtinTntEntityentity, and thus it is rendered with the default TNT texture and not the same texture as the Compressed TNT block when it is unignited. How can I replace the texture of this entity, and have it extensible so the different classes that extendCustomTntBlockcan each have their own texture for both the block and the entity?
Code for CustomTntBlock and CompressedTntBlock attached below. CustomTntBlockbasically just lets you set a custom explosion power and summons a regular TNT with that power when ignited