mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-28 07:35:46 +00:00
-Fixed rendering bug for packager
-Added texture for aura core -Fixed collision box of packager
This commit is contained in:
1 parent
32a69727b3
commit
83bd63153d
9 files changed
+111
-37
No files matched your search
@@ -16,7 +16,7 @@ public class ModelPackagerPiston extends ModelBase {
|
||||
ModelRenderer shape1;
|
||||
ModelRenderer shape2;
|
||||
|
||||
public ModelPackagerPiston()
|
||||
public ModelPackagerPiston(boolean cut)
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
@@ -26,9 +26,10 @@ public class ModelPackagerPiston extends ModelBase {
|
||||
shape1.setRotationPoint(-5F, 16F, -5F);
|
||||
shape1.setTextureSize(64, 32);
|
||||
shape1.mirror = true;
|
||||
shape2 = new ModelRenderer(this, 41, 0);
|
||||
|
||||
shape2 = new ModelRenderer(this, 41, cut ? 1 : 0);
|
||||
shape2.addBox(0F, 0F, 0F, 4, 4, 4);
|
||||
shape2.setRotationPoint(-2F, 12F, -2F);
|
||||
shape2.setRotationPoint(-2F, cut ? 13F : 12F, -2F);
|
||||
shape2.setTextureSize(64, 32);
|
||||
shape2.mirror = true;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ public class RenderTileArcanePackager extends TileEntitySpecialRenderer {
|
||||
private static final ModelArcanePackager MODEL = new ModelArcanePackager();
|
||||
|
||||
private static final ResourceLocation TEXTURE_PISTON = new SimpleResourceLocation("/models/packager_piston.png");
|
||||
private static final ModelPackagerPiston MODEL_PISTON = new ModelPackagerPiston();
|
||||
private static final ModelPackagerPiston MODEL_PISTON = new ModelPackagerPiston(false);
|
||||
private static final ModelPackagerPiston MODEL_PISTON_CUT = new ModelPackagerPiston(true);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) {
|
||||
@@ -49,13 +50,20 @@ public class RenderTileArcanePackager extends TileEntitySpecialRenderer {
|
||||
}
|
||||
|
||||
GL11.glTranslatef(0, pistonOffset, 0);
|
||||
bindTexture(TEXTURE_PISTON);
|
||||
MODEL_PISTON.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
bindTexture(TEXTURE_PISTON);
|
||||
|
||||
if(pistonOffset < 1/16f) {
|
||||
MODEL_PISTON_CUT.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
} else {
|
||||
MODEL_PISTON.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
bindTexture(TEXTURE);
|
||||
MODEL.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
|
||||
Reference in new issue
Block a user