Jump to content

Recommended Posts

Posted

As title..I've worked with TESR on 1.7.10 and while in the process of porting to 1.8 I had to rely on it once more...the problem is, something's not right! Here's my code:

 

 

public class TileFountainRenderer extends TileEntitySpecialRenderer {

 

  private static final ResourceLocation TEX = new ResourceLocation(Knowledge.MODID + ":textures/blocks/tk_misc.qs_cons");

  private static final ModelFountain model = new ModelFountain();

 

  @Override

  public void renderTileEntityAt(TileEntity te, double x, double z, double y, float f, int q) {

 

    TileFountain t = (te instanceof TileFountain) ? (TileFountain)te : null;

 

    GlStateManager.pushMatrix();

    GlStateManager.translate(x, y, z);

    renderModel(t, t.getWorld, t.getPos.getX, t.getPos.getY, t.getPos.getZ, TKBlocks.fountain);

    GlStateManager.popMatrix();

 

  }

 

 

  private void renderModel(TileFountain te, World world, int x, int y, int z, Block b) {

 

 

 

    Minecraft.getMinecraft.renderEngine.bindTexture(TEX);

    model.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);

 

 

 

 

  }

 

}

 

 

And here is what's happening...the model follows the player instead of sticking to the TE's coords!

Ignore the black and purple texture, I just haven't finished the texturemap yet. But why is this happening?

 

  • 1 month later...
Posted

  GlStateManager.translate(x, y, z);
    renderModel(t, t.getWorld, t.getPos.getX, t.getPos.getY, t.getPos.getZ, TKBlocks.fountain);

Why are you translating if you've got the location sent to your draw method...?

I think its my java of the variables.

Posted

The problem is in the renderTileEntityAt Methode Parameters they got switched in the 1.8

public void renderTileEntityAt(TileEntity te, double x, [glow=red,2,300]double y[/glow], [glow=red,2,300]double z[/glow], float f, int q) {}

Posted

The problem is in the renderTileEntityAt Methode Parameters they got switched in the 1.8

public void renderTileEntityAt(TileEntity te, double x, [glow=red,2,300]double y[/glow], [glow=red,2,300]double z[/glow], float f, int q) {}

No, they were always in the same order (x,y,z), he just named them wrong...

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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