mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-17 11:15:07 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
a314fccd1b
commit
8f026dad8f
161 files changed
+14073
-12846
No files matched your search
@@ -1,9 +1,9 @@
|
||||
package team.chisel.client.render.tile;
|
||||
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.block.tileentity.TileEntityAutoChisel;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
@@ -24,169 +24,187 @@ import net.minecraftforge.client.model.obj.GroupObject;
|
||||
import net.minecraftforge.client.model.obj.TextureCoordinate;
|
||||
import net.minecraftforge.client.model.obj.Vertex;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
|
||||
import team.chisel.Chisel;
|
||||
import team.chisel.block.tileentity.TileEntityAutoChisel;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
||||
public class RenderAutoChisel extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler, IItemRenderer {
|
||||
|
||||
private static final WavefrontObject model = new WavefrontObject(new ResourceLocation(Chisel.MOD_ID, "models/autoChisel/autoChisel.obj"));
|
||||
private static final ResourceLocation texture = new ResourceLocation(Chisel.MOD_ID, "textures/blocks/autoChisel/autoChisel.png");
|
||||
private static final WavefrontObject model = new WavefrontObject(
|
||||
new ResourceLocation(Chisel.MOD_ID, "models/autoChisel/autoChisel.obj"));
|
||||
private static final ResourceLocation texture = new ResourceLocation(
|
||||
Chisel.MOD_ID,
|
||||
"textures/blocks/autoChisel/autoChisel.png");
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return helper == ItemRendererHelper.INVENTORY_BLOCK || helper == ItemRendererHelper.ENTITY_BOBBING || helper == ItemRendererHelper.ENTITY_ROTATION;
|
||||
}
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return helper == ItemRendererHelper.INVENTORY_BLOCK || helper == ItemRendererHelper.ENTITY_BOBBING
|
||||
|| helper == ItemRendererHelper.ENTITY_ROTATION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
glTranslatef(-0.5f, 0, 0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
glRotatef(20, 0, 1, 0);
|
||||
glRotatef(-15, 1, 0, -1);
|
||||
glScalef(0.65f, 0.65f, 0.65f);
|
||||
glTranslatef(0.75f, -0.5f, 1.25f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
glRotatef(20, 0, 0, 1);
|
||||
glRotatef(30, 0, 1, 0);
|
||||
glTranslatef(0.2f, 0, -0.1f);
|
||||
glScalef(0.5f, 0.5f, 0.5f);
|
||||
break;
|
||||
case FIRST_PERSON_MAP:
|
||||
break;
|
||||
case INVENTORY:
|
||||
glTranslatef(-0.5f, -0.5f, 0.5f);
|
||||
break;
|
||||
}
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
glTranslatef(-0.5f, 0, 0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
glRotatef(20, 0, 1, 0);
|
||||
glRotatef(-15, 1, 0, -1);
|
||||
glScalef(0.65f, 0.65f, 0.65f);
|
||||
glTranslatef(0.75f, -0.5f, 1.25f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
glRotatef(20, 0, 0, 1);
|
||||
glRotatef(30, 0, 1, 0);
|
||||
glTranslatef(0.2f, 0, -0.1f);
|
||||
glScalef(0.5f, 0.5f, 0.5f);
|
||||
break;
|
||||
case FIRST_PERSON_MAP:
|
||||
break;
|
||||
case INVENTORY:
|
||||
glTranslatef(-0.5f, -0.5f, 0.5f);
|
||||
break;
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
model.renderAll();
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
model.renderAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
;
|
||||
}
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||
Tessellator tes = Tessellator.instance;
|
||||
IIcon icon = renderer.hasOverrideBlockTexture() ? renderer.overrideBlockTexture : block.getIcon(0, 0);
|
||||
tes.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
|
||||
tes.setColorOpaque_F(1, 1, 1);
|
||||
tes.addTranslation(x, y, z + 1);
|
||||
for (GroupObject go : model.groupObjects) {
|
||||
for (Face f : go.faces) {
|
||||
Vertex n = f.faceNormal;
|
||||
tes.setNormal(n.x, n.y, n.z);
|
||||
for (int i = 0; i < f.vertices.length; i++) {
|
||||
Vertex vert = f.vertices[i];
|
||||
TextureCoordinate t = f.textureCoordinates[i];
|
||||
if (!renderer.hasOverrideBlockTexture()) {
|
||||
tes.addVertexWithUV(vert.x, vert.y, vert.z, icon.getInterpolatedU(t.u * 16), icon.getInterpolatedV(t.v * 16));
|
||||
} else {
|
||||
tes.addVertexWithUV(vert.x, vert.y, vert.z, icon.getInterpolatedU((t.u * 64) % 16), icon.getInterpolatedV((t.v * 64) % 16));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tes.addTranslation(-x, -y, -z - 1);
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
Tessellator tes = Tessellator.instance;
|
||||
IIcon icon = renderer.hasOverrideBlockTexture() ? renderer.overrideBlockTexture : block.getIcon(0, 0);
|
||||
tes.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
|
||||
tes.setColorOpaque_F(1, 1, 1);
|
||||
tes.addTranslation(x, y, z + 1);
|
||||
for (GroupObject go : model.groupObjects) {
|
||||
for (Face f : go.faces) {
|
||||
Vertex n = f.faceNormal;
|
||||
tes.setNormal(n.x, n.y, n.z);
|
||||
for (int i = 0; i < f.vertices.length; i++) {
|
||||
Vertex vert = f.vertices[i];
|
||||
TextureCoordinate t = f.textureCoordinates[i];
|
||||
if (!renderer.hasOverrideBlockTexture()) {
|
||||
tes.addVertexWithUV(
|
||||
vert.x,
|
||||
vert.y,
|
||||
vert.z,
|
||||
icon.getInterpolatedU(t.u * 16),
|
||||
icon.getInterpolatedV(t.v * 16));
|
||||
} else {
|
||||
tes.addVertexWithUV(
|
||||
vert.x,
|
||||
vert.y,
|
||||
vert.z,
|
||||
icon.getInterpolatedU((t.u * 64) % 16),
|
||||
icon.getInterpolatedV((t.v * 64) % 16));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tes.addTranslation(-x, -y, -z - 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return Chisel.renderAutoChiselId;
|
||||
}
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return Chisel.renderAutoChiselId;
|
||||
}
|
||||
|
||||
private final RenderItem renderItem;
|
||||
private final RenderItem renderItem;
|
||||
|
||||
public RenderAutoChisel() {
|
||||
Chisel.renderAutoChiselId = RenderingRegistry.getNextAvailableRenderId();
|
||||
public RenderAutoChisel() {
|
||||
Chisel.renderAutoChiselId = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
renderItem = new RenderItem() {
|
||||
renderItem = new RenderItem() {
|
||||
|
||||
@Override
|
||||
public boolean shouldBob() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
renderItem.setRenderManager(RenderManager.instance);
|
||||
}
|
||||
@Override
|
||||
public boolean shouldBob() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
renderItem.setRenderManager(RenderManager.instance);
|
||||
}
|
||||
|
||||
private static final Random rand = new Random();
|
||||
private static final Random rand = new Random();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float scale) {
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float scale) {
|
||||
|
||||
// Render Blocks
|
||||
TileEntityAutoChisel autoChisel = (TileEntityAutoChisel) tile;
|
||||
EntityItem item = autoChisel.getItemForRendering(TileEntityAutoChisel.TARGET);
|
||||
// Render Blocks
|
||||
TileEntityAutoChisel autoChisel = (TileEntityAutoChisel) tile;
|
||||
EntityItem item = autoChisel.getItemForRendering(TileEntityAutoChisel.TARGET);
|
||||
|
||||
rand.setSeed(tile.xCoord + tile.yCoord + tile.zCoord);
|
||||
rand.nextBoolean();
|
||||
rand.setSeed(tile.xCoord + tile.yCoord + tile.zCoord);
|
||||
rand.nextBoolean();
|
||||
|
||||
float max = 0.35f;
|
||||
float max = 0.35f;
|
||||
|
||||
if (!Minecraft.getMinecraft().isGamePaused()) {
|
||||
autoChisel.xRot += (rand.nextFloat() * max) - (max / 2);
|
||||
autoChisel.yRot += (rand.nextFloat() * max) - (max / 2);
|
||||
autoChisel.zRot += (rand.nextFloat() * max) - (max / 2);
|
||||
}
|
||||
if (!Minecraft.getMinecraft().isGamePaused()) {
|
||||
autoChisel.xRot += (rand.nextFloat() * max) - (max / 2);
|
||||
autoChisel.yRot += (rand.nextFloat() * max) - (max / 2);
|
||||
autoChisel.zRot += (rand.nextFloat() * max) - (max / 2);
|
||||
}
|
||||
|
||||
if (item != null) {
|
||||
glPushMatrix();
|
||||
glPushAttrib(GL_ALL_ATTRIB_BITS);
|
||||
glTranslated(x + 0.5, y + 1.5, z + 0.5);
|
||||
glRotatef(autoChisel.xRot, 1, 0, 0);
|
||||
glRotatef(autoChisel.yRot, 0, 1, 0);
|
||||
glRotatef(autoChisel.zRot, 0, 0, 1);
|
||||
glEnable(GL_BLEND);
|
||||
glDepthMask(false);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA);
|
||||
renderItem.doRender(item, 0, 0, 0, 0, 0);
|
||||
glPopMatrix();
|
||||
glPopAttrib();
|
||||
}
|
||||
if (item != null) {
|
||||
glPushMatrix();
|
||||
glPushAttrib(GL_ALL_ATTRIB_BITS);
|
||||
glTranslated(x + 0.5, y + 1.5, z + 0.5);
|
||||
glRotatef(autoChisel.xRot, 1, 0, 0);
|
||||
glRotatef(autoChisel.yRot, 0, 1, 0);
|
||||
glRotatef(autoChisel.zRot, 0, 0, 1);
|
||||
glEnable(GL_BLEND);
|
||||
glDepthMask(false);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA);
|
||||
renderItem.doRender(item, 0, 0, 0, 0, 0);
|
||||
glPopMatrix();
|
||||
glPopAttrib();
|
||||
}
|
||||
|
||||
item = autoChisel.getItemForRendering(TileEntityAutoChisel.BASE);
|
||||
if (item != null) {
|
||||
glPushMatrix();
|
||||
glTranslated(x + 0.35, y + 0.934, z + 0.5);
|
||||
item.getEntityItem().stackSize = autoChisel.getLastBase() == null ? 1 : autoChisel.getLastBase().stackSize;
|
||||
renderItem.doRender(item, 0, 0, 0, 0, 0);
|
||||
glPopMatrix();
|
||||
}
|
||||
item = autoChisel.getItemForRendering(TileEntityAutoChisel.BASE);
|
||||
if (item != null) {
|
||||
glPushMatrix();
|
||||
glTranslated(x + 0.35, y + 0.934, z + 0.5);
|
||||
item.getEntityItem().stackSize = autoChisel.getLastBase() == null ? 1 : autoChisel.getLastBase().stackSize;
|
||||
renderItem.doRender(item, 0, 0, 0, 0, 0);
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
GameSettings settings = Minecraft.getMinecraft().gameSettings;
|
||||
item = autoChisel.getItemForRendering(TileEntityAutoChisel.CHISEL);
|
||||
if (item != null) {
|
||||
glPushMatrix();
|
||||
glTranslated(x + 0.7, y + 1.01, z + 0.5);
|
||||
float rot = autoChisel.chiselRot == 0 ? 0 : autoChisel.chiseling ? autoChisel.chiselRot + (TileEntityAutoChisel.rotAmnt * scale) : autoChisel.chiselRot
|
||||
- (TileEntityAutoChisel.rotAmnt * scale);
|
||||
glRotatef(rot, 0, 0, 1);
|
||||
glTranslated(-0.12, 0, 0);
|
||||
glScalef(0.9f, 0.9f, 0.9f);
|
||||
boolean was = settings.fancyGraphics;
|
||||
settings.fancyGraphics = true;
|
||||
renderItem.doRender(item, 0, 0, 0, 0, 0);
|
||||
settings.fancyGraphics = was;
|
||||
glPopMatrix();
|
||||
}
|
||||
}
|
||||
GameSettings settings = Minecraft.getMinecraft().gameSettings;
|
||||
item = autoChisel.getItemForRendering(TileEntityAutoChisel.CHISEL);
|
||||
if (item != null) {
|
||||
glPushMatrix();
|
||||
glTranslated(x + 0.7, y + 1.01, z + 0.5);
|
||||
float rot = autoChisel.chiselRot == 0 ? 0
|
||||
: autoChisel.chiseling ? autoChisel.chiselRot + (TileEntityAutoChisel.rotAmnt * scale)
|
||||
: autoChisel.chiselRot - (TileEntityAutoChisel.rotAmnt * scale);
|
||||
glRotatef(rot, 0, 0, 1);
|
||||
glTranslated(-0.12, 0, 0);
|
||||
glScalef(0.9f, 0.9f, 0.9f);
|
||||
boolean was = settings.fancyGraphics;
|
||||
settings.fancyGraphics = true;
|
||||
renderItem.doRender(item, 0, 0, 0, 0, 0);
|
||||
settings.fancyGraphics = was;
|
||||
glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,162 +24,163 @@ import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class RenderCarvableBeacon extends TileEntityBeaconRenderer implements ISimpleBlockRenderingHandler {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("textures/entity/beacon_beam.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation("textures/entity/beacon_beam.png");
|
||||
|
||||
private int renderId;
|
||||
private int renderId;
|
||||
|
||||
public RenderCarvableBeacon() {
|
||||
this.renderId = RenderingRegistry.getNextAvailableRenderId();
|
||||
}
|
||||
public RenderCarvableBeacon() {
|
||||
this.renderId = RenderingRegistry.getNextAvailableRenderId();
|
||||
}
|
||||
|
||||
public void renderTileEntityAt(TileEntityCarvableBeacon beacon, double x, double y, double z, float partialTicks) {
|
||||
float f1 = beacon.func_146002_i();
|
||||
if (f1 > 0.1F) {
|
||||
renderBeam(f1, beacon.getWorldObj(), x, y, z, beacon.getBlockMetadata(), partialTicks);
|
||||
}
|
||||
}
|
||||
|
||||
private void renderBeam(float f1, World world, double x, double y, double z, int meta, float partialTicks) {
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
Color color;
|
||||
if (meta < 15) {
|
||||
color = new Color(ItemDye.field_150922_c[meta]);
|
||||
} else {
|
||||
float hue = ((float) world.getTotalWorldTime() % 256) / 256;
|
||||
color = new Color(Color.HSBtoRGB(hue + (partialTicks / 256), 1, 1));
|
||||
}
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
this.bindTexture(texture);
|
||||
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F);
|
||||
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(true);
|
||||
OpenGlHelper.glBlendFunc(770, 1, 1, 0);
|
||||
float f2 = world.getTotalWorldTime() + partialTicks;
|
||||
float f3 = -f2 * 0.2F - MathHelper.floor_float(-f2 * 0.1F);
|
||||
byte b0 = 1;
|
||||
double d3 = f2 * 0.025D * (1.0D - (b0 & 1) * 2.5D);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(color.getRed(), color.getGreen(), color.getBlue(), 32);
|
||||
double d5 = b0 * 0.2D;
|
||||
double d7 = 0.5D + Math.cos(d3 + 2.356194490192345D) * d5;
|
||||
double d9 = 0.5D + Math.sin(d3 + 2.356194490192345D) * d5;
|
||||
double d11 = 0.5D + Math.cos(d3 + (Math.PI / 4D)) * d5;
|
||||
double d13 = 0.5D + Math.sin(d3 + (Math.PI / 4D)) * d5;
|
||||
double d15 = 0.5D + Math.cos(d3 + 3.9269908169872414D) * d5;
|
||||
double d17 = 0.5D + Math.sin(d3 + 3.9269908169872414D) * d5;
|
||||
double d19 = 0.5D + Math.cos(d3 + 5.497787143782138D) * d5;
|
||||
double d21 = 0.5D + Math.sin(d3 + 5.497787143782138D) * d5;
|
||||
double d23 = 256.0F * f1;
|
||||
double d25 = 0.0D;
|
||||
double d27 = 1.0D;
|
||||
double d28 = -1.0F + f3;
|
||||
double d29 = 256.0F * f1 * (0.5D / d5) + d28;
|
||||
tessellator.addVertexWithUV(x + d7, y + d23, z + d9, d27, d29);
|
||||
tessellator.addVertexWithUV(x + d7, y, z + d9, d27, d28);
|
||||
tessellator.addVertexWithUV(x + d11, y, z + d13, d25, d28);
|
||||
tessellator.addVertexWithUV(x + d11, y + d23, z + d13, d25, d29);
|
||||
tessellator.addVertexWithUV(x + d19, y + d23, z + d21, d27, d29);
|
||||
tessellator.addVertexWithUV(x + d19, y, z + d21, d27, d28);
|
||||
tessellator.addVertexWithUV(x + d15, y, z + d17, d25, d28);
|
||||
tessellator.addVertexWithUV(x + d15, y + d23, z + d17, d25, d29);
|
||||
tessellator.addVertexWithUV(x + d11, y + d23, z + d13, d27, d29);
|
||||
tessellator.addVertexWithUV(x + d11, y, z + d13, d27, d28);
|
||||
tessellator.addVertexWithUV(x + d19, y, z + d21, d25, d28);
|
||||
tessellator.addVertexWithUV(x + d19, y + d23, z + d21, d25, d29);
|
||||
tessellator.addVertexWithUV(x + d15, y + d23, z + d17, d27, d29);
|
||||
tessellator.addVertexWithUV(x + d15, y, z + d17, d27, d28);
|
||||
tessellator.addVertexWithUV(x + d7, y, z + d9, d25, d28);
|
||||
tessellator.addVertexWithUV(x + d7, y + d23, z + d9, d25, d29);
|
||||
tessellator.draw();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glDepthMask(false);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(color.getRed(), color.getGreen(), color.getBlue(), 32);
|
||||
double d30 = 0.2D;
|
||||
double d4 = 0.2D;
|
||||
double d6 = 0.8D;
|
||||
double d8 = 0.2D;
|
||||
double d10 = 0.2D;
|
||||
double d12 = 0.8D;
|
||||
double d14 = 0.8D;
|
||||
double d16 = 0.8D;
|
||||
double d18 = 256.0F * f1;
|
||||
double d20 = 0.0D;
|
||||
double d22 = 1.0D;
|
||||
double d24 = -1.0F + f3;
|
||||
double d26 = 256.0F * f1 + d24;
|
||||
tessellator.addVertexWithUV(x + d30, y + d18, z + d4, d22, d26);
|
||||
tessellator.addVertexWithUV(x + d30, y, z + d4, d22, d24);
|
||||
tessellator.addVertexWithUV(x + d6, y, z + d8, d20, d24);
|
||||
tessellator.addVertexWithUV(x + d6, y + d18, z + d8, d20, d26);
|
||||
tessellator.addVertexWithUV(x + d14, y + d18, z + d16, d22, d26);
|
||||
tessellator.addVertexWithUV(x + d14, y, z + d16, d22, d24);
|
||||
tessellator.addVertexWithUV(x + d10, y, z + d12, d20, d24);
|
||||
tessellator.addVertexWithUV(x + d10, y + d18, z + d12, d20, d26);
|
||||
tessellator.addVertexWithUV(x + d6, y + d18, z + d8, d22, d26);
|
||||
tessellator.addVertexWithUV(x + d6, y, z + d8, d22, d24);
|
||||
tessellator.addVertexWithUV(x + d14, y, z + d16, d20, d24);
|
||||
tessellator.addVertexWithUV(x + d14, y + d18, z + d16, d20, d26);
|
||||
tessellator.addVertexWithUV(x + d10, y + d18, z + d12, d22, d26);
|
||||
tessellator.addVertexWithUV(x + d10, y, z + d12, d22, d24);
|
||||
tessellator.addVertexWithUV(x + d30, y, z + d4, d20, d24);
|
||||
tessellator.addVertexWithUV(x + d30, y + d18, z + d4, d20, d26);
|
||||
tessellator.draw();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDepthMask(true);
|
||||
}
|
||||
public void renderTileEntityAt(TileEntityCarvableBeacon beacon, double x, double y, double z, float partialTicks) {
|
||||
float f1 = beacon.func_146002_i();
|
||||
if (f1 > 0.1F) {
|
||||
renderBeam(f1, beacon.getWorldObj(), x, y, z, beacon.getBlockMetadata(), partialTicks);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) {
|
||||
this.renderTileEntityAt((TileEntityCarvableBeacon) tile, x, y, z, partialTicks);
|
||||
}
|
||||
private void renderBeam(float f1, World world, double x, double y, double z, int meta, float partialTicks) {
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
Color color;
|
||||
if (meta < 15) {
|
||||
color = new Color(ItemDye.field_150922_c[meta]);
|
||||
} else {
|
||||
float hue = ((float) world.getTotalWorldTime() % 256) / 256;
|
||||
color = new Color(Color.HSBtoRGB(hue + (partialTicks / 256), 1, 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
renderer.renderBlockAsItem(Blocks.beacon, 0, 1);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5f, 0, -0.5f);
|
||||
renderBeam(0.00195f, Minecraft.getMinecraft().theWorld, 0, 0, 0, metadata, 0);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
this.bindTexture(texture);
|
||||
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, 10497.0F);
|
||||
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(true);
|
||||
OpenGlHelper.glBlendFunc(770, 1, 1, 0);
|
||||
float f2 = world.getTotalWorldTime() + partialTicks;
|
||||
float f3 = -f2 * 0.2F - MathHelper.floor_float(-f2 * 0.1F);
|
||||
byte b0 = 1;
|
||||
double d3 = f2 * 0.025D * (1.0D - (b0 & 1) * 2.5D);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(color.getRed(), color.getGreen(), color.getBlue(), 32);
|
||||
double d5 = b0 * 0.2D;
|
||||
double d7 = 0.5D + Math.cos(d3 + 2.356194490192345D) * d5;
|
||||
double d9 = 0.5D + Math.sin(d3 + 2.356194490192345D) * d5;
|
||||
double d11 = 0.5D + Math.cos(d3 + (Math.PI / 4D)) * d5;
|
||||
double d13 = 0.5D + Math.sin(d3 + (Math.PI / 4D)) * d5;
|
||||
double d15 = 0.5D + Math.cos(d3 + 3.9269908169872414D) * d5;
|
||||
double d17 = 0.5D + Math.sin(d3 + 3.9269908169872414D) * d5;
|
||||
double d19 = 0.5D + Math.cos(d3 + 5.497787143782138D) * d5;
|
||||
double d21 = 0.5D + Math.sin(d3 + 5.497787143782138D) * d5;
|
||||
double d23 = 256.0F * f1;
|
||||
double d25 = 0.0D;
|
||||
double d27 = 1.0D;
|
||||
double d28 = -1.0F + f3;
|
||||
double d29 = 256.0F * f1 * (0.5D / d5) + d28;
|
||||
tessellator.addVertexWithUV(x + d7, y + d23, z + d9, d27, d29);
|
||||
tessellator.addVertexWithUV(x + d7, y, z + d9, d27, d28);
|
||||
tessellator.addVertexWithUV(x + d11, y, z + d13, d25, d28);
|
||||
tessellator.addVertexWithUV(x + d11, y + d23, z + d13, d25, d29);
|
||||
tessellator.addVertexWithUV(x + d19, y + d23, z + d21, d27, d29);
|
||||
tessellator.addVertexWithUV(x + d19, y, z + d21, d27, d28);
|
||||
tessellator.addVertexWithUV(x + d15, y, z + d17, d25, d28);
|
||||
tessellator.addVertexWithUV(x + d15, y + d23, z + d17, d25, d29);
|
||||
tessellator.addVertexWithUV(x + d11, y + d23, z + d13, d27, d29);
|
||||
tessellator.addVertexWithUV(x + d11, y, z + d13, d27, d28);
|
||||
tessellator.addVertexWithUV(x + d19, y, z + d21, d25, d28);
|
||||
tessellator.addVertexWithUV(x + d19, y + d23, z + d21, d25, d29);
|
||||
tessellator.addVertexWithUV(x + d15, y + d23, z + d17, d27, d29);
|
||||
tessellator.addVertexWithUV(x + d15, y, z + d17, d27, d28);
|
||||
tessellator.addVertexWithUV(x + d7, y, z + d9, d25, d28);
|
||||
tessellator.addVertexWithUV(x + d7, y + d23, z + d9, d25, d29);
|
||||
tessellator.draw();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glDepthMask(false);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(color.getRed(), color.getGreen(), color.getBlue(), 32);
|
||||
double d30 = 0.2D;
|
||||
double d4 = 0.2D;
|
||||
double d6 = 0.8D;
|
||||
double d8 = 0.2D;
|
||||
double d10 = 0.2D;
|
||||
double d12 = 0.8D;
|
||||
double d14 = 0.8D;
|
||||
double d16 = 0.8D;
|
||||
double d18 = 256.0F * f1;
|
||||
double d20 = 0.0D;
|
||||
double d22 = 1.0D;
|
||||
double d24 = -1.0F + f3;
|
||||
double d26 = 256.0F * f1 + d24;
|
||||
tessellator.addVertexWithUV(x + d30, y + d18, z + d4, d22, d26);
|
||||
tessellator.addVertexWithUV(x + d30, y, z + d4, d22, d24);
|
||||
tessellator.addVertexWithUV(x + d6, y, z + d8, d20, d24);
|
||||
tessellator.addVertexWithUV(x + d6, y + d18, z + d8, d20, d26);
|
||||
tessellator.addVertexWithUV(x + d14, y + d18, z + d16, d22, d26);
|
||||
tessellator.addVertexWithUV(x + d14, y, z + d16, d22, d24);
|
||||
tessellator.addVertexWithUV(x + d10, y, z + d12, d20, d24);
|
||||
tessellator.addVertexWithUV(x + d10, y + d18, z + d12, d20, d26);
|
||||
tessellator.addVertexWithUV(x + d6, y + d18, z + d8, d22, d26);
|
||||
tessellator.addVertexWithUV(x + d6, y, z + d8, d22, d24);
|
||||
tessellator.addVertexWithUV(x + d14, y, z + d16, d20, d24);
|
||||
tessellator.addVertexWithUV(x + d14, y + d18, z + d16, d20, d26);
|
||||
tessellator.addVertexWithUV(x + d10, y + d18, z + d12, d22, d26);
|
||||
tessellator.addVertexWithUV(x + d10, y, z + d12, d22, d24);
|
||||
tessellator.addVertexWithUV(x + d30, y, z + d4, d20, d24);
|
||||
tessellator.addVertexWithUV(x + d30, y + d18, z + d4, d20, d26);
|
||||
tessellator.draw();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDepthMask(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||
float f = 0.1875F;
|
||||
boolean breaking = renderer.hasOverrideBlockTexture();
|
||||
if (!breaking) {
|
||||
renderer.setOverrideBlockTexture(renderer.getBlockIcon(Blocks.glass));
|
||||
}
|
||||
renderer.renderStandardBlockWithAmbientOcclusion(block, x, y, z, 1, 1, 1);
|
||||
renderer.renderAllFaces = true;
|
||||
if (!breaking) {
|
||||
renderer.setOverrideBlockTexture(renderer.getBlockIcon(Blocks.obsidian));
|
||||
}
|
||||
renderer.setRenderBounds(0.125D, 0.00625D, 0.125D, 0.875D, f, 0.875D);
|
||||
renderer.renderStandardBlockWithAmbientOcclusion(block, x, y, z, 1, 1, 1);
|
||||
if (!breaking) {
|
||||
renderer.setOverrideBlockTexture(renderer.getBlockIcon(Blocks.beacon));
|
||||
}
|
||||
renderer.setRenderBounds(0.1875D, f, 0.1875D, 0.8125D, 0.875D, 0.8125D);
|
||||
renderer.renderStandardBlockWithAmbientOcclusion(block, x, y, z, 1, 1, 1);
|
||||
renderer.renderAllFaces = false;
|
||||
renderer.clearOverrideBlockTexture();
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) {
|
||||
this.renderTileEntityAt((TileEntityCarvableBeacon) tile, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
renderer.renderBlockAsItem(Blocks.beacon, 0, 1);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5f, 0, -0.5f);
|
||||
renderBeam(0.00195f, Minecraft.getMinecraft().theWorld, 0, 0, 0, metadata, 0);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return renderId;
|
||||
}
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
float f = 0.1875F;
|
||||
boolean breaking = renderer.hasOverrideBlockTexture();
|
||||
if (!breaking) {
|
||||
renderer.setOverrideBlockTexture(renderer.getBlockIcon(Blocks.glass));
|
||||
}
|
||||
renderer.renderStandardBlockWithAmbientOcclusion(block, x, y, z, 1, 1, 1);
|
||||
renderer.renderAllFaces = true;
|
||||
if (!breaking) {
|
||||
renderer.setOverrideBlockTexture(renderer.getBlockIcon(Blocks.obsidian));
|
||||
}
|
||||
renderer.setRenderBounds(0.125D, 0.00625D, 0.125D, 0.875D, f, 0.875D);
|
||||
renderer.renderStandardBlockWithAmbientOcclusion(block, x, y, z, 1, 1, 1);
|
||||
if (!breaking) {
|
||||
renderer.setOverrideBlockTexture(renderer.getBlockIcon(Blocks.beacon));
|
||||
}
|
||||
renderer.setRenderBounds(0.1875D, f, 0.1875D, 0.8125D, 0.875D, 0.8125D);
|
||||
renderer.renderStandardBlockWithAmbientOcclusion(block, x, y, z, 1, 1, 1);
|
||||
renderer.renderAllFaces = false;
|
||||
renderer.clearOverrideBlockTexture();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return renderId;
|
||||
}
|
||||
}
|
||||
@@ -19,127 +19,130 @@ import team.chisel.block.tileentity.TileEntityPresent;
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class RenderPresent extends TileEntitySpecialRenderer implements IItemRenderer {
|
||||
|
||||
private ModelChest smallChest = new ModelChest();
|
||||
private ModelChest largeChest = new ModelLargeChest();
|
||||
private ModelChest smallChest = new ModelChest();
|
||||
private ModelChest largeChest = new ModelLargeChest();
|
||||
|
||||
private HashMap<Integer, ResourceLocation> textureCache = Maps.newHashMap();
|
||||
private HashMap<Integer, ResourceLocation> textureCache = Maps.newHashMap();
|
||||
|
||||
public void renderTileEntityAt(TileEntityPresent present, double x, double y, double z, float partialTicks) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glTranslatef((float) x, (float) y + 1.0F, (float) z + 1.0F);
|
||||
GL11.glScalef(1.0F, -1.0F, -1.0F);
|
||||
int rotation = present.getRotation();
|
||||
bindTexture(present);
|
||||
if (!present.isConnected()) {
|
||||
GL11.glRotatef(90 * rotation + 180, 0, 1, 0);
|
||||
switch (rotation) {
|
||||
case 0:
|
||||
GL11.glTranslatef(-1, 0, -1);
|
||||
break;
|
||||
case 1:
|
||||
GL11.glTranslatef(0, 0, -1);
|
||||
break;
|
||||
case 3:
|
||||
GL11.glTranslatef(-1, 0, 0);
|
||||
break;
|
||||
}
|
||||
smallChest.renderAll();
|
||||
} else if (present.isParent()) {
|
||||
ForgeDirection dir = present.getConnectionDir();
|
||||
switch (dir) {
|
||||
case NORTH:
|
||||
GL11.glRotatef(-90, 0, 1, 0);
|
||||
GL11.glTranslatef(0, 0, -1);
|
||||
break;
|
||||
case SOUTH:
|
||||
GL11.glRotatef(-90, 0, 1, 0);
|
||||
GL11.glTranslatef(-1, 0, -1);
|
||||
break;
|
||||
case WEST:
|
||||
GL11.glTranslatef(-1, 0, 0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (rotation == 0 || rotation == 3) {
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
GL11.glTranslatef(-2, 0, -1);
|
||||
}
|
||||
largeChest.renderAll();
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
public void renderTileEntityAt(TileEntityPresent present, double x, double y, double z, float partialTicks) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glTranslatef((float) x, (float) y + 1.0F, (float) z + 1.0F);
|
||||
GL11.glScalef(1.0F, -1.0F, -1.0F);
|
||||
int rotation = present.getRotation();
|
||||
bindTexture(present);
|
||||
if (!present.isConnected()) {
|
||||
GL11.glRotatef(90 * rotation + 180, 0, 1, 0);
|
||||
switch (rotation) {
|
||||
case 0:
|
||||
GL11.glTranslatef(-1, 0, -1);
|
||||
break;
|
||||
case 1:
|
||||
GL11.glTranslatef(0, 0, -1);
|
||||
break;
|
||||
case 3:
|
||||
GL11.glTranslatef(-1, 0, 0);
|
||||
break;
|
||||
}
|
||||
smallChest.renderAll();
|
||||
} else if (present.isParent()) {
|
||||
ForgeDirection dir = present.getConnectionDir();
|
||||
switch (dir) {
|
||||
case NORTH:
|
||||
GL11.glRotatef(-90, 0, 1, 0);
|
||||
GL11.glTranslatef(0, 0, -1);
|
||||
break;
|
||||
case SOUTH:
|
||||
GL11.glRotatef(-90, 0, 1, 0);
|
||||
GL11.glTranslatef(-1, 0, -1);
|
||||
break;
|
||||
case WEST:
|
||||
GL11.glTranslatef(-1, 0, 0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (rotation == 0 || rotation == 3) {
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
GL11.glTranslatef(-2, 0, -1);
|
||||
}
|
||||
largeChest.renderAll();
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
private void bindTexture(TileEntityPresent present) {
|
||||
int idx = present.getWorldObj().getBlockMetadata(present.xCoord, present.yCoord, present.zCoord) + (present.isConnected() ? 0 : 16);
|
||||
ResourceLocation rl = textureCache.get(idx);
|
||||
if (rl == null) {
|
||||
String res = ChiselBlocks.present.getModelTexture(idx % 16);
|
||||
res += present.isConnected() ? "_double.png" : ".png";
|
||||
rl = new ResourceLocation("chisel", res);
|
||||
textureCache.put(idx, rl);
|
||||
}
|
||||
bindTexture(rl);
|
||||
}
|
||||
private void bindTexture(TileEntityPresent present) {
|
||||
int idx = present.getWorldObj().getBlockMetadata(present.xCoord, present.yCoord, present.zCoord)
|
||||
+ (present.isConnected() ? 0 : 16);
|
||||
ResourceLocation rl = textureCache.get(idx);
|
||||
if (rl == null) {
|
||||
String res = ChiselBlocks.present.getModelTexture(idx % 16);
|
||||
res += present.isConnected() ? "_double.png" : ".png";
|
||||
rl = new ResourceLocation("chisel", res);
|
||||
textureCache.put(idx, rl);
|
||||
}
|
||||
bindTexture(rl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) {
|
||||
this.renderTileEntityAt((TileEntityPresent) tileEntity, x, y, z, partialTicks);
|
||||
}
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) {
|
||||
this.renderTileEntityAt((TileEntityPresent) tileEntity, x, y, z, partialTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
return type != ItemRenderType.FIRST_PERSON_MAP;
|
||||
}
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
return type != ItemRenderType.FIRST_PERSON_MAP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(Chisel.MOD_ID, ChiselBlocks.present.getModelTexture(item.getItemDamage()) + ".png"));
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
renderBlock(0.0F, 1.0F, 0.0F);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderBlock(0.5F, 1.5F, 0.5F);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderBlock(0.5F, 1.0F, 0.5F);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderInventory(1.0F, 1.0F, 1.0F);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(
|
||||
new ResourceLocation(
|
||||
Chisel.MOD_ID,
|
||||
ChiselBlocks.present.getModelTexture(item.getItemDamage()) + ".png"));
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
renderBlock(0.0F, 1.0F, 0.0F);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderBlock(0.5F, 1.5F, 0.5F);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderBlock(0.5F, 1.0F, 0.5F);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderInventory(1.0F, 1.0F, 1.0F);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void renderBlock(float x, float y, float z) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(x, y, z);
|
||||
GL11.glScaled(-1, -1, 1);
|
||||
smallChest.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
private void renderBlock(float x, float y, float z) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(x, y, z);
|
||||
GL11.glScaled(-1, -1, 1);
|
||||
smallChest.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
private void renderInventory(float x, float y, float z) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(x, y, z);
|
||||
GL11.glRotatef(180F, 1F, 0, 0);
|
||||
GL11.glRotatef(-90F, 0, 1F, 0);
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
smallChest.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
private void renderInventory(float x, float y, float z) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(x, y, z);
|
||||
GL11.glRotatef(180F, 1F, 0, 0);
|
||||
GL11.glRotatef(-90F, 0, 1F, 0);
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
smallChest.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user