I have a block that renders with a TESR. The problem is that part of the render is very large (shaped like a sideways beacon beam that ends after a certain distance), and I want that part of the TESR to still render when the block itself is offscreen. Which method do I have to override to make this possible?
Looking at the beacon, it seems you need to override TileEntity#getMaxRenderDistanceSquared to return a much larger value and override TileEntitySpecialRenderer#isGlobalRenderer to return true.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I should have mentioned that I already tried those two things with no success. The length of the beam my TESR has is never longer than the default renderDistanceSquared value (the TESR is capped at 16 blocks, the method returns 64^2 by default) and override isGlobalRenderer didn't seem to have any noticeable effect other than causing beacon beams to become a solid color when my block is being rendered (this effect doesn't happen when it returns false and my block is being rendered).
You also need to override TileEntity#getRenderBoundingBox to return TileEntity.INFINITE_EXTENT_AABB like the base method does for Blocks.BEACON.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I have a block that renders with a TESR. The problem is that part of the render is very large (shaped like a sideways beacon beam that ends after a certain distance), and I want that part of the TESR to still render when the block itself is offscreen. Which method do I have to override to make this possible?
Looking at the beacon, it seems you need to override TileEntity#getMaxRenderDistanceSquared to return a much larger value and override TileEntitySpecialRenderer#isGlobalRenderer to return true.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I should have mentioned that I already tried those two things with no success. The length of the beam my TESR has is never longer than the default renderDistanceSquared value (the TESR is capped at 16 blocks, the method returns 64^2 by default) and override isGlobalRenderer didn't seem to have any noticeable effect other than causing beacon beams to become a solid color when my block is being rendered (this effect doesn't happen when it returns false and my block is being rendered).
You also need to override TileEntity#getRenderBoundingBox to return TileEntity.INFINITE_EXTENT_AABB like the base method does for Blocks.BEACON.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Thank you, that seems to have worked. It also seems that overriding TileEntity#getMaxRenderDistanceSquared [/i]isn't necessary in this case.