Jump to content

[1.8] Rendering JSON with TileEntitySpecialRenderer


shucke

Recommended Posts

I need a way to render a block normally but from the TileEntitySpecialRenderer.

I need this because i need to apply a rotation to it.

I currently have this:

private void renderWaterWheel(TileWaterWheel tile, double posX, double posY, double posZ, float partialTick){
	GlStateManager.pushMatrix();

	World world = tile.getWorld();
	IBlockState state = tile.getBlockState();
	BlockPos pos = tile.getPos();

	GlStateManager.rotate(0.0F, 0.0F, 1.0F, tile.rotation);

	IFlexibleBakedModel model = (IFlexibleBakedModel) mc.getBlockRendererDispatcher().getModelFromBlockState(state, world, pos);
	mc.getBlockRendererDispatcher().getBlockModelRenderer().renderModel(world, model, state, pos, Tessellator.getInstance().getWorldRenderer());

	GlStateManager.popMatrix();
}

@Override
public void renderTileEntityAt(TileEntity tile, double posX, double posY, double posZ, float partialTick, int i0) {
	renderWaterWheel((TileWaterWheel) tile, posX, posY, posZ, partialTick);
}

 

But this doesnt work.

Anyone knows how to do it properly?

 

Link to comment
Share on other sites

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.