Jump to content

Recommended Posts

Posted

When rendering my tile entity, the model renders incorrectly. The model renders in the right block on the first place, but every time I place it after that, the model keeps rendering in the first position. The model itself doesn't render properly either.

 

WoodenBaseTileEntityRenderer.java:

package com.aimod.tileEntities;

import org.lwjgl.opengl.GL11;
import com.aimod.Main;
import com.aimod.models.WoodenBaseModel;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;

public class WoodenBaseTileEntityRenderer extends TileEntitySpecialRenderer {

private WoodenBaseModel model;
private ResourceLocation texture = new ResourceLocation("aimod:textures/blocks/WoodenBase.png");

public WoodenBaseTileEntityRenderer() {
	model = new WoodenBaseModel();
}

@Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float scale) {
	GL11.glPushMatrix();
	GL11.glTranslated(x+0.5, y+1.5, z+0.5);
	GL11.glRotated(0, 0, 0, 1);
	this.bindTexture(texture);
	this.model.render(null, 0, -0.1f, 0, 0, 0, -0.0625f);
	GL11.glPopMatrix();
}
}

Posted

I probably should have said this in my first post, but the block will need to have a GUI and storage. I'm using 1.7.10, which I also should have said. I'm absent-minded. Since it needs storage, wouldn't it need to be a tile entity?

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.