fix dice
|
@ -214,9 +214,6 @@ public abstract class ModelBakery
|
|||
}
|
||||
|
||||
private static final ModelBlock getModel(Item item, ModelProvider provider, String name) {
|
||||
ModelBlock model = (ModelBlock)item.getCustomModel(provider, name);
|
||||
if(model != null)
|
||||
return new ModelBlock(model, item.getCustomPosition());
|
||||
if(item.hasBuiltinModel())
|
||||
return new ModelBlock(MODEL_ENTITY, GuiPosition.NORMAL);
|
||||
Block block = item.getBlock();
|
||||
|
|
|
@ -2,44 +2,33 @@ package client.renderer.entity;
|
|||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import client.Client;
|
||||
import client.renderer.GlState;
|
||||
import client.renderer.model.ModelDie;
|
||||
import client.renderer.texture.TextureMap;
|
||||
import common.entity.projectile.EntityDie;
|
||||
import common.item.projectile.ItemDie;
|
||||
|
||||
public class RenderDie extends Render<EntityDie>
|
||||
{
|
||||
private final ModelDie model = new ModelDie();
|
||||
public class RenderDie extends Render<EntityDie> {
|
||||
private final ModelDie model = new ModelDie();
|
||||
|
||||
public RenderDie(RenderManager renderManagerIn)
|
||||
{
|
||||
super(renderManagerIn);
|
||||
// this.shadowSize = 0.09F;
|
||||
}
|
||||
|
||||
protected String getEntityTexture(EntityDie entity)
|
||||
{
|
||||
return TextureMap.BLOCKS;
|
||||
}
|
||||
|
||||
public void doRender(EntityDie entity, double x, double y, double z, float partialTicks)
|
||||
{
|
||||
// BlockRendererDispatcher blockrendererdispatcher = Game.getClient().getBlockRendererDispatcher();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y + 0.05F, (float)z);
|
||||
this.bindEntityTexture(entity);
|
||||
if(entity.getValue() == 0)
|
||||
public RenderDie(RenderManager renderManagerIn) {
|
||||
super(renderManagerIn);
|
||||
}
|
||||
|
||||
protected String getEntityTexture(EntityDie entity) {
|
||||
return "textures/object/die_d" + ((ItemDie)entity.getItem()).getSides() + ".png";
|
||||
}
|
||||
|
||||
public void doRender(EntityDie entity, double x, double y, double z, float partialTicks) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y + 0.05F, (float)z);
|
||||
this.bindEntityTexture(entity);
|
||||
if(entity.getValue() == 0)
|
||||
GL11.glRotatef((float)((entity.ticksExisted % 10) * (360 / 10)), 0.3f, 0.4f, 0.1f);
|
||||
// GlState.translate(-0.05F, -0.05F, 0.05F);
|
||||
GL11.glScalef(0.5f, 0.5f, 0.5f);
|
||||
Client.CLIENT.getRenderItem().renderItemAsGround(entity.getStack());
|
||||
// blockrendererdispatcher.renderBlockBrightness(Blocks.planks.getDefaultState(), entity.getBrightness(partialTicks));
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
// protected boolean canRenderName(EntityDie entity)
|
||||
// {
|
||||
// return entity.getValue() != 0 || super.canRenderName(entity);
|
||||
// }
|
||||
GL11.glScalef(-0.1f, -0.1f, 0.1f);
|
||||
GlState.disableCull();
|
||||
this.model.render(entity, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
GlState.enableCull();
|
||||
GL11.glPopMatrix();
|
||||
super.doRender(entity, x, y, z, partialTicks);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,27 +1,16 @@
|
|||
package client.renderer.model;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import common.entity.Entity;
|
||||
|
||||
public class ModelDie extends ModelBase
|
||||
{
|
||||
ModelRenderer cube;
|
||||
public class ModelDie extends ModelBase {
|
||||
ModelRenderer cube;
|
||||
|
||||
public ModelDie()
|
||||
{
|
||||
this.cube = new ModelRenderer(this, 0, 0);
|
||||
this.cube.addBox(-8.0F, -8.0F, -8.0F, 16, 16, 16);
|
||||
// this.cube.rotationPointY += (float)(24 - 16);
|
||||
}
|
||||
|
||||
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 0.6F, 0.0F);
|
||||
if(Math.abs(entityIn.motionX) > 0.05 || Math.abs(entityIn.motionY) > 0.05 || Math.abs(entityIn.motionZ) > 0.05)
|
||||
GL11.glRotatef((float)((entityIn.ticksExisted % 20) * (360 / 20)), 0.3f, 0.4f, 0.1f);
|
||||
this.cube.render(scale);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
public ModelDie() {
|
||||
this.cube = new ModelRenderer(this, 0, 0);
|
||||
this.cube.addBox(-8.0F, -8.0F, -8.0F, 16, 16, 16);
|
||||
}
|
||||
|
||||
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale) {
|
||||
this.cube.render(scale);
|
||||
}
|
||||
}
|
||||
|
|
BIN
client/src/main/resources/textures/items/die_10.png
Executable file
After Width: | Height: | Size: 5 KiB |
BIN
client/src/main/resources/textures/items/die_12.png
Executable file
After Width: | Height: | Size: 4.9 KiB |
BIN
client/src/main/resources/textures/items/die_20.png
Executable file
After Width: | Height: | Size: 5.1 KiB |
BIN
client/src/main/resources/textures/items/die_4.png
Executable file
After Width: | Height: | Size: 4.9 KiB |
BIN
client/src/main/resources/textures/items/die_6.png
Executable file
After Width: | Height: | Size: 4.8 KiB |
BIN
client/src/main/resources/textures/items/die_8.png
Executable file
After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB |
BIN
client/src/main/resources/textures/object/die_d10.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
client/src/main/resources/textures/object/die_d12.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
client/src/main/resources/textures/object/die_d20.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
client/src/main/resources/textures/object/die_d4.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
client/src/main/resources/textures/object/die_d6.png
Normal file
After Width: | Height: | Size: 6 KiB |
BIN
client/src/main/resources/textures/object/die_d8.png
Normal file
After Width: | Height: | Size: 6.4 KiB |