Jump to content

Wunst

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Wunst

  1. Okay, it works now, I changed the code to:

    public class TESRCultistSpawn extends TileEntitySpecialRenderer<TileEntityCultistSpawn> {
        EntityCultist entity;
        
        @Override
        public void render(TileEntityCultistSpawn te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
            if(entity == null) {
                entity = new EntityCultist(te.getWorld());
            }
            GlStateManager.pushMatrix();
            GlStateManager.translate(0, 0, 0);
            Minecraft.getMinecraft().getRenderManager().renderEntity(entity, x + 0.5, y, z + 0.5, 180.0f, partialTicks, true);
            GlStateManager.popMatrix();
        }
    }

     

  2. Hi all,

    I coded a Tile Entity that spawns a mob with a TESR that shows the entity's model, but as soon as the TE is on screen, all other TESRs like chests move to the right and forth while their blocks stay at the same spot.

    Here's the renderer:

    public class TESRCultistSpawn extends TileEntitySpecialRenderer<TileEntityCultistSpawn> {
        @Override
        public void render(TileEntityCultistSpawn te, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
            
            GlStateManager.translate(0.5, 0, 0.5);
            EntityCultist entity = new EntityCultist(te.getWorld());
            entity.rotationYaw = 45;
            Minecraft.getMinecraft().getRenderManager().renderEntity(entity, x, y, z, 180.0f, partialTicks, true);
        }
    }

    And what happens is attached as PNG. Compare the chest model and the block outline!

    2019-06-10_09.52.31.png

×
×
  • Create New...

Important Information

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