Jump to content

Recommended Posts

Posted

I am using an [glow=white,2,300]ISimpleBlockRenderingHandler[/glow].

 

public class RendRobotTier1 implements ISimpleBlockRenderingHandler {

public void render(IBlockAccess world, int x, int y, int z, Block b, int model, RenderBlocks r) {
	b.setBlockBounds(0.15F, 0, 0.15F, 0.85F, 1, 0.85F);
	r.renderStandardBlock(b, x, y, z);
}

@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
	render(world,x,y,z,block,modelId,renderer);
	return true;
}
@Override
public boolean shouldRender3DInInventory() {
	return true;
}
@Override
public int getRenderId() {
	return RobocraftRenderProxy.t1BotRender;
}
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
	// TODO Auto-generated method stub

	//render(null, 0,0,0,block,modelID,renderer);
}
}

 

As you can see, I have commented out the render code for "renderInventoryBlock".

I know that it crashes.  It crashes because of RenderBlocks trying to get light values.

 

So how do I render an item in 3D?

 

I'll give the best answerer a cape.

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.