Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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...

Try using this methode  ;)

 

public void renderTileEntityAt(TileEntity te, double x, double y, double z, float f, int q) {
     // ---- >code here
}

  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.

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) {}

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.