Anti-comments sweep!
This commit is contained in:
parent
e6a10f3f06
commit
dea1f87078
454 changed files with 23594 additions and 26739 deletions
|
@ -1,13 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
|
||||
public class AlchemyCircleRenderer extends MRSRenderer
|
||||
{
|
||||
private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/TransCircle.png");
|
||||
|
@ -21,72 +19,69 @@ public class AlchemyCircleRenderer extends MRSRenderer
|
|||
private double radius;
|
||||
private double initialY;
|
||||
private boolean renderWithoutReagents;
|
||||
|
||||
|
||||
public AlchemyCircleRenderer(ResourceLocation resource, int red, int green, int blue, int intensity, double xOff, double initialY, double yOff, double zOff, double radius, boolean renderWithoutReagents)
|
||||
{
|
||||
this.resourceLocation = resource;
|
||||
this.colourRed = red;
|
||||
this.colourGreen = green;
|
||||
this.colourBlue = blue;
|
||||
this.colourIntensity = intensity;
|
||||
this.xOffset = xOff;
|
||||
this.initialY = initialY;
|
||||
this.yOffset = yOff;
|
||||
this.zOffset = zOff;
|
||||
this.radius = radius;
|
||||
this.renderWithoutReagents = renderWithoutReagents;
|
||||
this.resourceLocation = resource;
|
||||
this.colourRed = red;
|
||||
this.colourGreen = green;
|
||||
this.colourBlue = blue;
|
||||
this.colourIntensity = intensity;
|
||||
this.xOffset = xOff;
|
||||
this.initialY = initialY;
|
||||
this.yOffset = yOff;
|
||||
this.zOffset = zOff;
|
||||
this.radius = radius;
|
||||
this.renderWithoutReagents = renderWithoutReagents;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderAt(TEMasterStone tile, double x, double y, double z)
|
||||
{
|
||||
if(tile.areTanksEmpty() && !renderWithoutReagents)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
this.bindTexture(resourceLocation);
|
||||
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);
|
||||
float f2 = 0;
|
||||
float f3 = -f2 * 0.2F - (float)MathHelper.floor_float(-f2 * 0.1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity);
|
||||
|
||||
GL11.glTranslated(x+0.5+xOffset, y+0.5+(yOffset-initialY)*(tile.runningTime/100d)+initialY, z+0.5+zOffset);
|
||||
|
||||
float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL);
|
||||
@Override
|
||||
public void renderAt(TEMasterStone tile, double x, double y, double z)
|
||||
{
|
||||
if (tile.areTanksEmpty() && !renderWithoutReagents)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
GL11.glRotatef(rotationAngle, 0F, 1F, 0F); //Rotate on planar axis
|
||||
//GL11.glRotatef(30F, 0F, 0F, 1F); //Rotate vertical axis
|
||||
//GL11.glRotatef(tileAltar.getWorldObj().getWorldTime()*2f, 1F, 0F, 0F); //Rotate cylindrically
|
||||
|
||||
tessellator.setBrightness(240);
|
||||
|
||||
double finalRadius = (radius)*(tile.runningTime/100d);
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
this.bindTexture(resourceLocation);
|
||||
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);
|
||||
float f2 = 0;
|
||||
float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
tessellator.addVertexWithUV(-finalRadius, 0, -finalRadius, 0.0d, 0.0d);
|
||||
tessellator.addVertexWithUV(finalRadius, 0, -finalRadius, 1.0d, 0.0d);
|
||||
tessellator.addVertexWithUV(finalRadius, 0, finalRadius, 1.0d, 1.0d);
|
||||
tessellator.addVertexWithUV(-finalRadius, 0, finalRadius, 0.0d, 1.0d);
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity);
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glTranslated(x + 0.5 + xOffset, y + 0.5 + (yOffset - initialY) * (tile.runningTime / 100d) + initialY, z + 0.5 + zOffset);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL);
|
||||
|
||||
GL11.glRotatef(rotationAngle, 0F, 1F, 0F); //Rotate on planar axis
|
||||
tessellator.setBrightness(240);
|
||||
|
||||
double finalRadius = (radius) * (tile.runningTime / 100d);
|
||||
|
||||
tessellator.addVertexWithUV(-finalRadius, 0, -finalRadius, 0.0d, 0.0d);
|
||||
tessellator.addVertexWithUV(finalRadius, 0, -finalRadius, 1.0d, 0.0d);
|
||||
tessellator.addVertexWithUV(finalRadius, 0, finalRadius, 1.0d, 1.0d);
|
||||
tessellator.addVertexWithUV(-finalRadius, 0, finalRadius, 0.0d, 1.0d);
|
||||
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,58 +1,56 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.ColourAndCoords;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.ColourAndCoords;
|
||||
|
||||
public class BeamRenderer
|
||||
public class BeamRenderer
|
||||
{
|
||||
private static final ResourceLocation field_110629_a = new ResourceLocation("textures/entity/beacon_beam.png");
|
||||
|
||||
|
||||
public int xInit;
|
||||
public int yInit;
|
||||
public int zInit;
|
||||
|
||||
|
||||
public int xFinal;
|
||||
public int yFinal;
|
||||
public int zFinal;
|
||||
|
||||
|
||||
public int colourRed;
|
||||
public int colourGreen;
|
||||
public int colourBlue;
|
||||
public int colourIntensity;
|
||||
|
||||
|
||||
public double size;
|
||||
|
||||
|
||||
public void setInitialPosition(int x, int y, int z)
|
||||
{
|
||||
this.xInit = x;
|
||||
this.yInit = y;
|
||||
this.zInit = z;
|
||||
this.xInit = x;
|
||||
this.yInit = y;
|
||||
this.zInit = z;
|
||||
}
|
||||
|
||||
|
||||
public void setColourAndFinalPosition(ColourAndCoords col)
|
||||
{
|
||||
this.colourRed = col.colourRed;
|
||||
this.colourGreen = col.colourGreen;
|
||||
this.colourBlue = col.colourBlue;
|
||||
this.colourIntensity = col.colourIntensity;
|
||||
|
||||
this.xFinal = col.xCoord;
|
||||
this.yFinal = col.yCoord;
|
||||
this.zFinal = col.zCoord;
|
||||
this.colourRed = col.colourRed;
|
||||
this.colourGreen = col.colourGreen;
|
||||
this.colourBlue = col.colourBlue;
|
||||
this.colourIntensity = col.colourIntensity;
|
||||
|
||||
this.xFinal = col.xCoord;
|
||||
this.yFinal = col.yCoord;
|
||||
this.zFinal = col.zCoord;
|
||||
}
|
||||
|
||||
|
||||
public void setSize(double size)
|
||||
{
|
||||
this.size = size;
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
|
||||
protected static void bindTexture(ResourceLocation p_147499_1_)
|
||||
{
|
||||
TextureManager texturemanager = TileEntityRendererDispatcher.instance.field_147553_e;
|
||||
|
@ -62,94 +60,87 @@ public class BeamRenderer
|
|||
texturemanager.bindTexture(p_147499_1_);
|
||||
}
|
||||
}
|
||||
|
||||
public void render(double d0, double d1, double d2)
|
||||
{
|
||||
int xDiff = this.xFinal - this.xInit;
|
||||
int yDiff = this.yFinal - this.yInit;
|
||||
int zDiff = this.zFinal - this.zInit;
|
||||
|
||||
float planarAngle = (float)(Math.atan2(-zDiff, xDiff) * 180d / Math.PI); //Radians
|
||||
float verticalAngle = (float)(Math.atan2(yDiff, Math.sqrt(xDiff*xDiff + zDiff+zDiff)) * 180d / Math.PI);
|
||||
|
||||
float distance = (float) Math.sqrt(xDiff*xDiff + yDiff*yDiff + zDiff*zDiff); //Total distance
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
BeamRenderer.bindTexture(field_110629_a);
|
||||
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);
|
||||
float f2 = 0;
|
||||
float f3 = -f2 * 0.2F - (float)MathHelper.floor_float(-f2 * 0.1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
public void render(double d0, double d1, double d2)
|
||||
{
|
||||
int xDiff = this.xFinal - this.xInit;
|
||||
int yDiff = this.yFinal - this.yInit;
|
||||
int zDiff = this.zFinal - this.zInit;
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
float planarAngle = (float) (Math.atan2(-zDiff, xDiff) * 180d / Math.PI); //Radians
|
||||
float verticalAngle = (float) (Math.atan2(yDiff, Math.sqrt(xDiff * xDiff + zDiff + zDiff)) * 180d / Math.PI);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity);
|
||||
//tessellator.setColorOpaque(255, 255, 255);
|
||||
|
||||
double inside = -(this.size/2d);
|
||||
double outside = 1.0d-(0.50d - this.size/2d)-0.5d;
|
||||
|
||||
double d18 = inside;
|
||||
double d19 = inside;
|
||||
double d20 = outside;
|
||||
double d21 = inside;
|
||||
double d22 = inside;
|
||||
double d23 = outside;
|
||||
double d24 = outside;
|
||||
double d25 = outside;
|
||||
double d26 = (double)(distance * f1);// + 0.2;
|
||||
double d27 = 0.0D;
|
||||
double d28 = 1.0D;
|
||||
double d29 = (double)(-1.0F + f3);
|
||||
double d30 = (double)(distance * f1) + d29;
|
||||
|
||||
GL11.glTranslated(d0+0.5, d1+0.5, d2+0.5);
|
||||
float distance = (float) Math.sqrt(xDiff * xDiff + yDiff * yDiff + zDiff * zDiff); //Total distance
|
||||
|
||||
GL11.glRotatef(planarAngle, 0F, 1F, 0F); //Rotate on planar axis
|
||||
GL11.glRotatef(verticalAngle, 0F, 0F, 1F); //Rotate vertical axis
|
||||
//GL11.glRotatef(tileAltar.getWorldObj().getWorldTime()*2f, 1F, 0F, 0F); //Rotate cylindrically
|
||||
|
||||
double offset = 0;
|
||||
|
||||
tessellator.setBrightness(240);
|
||||
float s = 1F / 16F;
|
||||
// GL11.glTranslatef(0F, s, s);
|
||||
// GL11.glScalef(1F, s * 14F, s * 14F);
|
||||
tessellator.addVertexWithUV(d26, d18, d19, d28, d30);
|
||||
tessellator.addVertexWithUV(offset, d18, d19, d28, d29);
|
||||
tessellator.addVertexWithUV(offset, d20, d21, d27, d29);
|
||||
tessellator.addVertexWithUV(d26, d20, d21, d27, d30);
|
||||
tessellator.addVertexWithUV(d26, d24, d25, d28, d30);
|
||||
tessellator.addVertexWithUV(offset, d24, d25, d28, d29);
|
||||
tessellator.addVertexWithUV(offset, d22, d23, d27, d29);
|
||||
tessellator.addVertexWithUV(d26, d22, d23, d27, d30);
|
||||
tessellator.addVertexWithUV(d26, d20, d21, d28, d30);
|
||||
tessellator.addVertexWithUV(offset, d20, d21, d28, d29);
|
||||
tessellator.addVertexWithUV(offset, d24, d25, d27, d29);
|
||||
tessellator.addVertexWithUV(d26, d24, d25, d27, d30);
|
||||
tessellator.addVertexWithUV(d26, d22, d23, d28, d30);
|
||||
tessellator.addVertexWithUV(offset, d22, d23, d28, d29);
|
||||
tessellator.addVertexWithUV(offset, d18, d19, d27, d29);
|
||||
tessellator.addVertexWithUV(d26, d18, d19, d27, d30);
|
||||
|
||||
//ShaderHelper.useShaderWithProps(ShaderHelper.beam, "time", (int) tileAltar.getWorldObj().getTotalWorldTime());
|
||||
tessellator.draw();
|
||||
//ShaderHelper.releaseShader();
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
BeamRenderer.bindTexture(field_110629_a);
|
||||
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);
|
||||
float f2 = 0;
|
||||
float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity);
|
||||
|
||||
double inside = -(this.size / 2d);
|
||||
double outside = 1.0d - (0.50d - this.size / 2d) - 0.5d;
|
||||
|
||||
double d18 = inside;
|
||||
double d19 = inside;
|
||||
double d20 = outside;
|
||||
double d21 = inside;
|
||||
double d22 = inside;
|
||||
double d23 = outside;
|
||||
double d24 = outside;
|
||||
double d25 = outside;
|
||||
double d26 = (double) (distance * f1);// + 0.2;
|
||||
double d27 = 0.0D;
|
||||
double d28 = 1.0D;
|
||||
double d29 = (double) (-1.0F + f3);
|
||||
double d30 = (double) (distance * f1) + d29;
|
||||
|
||||
GL11.glTranslated(d0 + 0.5, d1 + 0.5, d2 + 0.5);
|
||||
|
||||
GL11.glRotatef(planarAngle, 0F, 1F, 0F); //Rotate on planar axis
|
||||
GL11.glRotatef(verticalAngle, 0F, 0F, 1F); //Rotate vertical axis
|
||||
//GL11.glRotatef(tileAltar.getWorldObj().getWorldTime()*2f, 1F, 0F, 0F); //Rotate cylindrically
|
||||
|
||||
double offset = 0;
|
||||
|
||||
tessellator.setBrightness(240);
|
||||
float s = 1F / 16F;
|
||||
tessellator.addVertexWithUV(d26, d18, d19, d28, d30);
|
||||
tessellator.addVertexWithUV(offset, d18, d19, d28, d29);
|
||||
tessellator.addVertexWithUV(offset, d20, d21, d27, d29);
|
||||
tessellator.addVertexWithUV(d26, d20, d21, d27, d30);
|
||||
tessellator.addVertexWithUV(d26, d24, d25, d28, d30);
|
||||
tessellator.addVertexWithUV(offset, d24, d25, d28, d29);
|
||||
tessellator.addVertexWithUV(offset, d22, d23, d27, d29);
|
||||
tessellator.addVertexWithUV(d26, d22, d23, d27, d30);
|
||||
tessellator.addVertexWithUV(d26, d20, d21, d28, d30);
|
||||
tessellator.addVertexWithUV(offset, d20, d21, d28, d29);
|
||||
tessellator.addVertexWithUV(offset, d24, d25, d27, d29);
|
||||
tessellator.addVertexWithUV(d26, d24, d25, d27, d30);
|
||||
tessellator.addVertexWithUV(d26, d22, d23, d28, d30);
|
||||
tessellator.addVertexWithUV(offset, d22, d23, d28, d29);
|
||||
tessellator.addVertexWithUV(offset, d18, d19, d27, d29);
|
||||
tessellator.addVertexWithUV(d26, d18, d19, d27, d30);
|
||||
|
||||
tessellator.draw();
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.block.RenderMasterStone;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
|
||||
public abstract class MRSRenderer
|
||||
public abstract class MRSRenderer
|
||||
{
|
||||
public abstract void renderAt(TEMasterStone tile, double x, double y, double z);
|
||||
|
||||
protected void bindTexture(ResourceLocation p_147499_1_)
|
||||
public abstract void renderAt(TEMasterStone tile, double x, double y, double z);
|
||||
|
||||
protected void bindTexture(ResourceLocation p_147499_1_)
|
||||
{
|
||||
TextureManager texturemanager = TileEntityRendererDispatcher.instance.field_147553_e;
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
|
@ -12,21 +18,13 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAlchemicCalcinator;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer
|
||||
{
|
||||
private final RenderItem customRenderItem;
|
||||
private ModelAlchemicalCalcinator modelConduit = new ModelAlchemicalCalcinator();
|
||||
|
||||
|
||||
private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png");
|
||||
|
||||
public RenderAlchemicCalcinator()
|
||||
|
@ -50,25 +48,17 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer
|
|||
TEAlchemicCalcinator tileAltar = (TEAlchemicCalcinator) tileEntity;
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
// GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/AlchemicalCalcinator.png");
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelConduit.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
// GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (tileAltar.getStackInSlot(1) != null)
|
||||
|
@ -77,7 +67,6 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer
|
|||
EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj());
|
||||
ghostEntityItem.hoverStart = 0.0F;
|
||||
ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(1));
|
||||
//translateGhostItemByOrientation(ghostEntityItem.getEntityItem(), d0, d1, d2, ForgeDirection.DOWN);
|
||||
float displacement = 0.2F;
|
||||
|
||||
if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)
|
||||
|
@ -85,10 +74,8 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer
|
|||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F);
|
||||
} else
|
||||
{
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 10.4f / 16.0f, (float) d2 + 0.5F - 0.0625f*2f);
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 10.4f / 16.0f, (float) d2 + 0.5F - 0.0625f * 2f);
|
||||
}
|
||||
|
||||
//GL11.glTranslatef((float) tileAltar.xCoord + 0.5F, (float) tileAltar.yCoord + 2.7F, (float) tileAltar.zCoord + 0.5F);
|
||||
GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
|
||||
|
||||
if (!(ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock))
|
||||
|
@ -98,7 +85,7 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer
|
|||
|
||||
customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
@ -109,7 +96,6 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer
|
|||
EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj());
|
||||
ghostEntityItem.hoverStart = 0.0F;
|
||||
ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0));
|
||||
//translateGhostItemByOrientation(ghostEntityItem.getEntityItem(), d0, d1, d2, ForgeDirection.DOWN);
|
||||
float displacement = -0.5F;
|
||||
|
||||
if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)
|
||||
|
@ -117,10 +103,8 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer
|
|||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F);
|
||||
} else
|
||||
{
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 10.4f / 16.0f, (float) d2 + 0.5F - 0.0625f*2f);
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 10.4f / 16.0f, (float) d2 + 0.5F - 0.0625f * 2f);
|
||||
}
|
||||
|
||||
//GL11.glTranslatef((float) tileAltar.xCoord + 0.5F, (float) tileAltar.yCoord + 2.7F, (float) tileAltar.zCoord + 0.5F);
|
||||
GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
|
||||
|
||||
if (!(ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock))
|
||||
|
@ -130,57 +114,21 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer
|
|||
|
||||
customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
ReagentContainerInfo[] info = tileAltar.getContainerInfo(ForgeDirection.UNKNOWN);
|
||||
if(info.length >= 1 && info[0] != null)
|
||||
{
|
||||
ReagentStack reagentStack = info[0].reagent;
|
||||
int capacity = info[0].capacity;
|
||||
if(reagentStack != null && reagentStack.reagent != null)
|
||||
{
|
||||
Reagent reagent = reagentStack.reagent;
|
||||
this.renderTankContents(d0, d1, d2, reagent.getColourRed(), reagent.getColourGreen(), reagent.getColourBlue(), 200 * reagentStack.amount / capacity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// for (int i = 0; i <= 1; i++)
|
||||
// {
|
||||
// GL11.glPushMatrix();
|
||||
//
|
||||
// if (tileAltar.getStackInSlot(i) != null)
|
||||
// {
|
||||
// float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(i));
|
||||
// float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL);
|
||||
// EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj());
|
||||
// ghostEntityItem.hoverStart = 0.0F;
|
||||
// ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(i));
|
||||
// //translateGhostItemByOrientation(ghostEntityItem.getEntityItem(), d0, d1, d2, ForgeDirection.DOWN);
|
||||
// float displacementX = getXDisplacementForSlot(i);
|
||||
// float displacementY = getYDisplacementForSlot(i);
|
||||
// float displacementZ = getZDisplacementForSlot(i);
|
||||
//
|
||||
// if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)
|
||||
// {
|
||||
// GL11.glTranslatef((float) d0 + 0.5F + displacementX, (float) d1 + displacementY + 0.7F, (float) d2 + 0.5F + displacementZ);
|
||||
// } else
|
||||
// {
|
||||
// GL11.glTranslatef((float) d0 + 0.5F + displacementX, (float) d1 + displacementY + 0.6F, (float) d2 + 0.5F + displacementZ);
|
||||
// }
|
||||
//
|
||||
// //GL11.glTranslatef((float) tileAltar.xCoord + 0.5F, (float) tileAltar.yCoord + 2.7F, (float) tileAltar.zCoord + 0.5F);
|
||||
// GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
|
||||
// GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F);
|
||||
// customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0);
|
||||
// }
|
||||
//
|
||||
// GL11.glPopMatrix();
|
||||
// }
|
||||
|
||||
ReagentContainerInfo[] info = tileAltar.getContainerInfo(ForgeDirection.UNKNOWN);
|
||||
if (info.length >= 1 && info[0] != null)
|
||||
{
|
||||
ReagentStack reagentStack = info[0].reagent;
|
||||
int capacity = info[0].capacity;
|
||||
if (reagentStack != null && reagentStack.reagent != null)
|
||||
{
|
||||
Reagent reagent = reagentStack.reagent;
|
||||
this.renderTankContents(d0, d1, d2, reagent.getColourRed(), reagent.getColourGreen(), reagent.getColourBlue(), 200 * reagentStack.amount / capacity);
|
||||
}
|
||||
}
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
|
@ -188,68 +136,64 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer
|
|||
|
||||
private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
this.bindTexture(resourceLocation);
|
||||
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);
|
||||
float f2 = 0;
|
||||
float f3 = -f2 * 0.2F - (float)MathHelper.floor_float(-f2 * 0.1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
this.bindTexture(resourceLocation);
|
||||
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);
|
||||
float f2 = 0;
|
||||
float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity);
|
||||
|
||||
GL11.glTranslated(x+0.5, y+0.5, z+0.5);
|
||||
//GL11.glRotatef(30F, 0F, 0F, 1F); //Rotate vertical axis
|
||||
//GL11.glRotatef(tileAltar.getWorldObj().getWorldTime()*2f, 1F, 0F, 0F); //Rotate cylindrically
|
||||
|
||||
tessellator.setBrightness(240);
|
||||
|
||||
double x1 = -7d/16d;
|
||||
double x2 = 7d/16d;
|
||||
double y1 = 1d/16d;
|
||||
double y2 = 5d/16d;
|
||||
double z1 = -7d/16d;
|
||||
double z2 = 7d/16d;
|
||||
|
||||
double resx1 = 0.0d;
|
||||
double resx2 = 0.0d;
|
||||
double resy1 = 1.0d;
|
||||
double resy2 = 1.0d;
|
||||
|
||||
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z1, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x1, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y1, z2, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x2, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx1, resy2);
|
||||
tessellator.draw();
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity);
|
||||
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
|
||||
tessellator.setBrightness(240);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
double x1 = -7d / 16d;
|
||||
double x2 = 7d / 16d;
|
||||
double y1 = 1d / 16d;
|
||||
double y2 = 5d / 16d;
|
||||
double z1 = -7d / 16d;
|
||||
double z2 = 7d / 16d;
|
||||
|
||||
double resx1 = 0.0d;
|
||||
double resx2 = 0.0d;
|
||||
double resy1 = 1.0d;
|
||||
double resy2 = 1.0d;
|
||||
|
||||
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z1, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x1, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y1, z2, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x2, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx1, resy2);
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
private float getGhostItemScaleFactor(ItemStack itemStack)
|
||||
{
|
||||
float scaleFactor = 1.5F;
|
||||
|
@ -258,7 +202,7 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer
|
|||
{
|
||||
if (itemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (customRenderItem.getMiniBlockCount(itemStack,(byte)1))
|
||||
switch (customRenderItem.getMiniBlockCount(itemStack, (byte) 1))
|
||||
{
|
||||
case 1:
|
||||
return 0.90F * scaleFactor;
|
||||
|
@ -280,7 +224,7 @@ public class RenderAlchemicCalcinator extends TileEntitySpecialRenderer
|
|||
}
|
||||
} else
|
||||
{
|
||||
switch (customRenderItem.getMiniItemCount(itemStack,(byte)1))
|
||||
switch (customRenderItem.getMiniItemCount(itemStack, (byte) 1))
|
||||
{
|
||||
case 1:
|
||||
return 0.65F * scaleFactor;
|
||||
|
|
|
@ -21,19 +21,13 @@ public class RenderConduit extends TileEntitySpecialRenderer
|
|||
TEConduit tileConduit = (TEConduit) tileEntity;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/Conduit.png");
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelConduit.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileConduit.getInputDirection(), tileConduit.getOutputDirection());
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
|
|
@ -1,30 +1,24 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class RenderCrystalBelljar extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelCrystalBelljar modelConduit = new ModelCrystalBelljar();
|
||||
|
||||
|
||||
private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png");
|
||||
|
||||
|
||||
|
@ -34,80 +28,30 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer
|
|||
if (tileEntity instanceof TEBellJar)
|
||||
{
|
||||
TEBellJar tileAltar = (TEBellJar) tileEntity;
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
// GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png");
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelConduit.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
// GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ReagentContainerInfo[] info = tileAltar.getContainerInfo(ForgeDirection.UNKNOWN);
|
||||
if(info.length >= 1 && info[0] != null)
|
||||
if (info.length >= 1 && info[0] != null)
|
||||
{
|
||||
ReagentStack reagentStack = info[0].reagent;
|
||||
int capacity = info[0].capacity;
|
||||
if(reagentStack != null && reagentStack.reagent != null)
|
||||
{
|
||||
Reagent reagent = reagentStack.reagent;
|
||||
ReagentStack reagentStack = info[0].reagent;
|
||||
int capacity = info[0].capacity;
|
||||
if (reagentStack != null && reagentStack.reagent != null)
|
||||
{
|
||||
Reagent reagent = reagentStack.reagent;
|
||||
this.renderTankContents(d0, d1, d2, reagent.getColourRed(), reagent.getColourGreen(), reagent.getColourBlue(), 200 * reagentStack.amount / capacity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// this.renderTankContents(d0, d1, d2, 255, 0, 0, 200);
|
||||
|
||||
|
||||
|
||||
|
||||
// for (int i = 0; i <= 1; i++)
|
||||
// {
|
||||
// GL11.glPushMatrix();
|
||||
//
|
||||
// if (tileAltar.getStackInSlot(i) != null)
|
||||
// {
|
||||
// float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(i));
|
||||
// float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL);
|
||||
// EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj());
|
||||
// ghostEntityItem.hoverStart = 0.0F;
|
||||
// ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(i));
|
||||
// //translateGhostItemByOrientation(ghostEntityItem.getEntityItem(), d0, d1, d2, ForgeDirection.DOWN);
|
||||
// float displacementX = getXDisplacementForSlot(i);
|
||||
// float displacementY = getYDisplacementForSlot(i);
|
||||
// float displacementZ = getZDisplacementForSlot(i);
|
||||
//
|
||||
// if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)
|
||||
// {
|
||||
// GL11.glTranslatef((float) d0 + 0.5F + displacementX, (float) d1 + displacementY + 0.7F, (float) d2 + 0.5F + displacementZ);
|
||||
// } else
|
||||
// {
|
||||
// GL11.glTranslatef((float) d0 + 0.5F + displacementX, (float) d1 + displacementY + 0.6F, (float) d2 + 0.5F + displacementZ);
|
||||
// }
|
||||
//
|
||||
// //GL11.glTranslatef((float) tileAltar.xCoord + 0.5F, (float) tileAltar.yCoord + 2.7F, (float) tileAltar.zCoord + 0.5F);
|
||||
// GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
|
||||
// GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F);
|
||||
// customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0);
|
||||
// }
|
||||
//
|
||||
// GL11.glPopMatrix();
|
||||
// }
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
|
@ -115,70 +59,64 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer
|
|||
|
||||
private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
this.bindTexture(resourceLocation);
|
||||
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);
|
||||
float f2 = 0;
|
||||
float f3 = -f2 * 0.2F - (float)MathHelper.floor_float(-f2 * 0.1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
this.bindTexture(resourceLocation);
|
||||
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);
|
||||
float f2 = 0;
|
||||
float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glDepthMask(false);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity);
|
||||
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
|
||||
tessellator.setBrightness(240);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity);
|
||||
|
||||
GL11.glTranslated(x+0.5, y+0.5, z+0.5);
|
||||
//GL11.glRotatef(30F, 0F, 0F, 1F); //Rotate vertical axis
|
||||
//GL11.glRotatef(tileAltar.getWorldObj().getWorldTime()*2f, 1F, 0F, 0F); //Rotate cylindrically
|
||||
|
||||
tessellator.setBrightness(240);
|
||||
|
||||
double x1 = -4d/16d;
|
||||
double x2 = 4d/16d;
|
||||
double y1 = -6d/16d;
|
||||
double y2 = 4d/16d;
|
||||
double z1 = -4d/16d;
|
||||
double z2 = 4d/16d;
|
||||
|
||||
double resx1 = 0.0d;
|
||||
double resx2 = 0.0d;
|
||||
double resy1 = 1.0d;
|
||||
double resy2 = 1.0d;
|
||||
|
||||
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z1, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x1, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y1, z2, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x2, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2);
|
||||
tessellator.draw();
|
||||
double x1 = -4d / 16d;
|
||||
double x2 = 4d / 16d;
|
||||
double y1 = -6d / 16d;
|
||||
double y2 = 4d / 16d;
|
||||
double z1 = -4d / 16d;
|
||||
double z2 = 4d / 16d;
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
double resx1 = 0.0d;
|
||||
double resx2 = 0.0d;
|
||||
double resy1 = 1.0d;
|
||||
double resy2 = 1.0d;
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z1, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x1, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y1, z2, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x2, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2);
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
|
@ -1,15 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.MRSRenderer;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class RenderMasterStone extends TileEntitySpecialRenderer
|
||||
{
|
||||
|
@ -18,13 +13,13 @@ public class RenderMasterStone extends TileEntitySpecialRenderer
|
|||
{
|
||||
if (tileEntity instanceof TEMasterStone)
|
||||
{
|
||||
String str = ((TEMasterStone) tileEntity).getCurrentRitual();
|
||||
MRSRenderer renderer = Rituals.getRendererForKey(str);
|
||||
|
||||
if(renderer != null)
|
||||
{
|
||||
renderer.renderAt(((TEMasterStone) tileEntity), d0, d1, d2);
|
||||
}
|
||||
String str = ((TEMasterStone) tileEntity).getCurrentRitual();
|
||||
MRSRenderer renderer = Rituals.getRendererForKey(str);
|
||||
|
||||
if (renderer != null)
|
||||
{
|
||||
renderer.renderAt(((TEMasterStone) tileEntity), d0, d1, d2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelPedestal;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
|
@ -9,16 +11,10 @@ import net.minecraft.entity.item.EntityItem;
|
|||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelPedestal;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class RenderPedestal extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelPedestal modelPedestal = new ModelPedestal();
|
||||
|
@ -44,19 +40,13 @@ public class RenderPedestal extends TileEntitySpecialRenderer
|
|||
{
|
||||
TEPedestal tileAltar = (TEPedestal) tileEntity;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
// GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/Pedestal.png");
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelPedestal.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
@ -68,7 +58,6 @@ public class RenderPedestal extends TileEntitySpecialRenderer
|
|||
EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj());
|
||||
ghostEntityItem.hoverStart = 0.0F;
|
||||
ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0));
|
||||
//translateGhostItemByOrientation(ghostEntityItem.getEntityItem(), d0, d1, d2, ForgeDirection.DOWN);
|
||||
float displacement = 0.2F;
|
||||
|
||||
if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)
|
||||
|
@ -78,8 +67,6 @@ public class RenderPedestal extends TileEntitySpecialRenderer
|
|||
{
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.6F, (float) d2 + 0.5F);
|
||||
}
|
||||
|
||||
//GL11.glTranslatef((float) tileAltar.xCoord + 0.5F, (float) tileAltar.yCoord + 2.7F, (float) tileAltar.zCoord + 0.5F);
|
||||
GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
|
||||
GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F);
|
||||
customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0);
|
||||
|
@ -88,24 +75,21 @@ public class RenderPedestal extends TileEntitySpecialRenderer
|
|||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
// GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
// this.modelInputMirror.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection());
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +102,7 @@ public class RenderPedestal extends TileEntitySpecialRenderer
|
|||
{
|
||||
if (itemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (customRenderItem.getMiniBlockCount(itemStack,(byte)1))
|
||||
switch (customRenderItem.getMiniBlockCount(itemStack, (byte) 1))
|
||||
{
|
||||
case 1:
|
||||
return 0.90F;
|
||||
|
@ -140,7 +124,7 @@ public class RenderPedestal extends TileEntitySpecialRenderer
|
|||
}
|
||||
} else
|
||||
{
|
||||
switch (customRenderItem.getMiniItemCount(itemStack,(byte)1))
|
||||
switch (customRenderItem.getMiniItemCount(itemStack, (byte) 1))
|
||||
{
|
||||
case 1:
|
||||
return 0.65F;
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelPlinth;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
|
@ -10,13 +13,8 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelPlinth;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class RenderPlinth extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelPlinth modelPlinth = new ModelPlinth();
|
||||
|
@ -42,19 +40,13 @@ public class RenderPlinth extends TileEntitySpecialRenderer
|
|||
{
|
||||
TEPlinth tileAltar = (TEPlinth) tileEntity;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
// GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/Plinth.png");
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelPlinth.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
@ -65,7 +57,6 @@ public class RenderPlinth extends TileEntitySpecialRenderer
|
|||
EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj());
|
||||
ghostEntityItem.hoverStart = 0.0F;
|
||||
ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0));
|
||||
//translateGhostItemByOrientation(ghostEntityItem.getEntityItem(), d0, d1, d2, ForgeDirection.DOWN);
|
||||
float displacement = 0.2F;
|
||||
|
||||
if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)
|
||||
|
@ -75,8 +66,6 @@ public class RenderPlinth extends TileEntitySpecialRenderer
|
|||
{
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 10.4f / 16.0f, (float) d2 + 0.5F - 0.1875f);
|
||||
}
|
||||
|
||||
//GL11.glTranslatef((float) tileAltar.xCoord + 0.5F, (float) tileAltar.yCoord + 2.7F, (float) tileAltar.zCoord + 0.5F);
|
||||
GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
|
||||
|
||||
if (!(ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock))
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
|
||||
|
||||
public class RenderReagentConduit extends TileEntitySpecialRenderer
|
||||
{
|
||||
{
|
||||
private static final ResourceLocation field_110629_a = new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png");
|
||||
|
||||
@Override
|
||||
|
@ -20,56 +18,44 @@ public class RenderReagentConduit extends TileEntitySpecialRenderer
|
|||
{
|
||||
if (tileEntity instanceof TEReagentConduit)
|
||||
{
|
||||
int renderCount = ((TEReagentConduit)tileEntity).renderCount;
|
||||
float key1 = (tileEntity.xCoord*54f - tileEntity.yCoord*38.72f + tileEntity.zCoord*10.432f);
|
||||
float key2 = (tileEntity.xCoord*21.43f - tileEntity.yCoord*9.96f + tileEntity.zCoord*12.8f);
|
||||
|
||||
Int3 colourMap = ((TEReagentConduit) tileEntity).getColour();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
this.bindTexture(field_110629_a);
|
||||
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);
|
||||
float f2 = 0;
|
||||
float f3 = -f2 * 0.2F - (float)MathHelper.floor_float(-f2 * 0.1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
int renderCount = ((TEReagentConduit) tileEntity).renderCount;
|
||||
float key1 = (tileEntity.xCoord * 54f - tileEntity.yCoord * 38.72f + tileEntity.zCoord * 10.432f);
|
||||
float key2 = (tileEntity.xCoord * 21.43f - tileEntity.yCoord * 9.96f + tileEntity.zCoord * 12.8f);
|
||||
Int3 colourMap = ((TEReagentConduit) tileEntity).getColour();
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
this.bindTexture(field_110629_a);
|
||||
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);
|
||||
float f2 = 0;
|
||||
float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glDepthMask(false);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(colourMap.xCoord, colourMap.yCoord, colourMap.zCoord, 200);
|
||||
GL11.glTranslated(d0 + 0.5, d1 + 0.5, d2 + 0.5);
|
||||
GL11.glRotatef(tileEntity.getWorldObj().getWorldTime() / 3.0f, 0F, 1F, 0F); //Rotate on planar axis
|
||||
GL11.glRotatef(renderCount + key1, 0F, 0F, 1F); //Rotate vertical axis
|
||||
GL11.glRotatef(renderCount * 2f + key2, 1F, 0F, 0F); //Rotate cylindrically
|
||||
double offset = 0;
|
||||
tessellator.setBrightness(240);
|
||||
tessellator.addVertexWithUV(-0.5d, 0, -0.5d, 0.0d, 0.0d);
|
||||
tessellator.addVertexWithUV(0.5d, 0, -0.5d, 1.0d, 0.0d);
|
||||
tessellator.addVertexWithUV(0.5d, 0, 0.5d, 1.0d, 1.0d);
|
||||
tessellator.addVertexWithUV(-0.5d, 0, 0.5d, 0.0d, 1.0d);
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
tessellator.draw();
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(colourMap.xCoord, colourMap.yCoord, colourMap.zCoord, 200);
|
||||
//tessellator.setColorOpaque(255, 255, 255);
|
||||
|
||||
GL11.glTranslated(d0+0.5, d1+0.5, d2+0.5);
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
GL11.glRotatef(tileEntity.getWorldObj().getWorldTime()/3.0f, 0F, 1F, 0F); //Rotate on planar axis
|
||||
GL11.glRotatef(renderCount + key1, 0F, 0F, 1F); //Rotate vertical axis
|
||||
GL11.glRotatef(renderCount*2f + key2, 1F, 0F, 0F); //Rotate cylindrically
|
||||
|
||||
double offset = 0;
|
||||
|
||||
tessellator.setBrightness(240);
|
||||
// GL11.glTranslatef(0F, s, s);
|
||||
// GL11.glScalef(1F, s * 14F, s * 14F);
|
||||
tessellator.addVertexWithUV(-0.5d, 0, -0.5d, 0.0d, 0.0d);
|
||||
tessellator.addVertexWithUV(0.5d, 0, -0.5d, 1.0d, 0.0d);
|
||||
tessellator.addVertexWithUV(0.5d, 0, 0.5d, 1.0d, 1.0d);
|
||||
tessellator.addVertexWithUV(-0.5d, 0, 0.5d, 0.0d, 1.0d);
|
||||
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEffectBlock;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class RenderSpellEffectBlock extends TileEntitySpecialRenderer
|
||||
{
|
||||
|
@ -22,24 +20,17 @@ public class RenderSpellEffectBlock extends TileEntitySpecialRenderer
|
|||
{
|
||||
TESpellEffectBlock tileSpellBlock = (TESpellEffectBlock) tileEntity;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
// GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/BlockSpellEffect.png");
|
||||
int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
|
||||
String resource = tileSpellBlock.getResourceLocationForMeta(meta);
|
||||
test = new ResourceLocation(resource);
|
||||
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelSpellEffectBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection());
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer
|
||||
{
|
||||
|
@ -22,24 +20,17 @@ public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer
|
|||
{
|
||||
TESpellEnhancementBlock tileSpellBlock = (TESpellEnhancementBlock) tileEntity;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
// GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/BlockSpellEnhancementPower1.png");
|
||||
int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
|
||||
String resource = tileSpellBlock.getResourceLocationForMeta(meta);
|
||||
test = new ResourceLocation(resource);
|
||||
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelSpellEnhancementBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection());
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class RenderSpellModifierBlock extends TileEntitySpecialRenderer
|
||||
{
|
||||
|
@ -22,24 +20,17 @@ public class RenderSpellModifierBlock extends TileEntitySpecialRenderer
|
|||
{
|
||||
TESpellModifierBlock tileSpellBlock = (TESpellModifierBlock) tileEntity;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
// GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/BlockSpellModifier.png");
|
||||
int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
|
||||
String resource = tileSpellBlock.getResourceLocationForMeta(meta);
|
||||
test = new ResourceLocation(resource);
|
||||
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelSpellModifierBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection());
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class RenderSpellParadigmBlock extends TileEntitySpecialRenderer
|
||||
{
|
||||
|
@ -22,24 +20,17 @@ public class RenderSpellParadigmBlock extends TileEntitySpecialRenderer
|
|||
{
|
||||
TESpellParadigmBlock tileSpellBlock = (TESpellParadigmBlock) tileEntity;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
// GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/BlockSpellParadigm.png");
|
||||
int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
|
||||
String resource = tileSpellBlock.getResourceLocationForMeta(meta);
|
||||
test = new ResourceLocation(resource);
|
||||
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelSpellParadigmBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, tileSpellBlock.getInputDirection(), tileSpellBlock.getOutputDirection());
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
|
@ -10,13 +13,8 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEWritingTable;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class RenderWritingTable extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelWritingTable modelWritingTable = new ModelWritingTable();
|
||||
|
@ -42,16 +40,13 @@ public class RenderWritingTable extends TileEntitySpecialRenderer
|
|||
{
|
||||
TEWritingTable tileAltar = (TEWritingTable) tileEntity;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
// GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/WritingTable.png");
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelWritingTable.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
@ -66,7 +61,6 @@ public class RenderWritingTable extends TileEntitySpecialRenderer
|
|||
EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj());
|
||||
ghostEntityItem.hoverStart = 0.0F;
|
||||
ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(i));
|
||||
//translateGhostItemByOrientation(ghostEntityItem.getEntityItem(), d0, d1, d2, ForgeDirection.DOWN);
|
||||
float displacementX = getXDisplacementForSlot(i);
|
||||
float displacementY = getYDisplacementForSlot(i);
|
||||
float displacementZ = getZDisplacementForSlot(i);
|
||||
|
@ -78,8 +72,6 @@ public class RenderWritingTable extends TileEntitySpecialRenderer
|
|||
{
|
||||
GL11.glTranslatef((float) d0 + 0.5F + displacementX, (float) d1 + displacementY + 0.6F, (float) d2 + 0.5F + displacementZ);
|
||||
}
|
||||
|
||||
//GL11.glTranslatef((float) tileAltar.xCoord + 0.5F, (float) tileAltar.yCoord + 2.7F, (float) tileAltar.zCoord + 0.5F);
|
||||
GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
|
||||
GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F);
|
||||
customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0);
|
||||
|
@ -101,7 +93,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer
|
|||
{
|
||||
if (itemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (customRenderItem.getMiniBlockCount(itemStack,(byte)1))
|
||||
switch (customRenderItem.getMiniBlockCount(itemStack, (byte) 1))
|
||||
{
|
||||
case 1:
|
||||
return 0.90F * scaleFactor;
|
||||
|
@ -123,7 +115,7 @@ public class RenderWritingTable extends TileEntitySpecialRenderer
|
|||
}
|
||||
} else
|
||||
{
|
||||
switch (customRenderItem.getMiniItemCount(itemStack,(byte)1))
|
||||
switch (customRenderItem.getMiniItemCount(itemStack, (byte) 1))
|
||||
{
|
||||
case 1:
|
||||
return 0.65F * scaleFactor;
|
||||
|
|
|
@ -2,183 +2,195 @@
|
|||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
*
|
||||
* File Created @ [Apr 9, 2014, 11:20:26 PM (GMT)]
|
||||
*/
|
||||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.lwjgl.opengl.ARBFragmentShader;
|
||||
import org.lwjgl.opengl.ARBShaderObjects;
|
||||
import org.lwjgl.opengl.ARBVertexShader;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
public final class ShaderHelper {
|
||||
public final class ShaderHelper
|
||||
{
|
||||
|
||||
private static final int VERT = ARBVertexShader.GL_VERTEX_SHADER_ARB;
|
||||
private static final int FRAG = ARBFragmentShader.GL_FRAGMENT_SHADER_ARB;
|
||||
private static final int VERT = ARBVertexShader.GL_VERTEX_SHADER_ARB;
|
||||
private static final int FRAG = ARBFragmentShader.GL_FRAGMENT_SHADER_ARB;
|
||||
|
||||
public static int beam = 0;
|
||||
|
||||
public static void initShaders() {
|
||||
// if(!useShaders())
|
||||
// return;
|
||||
|
||||
beam = createProgram(null, "/assets/alchemicalwizardry/shaders/beam.frag");
|
||||
}
|
||||
public static int beam = 0;
|
||||
|
||||
public static void useShaderWithProps(int shader, Object... props) {
|
||||
// if(!useShaders())
|
||||
// return;
|
||||
|
||||
ARBShaderObjects.glUseProgramObjectARB(shader);
|
||||
public static void initShaders()
|
||||
{
|
||||
beam = createProgram(null, "/assets/alchemicalwizardry/shaders/beam.frag");
|
||||
}
|
||||
|
||||
if(shader != 0 && props.length % 2 == 0) {
|
||||
int propCount = props.length / 2;
|
||||
for(int i = 0; i < propCount; i++) {
|
||||
String propName = (String) props[i * 2];
|
||||
Object propVal = props[i * 2 + 1];
|
||||
|
||||
int uniform = ARBShaderObjects.glGetUniformLocationARB(shader, propName);
|
||||
if(propVal instanceof Integer)
|
||||
ARBShaderObjects.glUniform1iARB(uniform, (Integer) propVal);
|
||||
if(propVal instanceof Float)
|
||||
ARBShaderObjects.glUniform1fARB(uniform, (Float) propVal);
|
||||
// Possible Vector2, Vector3 and Vector4, no need yet.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void useShader(int shader) {
|
||||
useShaderWithProps(shader);
|
||||
}
|
||||
public static void useShaderWithProps(int shader, Object... props)
|
||||
{
|
||||
ARBShaderObjects.glUseProgramObjectARB(shader);
|
||||
|
||||
public static void releaseShader() {
|
||||
useShader(0);
|
||||
}
|
||||
|
||||
public static boolean useShaders() {
|
||||
return true;//ConfigHandler.useShaders && OpenGlHelper.shadersSupported;
|
||||
}
|
||||
|
||||
// Most of the code taken from the LWJGL wiki
|
||||
// http://lwjgl.org/wiki/index.php?title=GLSL_Shaders_with_LWJGL
|
||||
if (shader != 0 && props.length % 2 == 0)
|
||||
{
|
||||
int propCount = props.length / 2;
|
||||
for (int i = 0; i < propCount; i++)
|
||||
{
|
||||
String propName = (String) props[i * 2];
|
||||
Object propVal = props[i * 2 + 1];
|
||||
|
||||
private static int createProgram(String vert, String frag) {
|
||||
int vertId = 0, fragId = 0, program = 0;
|
||||
if(vert != null)
|
||||
vertId = createShader(vert, VERT);
|
||||
if(frag != null)
|
||||
fragId = createShader(frag, FRAG);
|
||||
int uniform = ARBShaderObjects.glGetUniformLocationARB(shader, propName);
|
||||
if (propVal instanceof Integer)
|
||||
ARBShaderObjects.glUniform1iARB(uniform, (Integer) propVal);
|
||||
if (propVal instanceof Float)
|
||||
ARBShaderObjects.glUniform1fARB(uniform, (Float) propVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
program = ARBShaderObjects.glCreateProgramObjectARB();
|
||||
if(program == 0)
|
||||
return 0;
|
||||
public static void useShader(int shader)
|
||||
{
|
||||
useShaderWithProps(shader);
|
||||
}
|
||||
|
||||
if(vert != null)
|
||||
ARBShaderObjects.glAttachObjectARB(program, vertId);
|
||||
if(frag != null)
|
||||
ARBShaderObjects.glAttachObjectARB(program, fragId);
|
||||
public static void releaseShader()
|
||||
{
|
||||
useShader(0);
|
||||
}
|
||||
|
||||
ARBShaderObjects.glLinkProgramARB(program);
|
||||
if(ARBShaderObjects.glGetObjectParameteriARB(program, ARBShaderObjects.GL_OBJECT_LINK_STATUS_ARB) == GL11.GL_FALSE) {
|
||||
// FMLLog.log(Level.WARNING, getLogInfo(program));
|
||||
return 0;
|
||||
}
|
||||
|
||||
ARBShaderObjects.glValidateProgramARB(program);
|
||||
if (ARBShaderObjects.glGetObjectParameteriARB(program, ARBShaderObjects.GL_OBJECT_VALIDATE_STATUS_ARB) == GL11.GL_FALSE) {
|
||||
// FMLLog.log(Level.WARNING, getLogInfo(program));
|
||||
return 0;
|
||||
}
|
||||
|
||||
return program;
|
||||
}
|
||||
public static boolean useShaders()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private static int createShader(String filename, int shaderType){
|
||||
int shader = 0;
|
||||
try {
|
||||
shader = ARBShaderObjects.glCreateShaderObjectARB(shaderType);
|
||||
// Most of the code taken from the LWJGL wiki
|
||||
// http://lwjgl.org/wiki/index.php?title=GLSL_Shaders_with_LWJGL
|
||||
private static int createProgram(String vert, String frag)
|
||||
{
|
||||
int vertId = 0, fragId = 0, program = 0;
|
||||
if (vert != null)
|
||||
vertId = createShader(vert, VERT);
|
||||
if (frag != null)
|
||||
fragId = createShader(frag, FRAG);
|
||||
|
||||
if(shader == 0)
|
||||
return 0;
|
||||
program = ARBShaderObjects.glCreateProgramObjectARB();
|
||||
if (program == 0)
|
||||
return 0;
|
||||
|
||||
ARBShaderObjects.glShaderSourceARB(shader, readFileAsString(filename));
|
||||
ARBShaderObjects.glCompileShaderARB(shader);
|
||||
if (vert != null)
|
||||
ARBShaderObjects.glAttachObjectARB(program, vertId);
|
||||
if (frag != null)
|
||||
ARBShaderObjects.glAttachObjectARB(program, fragId);
|
||||
|
||||
if (ARBShaderObjects.glGetObjectParameteriARB(shader, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB) == GL11.GL_FALSE)
|
||||
throw new RuntimeException("Error creating shader: " + getLogInfo(shader));
|
||||
ARBShaderObjects.glLinkProgramARB(program);
|
||||
if (ARBShaderObjects.glGetObjectParameteriARB(program, ARBShaderObjects.GL_OBJECT_LINK_STATUS_ARB) == GL11.GL_FALSE)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return shader;
|
||||
}
|
||||
catch(Exception e) {
|
||||
ARBShaderObjects.glDeleteObjectARB(shader);
|
||||
e.printStackTrace();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
ARBShaderObjects.glValidateProgramARB(program);
|
||||
if (ARBShaderObjects.glGetObjectParameteriARB(program, ARBShaderObjects.GL_OBJECT_VALIDATE_STATUS_ARB) == GL11.GL_FALSE)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static String getLogInfo(int obj) {
|
||||
return ARBShaderObjects.glGetInfoLogARB(obj, ARBShaderObjects.glGetObjectParameteriARB(obj, ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB));
|
||||
}
|
||||
return program;
|
||||
}
|
||||
|
||||
private static String readFileAsString(String filename) throws Exception {
|
||||
StringBuilder source = new StringBuilder();
|
||||
InputStream in = ShaderHelper.class.getResourceAsStream(filename);
|
||||
Exception exception = null;
|
||||
BufferedReader reader;
|
||||
private static int createShader(String filename, int shaderType)
|
||||
{
|
||||
int shader = 0;
|
||||
try
|
||||
{
|
||||
shader = ARBShaderObjects.glCreateShaderObjectARB(shaderType);
|
||||
|
||||
if(in == null)
|
||||
return "";
|
||||
|
||||
try {
|
||||
reader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
|
||||
if (shader == 0)
|
||||
return 0;
|
||||
|
||||
Exception innerExc= null;
|
||||
try {
|
||||
String line;
|
||||
while((line = reader.readLine()) != null)
|
||||
source.append(line).append('\n');
|
||||
} catch(Exception exc) {
|
||||
exception = exc;
|
||||
} finally {
|
||||
try {
|
||||
reader.close();
|
||||
} catch(Exception exc) {
|
||||
if(innerExc == null)
|
||||
innerExc = exc;
|
||||
else exc.printStackTrace();
|
||||
}
|
||||
}
|
||||
ARBShaderObjects.glShaderSourceARB(shader, readFileAsString(filename));
|
||||
ARBShaderObjects.glCompileShaderARB(shader);
|
||||
|
||||
if(innerExc != null)
|
||||
throw innerExc;
|
||||
} catch(Exception exc) {
|
||||
exception = exc;
|
||||
} finally {
|
||||
try {
|
||||
in.close();
|
||||
} catch(Exception exc) {
|
||||
if(exception == null)
|
||||
exception = exc;
|
||||
else exc.printStackTrace();
|
||||
}
|
||||
if (ARBShaderObjects.glGetObjectParameteriARB(shader, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB) == GL11.GL_FALSE)
|
||||
throw new RuntimeException("Error creating shader: " + getLogInfo(shader));
|
||||
|
||||
if(exception != null)
|
||||
throw exception;
|
||||
}
|
||||
return shader;
|
||||
} catch (Exception e)
|
||||
{
|
||||
ARBShaderObjects.glDeleteObjectARB(shader);
|
||||
e.printStackTrace();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return source.toString();
|
||||
}
|
||||
private static String getLogInfo(int obj)
|
||||
{
|
||||
return ARBShaderObjects.glGetInfoLogARB(obj, ARBShaderObjects.glGetObjectParameteriARB(obj, ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB));
|
||||
}
|
||||
|
||||
private static String readFileAsString(String filename) throws Exception
|
||||
{
|
||||
StringBuilder source = new StringBuilder();
|
||||
InputStream in = ShaderHelper.class.getResourceAsStream(filename);
|
||||
Exception exception = null;
|
||||
BufferedReader reader;
|
||||
|
||||
if (in == null)
|
||||
return "";
|
||||
|
||||
try
|
||||
{
|
||||
reader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
|
||||
|
||||
Exception innerExc = null;
|
||||
try
|
||||
{
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null)
|
||||
source.append(line).append('\n');
|
||||
} catch (Exception exc)
|
||||
{
|
||||
exception = exc;
|
||||
} finally
|
||||
{
|
||||
try
|
||||
{
|
||||
reader.close();
|
||||
} catch (Exception exc)
|
||||
{
|
||||
if (innerExc == null)
|
||||
innerExc = exc;
|
||||
else exc.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (innerExc != null)
|
||||
throw innerExc;
|
||||
} catch (Exception exc)
|
||||
{
|
||||
exception = exc;
|
||||
} finally
|
||||
{
|
||||
try
|
||||
{
|
||||
in.close();
|
||||
} catch (Exception exc)
|
||||
{
|
||||
if (exception == null)
|
||||
exception = exc;
|
||||
else exc.printStackTrace();
|
||||
}
|
||||
|
||||
if (exception != null)
|
||||
throw exception;
|
||||
}
|
||||
|
||||
return source.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
|
@ -8,12 +10,8 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
|
||||
public class TEAltarRenderer extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelBloodAltar modelBloodAltar = new ModelBloodAltar();
|
||||
|
@ -42,10 +40,6 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer
|
|||
{
|
||||
TEAltar tileAltar = (TEAltar) tileEntity;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
// GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (tileAltar.getStackInSlot(0) != null)
|
||||
|
@ -55,7 +49,6 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer
|
|||
EntityItem ghostEntityItem = new EntityItem(tileAltar.getWorldObj());
|
||||
ghostEntityItem.hoverStart = 0.0F;
|
||||
ghostEntityItem.setEntityItemStack(tileAltar.getStackInSlot(0));
|
||||
//translateGhostItemByOrientation(ghostEntityItem.getEntityItem(), d0, d1, d2, ForgeDirection.DOWN);
|
||||
float displacement = 0.2F;
|
||||
|
||||
if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock)
|
||||
|
@ -65,8 +58,6 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer
|
|||
{
|
||||
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.6F, (float) d2 + 0.5F);
|
||||
}
|
||||
|
||||
//GL11.glTranslatef((float) tileAltar.xCoord + 0.5F, (float) tileAltar.yCoord + 2.7F, (float) tileAltar.zCoord + 0.5F);
|
||||
GL11.glScalef(scaleFactor, scaleFactor, scaleFactor);
|
||||
GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F);
|
||||
customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0);
|
||||
|
@ -86,7 +77,7 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer
|
|||
{
|
||||
if (itemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (customRenderItem.getMiniBlockCount(itemStack,(byte)1))
|
||||
switch (customRenderItem.getMiniBlockCount(itemStack, (byte) 1))
|
||||
{
|
||||
case 1:
|
||||
return 0.90F;
|
||||
|
@ -108,7 +99,7 @@ public class TEAltarRenderer extends TileEntitySpecialRenderer
|
|||
}
|
||||
} else
|
||||
{
|
||||
switch (customRenderItem.getMiniItemCount(itemStack,(byte)1))
|
||||
switch (customRenderItem.getMiniItemCount(itemStack, (byte) 1))
|
||||
{
|
||||
case 1:
|
||||
return 0.65F;
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
@ -7,89 +10,81 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelAlchemicalCalcinator;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class TEAlchemicalCalcinatorItemRenderer implements IItemRenderer
|
||||
public class TEAlchemicalCalcinatorItemRenderer implements IItemRenderer
|
||||
{
|
||||
private ModelAlchemicalCalcinator modelConduit = new ModelAlchemicalCalcinator();
|
||||
private ModelAlchemicalCalcinator modelConduit = new ModelAlchemicalCalcinator();
|
||||
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
Block block = ModBlocks.blockAlchemicCalcinator;
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
Block block = ModBlocks.blockAlchemicCalcinator;
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/AlchemicalCalcinator.png");
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelConduit.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
return true;
|
||||
case EQUIPPED:
|
||||
return true;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
return true;
|
||||
case EQUIPPED:
|
||||
return true;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@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) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import net.minecraft.client.renderer.RenderBlocks;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class TEAltarItemRenderer implements IItemRenderer
|
||||
|
@ -21,14 +20,12 @@ public class TEAltarItemRenderer implements IItemRenderer
|
|||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -36,22 +33,20 @@ public class TEAltarItemRenderer implements IItemRenderer
|
|||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
float scale = 0.08f;
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
renderBloodAltar((RenderBlocks) data[0], item, 0, 0, 0, scale);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderBloodAltar((RenderBlocks) data[0], item, 0, 0, 0.5f, scale);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderBloodAltar((RenderBlocks) data[0], item, +0.5f, 0.5f, +0.5f, scale);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderBloodAltar((RenderBlocks) data[0], item, -0.5f, -0.75f, -0.5f, scale);
|
||||
break;
|
||||
case ENTITY:
|
||||
renderBloodAltar((RenderBlocks) data[0], item, 0, 0, 0, scale);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderBloodAltar((RenderBlocks) data[0], item, 0, 0, 0.5f, scale);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderBloodAltar((RenderBlocks) data[0], item, +0.5f, 0.5f, +0.5f, scale);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderBloodAltar((RenderBlocks) data[0], item, -0.5f, -0.75f, -0.5f, scale);
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
|
@ -63,16 +58,12 @@ public class TEAltarItemRenderer implements IItemRenderer
|
|||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glPushMatrix();
|
||||
// Disable Lighting Calculations
|
||||
GL11.glTranslatef(x, y, z);
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glRotatef(180f, 0f, 1f, 0f);
|
||||
//FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/OBJTutorial/textures/models/TutBox.png");
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/altar.png");
|
||||
//FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/alchemicalwizardry/textures/models/altar.png");
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
modelBloodAltar.renderBloodAltar();
|
||||
// Re-enable Lighting Calculations
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
|
|
@ -1,206 +1,195 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class TEBellJarItemRenderer implements IItemRenderer
|
||||
public class TEBellJarItemRenderer implements IItemRenderer
|
||||
{
|
||||
ItemRenderer d;
|
||||
private ModelCrystalBelljar modelConduit = new ModelCrystalBelljar();
|
||||
private ResourceLocation mainResource = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png");
|
||||
ItemRenderer d;
|
||||
private ModelCrystalBelljar modelConduit = new ModelCrystalBelljar();
|
||||
private ResourceLocation mainResource = new ResourceLocation("alchemicalwizardry:textures/models/CrystalBelljar.png");
|
||||
private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png");
|
||||
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
GL11.glDepthMask(false);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
GL11.glDepthMask(false);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(mainResource);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelConduit.renderSpecialItem((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, 0);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
ReagentContainerInfo[] info = TEBellJar.getContainerInfoFromItem(item);
|
||||
if(info.length >= 1 && info[0] != null)
|
||||
if (info.length >= 1 && info[0] != null)
|
||||
{
|
||||
ReagentStack reagentStack = info[0].reagent;
|
||||
int capacity = info[0].capacity;
|
||||
if(reagentStack != null && reagentStack.reagent != null)
|
||||
{
|
||||
Reagent reagent = reagentStack.reagent;
|
||||
ReagentStack reagentStack = info[0].reagent;
|
||||
int capacity = info[0].capacity;
|
||||
if (reagentStack != null && reagentStack.reagent != null)
|
||||
{
|
||||
Reagent reagent = reagentStack.reagent;
|
||||
this.renderTankContents(translateX, translateY, translateZ, reagent.getColourRed(), reagent.getColourGreen(), reagent.getColourBlue(), 200 * reagentStack.amount / capacity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(mainResource);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelConduit.renderSpecialItem((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, 1);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
// GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
// GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(true);
|
||||
}
|
||||
|
||||
private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(resourceLocation);
|
||||
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.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f2 = 0;
|
||||
float f3 = -f2 * 0.2F - (float)MathHelper.floor_float(-f2 * 0.1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity);
|
||||
|
||||
GL11.glTranslated(x+0.5, y+0.5, z+0.5);
|
||||
//GL11.glRotatef(30F, 0F, 0F, 1F); //Rotate vertical axis
|
||||
//GL11.glRotatef(tileAltar.getWorldObj().getWorldTime()*2f, 1F, 0F, 0F); //Rotate cylindrically
|
||||
|
||||
tessellator.setBrightness(240);
|
||||
|
||||
double x1 = -4d/16d;
|
||||
double x2 = 4d/16d;
|
||||
double y1 = -6d/16d;
|
||||
double y2 = 4d/16d;
|
||||
double z1 = -4d/16d;
|
||||
double z2 = 4d/16d;
|
||||
|
||||
double resx1 = 0.0d;
|
||||
double resx2 = 0.0d;
|
||||
double resy1 = 1.0d;
|
||||
double resy2 = 1.0d;
|
||||
|
||||
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z1, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x1, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y1, z2, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x2, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2);
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
return true;
|
||||
case EQUIPPED:
|
||||
return true;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void renderTankContents(double x, double y, double z, int colourRed, int colourGreen, int colourBlue, int colourIntensity)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
float f1 = 1.0f;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(resourceLocation);
|
||||
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.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f2 = 0;
|
||||
float f3 = -f2 * 0.2F - (float) MathHelper.floor_float(-f2 * 0.1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity);
|
||||
|
||||
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
|
||||
|
||||
tessellator.setBrightness(240);
|
||||
|
||||
double x1 = -4d / 16d;
|
||||
double x2 = 4d / 16d;
|
||||
double y1 = -6d / 16d;
|
||||
double y2 = 4d / 16d;
|
||||
double z1 = -4d / 16d;
|
||||
double z2 = 4d / 16d;
|
||||
|
||||
double resx1 = 0.0d;
|
||||
double resx2 = 0.0d;
|
||||
double resy1 = 1.0d;
|
||||
double resy2 = 1.0d;
|
||||
|
||||
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z1, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x1, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y1, z2, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x2, y1, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx1, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z1, resx2, resy1);
|
||||
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2);
|
||||
tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2);
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
return true;
|
||||
case EQUIPPED:
|
||||
return true;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@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) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,96 +1,89 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class TEConduitItemRenderer implements IItemRenderer
|
||||
public class TEConduitItemRenderer implements IItemRenderer
|
||||
{
|
||||
private ModelConduit modelConduit = new ModelConduit();
|
||||
private ModelConduit modelConduit = new ModelConduit();
|
||||
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
Block block = ModBlocks.blockConduit;
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
Block block = ModBlocks.blockConduit;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/Conduit.png");
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelConduit.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
return true;
|
||||
case EQUIPPED:
|
||||
return true;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
return true;
|
||||
case EQUIPPED:
|
||||
return true;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@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) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEffectBlock;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
@ -8,101 +11,96 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEffectBlock;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class TESpellEffectBlockItemRenderer implements IItemRenderer
|
||||
public class TESpellEffectBlockItemRenderer implements IItemRenderer
|
||||
{
|
||||
private ModelSpellEffectBlock modelSpellBlock = new ModelSpellEffectBlock();
|
||||
private ModelSpellEffectBlock modelSpellBlock = new ModelSpellEffectBlock();
|
||||
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
Block block = ModBlocks.blockSpellEffect;
|
||||
//Icon icon = item.getItem().getIconFromDamage(0);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
Block block = ModBlocks.blockSpellEffect;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation(this.getResourceLocationForMeta(item.getItemDamage()));
|
||||
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
return true;
|
||||
case EQUIPPED:
|
||||
return true;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
public String getResourceLocationForMeta(int meta)
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
{
|
||||
switch(meta)
|
||||
{
|
||||
case 0: return "alchemicalwizardry:textures/models/SpellEffectFire.png";
|
||||
case 1: return "alchemicalwizardry:textures/models/SpellEffectIce.png";
|
||||
case 2: return "alchemicalwizardry:textures/models/SpellEffectWind.png";
|
||||
case 3: return "alchemicalwizardry:textures/models/SpellEffectEarth.png";
|
||||
}
|
||||
return "";
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
return true;
|
||||
case EQUIPPED:
|
||||
return true;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
public String getResourceLocationForMeta(int meta)
|
||||
{
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
return "alchemicalwizardry:textures/models/SpellEffectFire.png";
|
||||
case 1:
|
||||
return "alchemicalwizardry:textures/models/SpellEffectIce.png";
|
||||
case 2:
|
||||
return "alchemicalwizardry:textures/models/SpellEffectWind.png";
|
||||
case 3:
|
||||
return "alchemicalwizardry:textures/models/SpellEffectEarth.png";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
@ -8,107 +11,108 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class TESpellEnhancementBlockItemRenderer implements IItemRenderer
|
||||
public class TESpellEnhancementBlockItemRenderer implements IItemRenderer
|
||||
{
|
||||
private ModelSpellEnhancementBlock modelSpellBlock = new ModelSpellEnhancementBlock();
|
||||
private ModelSpellEnhancementBlock modelSpellBlock = new ModelSpellEnhancementBlock();
|
||||
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
Block block = ModBlocks.blockSpellEffect;
|
||||
//Icon icon = item.getItem().getIconFromDamage(0);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
Block block = ModBlocks.blockSpellEffect;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
*/
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation(this.getResourceLocationForMeta(item.getItemDamage()));
|
||||
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
return true;
|
||||
case EQUIPPED:
|
||||
return true;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
return true;
|
||||
case EQUIPPED:
|
||||
return true;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@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) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
public String getResourceLocationForMeta(int meta)
|
||||
{
|
||||
switch(meta)
|
||||
{
|
||||
case 0: return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png";
|
||||
case 1: return "alchemicalwizardry:textures/models/SpellEnhancementPower2.png";
|
||||
case 2: return "alchemicalwizardry:textures/models/SpellEnhancementPower3.png";
|
||||
case 5: return "alchemicalwizardry:textures/models/SpellEnhancementCost1.png";
|
||||
case 6: return "alchemicalwizardry:textures/models/SpellEnhancementCost2.png";
|
||||
case 7: return "alchemicalwizardry:textures/models/SpellEnhancementCost3.png";
|
||||
case 10: return "alchemicalwizardry:textures/models/SpellEnhancementPotency1.png";
|
||||
case 11: return "alchemicalwizardry:textures/models/SpellEnhancementPotency2.png";
|
||||
case 12: return "alchemicalwizardry:textures/models/SpellEnhancementPotency3.png";
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png";
|
||||
}
|
||||
public String getResourceLocationForMeta(int meta)
|
||||
{
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png";
|
||||
case 1:
|
||||
return "alchemicalwizardry:textures/models/SpellEnhancementPower2.png";
|
||||
case 2:
|
||||
return "alchemicalwizardry:textures/models/SpellEnhancementPower3.png";
|
||||
case 5:
|
||||
return "alchemicalwizardry:textures/models/SpellEnhancementCost1.png";
|
||||
case 6:
|
||||
return "alchemicalwizardry:textures/models/SpellEnhancementCost2.png";
|
||||
case 7:
|
||||
return "alchemicalwizardry:textures/models/SpellEnhancementCost3.png";
|
||||
case 10:
|
||||
return "alchemicalwizardry:textures/models/SpellEnhancementPotency1.png";
|
||||
case 11:
|
||||
return "alchemicalwizardry:textures/models/SpellEnhancementPotency2.png";
|
||||
case 12:
|
||||
return "alchemicalwizardry:textures/models/SpellEnhancementPotency3.png";
|
||||
|
||||
}
|
||||
return "alchemicalwizardry:textures/models/SpellEnhancementPower1.png";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
@ -8,25 +11,19 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class TESpellModifierBlockItemRenderer implements IItemRenderer
|
||||
public class TESpellModifierBlockItemRenderer implements IItemRenderer
|
||||
{
|
||||
private ModelSpellModifierBlock modelSpellBlock = new ModelSpellModifierBlock();
|
||||
private ModelSpellModifierBlock modelSpellBlock = new ModelSpellModifierBlock();
|
||||
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
Block block = ModBlocks.blockSpellEffect;
|
||||
//Icon icon = item.getItem().getIconFromDamage(0);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
Block block = ModBlocks.blockSpellEffect;
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
|
@ -34,75 +31,82 @@ public class TESpellModifierBlockItemRenderer implements IItemRenderer
|
|||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation(this.getResourceLocationForMeta(item.getItemDamage()));
|
||||
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
return true;
|
||||
case EQUIPPED:
|
||||
return true;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
public String getResourceLocationForMeta(int meta)
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
{
|
||||
switch(meta)
|
||||
{
|
||||
case 0: return "alchemicalwizardry:textures/models/SpellModifierDefault.png";
|
||||
case 1: return "alchemicalwizardry:textures/models/SpellModifierOffensive.png";
|
||||
case 2: return "alchemicalwizardry:textures/models/SpellModifierDefensive.png";
|
||||
case 3: return "alchemicalwizardry:textures/models/SpellModifierEnvironmental.png";
|
||||
}
|
||||
return "alchemicalwizardry:textures/models/SpellModifierDefault.png";
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
return true;
|
||||
case EQUIPPED:
|
||||
return true;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
public String getResourceLocationForMeta(int meta)
|
||||
{
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
return "alchemicalwizardry:textures/models/SpellModifierDefault.png";
|
||||
case 1:
|
||||
return "alchemicalwizardry:textures/models/SpellModifierOffensive.png";
|
||||
case 2:
|
||||
return "alchemicalwizardry:textures/models/SpellModifierDefensive.png";
|
||||
case 3:
|
||||
return "alchemicalwizardry:textures/models/SpellModifierEnvironmental.png";
|
||||
}
|
||||
return "alchemicalwizardry:textures/models/SpellModifierDefault.png";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
@ -8,25 +11,18 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class TESpellParadigmBlockItemRenderer implements IItemRenderer
|
||||
public class TESpellParadigmBlockItemRenderer implements IItemRenderer
|
||||
{
|
||||
private ModelSpellParadigmBlock modelSpellBlock = new ModelSpellParadigmBlock();
|
||||
private ModelSpellParadigmBlock modelSpellBlock = new ModelSpellParadigmBlock();
|
||||
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
private void renderConduitItem(RenderBlocks render, ItemStack item, float translateX, float translateY, float translateZ)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
Block block = ModBlocks.blockSpellEffect;
|
||||
//Icon icon = item.getItem().getIconFromDamage(0);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
Block block = ModBlocks.blockSpellEffect;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
/**
|
||||
* Render the ghost item inside of the Altar, slowly spinning
|
||||
|
@ -34,11 +30,9 @@ public class TESpellParadigmBlockItemRenderer implements IItemRenderer
|
|||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) translateX + 0.5F, (float) translateY + 1.5F, (float) translateZ + 0.5F);
|
||||
ResourceLocation test = new ResourceLocation(this.getResourceLocationForMeta(item.getItemDamage()));
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//A reference to your Model file. Again, very important.
|
||||
this.modelSpellBlock.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, ForgeDirection.DOWN, ForgeDirection.UP);
|
||||
//Tell it to stop rendering for both the PushMatrix's
|
||||
|
@ -46,63 +40,72 @@ public class TESpellParadigmBlockItemRenderer implements IItemRenderer
|
|||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
return true;
|
||||
case EQUIPPED:
|
||||
return true;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch (type) {
|
||||
case ENTITY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
public String getResourceLocationForMeta(int meta)
|
||||
/**
|
||||
* IItemRenderer implementation *
|
||||
*/
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
{
|
||||
switch(meta)
|
||||
{
|
||||
case 0: return "alchemicalwizardry:textures/models/SpellParadigmProjectile.png";
|
||||
case 1: return "alchemicalwizardry:textures/models/SpellParadigmSelf.png";
|
||||
case 2: return "alchemicalwizardry:textures/models/SpellParadigmMelee.png";
|
||||
case 3: return "alchemicalwizardry:textures/models/SpellParadigmTool.png";
|
||||
}
|
||||
return "alchemicalwizardry:textures/models/SpellParadigmProjectile.png";
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
return true;
|
||||
case EQUIPPED:
|
||||
return true;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
return true;
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
case EQUIPPED:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.4f, 0.50f, 0.35f);
|
||||
break;
|
||||
case INVENTORY:
|
||||
renderConduitItem((RenderBlocks) data[0], item, -0.5f, -0.5f, -0.5f);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
public String getResourceLocationForMeta(int meta)
|
||||
{
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
return "alchemicalwizardry:textures/models/SpellParadigmProjectile.png";
|
||||
case 1:
|
||||
return "alchemicalwizardry:textures/models/SpellParadigmSelf.png";
|
||||
case 2:
|
||||
return "alchemicalwizardry:textures/models/SpellParadigmMelee.png";
|
||||
case 3:
|
||||
return "alchemicalwizardry:textures/models/SpellParadigmTool.png";
|
||||
}
|
||||
return "alchemicalwizardry:textures/models/SpellParadigmProjectile.png";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,24 +10,22 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
public class TEWritingTableItemRenderer implements IItemRenderer
|
||||
{
|
||||
private ModelWritingTable modelBloodAltar;
|
||||
private ModelWritingTable model;
|
||||
|
||||
public TEWritingTableItemRenderer()
|
||||
{
|
||||
modelBloodAltar = new ModelWritingTable();
|
||||
model = new ModelWritingTable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -35,8 +33,6 @@ public class TEWritingTableItemRenderer implements IItemRenderer
|
|||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
float scale = 0.08f;
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
|
@ -70,11 +66,9 @@ public class TEWritingTableItemRenderer implements IItemRenderer
|
|||
GL11.glTranslatef(x, y, z);
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glRotatef(180f, 0f, 1f, 0f);
|
||||
//FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/OBJTutorial/textures/models/TutBox.png");
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/WritingTable.png");
|
||||
//FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/alchemicalwizardry/textures/models/altar.png");
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
modelBloodAltar.render((Entity) null, 0, 0, 0, 0, 0, 0);
|
||||
model.render((Entity) null, 0, 0, 0, 0, 0, 0);
|
||||
// Re-enable Lighting Calculations
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.util.ResourceLocation;
|
|||
|
||||
public class RenderBileDemon extends RenderLiving
|
||||
{
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/BileDemon.png"); //refers to:YourMod/modelsTextureFile/optionalFile/yourTexture.png
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/BileDemon.png");
|
||||
|
||||
public RenderBileDemon(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.util.ResourceLocation;
|
|||
|
||||
public class RenderBoulderFist extends RenderLiving
|
||||
{
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/BoulderFist.png"); //refers to:YourMod/modelsTextureFile/optionalFile/yourTexture.png
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/BoulderFist.png");
|
||||
|
||||
public RenderBoulderFist(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.util.ResourceLocation;
|
|||
|
||||
public class RenderElemental extends RenderLiving
|
||||
{
|
||||
private static final ResourceLocation airBeacon = new ResourceLocation("alchemicalwizardry", "textures/models/AirFloatingBeacon.png"); //refers to:YourMod/modelsTextureFile/optionalFile/yourTexture.png
|
||||
private static final ResourceLocation airBeacon = new ResourceLocation("alchemicalwizardry", "textures/models/AirFloatingBeacon.png");
|
||||
private static final ResourceLocation waterBeacon = new ResourceLocation("alchemicalwizardry", "textures/models/WaterFloatingBeacon.png");
|
||||
private static final ResourceLocation earthBeacon = new ResourceLocation("alchemicalwizardry", "textures/models/EarthFloatingBeacon.png");
|
||||
private static final ResourceLocation fireBeacon = new ResourceLocation("alchemicalwizardry", "textures/models/FireFloatingBeacon.png");
|
||||
|
|
|
@ -11,7 +11,7 @@ import net.minecraft.util.ResourceLocation;
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class RenderFallenAngel extends RenderLiving
|
||||
{
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/WingedAngel.png"); //refers to:YourMod/modelsTextureFile/optionalFile/yourTexture.png
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/WingedAngel.png");
|
||||
|
||||
public RenderFallenAngel(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.util.ResourceLocation;
|
|||
|
||||
public class RenderIceDemon extends RenderLiving
|
||||
{
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/IceDemon.png"); //refers to:YourMod/modelsTextureFile/optionalFile/yourTexture.png
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/IceDemon.png");
|
||||
|
||||
public RenderIceDemon(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.util.ResourceLocation;
|
|||
|
||||
public class RenderLowerGuardian extends RenderLiving
|
||||
{
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/LowerGuardian.png"); //refers to:YourMod/modelsTextureFile/optionalFile/yourTexture.png
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/LowerGuardian.png");
|
||||
|
||||
public RenderLowerGuardian(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.util.ResourceLocation;
|
|||
|
||||
public class RenderShade extends RenderLiving
|
||||
{
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/ShadeMob.png"); //refers to:YourMod/modelsTextureFile/optionalFile/yourTexture.png
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/ShadeMob.png");
|
||||
|
||||
public RenderShade(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.util.ResourceLocation;
|
|||
|
||||
public class RenderSmallEarthGolem extends RenderLiving
|
||||
{
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/SmallEarthGolem.png"); //refers to:YourMod/modelsTextureFile/optionalFile/yourTexture.png
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/SmallEarthGolem.png");
|
||||
|
||||
public RenderSmallEarthGolem(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.util.ResourceLocation;
|
|||
|
||||
public class RenderWingedFireDemon extends RenderLiving
|
||||
{
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/WingedFireDemon.png"); //refers to:YourMod/modelsTextureFile/optionalFile/yourTexture.png
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/WingedFireDemon.png");
|
||||
|
||||
public RenderWingedFireDemon(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.entity.Entity;
|
|||
|
||||
public class ModelAlchemicalCalcinator extends ModelBase
|
||||
{
|
||||
//fields
|
||||
//fields
|
||||
ModelRenderer top1;
|
||||
ModelRenderer top2;
|
||||
ModelRenderer top3;
|
||||
|
@ -20,121 +20,121 @@ public class ModelAlchemicalCalcinator extends ModelBase
|
|||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
ModelRenderer Shape5;
|
||||
|
||||
public ModelAlchemicalCalcinator()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
||||
|
||||
top1 = new ModelRenderer(this, 0, 34);
|
||||
top1.addBox(4F, -8F, -8F, 4, 3, 16);
|
||||
top1.setRotationPoint(0F, 16F, 0F);
|
||||
top1.setTextureSize(128, 128);
|
||||
top1.mirror = true;
|
||||
setRotation(top1, 0F, 0F, 0F);
|
||||
top2 = new ModelRenderer(this, 41, 34);
|
||||
top2.addBox(-8F, -8F, -8F, 4, 3, 16);
|
||||
top2.setRotationPoint(0F, 16F, 0F);
|
||||
top2.setTextureSize(128, 128);
|
||||
top2.mirror = true;
|
||||
setRotation(top2, 0F, 0F, 0F);
|
||||
top3 = new ModelRenderer(this, 25, 55);
|
||||
top3.addBox(-4F, -8F, 4F, 8, 3, 4);
|
||||
top3.setRotationPoint(0F, 16F, 0F);
|
||||
top3.setTextureSize(128, 128);
|
||||
top3.mirror = true;
|
||||
setRotation(top3, 0F, 0F, 0F);
|
||||
top4 = new ModelRenderer(this, 0, 55);
|
||||
top4.addBox(-4F, -8F, -8F, 8, 3, 4);
|
||||
top4.setRotationPoint(0F, 16F, 0F);
|
||||
top4.setTextureSize(128, 128);
|
||||
top4.mirror = true;
|
||||
setRotation(top4, 0F, 0F, 0F);
|
||||
tank = new ModelRenderer(this, 0, 0);
|
||||
tank.addBox(-8F, -5F, -8F, 16, 4, 16);
|
||||
tank.setRotationPoint(0F, 16F, 0F);
|
||||
tank.setTextureSize(128, 128);
|
||||
tank.mirror = true;
|
||||
setRotation(tank, 0F, 0F, 0F);
|
||||
centreCollumn = new ModelRenderer(this, 0, 21);
|
||||
centreCollumn.addBox(-4F, -5F, -4F, 8, 4, 8);
|
||||
centreCollumn.setRotationPoint(0F, 16F, 0F);
|
||||
centreCollumn.setTextureSize(128, 128);
|
||||
centreCollumn.mirror = true;
|
||||
setRotation(centreCollumn, 0F, 0F, 0F);
|
||||
furnaceShape = new ModelRenderer(this, 0, 63);
|
||||
furnaceShape.addBox(-8F, -1F, -8F, 16, 5, 16);
|
||||
furnaceShape.setRotationPoint(0F, 16F, 0F);
|
||||
furnaceShape.setTextureSize(128, 128);
|
||||
furnaceShape.mirror = true;
|
||||
setRotation(furnaceShape, 0F, 0F, 0F);
|
||||
glassWindow = new ModelRenderer(this, 0, 85);
|
||||
glassWindow.addBox(-4F, -8F, -4F, 8, 0, 8);
|
||||
glassWindow.setRotationPoint(0F, 16F, 0F);
|
||||
glassWindow.setTextureSize(128, 128);
|
||||
glassWindow.mirror = true;
|
||||
setRotation(glassWindow, 0F, 0F, 0F);
|
||||
Shape1 = new ModelRenderer(this, 0, 94);
|
||||
Shape1.addBox(-8F, 4F, -8F, 4, 4, 4);
|
||||
Shape1.setRotationPoint(0F, 16F, 0F);
|
||||
Shape1.setTextureSize(128, 128);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
Shape2 = new ModelRenderer(this, 0, 103);
|
||||
Shape2.addBox(-4F, 6F, -4F, 8, 1, 8);
|
||||
Shape2.setRotationPoint(0F, 16F, 0F);
|
||||
Shape2.setTextureSize(128, 128);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
Shape3 = new ModelRenderer(this, 0, 94);
|
||||
Shape3.addBox(4F, 4F, -8F, 4, 4, 4);
|
||||
Shape3.setRotationPoint(0F, 16F, 0F);
|
||||
Shape3.setTextureSize(128, 128);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0F, 0F, 0F);
|
||||
Shape4 = new ModelRenderer(this, 0, 94);
|
||||
Shape4.addBox(-8F, 4F, 4F, 4, 4, 4);
|
||||
Shape4.setRotationPoint(0F, 16F, 0F);
|
||||
Shape4.setTextureSize(128, 128);
|
||||
Shape4.mirror = true;
|
||||
setRotation(Shape4, 0F, 0F, 0F);
|
||||
Shape5 = new ModelRenderer(this, 0, 94);
|
||||
Shape5.addBox(4F, 4F, 4F, 4, 4, 4);
|
||||
Shape5.setRotationPoint(0F, 16F, 0F);
|
||||
Shape5.setTextureSize(128, 128);
|
||||
Shape5.mirror = true;
|
||||
setRotation(Shape5, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
top1.render(f5);
|
||||
top2.render(f5);
|
||||
top3.render(f5);
|
||||
top4.render(f5);
|
||||
tank.render(f5);
|
||||
centreCollumn.render(f5);
|
||||
furnaceShape.render(f5);
|
||||
glassWindow.render(f5);
|
||||
Shape1.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape3.render(f5);
|
||||
Shape4.render(f5);
|
||||
Shape5.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
|
||||
public ModelAlchemicalCalcinator()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
||||
|
||||
top1 = new ModelRenderer(this, 0, 34);
|
||||
top1.addBox(4F, -8F, -8F, 4, 3, 16);
|
||||
top1.setRotationPoint(0F, 16F, 0F);
|
||||
top1.setTextureSize(128, 128);
|
||||
top1.mirror = true;
|
||||
setRotation(top1, 0F, 0F, 0F);
|
||||
top2 = new ModelRenderer(this, 41, 34);
|
||||
top2.addBox(-8F, -8F, -8F, 4, 3, 16);
|
||||
top2.setRotationPoint(0F, 16F, 0F);
|
||||
top2.setTextureSize(128, 128);
|
||||
top2.mirror = true;
|
||||
setRotation(top2, 0F, 0F, 0F);
|
||||
top3 = new ModelRenderer(this, 25, 55);
|
||||
top3.addBox(-4F, -8F, 4F, 8, 3, 4);
|
||||
top3.setRotationPoint(0F, 16F, 0F);
|
||||
top3.setTextureSize(128, 128);
|
||||
top3.mirror = true;
|
||||
setRotation(top3, 0F, 0F, 0F);
|
||||
top4 = new ModelRenderer(this, 0, 55);
|
||||
top4.addBox(-4F, -8F, -8F, 8, 3, 4);
|
||||
top4.setRotationPoint(0F, 16F, 0F);
|
||||
top4.setTextureSize(128, 128);
|
||||
top4.mirror = true;
|
||||
setRotation(top4, 0F, 0F, 0F);
|
||||
tank = new ModelRenderer(this, 0, 0);
|
||||
tank.addBox(-8F, -5F, -8F, 16, 4, 16);
|
||||
tank.setRotationPoint(0F, 16F, 0F);
|
||||
tank.setTextureSize(128, 128);
|
||||
tank.mirror = true;
|
||||
setRotation(tank, 0F, 0F, 0F);
|
||||
centreCollumn = new ModelRenderer(this, 0, 21);
|
||||
centreCollumn.addBox(-4F, -5F, -4F, 8, 4, 8);
|
||||
centreCollumn.setRotationPoint(0F, 16F, 0F);
|
||||
centreCollumn.setTextureSize(128, 128);
|
||||
centreCollumn.mirror = true;
|
||||
setRotation(centreCollumn, 0F, 0F, 0F);
|
||||
furnaceShape = new ModelRenderer(this, 0, 63);
|
||||
furnaceShape.addBox(-8F, -1F, -8F, 16, 5, 16);
|
||||
furnaceShape.setRotationPoint(0F, 16F, 0F);
|
||||
furnaceShape.setTextureSize(128, 128);
|
||||
furnaceShape.mirror = true;
|
||||
setRotation(furnaceShape, 0F, 0F, 0F);
|
||||
glassWindow = new ModelRenderer(this, 0, 85);
|
||||
glassWindow.addBox(-4F, -8F, -4F, 8, 0, 8);
|
||||
glassWindow.setRotationPoint(0F, 16F, 0F);
|
||||
glassWindow.setTextureSize(128, 128);
|
||||
glassWindow.mirror = true;
|
||||
setRotation(glassWindow, 0F, 0F, 0F);
|
||||
Shape1 = new ModelRenderer(this, 0, 94);
|
||||
Shape1.addBox(-8F, 4F, -8F, 4, 4, 4);
|
||||
Shape1.setRotationPoint(0F, 16F, 0F);
|
||||
Shape1.setTextureSize(128, 128);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
Shape2 = new ModelRenderer(this, 0, 103);
|
||||
Shape2.addBox(-4F, 6F, -4F, 8, 1, 8);
|
||||
Shape2.setRotationPoint(0F, 16F, 0F);
|
||||
Shape2.setTextureSize(128, 128);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
Shape3 = new ModelRenderer(this, 0, 94);
|
||||
Shape3.addBox(4F, 4F, -8F, 4, 4, 4);
|
||||
Shape3.setRotationPoint(0F, 16F, 0F);
|
||||
Shape3.setTextureSize(128, 128);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0F, 0F, 0F);
|
||||
Shape4 = new ModelRenderer(this, 0, 94);
|
||||
Shape4.addBox(-8F, 4F, 4F, 4, 4, 4);
|
||||
Shape4.setRotationPoint(0F, 16F, 0F);
|
||||
Shape4.setTextureSize(128, 128);
|
||||
Shape4.mirror = true;
|
||||
setRotation(Shape4, 0F, 0F, 0F);
|
||||
Shape5 = new ModelRenderer(this, 0, 94);
|
||||
Shape5.addBox(4F, 4F, 4F, 4, 4, 4);
|
||||
Shape5.setRotationPoint(0F, 16F, 0F);
|
||||
Shape5.setTextureSize(128, 128);
|
||||
Shape5.mirror = true;
|
||||
setRotation(Shape5, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
top1.render(f5);
|
||||
top2.render(f5);
|
||||
top3.render(f5);
|
||||
top4.render(f5);
|
||||
tank.render(f5);
|
||||
centreCollumn.render(f5);
|
||||
furnaceShape.render(f5);
|
||||
glassWindow.render(f5);
|
||||
Shape1.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape3.render(f5);
|
||||
Shape4.render(f5);
|
||||
Shape5.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class ModelBloodAltar extends ModelBase
|
||||
{
|
||||
private IModelCustom modelBloodAltar;
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.entity.Entity;
|
|||
|
||||
public class ModelCrystalBelljar extends ModelBase
|
||||
{
|
||||
//fields
|
||||
//fields
|
||||
ModelRenderer handle1;
|
||||
ModelRenderer handle2;
|
||||
ModelRenderer jar1;
|
||||
|
@ -15,105 +15,105 @@ public class ModelCrystalBelljar extends ModelBase
|
|||
ModelRenderer jar3;
|
||||
ModelRenderer jar4;
|
||||
ModelRenderer jar5;
|
||||
|
||||
public ModelCrystalBelljar()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 64;
|
||||
|
||||
handle1 = new ModelRenderer(this, 0, 17);
|
||||
handle1.addBox(-2F, -7F, -2F, 4, 1, 4);
|
||||
handle1.setRotationPoint(0F, 16F, 0F);
|
||||
handle1.setTextureSize(128, 64);
|
||||
handle1.mirror = true;
|
||||
setRotation(handle1, 0F, 0F, 0F);
|
||||
handle2 = new ModelRenderer(this, 0, 23);
|
||||
handle2.addBox(-1F, -6F, -1F, 2, 1, 2);
|
||||
handle2.setRotationPoint(0F, 16F, 0F);
|
||||
handle2.setTextureSize(128, 64);
|
||||
handle2.mirror = true;
|
||||
setRotation(handle2, 0F, 0F, 0F);
|
||||
jar1 = new ModelRenderer(this, 0, 27);
|
||||
jar1.addBox(-4F, -5F, -4F, 8, 1, 8);
|
||||
jar1.setRotationPoint(0F, 16F, 0F);
|
||||
jar1.setTextureSize(128, 64);
|
||||
jar1.mirror = true;
|
||||
setRotation(jar1, 0F, 0F, 0F);
|
||||
woodBottom = new ModelRenderer(this, 0, 0);
|
||||
woodBottom.addBox(-7F, 6F, -7F, 14, 2, 14);
|
||||
woodBottom.setRotationPoint(0F, 16F, 0F);
|
||||
woodBottom.setTextureSize(128, 64);
|
||||
woodBottom.mirror = true;
|
||||
setRotation(woodBottom, 0F, 0F, 0F);
|
||||
jar2 = new ModelRenderer(this, 0, 38);
|
||||
jar2.addBox(-5F, -4F, 4F, 10, 10, 1);
|
||||
jar2.setRotationPoint(0F, 16F, 0F);
|
||||
jar2.setTextureSize(128, 64);
|
||||
jar2.mirror = true;
|
||||
setRotation(jar2, 0F, 0F, 0F);
|
||||
jar3 = new ModelRenderer(this, 46, 38);
|
||||
jar3.addBox(4F, -4F, -4F, 1, 10, 8);
|
||||
jar3.setRotationPoint(0F, 16F, 0F);
|
||||
jar3.setTextureSize(128, 64);
|
||||
jar3.mirror = true;
|
||||
setRotation(jar3, 0F, 0F, 0F);
|
||||
jar4 = new ModelRenderer(this, 23, 38);
|
||||
jar4.addBox(-5F, -4F, -5F, 10, 10, 1);
|
||||
jar4.setRotationPoint(0F, 16F, 0F);
|
||||
jar4.setTextureSize(128, 64);
|
||||
jar4.mirror = true;
|
||||
setRotation(jar4, 0F, 0F, 0F);
|
||||
jar5 = new ModelRenderer(this, 65, 38);
|
||||
jar5.addBox(-5F, -4F, -4F, 1, 10, 8);
|
||||
jar5.setRotationPoint(0F, 16F, 0F);
|
||||
jar5.setTextureSize(128, 64);
|
||||
jar5.mirror = true;
|
||||
setRotation(jar5, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
handle1.render(f5);
|
||||
handle2.render(f5);
|
||||
jar1.render(f5);
|
||||
woodBottom.render(f5);
|
||||
jar2.render(f5);
|
||||
jar3.render(f5);
|
||||
jar4.render(f5);
|
||||
jar5.render(f5);
|
||||
}
|
||||
|
||||
public void renderSpecialItem(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, int part)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
if(part == 0)
|
||||
{
|
||||
woodBottom.render(f5);
|
||||
}else
|
||||
{
|
||||
handle1.render(f5);
|
||||
handle2.render(f5);
|
||||
jar1.render(f5);
|
||||
jar2.render(f5);
|
||||
jar3.render(f5);
|
||||
jar4.render(f5);
|
||||
jar5.render(f5);
|
||||
}
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
|
||||
public ModelCrystalBelljar()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 64;
|
||||
|
||||
handle1 = new ModelRenderer(this, 0, 17);
|
||||
handle1.addBox(-2F, -7F, -2F, 4, 1, 4);
|
||||
handle1.setRotationPoint(0F, 16F, 0F);
|
||||
handle1.setTextureSize(128, 64);
|
||||
handle1.mirror = true;
|
||||
setRotation(handle1, 0F, 0F, 0F);
|
||||
handle2 = new ModelRenderer(this, 0, 23);
|
||||
handle2.addBox(-1F, -6F, -1F, 2, 1, 2);
|
||||
handle2.setRotationPoint(0F, 16F, 0F);
|
||||
handle2.setTextureSize(128, 64);
|
||||
handle2.mirror = true;
|
||||
setRotation(handle2, 0F, 0F, 0F);
|
||||
jar1 = new ModelRenderer(this, 0, 27);
|
||||
jar1.addBox(-4F, -5F, -4F, 8, 1, 8);
|
||||
jar1.setRotationPoint(0F, 16F, 0F);
|
||||
jar1.setTextureSize(128, 64);
|
||||
jar1.mirror = true;
|
||||
setRotation(jar1, 0F, 0F, 0F);
|
||||
woodBottom = new ModelRenderer(this, 0, 0);
|
||||
woodBottom.addBox(-7F, 6F, -7F, 14, 2, 14);
|
||||
woodBottom.setRotationPoint(0F, 16F, 0F);
|
||||
woodBottom.setTextureSize(128, 64);
|
||||
woodBottom.mirror = true;
|
||||
setRotation(woodBottom, 0F, 0F, 0F);
|
||||
jar2 = new ModelRenderer(this, 0, 38);
|
||||
jar2.addBox(-5F, -4F, 4F, 10, 10, 1);
|
||||
jar2.setRotationPoint(0F, 16F, 0F);
|
||||
jar2.setTextureSize(128, 64);
|
||||
jar2.mirror = true;
|
||||
setRotation(jar2, 0F, 0F, 0F);
|
||||
jar3 = new ModelRenderer(this, 46, 38);
|
||||
jar3.addBox(4F, -4F, -4F, 1, 10, 8);
|
||||
jar3.setRotationPoint(0F, 16F, 0F);
|
||||
jar3.setTextureSize(128, 64);
|
||||
jar3.mirror = true;
|
||||
setRotation(jar3, 0F, 0F, 0F);
|
||||
jar4 = new ModelRenderer(this, 23, 38);
|
||||
jar4.addBox(-5F, -4F, -5F, 10, 10, 1);
|
||||
jar4.setRotationPoint(0F, 16F, 0F);
|
||||
jar4.setTextureSize(128, 64);
|
||||
jar4.mirror = true;
|
||||
setRotation(jar4, 0F, 0F, 0F);
|
||||
jar5 = new ModelRenderer(this, 65, 38);
|
||||
jar5.addBox(-5F, -4F, -4F, 1, 10, 8);
|
||||
jar5.setRotationPoint(0F, 16F, 0F);
|
||||
jar5.setTextureSize(128, 64);
|
||||
jar5.mirror = true;
|
||||
setRotation(jar5, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
handle1.render(f5);
|
||||
handle2.render(f5);
|
||||
jar1.render(f5);
|
||||
woodBottom.render(f5);
|
||||
jar2.render(f5);
|
||||
jar3.render(f5);
|
||||
jar4.render(f5);
|
||||
jar5.render(f5);
|
||||
}
|
||||
|
||||
public void renderSpecialItem(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, int part)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
if (part == 0)
|
||||
{
|
||||
woodBottom.render(f5);
|
||||
} else
|
||||
{
|
||||
handle1.render(f5);
|
||||
handle2.render(f5);
|
||||
jar1.render(f5);
|
||||
jar2.render(f5);
|
||||
jar3.render(f5);
|
||||
jar4.render(f5);
|
||||
jar5.render(f5);
|
||||
}
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -7,7 +7,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
|
||||
public class ModelSpellEffectBlock extends ModelBase
|
||||
{
|
||||
//fields
|
||||
//fields
|
||||
ModelRenderer core;
|
||||
ModelRenderer frame1;
|
||||
ModelRenderer frame2;
|
||||
|
@ -32,301 +32,301 @@ public class ModelSpellEffectBlock extends ModelBase
|
|||
ModelRenderer outputSpacer2;
|
||||
ModelRenderer outputSpacer3;
|
||||
ModelRenderer outputSpacer4;
|
||||
|
||||
public ModelSpellEffectBlock()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
core = new ModelRenderer(this, 0, 0);
|
||||
core.addBox(-3F, -3F, -3F, 6, 6, 6);
|
||||
core.setRotationPoint(0F, 16F, 0F);
|
||||
core.setTextureSize(64, 64);
|
||||
core.mirror = true;
|
||||
setRotation(core, 0F, 0F, 0F);
|
||||
frame1 = new ModelRenderer(this, 16, 18);
|
||||
frame1.addBox(3F, -3F, -5F, 2, 6, 2);
|
||||
frame1.setRotationPoint(0F, 16F, 0F);
|
||||
frame1.setTextureSize(64, 64);
|
||||
frame1.mirror = true;
|
||||
setRotation(frame1, 0F, 0F, 0F);
|
||||
frame2 = new ModelRenderer(this, 0, 18);
|
||||
frame2.addBox(-5F, -3F, -5F, 2, 6, 2);
|
||||
frame2.setRotationPoint(0F, 16F, 0F);
|
||||
frame2.setTextureSize(64, 64);
|
||||
frame2.mirror = true;
|
||||
setRotation(frame2, 0F, 0F, 0F);
|
||||
frame3 = new ModelRenderer(this, 0, 13);
|
||||
frame3.addBox(-5F, -5F, -5F, 10, 2, 2);
|
||||
frame3.setRotationPoint(0F, 16F, 0F);
|
||||
frame3.setTextureSize(64, 64);
|
||||
frame3.mirror = true;
|
||||
setRotation(frame3, 0F, 0F, 0F);
|
||||
frame4 = new ModelRenderer(this, 0, 27);
|
||||
frame4.addBox(-5F, 3F, -5F, 10, 2, 2);
|
||||
frame4.setRotationPoint(0F, 16F, 0F);
|
||||
frame4.setTextureSize(64, 64);
|
||||
frame4.mirror = true;
|
||||
setRotation(frame4, 0F, 0F, 0F);
|
||||
frame5 = new ModelRenderer(this, 0, 34);
|
||||
frame5.addBox(-5F, -5F, 3F, 10, 2, 2);
|
||||
frame5.setRotationPoint(0F, 16F, 0F);
|
||||
frame5.setTextureSize(64, 64);
|
||||
frame5.mirror = true;
|
||||
setRotation(frame5, 0F, 0F, 0F);
|
||||
frame6 = new ModelRenderer(this, 0, 48);
|
||||
frame6.addBox(-5F, 3F, 3F, 10, 2, 2);
|
||||
frame6.setRotationPoint(0F, 16F, 0F);
|
||||
frame6.setTextureSize(64, 64);
|
||||
frame6.mirror = true;
|
||||
setRotation(frame6, 0F, 0F, 0F);
|
||||
frame7 = new ModelRenderer(this, 16, 39);
|
||||
frame7.addBox(-5F, -3F, 3F, 2, 6, 2);
|
||||
frame7.setRotationPoint(0F, 16F, 0F);
|
||||
frame7.setTextureSize(64, 64);
|
||||
frame7.mirror = true;
|
||||
setRotation(frame7, 0F, 0F, 0F);
|
||||
frame8 = new ModelRenderer(this, 0, 39);
|
||||
frame8.addBox(3F, -3F, 3F, 2, 6, 2);
|
||||
frame8.setRotationPoint(0F, 16F, 0F);
|
||||
frame8.setTextureSize(64, 64);
|
||||
frame8.mirror = true;
|
||||
setRotation(frame8, 0F, 0F, 0F);
|
||||
frame9 = new ModelRenderer(this, 25, 9);
|
||||
frame9.addBox(-5F, 3F, -3F, 2, 2, 6);
|
||||
frame9.setRotationPoint(0F, 16F, 0F);
|
||||
frame9.setTextureSize(64, 64);
|
||||
frame9.mirror = true;
|
||||
setRotation(frame9, 0F, 0F, 0F);
|
||||
frame10 = new ModelRenderer(this, 25, 0);
|
||||
frame10.addBox(-5F, -5F, -3F, 2, 2, 6);
|
||||
frame10.setRotationPoint(0F, 16F, 0F);
|
||||
frame10.setTextureSize(64, 64);
|
||||
frame10.mirror = true;
|
||||
setRotation(frame10, 0F, 0F, 0F);
|
||||
frame11 = new ModelRenderer(this, 42, 0);
|
||||
frame11.addBox(3F, -5F, -3F, 2, 2, 6);
|
||||
frame11.setRotationPoint(0F, 16F, 0F);
|
||||
frame11.setTextureSize(64, 64);
|
||||
frame11.mirror = true;
|
||||
setRotation(frame11, 0F, 0F, 0F);
|
||||
frame12 = new ModelRenderer(this, 42, 9);
|
||||
frame12.addBox(3F, 3F, -3F, 2, 2, 6);
|
||||
frame12.setRotationPoint(0F, 16F, 0F);
|
||||
frame12.setTextureSize(64, 64);
|
||||
frame12.mirror = true;
|
||||
setRotation(frame12, 0F, 0F, 0F);
|
||||
inputSpacer1 = new ModelRenderer(this, 25, 27);
|
||||
inputSpacer1.addBox(3F, -5F, -8F, 2, 2, 3);
|
||||
inputSpacer1.setRotationPoint(0F, 16F, 0F);
|
||||
inputSpacer1.setTextureSize(64, 64);
|
||||
inputSpacer1.mirror = true;
|
||||
setRotation(inputSpacer1, 0F, 0F, 0F);
|
||||
inputFace = new ModelRenderer(this, 38, 27);
|
||||
inputFace.addBox(-2F, -2F, -8F, 4, 4, 5);
|
||||
inputFace.setRotationPoint(0F, 16F, 0F);
|
||||
inputFace.setTextureSize(64, 64);
|
||||
inputFace.mirror = true;
|
||||
setRotation(inputFace, 0F, 0F, 0F);
|
||||
inputSpacer2 = new ModelRenderer(this, 25, 27);
|
||||
inputSpacer2.addBox(-5F, -5F, -8F, 2, 2, 3);
|
||||
inputSpacer2.setRotationPoint(0F, 16F, 0F);
|
||||
inputSpacer2.setTextureSize(64, 64);
|
||||
inputSpacer2.mirror = true;
|
||||
setRotation(inputSpacer2, 0F, 0F, 0F);
|
||||
inputSpacer3 = new ModelRenderer(this, 25, 27);
|
||||
inputSpacer3.addBox(3F, 3F, -8F, 2, 2, 3);
|
||||
inputSpacer3.setRotationPoint(0F, 16F, 0F);
|
||||
inputSpacer3.setTextureSize(64, 64);
|
||||
inputSpacer3.mirror = true;
|
||||
setRotation(inputSpacer3, 0F, 0F, 0F);
|
||||
inputSpacer4 = new ModelRenderer(this, 25, 27);
|
||||
inputSpacer4.addBox(-5F, 3F, -8F, 2, 2, 3);
|
||||
inputSpacer4.setRotationPoint(0F, 16F, 0F);
|
||||
inputSpacer4.setTextureSize(64, 64);
|
||||
inputSpacer4.mirror = true;
|
||||
setRotation(inputSpacer4, 0F, 0F, 0F);
|
||||
outputFace = new ModelRenderer(this, 38, 37);
|
||||
outputFace.addBox(6F, -2F, -2F, 2, 4, 4);
|
||||
outputFace.setRotationPoint(0F, 16F, 0F);
|
||||
outputFace.setTextureSize(64, 64);
|
||||
outputFace.mirror = true;
|
||||
setRotation(outputFace, 0F, 0F, 0F);
|
||||
outputPlug = new ModelRenderer(this, 36, 48);
|
||||
outputPlug.addBox(3F, -3F, -3F, 2, 6, 6);
|
||||
outputPlug.setRotationPoint(0F, 16F, 0F);
|
||||
outputPlug.setTextureSize(64, 64);
|
||||
outputPlug.mirror = true;
|
||||
setRotation(outputPlug, 0F, 0F, 0F);
|
||||
outputSpacer1 = new ModelRenderer(this, 25, 48);
|
||||
outputSpacer1.addBox(5F, -5F, -5F, 3, 2, 2);
|
||||
outputSpacer1.setRotationPoint(0F, 16F, 0F);
|
||||
outputSpacer1.setTextureSize(64, 64);
|
||||
outputSpacer1.mirror = true;
|
||||
setRotation(outputSpacer1, 0F, 0F, 0F);
|
||||
outputSpacer2 = new ModelRenderer(this, 25, 48);
|
||||
outputSpacer2.addBox(5F, -5F, 3F, 3, 2, 2);
|
||||
outputSpacer2.setRotationPoint(0F, 16F, 0F);
|
||||
outputSpacer2.setTextureSize(64, 64);
|
||||
outputSpacer2.mirror = true;
|
||||
setRotation(outputSpacer2, 0F, 0F, 0F);
|
||||
outputSpacer3 = new ModelRenderer(this, 25, 48);
|
||||
outputSpacer3.addBox(5F, 3F, -5F, 3, 2, 2);
|
||||
outputSpacer3.setRotationPoint(0F, 16F, 0F);
|
||||
outputSpacer3.setTextureSize(64, 64);
|
||||
outputSpacer3.mirror = true;
|
||||
setRotation(outputSpacer3, 0F, 0F, 0F);
|
||||
outputSpacer4 = new ModelRenderer(this, 25, 48);
|
||||
outputSpacer4.addBox(5F, 3F, 3F, 3, 2, 2);
|
||||
outputSpacer4.setRotationPoint(0F, 16F, 0F);
|
||||
outputSpacer4.setTextureSize(64, 64);
|
||||
outputSpacer4.mirror = true;
|
||||
setRotation(outputSpacer4, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
float xInputRot = 0.0f;
|
||||
float yInputRot = 0.0f;
|
||||
float zInputRot = 0.0f;
|
||||
float xOutputRot = 0.0f;
|
||||
float yOutputRot = 0.0f;
|
||||
float zOutputRot = 0.0f;
|
||||
|
||||
switch (input)
|
||||
public ModelSpellEffectBlock()
|
||||
{
|
||||
case NORTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
case EAST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case SOUTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (1.0f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case WEST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (-0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case UP:
|
||||
xInputRot = (float) (-0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
xInputRot = (float) (0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
core = new ModelRenderer(this, 0, 0);
|
||||
core.addBox(-3F, -3F, -3F, 6, 6, 6);
|
||||
core.setRotationPoint(0F, 16F, 0F);
|
||||
core.setTextureSize(64, 64);
|
||||
core.mirror = true;
|
||||
setRotation(core, 0F, 0F, 0F);
|
||||
frame1 = new ModelRenderer(this, 16, 18);
|
||||
frame1.addBox(3F, -3F, -5F, 2, 6, 2);
|
||||
frame1.setRotationPoint(0F, 16F, 0F);
|
||||
frame1.setTextureSize(64, 64);
|
||||
frame1.mirror = true;
|
||||
setRotation(frame1, 0F, 0F, 0F);
|
||||
frame2 = new ModelRenderer(this, 0, 18);
|
||||
frame2.addBox(-5F, -3F, -5F, 2, 6, 2);
|
||||
frame2.setRotationPoint(0F, 16F, 0F);
|
||||
frame2.setTextureSize(64, 64);
|
||||
frame2.mirror = true;
|
||||
setRotation(frame2, 0F, 0F, 0F);
|
||||
frame3 = new ModelRenderer(this, 0, 13);
|
||||
frame3.addBox(-5F, -5F, -5F, 10, 2, 2);
|
||||
frame3.setRotationPoint(0F, 16F, 0F);
|
||||
frame3.setTextureSize(64, 64);
|
||||
frame3.mirror = true;
|
||||
setRotation(frame3, 0F, 0F, 0F);
|
||||
frame4 = new ModelRenderer(this, 0, 27);
|
||||
frame4.addBox(-5F, 3F, -5F, 10, 2, 2);
|
||||
frame4.setRotationPoint(0F, 16F, 0F);
|
||||
frame4.setTextureSize(64, 64);
|
||||
frame4.mirror = true;
|
||||
setRotation(frame4, 0F, 0F, 0F);
|
||||
frame5 = new ModelRenderer(this, 0, 34);
|
||||
frame5.addBox(-5F, -5F, 3F, 10, 2, 2);
|
||||
frame5.setRotationPoint(0F, 16F, 0F);
|
||||
frame5.setTextureSize(64, 64);
|
||||
frame5.mirror = true;
|
||||
setRotation(frame5, 0F, 0F, 0F);
|
||||
frame6 = new ModelRenderer(this, 0, 48);
|
||||
frame6.addBox(-5F, 3F, 3F, 10, 2, 2);
|
||||
frame6.setRotationPoint(0F, 16F, 0F);
|
||||
frame6.setTextureSize(64, 64);
|
||||
frame6.mirror = true;
|
||||
setRotation(frame6, 0F, 0F, 0F);
|
||||
frame7 = new ModelRenderer(this, 16, 39);
|
||||
frame7.addBox(-5F, -3F, 3F, 2, 6, 2);
|
||||
frame7.setRotationPoint(0F, 16F, 0F);
|
||||
frame7.setTextureSize(64, 64);
|
||||
frame7.mirror = true;
|
||||
setRotation(frame7, 0F, 0F, 0F);
|
||||
frame8 = new ModelRenderer(this, 0, 39);
|
||||
frame8.addBox(3F, -3F, 3F, 2, 6, 2);
|
||||
frame8.setRotationPoint(0F, 16F, 0F);
|
||||
frame8.setTextureSize(64, 64);
|
||||
frame8.mirror = true;
|
||||
setRotation(frame8, 0F, 0F, 0F);
|
||||
frame9 = new ModelRenderer(this, 25, 9);
|
||||
frame9.addBox(-5F, 3F, -3F, 2, 2, 6);
|
||||
frame9.setRotationPoint(0F, 16F, 0F);
|
||||
frame9.setTextureSize(64, 64);
|
||||
frame9.mirror = true;
|
||||
setRotation(frame9, 0F, 0F, 0F);
|
||||
frame10 = new ModelRenderer(this, 25, 0);
|
||||
frame10.addBox(-5F, -5F, -3F, 2, 2, 6);
|
||||
frame10.setRotationPoint(0F, 16F, 0F);
|
||||
frame10.setTextureSize(64, 64);
|
||||
frame10.mirror = true;
|
||||
setRotation(frame10, 0F, 0F, 0F);
|
||||
frame11 = new ModelRenderer(this, 42, 0);
|
||||
frame11.addBox(3F, -5F, -3F, 2, 2, 6);
|
||||
frame11.setRotationPoint(0F, 16F, 0F);
|
||||
frame11.setTextureSize(64, 64);
|
||||
frame11.mirror = true;
|
||||
setRotation(frame11, 0F, 0F, 0F);
|
||||
frame12 = new ModelRenderer(this, 42, 9);
|
||||
frame12.addBox(3F, 3F, -3F, 2, 2, 6);
|
||||
frame12.setRotationPoint(0F, 16F, 0F);
|
||||
frame12.setTextureSize(64, 64);
|
||||
frame12.mirror = true;
|
||||
setRotation(frame12, 0F, 0F, 0F);
|
||||
inputSpacer1 = new ModelRenderer(this, 25, 27);
|
||||
inputSpacer1.addBox(3F, -5F, -8F, 2, 2, 3);
|
||||
inputSpacer1.setRotationPoint(0F, 16F, 0F);
|
||||
inputSpacer1.setTextureSize(64, 64);
|
||||
inputSpacer1.mirror = true;
|
||||
setRotation(inputSpacer1, 0F, 0F, 0F);
|
||||
inputFace = new ModelRenderer(this, 38, 27);
|
||||
inputFace.addBox(-2F, -2F, -8F, 4, 4, 5);
|
||||
inputFace.setRotationPoint(0F, 16F, 0F);
|
||||
inputFace.setTextureSize(64, 64);
|
||||
inputFace.mirror = true;
|
||||
setRotation(inputFace, 0F, 0F, 0F);
|
||||
inputSpacer2 = new ModelRenderer(this, 25, 27);
|
||||
inputSpacer2.addBox(-5F, -5F, -8F, 2, 2, 3);
|
||||
inputSpacer2.setRotationPoint(0F, 16F, 0F);
|
||||
inputSpacer2.setTextureSize(64, 64);
|
||||
inputSpacer2.mirror = true;
|
||||
setRotation(inputSpacer2, 0F, 0F, 0F);
|
||||
inputSpacer3 = new ModelRenderer(this, 25, 27);
|
||||
inputSpacer3.addBox(3F, 3F, -8F, 2, 2, 3);
|
||||
inputSpacer3.setRotationPoint(0F, 16F, 0F);
|
||||
inputSpacer3.setTextureSize(64, 64);
|
||||
inputSpacer3.mirror = true;
|
||||
setRotation(inputSpacer3, 0F, 0F, 0F);
|
||||
inputSpacer4 = new ModelRenderer(this, 25, 27);
|
||||
inputSpacer4.addBox(-5F, 3F, -8F, 2, 2, 3);
|
||||
inputSpacer4.setRotationPoint(0F, 16F, 0F);
|
||||
inputSpacer4.setTextureSize(64, 64);
|
||||
inputSpacer4.mirror = true;
|
||||
setRotation(inputSpacer4, 0F, 0F, 0F);
|
||||
outputFace = new ModelRenderer(this, 38, 37);
|
||||
outputFace.addBox(6F, -2F, -2F, 2, 4, 4);
|
||||
outputFace.setRotationPoint(0F, 16F, 0F);
|
||||
outputFace.setTextureSize(64, 64);
|
||||
outputFace.mirror = true;
|
||||
setRotation(outputFace, 0F, 0F, 0F);
|
||||
outputPlug = new ModelRenderer(this, 36, 48);
|
||||
outputPlug.addBox(3F, -3F, -3F, 2, 6, 6);
|
||||
outputPlug.setRotationPoint(0F, 16F, 0F);
|
||||
outputPlug.setTextureSize(64, 64);
|
||||
outputPlug.mirror = true;
|
||||
setRotation(outputPlug, 0F, 0F, 0F);
|
||||
outputSpacer1 = new ModelRenderer(this, 25, 48);
|
||||
outputSpacer1.addBox(5F, -5F, -5F, 3, 2, 2);
|
||||
outputSpacer1.setRotationPoint(0F, 16F, 0F);
|
||||
outputSpacer1.setTextureSize(64, 64);
|
||||
outputSpacer1.mirror = true;
|
||||
setRotation(outputSpacer1, 0F, 0F, 0F);
|
||||
outputSpacer2 = new ModelRenderer(this, 25, 48);
|
||||
outputSpacer2.addBox(5F, -5F, 3F, 3, 2, 2);
|
||||
outputSpacer2.setRotationPoint(0F, 16F, 0F);
|
||||
outputSpacer2.setTextureSize(64, 64);
|
||||
outputSpacer2.mirror = true;
|
||||
setRotation(outputSpacer2, 0F, 0F, 0F);
|
||||
outputSpacer3 = new ModelRenderer(this, 25, 48);
|
||||
outputSpacer3.addBox(5F, 3F, -5F, 3, 2, 2);
|
||||
outputSpacer3.setRotationPoint(0F, 16F, 0F);
|
||||
outputSpacer3.setTextureSize(64, 64);
|
||||
outputSpacer3.mirror = true;
|
||||
setRotation(outputSpacer3, 0F, 0F, 0F);
|
||||
outputSpacer4 = new ModelRenderer(this, 25, 48);
|
||||
outputSpacer4.addBox(5F, 3F, 3F, 3, 2, 2);
|
||||
outputSpacer4.setRotationPoint(0F, 16F, 0F);
|
||||
outputSpacer4.setTextureSize(64, 64);
|
||||
outputSpacer4.mirror = true;
|
||||
setRotation(outputSpacer4, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
switch (output)
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output)
|
||||
{
|
||||
case NORTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
float xInputRot = 0.0f;
|
||||
float yInputRot = 0.0f;
|
||||
float zInputRot = 0.0f;
|
||||
float xOutputRot = 0.0f;
|
||||
float yOutputRot = 0.0f;
|
||||
float zOutputRot = 0.0f;
|
||||
|
||||
case EAST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (1.0f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
switch (input)
|
||||
{
|
||||
case NORTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case SOUTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (-0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
case EAST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case WEST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
case SOUTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (1.0f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case UP:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (-0.5f * Math.PI);
|
||||
break;
|
||||
case WEST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (-0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (0.5f * Math.PI);
|
||||
break;
|
||||
case UP:
|
||||
xInputRot = (float) (-0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
case DOWN:
|
||||
xInputRot = (float) (0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (output)
|
||||
{
|
||||
case NORTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case EAST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (1.0f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case SOUTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (-0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case WEST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case UP:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (-0.5f * Math.PI);
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (0.5f * Math.PI);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
this.setRotation(inputFace, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(outputFace, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(inputSpacer1, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(inputSpacer2, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(inputSpacer3, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(inputSpacer4, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(outputPlug, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(outputSpacer1, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(outputSpacer2, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(outputSpacer3, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(outputSpacer4, xOutputRot, yOutputRot, zOutputRot);
|
||||
|
||||
core.render(f5);
|
||||
frame1.render(f5);
|
||||
frame2.render(f5);
|
||||
frame3.render(f5);
|
||||
frame4.render(f5);
|
||||
frame5.render(f5);
|
||||
frame6.render(f5);
|
||||
frame7.render(f5);
|
||||
frame8.render(f5);
|
||||
frame9.render(f5);
|
||||
frame10.render(f5);
|
||||
frame11.render(f5);
|
||||
frame12.render(f5);
|
||||
inputSpacer1.render(f5);
|
||||
inputFace.render(f5);
|
||||
inputSpacer2.render(f5);
|
||||
inputSpacer3.render(f5);
|
||||
inputSpacer4.render(f5);
|
||||
outputFace.render(f5);
|
||||
outputPlug.render(f5);
|
||||
outputSpacer1.render(f5);
|
||||
outputSpacer2.render(f5);
|
||||
outputSpacer3.render(f5);
|
||||
outputSpacer4.render(f5);
|
||||
}
|
||||
|
||||
this.setRotation(inputFace, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(outputFace, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(inputSpacer1, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(inputSpacer2, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(inputSpacer3, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(inputSpacer4, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(outputPlug, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(outputSpacer1, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(outputSpacer2, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(outputSpacer3, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(outputSpacer4, xOutputRot, yOutputRot, zOutputRot);
|
||||
|
||||
core.render(f5);
|
||||
frame1.render(f5);
|
||||
frame2.render(f5);
|
||||
frame3.render(f5);
|
||||
frame4.render(f5);
|
||||
frame5.render(f5);
|
||||
frame6.render(f5);
|
||||
frame7.render(f5);
|
||||
frame8.render(f5);
|
||||
frame9.render(f5);
|
||||
frame10.render(f5);
|
||||
frame11.render(f5);
|
||||
frame12.render(f5);
|
||||
inputSpacer1.render(f5);
|
||||
inputFace.render(f5);
|
||||
inputSpacer2.render(f5);
|
||||
inputSpacer3.render(f5);
|
||||
inputSpacer4.render(f5);
|
||||
outputFace.render(f5);
|
||||
outputPlug.render(f5);
|
||||
outputSpacer1.render(f5);
|
||||
outputSpacer2.render(f5);
|
||||
outputSpacer3.render(f5);
|
||||
outputSpacer4.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
|
||||
public class ModelSpellEnhancementBlock extends ModelBase
|
||||
{
|
||||
//fields
|
||||
//fields
|
||||
ModelRenderer core;
|
||||
ModelRenderer frame1;
|
||||
ModelRenderer frame2;
|
||||
|
@ -33,302 +33,302 @@ public class ModelSpellEnhancementBlock extends ModelBase
|
|||
ModelRenderer input3;
|
||||
ModelRenderer input4;
|
||||
ModelRenderer outputSecond;
|
||||
|
||||
public ModelSpellEnhancementBlock()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 64;
|
||||
|
||||
core = new ModelRenderer(this, 0, 0);
|
||||
core.addBox(-3F, -3F, -3F, 6, 6, 6);
|
||||
core.setRotationPoint(0F, 16F, 0F);
|
||||
core.setTextureSize(128, 64);
|
||||
core.mirror = true;
|
||||
setRotation(core, 0F, 0F, 0F);
|
||||
frame1 = new ModelRenderer(this, 0, 32);
|
||||
frame1.addBox(-7F, 5F, -7F, 14, 2, 2);
|
||||
frame1.setRotationPoint(0F, 16F, 0F);
|
||||
frame1.setTextureSize(128, 64);
|
||||
frame1.mirror = true;
|
||||
setRotation(frame1, 0F, 0F, 0F);
|
||||
frame2 = new ModelRenderer(this, 24, 19);
|
||||
frame2.addBox(5F, -5F, -7F, 2, 10, 2);
|
||||
frame2.setRotationPoint(0F, 16F, 0F);
|
||||
frame2.setTextureSize(128, 64);
|
||||
frame2.mirror = true;
|
||||
setRotation(frame2, 0F, 0F, 0F);
|
||||
frame3 = new ModelRenderer(this, 0, 19);
|
||||
frame3.addBox(-7F, -5F, -7F, 2, 10, 2);
|
||||
frame3.setRotationPoint(0F, 16F, 0F);
|
||||
frame3.setTextureSize(128, 64);
|
||||
frame3.mirror = true;
|
||||
setRotation(frame3, 0F, 0F, 0F);
|
||||
frame4 = new ModelRenderer(this, 0, 14);
|
||||
frame4.addBox(-7F, -7F, -7F, 14, 2, 2);
|
||||
frame4.setRotationPoint(0F, 16F, 0F);
|
||||
frame4.setTextureSize(128, 64);
|
||||
frame4.mirror = true;
|
||||
setRotation(frame4, 0F, 0F, 0F);
|
||||
frame5 = new ModelRenderer(this, 0, 57);
|
||||
frame5.addBox(-7F, 5F, 5F, 14, 2, 2);
|
||||
frame5.setRotationPoint(0F, 16F, 0F);
|
||||
frame5.setTextureSize(128, 64);
|
||||
frame5.mirror = true;
|
||||
setRotation(frame5, 0F, 0F, 0F);
|
||||
frame6 = new ModelRenderer(this, 0, 44);
|
||||
frame6.addBox(5F, -5F, 5F, 2, 10, 2);
|
||||
frame6.setRotationPoint(0F, 16F, 0F);
|
||||
frame6.setTextureSize(128, 64);
|
||||
frame6.mirror = true;
|
||||
setRotation(frame6, 0F, 0F, 0F);
|
||||
frame7 = new ModelRenderer(this, 24, 44);
|
||||
frame7.addBox(-7F, -5F, 5F, 2, 10, 2);
|
||||
frame7.setRotationPoint(0F, 16F, 0F);
|
||||
frame7.setTextureSize(128, 64);
|
||||
frame7.mirror = true;
|
||||
setRotation(frame7, 0F, 0F, 0F);
|
||||
frame8 = new ModelRenderer(this, 0, 39);
|
||||
frame8.addBox(-7F, -7F, 5F, 14, 2, 2);
|
||||
frame8.setRotationPoint(0F, 16F, 0F);
|
||||
frame8.setTextureSize(128, 64);
|
||||
frame8.mirror = true;
|
||||
setRotation(frame8, 0F, 0F, 0F);
|
||||
frame9 = new ModelRenderer(this, 66, 14);
|
||||
frame9.addBox(5F, 5F, -5F, 2, 2, 10);
|
||||
frame9.setRotationPoint(0F, 16F, 0F);
|
||||
frame9.setTextureSize(128, 64);
|
||||
frame9.mirror = true;
|
||||
setRotation(frame9, 0F, 0F, 0F);
|
||||
frame10 = new ModelRenderer(this, 40, 14);
|
||||
frame10.addBox(-7F, 5F, -5F, 2, 2, 10);
|
||||
frame10.setRotationPoint(0F, 16F, 0F);
|
||||
frame10.setTextureSize(128, 64);
|
||||
frame10.mirror = true;
|
||||
setRotation(frame10, 0F, 0F, 0F);
|
||||
frame11 = new ModelRenderer(this, 66, 0);
|
||||
frame11.addBox(5F, -7F, -5F, 2, 2, 10);
|
||||
frame11.setRotationPoint(0F, 16F, 0F);
|
||||
frame11.setTextureSize(128, 64);
|
||||
frame11.mirror = true;
|
||||
setRotation(frame11, 0F, 0F, 0F);
|
||||
frame12 = new ModelRenderer(this, 40, 0);
|
||||
frame12.addBox(-7F, -7F, -5F, 2, 2, 10);
|
||||
frame12.setRotationPoint(0F, 16F, 0F);
|
||||
frame12.setTextureSize(128, 64);
|
||||
frame12.mirror = true;
|
||||
setRotation(frame12, 0F, 0F, 0F);
|
||||
outputMain = new ModelRenderer(this, 78, 36);
|
||||
outputMain.addBox(6F, -2F, -2F, 2, 4, 4);
|
||||
outputMain.setRotationPoint(0F, 16F, 0F);
|
||||
outputMain.setTextureSize(128, 64);
|
||||
outputMain.mirror = true;
|
||||
setRotation(outputMain, 0F, 0F, 0F);
|
||||
inputMain = new ModelRenderer(this, 40, 36);
|
||||
inputMain.addBox(-2F, -2F, -8F, 4, 4, 5);
|
||||
inputMain.setRotationPoint(0F, 16F, 0F);
|
||||
inputMain.setTextureSize(128, 64);
|
||||
inputMain.mirror = true;
|
||||
setRotation(inputMain, 0F, 0F, 0F);
|
||||
output1 = new ModelRenderer(this, 80, 30);
|
||||
output1.addBox(5F, -5F, -5F, 3, 2, 2);
|
||||
output1.setRotationPoint(0F, 16F, 0F);
|
||||
output1.setTextureSize(128, 64);
|
||||
output1.mirror = true;
|
||||
setRotation(output1, 0F, 0F, 0F);
|
||||
output2 = new ModelRenderer(this, 80, 30);
|
||||
output2.addBox(5F, -5F, 3F, 3, 2, 2);
|
||||
output2.setRotationPoint(0F, 16F, 0F);
|
||||
output2.setTextureSize(128, 64);
|
||||
output2.mirror = true;
|
||||
setRotation(output2, 0F, 0F, 0F);
|
||||
output3 = new ModelRenderer(this, 80, 30);
|
||||
output3.addBox(5F, 3F, -5F, 3, 2, 2);
|
||||
output3.setRotationPoint(0F, 16F, 0F);
|
||||
output3.setTextureSize(128, 64);
|
||||
output3.mirror = true;
|
||||
setRotation(output3, 0F, 0F, 0F);
|
||||
output4 = new ModelRenderer(this, 80, 30);
|
||||
output4.addBox(5F, 3F, 3F, 3, 2, 2);
|
||||
output4.setRotationPoint(0F, 16F, 0F);
|
||||
output4.setTextureSize(128, 64);
|
||||
output4.mirror = true;
|
||||
setRotation(output4, 0F, 0F, 0F);
|
||||
input1 = new ModelRenderer(this, 40, 27);
|
||||
input1.addBox(3F, -5F, -8F, 2, 2, 5);
|
||||
input1.setRotationPoint(0F, 16F, 0F);
|
||||
input1.setTextureSize(128, 64);
|
||||
input1.mirror = true;
|
||||
setRotation(input1, 0F, 0F, 0F);
|
||||
input2 = new ModelRenderer(this, 40, 27);
|
||||
input2.addBox(-5F, -5F, -8F, 2, 2, 5);
|
||||
input2.setRotationPoint(0F, 16F, 0F);
|
||||
input2.setTextureSize(128, 64);
|
||||
input2.mirror = true;
|
||||
setRotation(input2, 0F, 0F, 0F);
|
||||
input3 = new ModelRenderer(this, 40, 27);
|
||||
input3.addBox(3F, 3F, -8F, 2, 2, 5);
|
||||
input3.setRotationPoint(0F, 16F, 0F);
|
||||
input3.setTextureSize(128, 64);
|
||||
input3.mirror = true;
|
||||
setRotation(input3, 0F, 0F, 0F);
|
||||
input4 = new ModelRenderer(this, 40, 27);
|
||||
input4.addBox(-5F, 3F, -8F, 2, 2, 5);
|
||||
input4.setRotationPoint(0F, 16F, 0F);
|
||||
input4.setTextureSize(128, 64);
|
||||
input4.mirror = true;
|
||||
setRotation(input4, 0F, 0F, 0F);
|
||||
outputSecond = new ModelRenderer(this, 78, 47);
|
||||
outputSecond.addBox(4F, -3F, -3F, 1, 6, 6);
|
||||
outputSecond.setRotationPoint(0F, 16F, 0F);
|
||||
outputSecond.setTextureSize(128, 64);
|
||||
outputSecond.mirror = true;
|
||||
setRotation(outputSecond, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
|
||||
float xInputRot = 0.0f;
|
||||
float yInputRot = 0.0f;
|
||||
float zInputRot = 0.0f;
|
||||
float xOutputRot = 0.0f;
|
||||
float yOutputRot = 0.0f;
|
||||
float zOutputRot = 0.0f;
|
||||
|
||||
switch (input)
|
||||
public ModelSpellEnhancementBlock()
|
||||
{
|
||||
case NORTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
textureWidth = 128;
|
||||
textureHeight = 64;
|
||||
|
||||
case EAST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case SOUTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (1.0f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case WEST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (-0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case UP:
|
||||
xInputRot = (float) (-0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
xInputRot = (float) (0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
core = new ModelRenderer(this, 0, 0);
|
||||
core.addBox(-3F, -3F, -3F, 6, 6, 6);
|
||||
core.setRotationPoint(0F, 16F, 0F);
|
||||
core.setTextureSize(128, 64);
|
||||
core.mirror = true;
|
||||
setRotation(core, 0F, 0F, 0F);
|
||||
frame1 = new ModelRenderer(this, 0, 32);
|
||||
frame1.addBox(-7F, 5F, -7F, 14, 2, 2);
|
||||
frame1.setRotationPoint(0F, 16F, 0F);
|
||||
frame1.setTextureSize(128, 64);
|
||||
frame1.mirror = true;
|
||||
setRotation(frame1, 0F, 0F, 0F);
|
||||
frame2 = new ModelRenderer(this, 24, 19);
|
||||
frame2.addBox(5F, -5F, -7F, 2, 10, 2);
|
||||
frame2.setRotationPoint(0F, 16F, 0F);
|
||||
frame2.setTextureSize(128, 64);
|
||||
frame2.mirror = true;
|
||||
setRotation(frame2, 0F, 0F, 0F);
|
||||
frame3 = new ModelRenderer(this, 0, 19);
|
||||
frame3.addBox(-7F, -5F, -7F, 2, 10, 2);
|
||||
frame3.setRotationPoint(0F, 16F, 0F);
|
||||
frame3.setTextureSize(128, 64);
|
||||
frame3.mirror = true;
|
||||
setRotation(frame3, 0F, 0F, 0F);
|
||||
frame4 = new ModelRenderer(this, 0, 14);
|
||||
frame4.addBox(-7F, -7F, -7F, 14, 2, 2);
|
||||
frame4.setRotationPoint(0F, 16F, 0F);
|
||||
frame4.setTextureSize(128, 64);
|
||||
frame4.mirror = true;
|
||||
setRotation(frame4, 0F, 0F, 0F);
|
||||
frame5 = new ModelRenderer(this, 0, 57);
|
||||
frame5.addBox(-7F, 5F, 5F, 14, 2, 2);
|
||||
frame5.setRotationPoint(0F, 16F, 0F);
|
||||
frame5.setTextureSize(128, 64);
|
||||
frame5.mirror = true;
|
||||
setRotation(frame5, 0F, 0F, 0F);
|
||||
frame6 = new ModelRenderer(this, 0, 44);
|
||||
frame6.addBox(5F, -5F, 5F, 2, 10, 2);
|
||||
frame6.setRotationPoint(0F, 16F, 0F);
|
||||
frame6.setTextureSize(128, 64);
|
||||
frame6.mirror = true;
|
||||
setRotation(frame6, 0F, 0F, 0F);
|
||||
frame7 = new ModelRenderer(this, 24, 44);
|
||||
frame7.addBox(-7F, -5F, 5F, 2, 10, 2);
|
||||
frame7.setRotationPoint(0F, 16F, 0F);
|
||||
frame7.setTextureSize(128, 64);
|
||||
frame7.mirror = true;
|
||||
setRotation(frame7, 0F, 0F, 0F);
|
||||
frame8 = new ModelRenderer(this, 0, 39);
|
||||
frame8.addBox(-7F, -7F, 5F, 14, 2, 2);
|
||||
frame8.setRotationPoint(0F, 16F, 0F);
|
||||
frame8.setTextureSize(128, 64);
|
||||
frame8.mirror = true;
|
||||
setRotation(frame8, 0F, 0F, 0F);
|
||||
frame9 = new ModelRenderer(this, 66, 14);
|
||||
frame9.addBox(5F, 5F, -5F, 2, 2, 10);
|
||||
frame9.setRotationPoint(0F, 16F, 0F);
|
||||
frame9.setTextureSize(128, 64);
|
||||
frame9.mirror = true;
|
||||
setRotation(frame9, 0F, 0F, 0F);
|
||||
frame10 = new ModelRenderer(this, 40, 14);
|
||||
frame10.addBox(-7F, 5F, -5F, 2, 2, 10);
|
||||
frame10.setRotationPoint(0F, 16F, 0F);
|
||||
frame10.setTextureSize(128, 64);
|
||||
frame10.mirror = true;
|
||||
setRotation(frame10, 0F, 0F, 0F);
|
||||
frame11 = new ModelRenderer(this, 66, 0);
|
||||
frame11.addBox(5F, -7F, -5F, 2, 2, 10);
|
||||
frame11.setRotationPoint(0F, 16F, 0F);
|
||||
frame11.setTextureSize(128, 64);
|
||||
frame11.mirror = true;
|
||||
setRotation(frame11, 0F, 0F, 0F);
|
||||
frame12 = new ModelRenderer(this, 40, 0);
|
||||
frame12.addBox(-7F, -7F, -5F, 2, 2, 10);
|
||||
frame12.setRotationPoint(0F, 16F, 0F);
|
||||
frame12.setTextureSize(128, 64);
|
||||
frame12.mirror = true;
|
||||
setRotation(frame12, 0F, 0F, 0F);
|
||||
outputMain = new ModelRenderer(this, 78, 36);
|
||||
outputMain.addBox(6F, -2F, -2F, 2, 4, 4);
|
||||
outputMain.setRotationPoint(0F, 16F, 0F);
|
||||
outputMain.setTextureSize(128, 64);
|
||||
outputMain.mirror = true;
|
||||
setRotation(outputMain, 0F, 0F, 0F);
|
||||
inputMain = new ModelRenderer(this, 40, 36);
|
||||
inputMain.addBox(-2F, -2F, -8F, 4, 4, 5);
|
||||
inputMain.setRotationPoint(0F, 16F, 0F);
|
||||
inputMain.setTextureSize(128, 64);
|
||||
inputMain.mirror = true;
|
||||
setRotation(inputMain, 0F, 0F, 0F);
|
||||
output1 = new ModelRenderer(this, 80, 30);
|
||||
output1.addBox(5F, -5F, -5F, 3, 2, 2);
|
||||
output1.setRotationPoint(0F, 16F, 0F);
|
||||
output1.setTextureSize(128, 64);
|
||||
output1.mirror = true;
|
||||
setRotation(output1, 0F, 0F, 0F);
|
||||
output2 = new ModelRenderer(this, 80, 30);
|
||||
output2.addBox(5F, -5F, 3F, 3, 2, 2);
|
||||
output2.setRotationPoint(0F, 16F, 0F);
|
||||
output2.setTextureSize(128, 64);
|
||||
output2.mirror = true;
|
||||
setRotation(output2, 0F, 0F, 0F);
|
||||
output3 = new ModelRenderer(this, 80, 30);
|
||||
output3.addBox(5F, 3F, -5F, 3, 2, 2);
|
||||
output3.setRotationPoint(0F, 16F, 0F);
|
||||
output3.setTextureSize(128, 64);
|
||||
output3.mirror = true;
|
||||
setRotation(output3, 0F, 0F, 0F);
|
||||
output4 = new ModelRenderer(this, 80, 30);
|
||||
output4.addBox(5F, 3F, 3F, 3, 2, 2);
|
||||
output4.setRotationPoint(0F, 16F, 0F);
|
||||
output4.setTextureSize(128, 64);
|
||||
output4.mirror = true;
|
||||
setRotation(output4, 0F, 0F, 0F);
|
||||
input1 = new ModelRenderer(this, 40, 27);
|
||||
input1.addBox(3F, -5F, -8F, 2, 2, 5);
|
||||
input1.setRotationPoint(0F, 16F, 0F);
|
||||
input1.setTextureSize(128, 64);
|
||||
input1.mirror = true;
|
||||
setRotation(input1, 0F, 0F, 0F);
|
||||
input2 = new ModelRenderer(this, 40, 27);
|
||||
input2.addBox(-5F, -5F, -8F, 2, 2, 5);
|
||||
input2.setRotationPoint(0F, 16F, 0F);
|
||||
input2.setTextureSize(128, 64);
|
||||
input2.mirror = true;
|
||||
setRotation(input2, 0F, 0F, 0F);
|
||||
input3 = new ModelRenderer(this, 40, 27);
|
||||
input3.addBox(3F, 3F, -8F, 2, 2, 5);
|
||||
input3.setRotationPoint(0F, 16F, 0F);
|
||||
input3.setTextureSize(128, 64);
|
||||
input3.mirror = true;
|
||||
setRotation(input3, 0F, 0F, 0F);
|
||||
input4 = new ModelRenderer(this, 40, 27);
|
||||
input4.addBox(-5F, 3F, -8F, 2, 2, 5);
|
||||
input4.setRotationPoint(0F, 16F, 0F);
|
||||
input4.setTextureSize(128, 64);
|
||||
input4.mirror = true;
|
||||
setRotation(input4, 0F, 0F, 0F);
|
||||
outputSecond = new ModelRenderer(this, 78, 47);
|
||||
outputSecond.addBox(4F, -3F, -3F, 1, 6, 6);
|
||||
outputSecond.setRotationPoint(0F, 16F, 0F);
|
||||
outputSecond.setTextureSize(128, 64);
|
||||
outputSecond.mirror = true;
|
||||
setRotation(outputSecond, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
switch (output)
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output)
|
||||
{
|
||||
case NORTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
|
||||
case EAST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (1.0f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
float xInputRot = 0.0f;
|
||||
float yInputRot = 0.0f;
|
||||
float zInputRot = 0.0f;
|
||||
float xOutputRot = 0.0f;
|
||||
float yOutputRot = 0.0f;
|
||||
float zOutputRot = 0.0f;
|
||||
|
||||
case SOUTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (-0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
switch (input)
|
||||
{
|
||||
case NORTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case WEST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
case EAST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case UP:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (-0.5f * Math.PI);
|
||||
break;
|
||||
case SOUTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (1.0f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (0.5f * Math.PI);
|
||||
break;
|
||||
case WEST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (-0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
case UP:
|
||||
xInputRot = (float) (-0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
xInputRot = (float) (0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (output)
|
||||
{
|
||||
case NORTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case EAST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (1.0f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case SOUTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (-0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case WEST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case UP:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (-0.5f * Math.PI);
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (0.5f * Math.PI);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
this.setRotation(inputMain, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(outputMain, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(input1, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(input2, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(input3, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(input4, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(outputSecond, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output1, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output2, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output3, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output4, xOutputRot, yOutputRot, zOutputRot);
|
||||
|
||||
core.render(f5);
|
||||
frame1.render(f5);
|
||||
frame2.render(f5);
|
||||
frame3.render(f5);
|
||||
frame4.render(f5);
|
||||
frame5.render(f5);
|
||||
frame6.render(f5);
|
||||
frame7.render(f5);
|
||||
frame8.render(f5);
|
||||
frame9.render(f5);
|
||||
frame10.render(f5);
|
||||
frame11.render(f5);
|
||||
frame12.render(f5);
|
||||
outputMain.render(f5);
|
||||
inputMain.render(f5);
|
||||
output1.render(f5);
|
||||
output2.render(f5);
|
||||
output3.render(f5);
|
||||
output4.render(f5);
|
||||
input1.render(f5);
|
||||
input2.render(f5);
|
||||
input3.render(f5);
|
||||
input4.render(f5);
|
||||
outputSecond.render(f5);
|
||||
}
|
||||
|
||||
this.setRotation(inputMain, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(outputMain, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(input1, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(input2, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(input3, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(input4, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(outputSecond, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output1, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output2, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output3, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output4, xOutputRot, yOutputRot, zOutputRot);
|
||||
|
||||
core.render(f5);
|
||||
frame1.render(f5);
|
||||
frame2.render(f5);
|
||||
frame3.render(f5);
|
||||
frame4.render(f5);
|
||||
frame5.render(f5);
|
||||
frame6.render(f5);
|
||||
frame7.render(f5);
|
||||
frame8.render(f5);
|
||||
frame9.render(f5);
|
||||
frame10.render(f5);
|
||||
frame11.render(f5);
|
||||
frame12.render(f5);
|
||||
outputMain.render(f5);
|
||||
inputMain.render(f5);
|
||||
output1.render(f5);
|
||||
output2.render(f5);
|
||||
output3.render(f5);
|
||||
output4.render(f5);
|
||||
input1.render(f5);
|
||||
input2.render(f5);
|
||||
input3.render(f5);
|
||||
input4.render(f5);
|
||||
outputSecond.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
|
||||
public class ModelSpellModifierBlock extends ModelBase
|
||||
{
|
||||
//fields
|
||||
//fields
|
||||
ModelRenderer core;
|
||||
ModelRenderer inputMain;
|
||||
ModelRenderer Shape2;
|
||||
|
@ -27,277 +27,277 @@ public class ModelSpellModifierBlock extends ModelBase
|
|||
ModelRenderer output2;
|
||||
ModelRenderer output3;
|
||||
ModelRenderer output4;
|
||||
|
||||
public ModelSpellModifierBlock()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
core = new ModelRenderer(this, 0, 0);
|
||||
core.addBox(-3F, -3F, -3F, 6, 6, 6);
|
||||
core.setRotationPoint(0F, 16F, 0F);
|
||||
core.setTextureSize(64, 64);
|
||||
core.mirror = true;
|
||||
setRotation(core, 0F, 0F, 0F);
|
||||
inputMain = new ModelRenderer(this, 25, 18);
|
||||
inputMain.addBox(-2F, -2F, -8F, 4, 4, 1);
|
||||
inputMain.setRotationPoint(0F, 16F, 0F);
|
||||
inputMain.setTextureSize(64, 64);
|
||||
inputMain.mirror = true;
|
||||
setRotation(inputMain, 0F, 0F, 0F);
|
||||
Shape2 = new ModelRenderer(this, 0, 13);
|
||||
Shape2.addBox(-5F, -5F, -8F, 10, 2, 2);
|
||||
Shape2.setRotationPoint(0F, 16F, 0F);
|
||||
Shape2.setTextureSize(64, 64);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
Shape3 = new ModelRenderer(this, 0, 27);
|
||||
Shape3.addBox(-5F, 3F, -8F, 10, 2, 2);
|
||||
Shape3.setRotationPoint(0F, 16F, 0F);
|
||||
Shape3.setTextureSize(64, 64);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0F, 0F, 0F);
|
||||
Shape4 = new ModelRenderer(this, 16, 18);
|
||||
Shape4.addBox(3F, -3F, -8F, 2, 6, 2);
|
||||
Shape4.setRotationPoint(0F, 16F, 0F);
|
||||
Shape4.setTextureSize(64, 64);
|
||||
Shape4.mirror = true;
|
||||
setRotation(Shape4, 0F, 0F, 0F);
|
||||
Shape5 = new ModelRenderer(this, 0, 18);
|
||||
Shape5.addBox(-5F, -3F, -8F, 2, 6, 2);
|
||||
Shape5.setRotationPoint(0F, 16F, 0F);
|
||||
Shape5.setTextureSize(64, 64);
|
||||
Shape5.mirror = true;
|
||||
setRotation(Shape5, 0F, 0F, 0F);
|
||||
Shape6 = new ModelRenderer(this, 0, 32);
|
||||
Shape6.addBox(-1F, -6F, -7F, 2, 1, 5);
|
||||
Shape6.setRotationPoint(0F, 16F, 0F);
|
||||
Shape6.setTextureSize(64, 64);
|
||||
Shape6.mirror = true;
|
||||
setRotation(Shape6, 0F, 0F, 0F);
|
||||
Shape7 = new ModelRenderer(this, 15, 32);
|
||||
Shape7.addBox(-2F, -6F, -2F, 4, 1, 4);
|
||||
Shape7.setRotationPoint(0F, 16F, 0F);
|
||||
Shape7.setTextureSize(64, 64);
|
||||
Shape7.mirror = true;
|
||||
setRotation(Shape7, 0F, 0F, 0F);
|
||||
Shape8 = new ModelRenderer(this, 15, 39);
|
||||
Shape8.addBox(-2F, 5F, -2F, 4, 1, 4);
|
||||
Shape8.setRotationPoint(0F, 16F, 0F);
|
||||
Shape8.setTextureSize(64, 64);
|
||||
Shape8.mirror = true;
|
||||
setRotation(Shape8, 0F, 0F, 0F);
|
||||
Shape9 = new ModelRenderer(this, 0, 39);
|
||||
Shape9.addBox(-1F, 5F, -7F, 2, 1, 5);
|
||||
Shape9.setRotationPoint(0F, 16F, 0F);
|
||||
Shape9.setTextureSize(64, 64);
|
||||
Shape9.mirror = true;
|
||||
setRotation(Shape9, 0F, 0F, 0F);
|
||||
outputMain = new ModelRenderer(this, 51, 23);
|
||||
outputMain.addBox(7F, -2F, -2F, 1, 4, 4);
|
||||
outputMain.setRotationPoint(0F, 16F, 0F);
|
||||
outputMain.setTextureSize(64, 64);
|
||||
outputMain.mirror = true;
|
||||
setRotation(outputMain, 0F, 0F, 0F);
|
||||
Shape11 = new ModelRenderer(this, 13, 46);
|
||||
Shape11.addBox(5F, -2F, -2F, 1, 4, 4);
|
||||
Shape11.setRotationPoint(0F, 16F, 0F);
|
||||
Shape11.setTextureSize(64, 64);
|
||||
Shape11.mirror = true;
|
||||
setRotation(Shape11, 0F, 0F, 0F);
|
||||
Shape12 = new ModelRenderer(this, 0, 46);
|
||||
Shape12.addBox(5F, -1F, -7F, 1, 2, 5);
|
||||
Shape12.setRotationPoint(0F, 16F, 0F);
|
||||
Shape12.setTextureSize(64, 64);
|
||||
Shape12.mirror = true;
|
||||
setRotation(Shape12, 0F, 0F, 0F);
|
||||
Shape13 = new ModelRenderer(this, 0, 56);
|
||||
Shape13.addBox(-6F, -1F, -7F, 1, 2, 5);
|
||||
Shape13.setRotationPoint(0F, 16F, 0F);
|
||||
Shape13.setTextureSize(64, 64);
|
||||
Shape13.mirror = true;
|
||||
setRotation(Shape13, 0F, 0F, 0F);
|
||||
Shape14 = new ModelRenderer(this, 13, 56);
|
||||
Shape14.addBox(-6F, -2F, -2F, 1, 4, 4);
|
||||
Shape14.setRotationPoint(0F, 16F, 0F);
|
||||
Shape14.setTextureSize(64, 64);
|
||||
Shape14.mirror = true;
|
||||
setRotation(Shape14, 0F, 0F, 0F);
|
||||
output1 = new ModelRenderer(this, 51, 18);
|
||||
output1.addBox(5F, -5F, -5F, 3, 2, 2);
|
||||
output1.setRotationPoint(0F, 16F, 0F);
|
||||
output1.setTextureSize(64, 64);
|
||||
output1.mirror = true;
|
||||
setRotation(output1, 0F, 0F, 0F);
|
||||
output2 = new ModelRenderer(this, 51, 18);
|
||||
output2.addBox(5F, -5F, 3F, 3, 2, 2);
|
||||
output2.setRotationPoint(0F, 16F, 0F);
|
||||
output2.setTextureSize(64, 64);
|
||||
output2.mirror = true;
|
||||
setRotation(output2, 0F, 0F, 0F);
|
||||
output3 = new ModelRenderer(this, 51, 18);
|
||||
output3.addBox(5F, 3F, -5F, 3, 2, 2);
|
||||
output3.setRotationPoint(0F, 16F, 0F);
|
||||
output3.setTextureSize(64, 64);
|
||||
output3.mirror = true;
|
||||
setRotation(output3, 0F, 0F, 0F);
|
||||
output4 = new ModelRenderer(this, 51, 18);
|
||||
output4.addBox(5F, 3F, 3F, 3, 2, 2);
|
||||
output4.setRotationPoint(0F, 16F, 0F);
|
||||
output4.setTextureSize(64, 64);
|
||||
output4.mirror = true;
|
||||
setRotation(output4, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
|
||||
float xInputRot = 0.0f;
|
||||
float yInputRot = 0.0f;
|
||||
float zInputRot = 0.0f;
|
||||
float xOutputRot = 0.0f;
|
||||
float yOutputRot = 0.0f;
|
||||
float zOutputRot = 0.0f;
|
||||
|
||||
switch (input)
|
||||
|
||||
public ModelSpellModifierBlock()
|
||||
{
|
||||
case NORTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
case EAST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case SOUTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (1.0f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case WEST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (-0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case UP:
|
||||
xInputRot = (float) (-0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
xInputRot = (float) (0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
core = new ModelRenderer(this, 0, 0);
|
||||
core.addBox(-3F, -3F, -3F, 6, 6, 6);
|
||||
core.setRotationPoint(0F, 16F, 0F);
|
||||
core.setTextureSize(64, 64);
|
||||
core.mirror = true;
|
||||
setRotation(core, 0F, 0F, 0F);
|
||||
inputMain = new ModelRenderer(this, 25, 18);
|
||||
inputMain.addBox(-2F, -2F, -8F, 4, 4, 1);
|
||||
inputMain.setRotationPoint(0F, 16F, 0F);
|
||||
inputMain.setTextureSize(64, 64);
|
||||
inputMain.mirror = true;
|
||||
setRotation(inputMain, 0F, 0F, 0F);
|
||||
Shape2 = new ModelRenderer(this, 0, 13);
|
||||
Shape2.addBox(-5F, -5F, -8F, 10, 2, 2);
|
||||
Shape2.setRotationPoint(0F, 16F, 0F);
|
||||
Shape2.setTextureSize(64, 64);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
Shape3 = new ModelRenderer(this, 0, 27);
|
||||
Shape3.addBox(-5F, 3F, -8F, 10, 2, 2);
|
||||
Shape3.setRotationPoint(0F, 16F, 0F);
|
||||
Shape3.setTextureSize(64, 64);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0F, 0F, 0F);
|
||||
Shape4 = new ModelRenderer(this, 16, 18);
|
||||
Shape4.addBox(3F, -3F, -8F, 2, 6, 2);
|
||||
Shape4.setRotationPoint(0F, 16F, 0F);
|
||||
Shape4.setTextureSize(64, 64);
|
||||
Shape4.mirror = true;
|
||||
setRotation(Shape4, 0F, 0F, 0F);
|
||||
Shape5 = new ModelRenderer(this, 0, 18);
|
||||
Shape5.addBox(-5F, -3F, -8F, 2, 6, 2);
|
||||
Shape5.setRotationPoint(0F, 16F, 0F);
|
||||
Shape5.setTextureSize(64, 64);
|
||||
Shape5.mirror = true;
|
||||
setRotation(Shape5, 0F, 0F, 0F);
|
||||
Shape6 = new ModelRenderer(this, 0, 32);
|
||||
Shape6.addBox(-1F, -6F, -7F, 2, 1, 5);
|
||||
Shape6.setRotationPoint(0F, 16F, 0F);
|
||||
Shape6.setTextureSize(64, 64);
|
||||
Shape6.mirror = true;
|
||||
setRotation(Shape6, 0F, 0F, 0F);
|
||||
Shape7 = new ModelRenderer(this, 15, 32);
|
||||
Shape7.addBox(-2F, -6F, -2F, 4, 1, 4);
|
||||
Shape7.setRotationPoint(0F, 16F, 0F);
|
||||
Shape7.setTextureSize(64, 64);
|
||||
Shape7.mirror = true;
|
||||
setRotation(Shape7, 0F, 0F, 0F);
|
||||
Shape8 = new ModelRenderer(this, 15, 39);
|
||||
Shape8.addBox(-2F, 5F, -2F, 4, 1, 4);
|
||||
Shape8.setRotationPoint(0F, 16F, 0F);
|
||||
Shape8.setTextureSize(64, 64);
|
||||
Shape8.mirror = true;
|
||||
setRotation(Shape8, 0F, 0F, 0F);
|
||||
Shape9 = new ModelRenderer(this, 0, 39);
|
||||
Shape9.addBox(-1F, 5F, -7F, 2, 1, 5);
|
||||
Shape9.setRotationPoint(0F, 16F, 0F);
|
||||
Shape9.setTextureSize(64, 64);
|
||||
Shape9.mirror = true;
|
||||
setRotation(Shape9, 0F, 0F, 0F);
|
||||
outputMain = new ModelRenderer(this, 51, 23);
|
||||
outputMain.addBox(7F, -2F, -2F, 1, 4, 4);
|
||||
outputMain.setRotationPoint(0F, 16F, 0F);
|
||||
outputMain.setTextureSize(64, 64);
|
||||
outputMain.mirror = true;
|
||||
setRotation(outputMain, 0F, 0F, 0F);
|
||||
Shape11 = new ModelRenderer(this, 13, 46);
|
||||
Shape11.addBox(5F, -2F, -2F, 1, 4, 4);
|
||||
Shape11.setRotationPoint(0F, 16F, 0F);
|
||||
Shape11.setTextureSize(64, 64);
|
||||
Shape11.mirror = true;
|
||||
setRotation(Shape11, 0F, 0F, 0F);
|
||||
Shape12 = new ModelRenderer(this, 0, 46);
|
||||
Shape12.addBox(5F, -1F, -7F, 1, 2, 5);
|
||||
Shape12.setRotationPoint(0F, 16F, 0F);
|
||||
Shape12.setTextureSize(64, 64);
|
||||
Shape12.mirror = true;
|
||||
setRotation(Shape12, 0F, 0F, 0F);
|
||||
Shape13 = new ModelRenderer(this, 0, 56);
|
||||
Shape13.addBox(-6F, -1F, -7F, 1, 2, 5);
|
||||
Shape13.setRotationPoint(0F, 16F, 0F);
|
||||
Shape13.setTextureSize(64, 64);
|
||||
Shape13.mirror = true;
|
||||
setRotation(Shape13, 0F, 0F, 0F);
|
||||
Shape14 = new ModelRenderer(this, 13, 56);
|
||||
Shape14.addBox(-6F, -2F, -2F, 1, 4, 4);
|
||||
Shape14.setRotationPoint(0F, 16F, 0F);
|
||||
Shape14.setTextureSize(64, 64);
|
||||
Shape14.mirror = true;
|
||||
setRotation(Shape14, 0F, 0F, 0F);
|
||||
output1 = new ModelRenderer(this, 51, 18);
|
||||
output1.addBox(5F, -5F, -5F, 3, 2, 2);
|
||||
output1.setRotationPoint(0F, 16F, 0F);
|
||||
output1.setTextureSize(64, 64);
|
||||
output1.mirror = true;
|
||||
setRotation(output1, 0F, 0F, 0F);
|
||||
output2 = new ModelRenderer(this, 51, 18);
|
||||
output2.addBox(5F, -5F, 3F, 3, 2, 2);
|
||||
output2.setRotationPoint(0F, 16F, 0F);
|
||||
output2.setTextureSize(64, 64);
|
||||
output2.mirror = true;
|
||||
setRotation(output2, 0F, 0F, 0F);
|
||||
output3 = new ModelRenderer(this, 51, 18);
|
||||
output3.addBox(5F, 3F, -5F, 3, 2, 2);
|
||||
output3.setRotationPoint(0F, 16F, 0F);
|
||||
output3.setTextureSize(64, 64);
|
||||
output3.mirror = true;
|
||||
setRotation(output3, 0F, 0F, 0F);
|
||||
output4 = new ModelRenderer(this, 51, 18);
|
||||
output4.addBox(5F, 3F, 3F, 3, 2, 2);
|
||||
output4.setRotationPoint(0F, 16F, 0F);
|
||||
output4.setTextureSize(64, 64);
|
||||
output4.mirror = true;
|
||||
setRotation(output4, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
switch (output)
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output)
|
||||
{
|
||||
case NORTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
|
||||
case EAST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (1.0f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
float xInputRot = 0.0f;
|
||||
float yInputRot = 0.0f;
|
||||
float zInputRot = 0.0f;
|
||||
float xOutputRot = 0.0f;
|
||||
float yOutputRot = 0.0f;
|
||||
float zOutputRot = 0.0f;
|
||||
|
||||
case SOUTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (-0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
switch (input)
|
||||
{
|
||||
case NORTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case WEST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
case EAST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case UP:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (-0.5f * Math.PI);
|
||||
break;
|
||||
case SOUTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (1.0f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (0.5f * Math.PI);
|
||||
break;
|
||||
case WEST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (-0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
case UP:
|
||||
xInputRot = (float) (-0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
xInputRot = (float) (0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch (output)
|
||||
{
|
||||
case NORTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case EAST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (1.0f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case SOUTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (-0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case WEST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case UP:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (-0.5f * Math.PI);
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (0.5f * Math.PI);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
this.setRotation(inputMain, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape2, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape3, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape4, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape5, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape6, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape7, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape8, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape9, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape12, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape11, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape13, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape14, xInputRot, yInputRot, zInputRot);
|
||||
|
||||
this.setRotation(outputMain, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output1, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output2, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output3, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output4, xOutputRot, yOutputRot, zOutputRot);
|
||||
|
||||
|
||||
core.render(f5);
|
||||
inputMain.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape3.render(f5);
|
||||
Shape4.render(f5);
|
||||
Shape5.render(f5);
|
||||
Shape6.render(f5);
|
||||
Shape7.render(f5);
|
||||
Shape8.render(f5);
|
||||
Shape9.render(f5);
|
||||
outputMain.render(f5);
|
||||
Shape11.render(f5);
|
||||
Shape12.render(f5);
|
||||
Shape13.render(f5);
|
||||
Shape14.render(f5);
|
||||
output1.render(f5);
|
||||
output2.render(f5);
|
||||
output3.render(f5);
|
||||
output4.render(f5);
|
||||
}
|
||||
|
||||
this.setRotation(inputMain, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape2, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape3, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape4, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape5, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape6, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape7, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape8, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape9, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape12, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape11, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape13, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(Shape14, xInputRot, yInputRot, zInputRot);
|
||||
|
||||
this.setRotation(outputMain, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output1, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output2, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output3, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output4, xOutputRot, yOutputRot, zOutputRot);
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
|
||||
core.render(f5);
|
||||
inputMain.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape3.render(f5);
|
||||
Shape4.render(f5);
|
||||
Shape5.render(f5);
|
||||
Shape6.render(f5);
|
||||
Shape7.render(f5);
|
||||
Shape8.render(f5);
|
||||
Shape9.render(f5);
|
||||
outputMain.render(f5);
|
||||
Shape11.render(f5);
|
||||
Shape12.render(f5);
|
||||
Shape13.render(f5);
|
||||
Shape14.render(f5);
|
||||
output1.render(f5);
|
||||
output2.render(f5);
|
||||
output3.render(f5);
|
||||
output4.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ package WayofTime.alchemicalWizardry.common.renderer.model;
|
|||
//- ZeuX
|
||||
|
||||
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -15,220 +14,220 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
|
||||
public class ModelSpellParadigmBlock extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer core;
|
||||
ModelRenderer outputMain;
|
||||
ModelRenderer output1;
|
||||
ModelRenderer output2;
|
||||
ModelRenderer output3;
|
||||
ModelRenderer output4;
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
ModelRenderer Shape5;
|
||||
//fields
|
||||
ModelRenderer core;
|
||||
ModelRenderer outputMain;
|
||||
ModelRenderer output1;
|
||||
ModelRenderer output2;
|
||||
ModelRenderer output3;
|
||||
ModelRenderer output4;
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
ModelRenderer Shape5;
|
||||
|
||||
public ModelSpellParadigmBlock()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
core = new ModelRenderer(this, 0, 0);
|
||||
core.addBox(-3F, -3F, -3F, 6, 6, 6);
|
||||
core.setRotationPoint(0F, 16F, 0F);
|
||||
core.setTextureSize(64, 64);
|
||||
core.mirror = true;
|
||||
setRotation(core, 0F, 0F, 0F);
|
||||
outputMain = new ModelRenderer(this, 0, 13);
|
||||
outputMain.addBox(6F, -2F, -2F, 2, 4, 4);
|
||||
outputMain.setRotationPoint(0F, 16F, 0F);
|
||||
outputMain.setTextureSize(64, 64);
|
||||
outputMain.mirror = true;
|
||||
setRotation(outputMain, 0F, 0F, 0F);
|
||||
output1 = new ModelRenderer(this, 0, 22);
|
||||
output1.addBox(5F, -5F, -5F, 3, 2, 2);
|
||||
output1.setRotationPoint(0F, 16F, 0F);
|
||||
output1.setTextureSize(64, 64);
|
||||
output1.mirror = true;
|
||||
setRotation(output1, 0F, 0F, 0F);
|
||||
output2 = new ModelRenderer(this, 0, 22);
|
||||
output2.addBox(5F, -5F, 3F, 3, 2, 2);
|
||||
output2.setRotationPoint(0F, 16F, 0F);
|
||||
output2.setTextureSize(64, 64);
|
||||
output2.mirror = true;
|
||||
setRotation(output2, 0F, 0F, 0F);
|
||||
output3 = new ModelRenderer(this, 0, 22);
|
||||
output3.addBox(5F, 3F, -5F, 3, 2, 2);
|
||||
output3.setRotationPoint(0F, 16F, 0F);
|
||||
output3.setTextureSize(64, 64);
|
||||
output3.mirror = true;
|
||||
setRotation(output3, 0F, 0F, 0F);
|
||||
output4 = new ModelRenderer(this, 0, 22);
|
||||
output4.addBox(5F, 3F, 3F, 3, 2, 2);
|
||||
output4.setRotationPoint(0F, 16F, 0F);
|
||||
output4.setTextureSize(64, 64);
|
||||
output4.mirror = true;
|
||||
setRotation(output4, 0F, 0F, 0F);
|
||||
Shape1 = new ModelRenderer(this, 0, 28);
|
||||
Shape1.addBox(-5F, -5F, -1F, 10, 1, 2);
|
||||
Shape1.setRotationPoint(0F, 16F, 0F);
|
||||
Shape1.setTextureSize(64, 64);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
Shape2 = new ModelRenderer(this, 25, 28);
|
||||
Shape2.addBox(-5F, -4F, -4F, 1, 8, 8);
|
||||
Shape2.setRotationPoint(0F, 16F, 0F);
|
||||
Shape2.setTextureSize(64, 64);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
Shape3 = new ModelRenderer(this, 0, 33);
|
||||
Shape3.addBox(-5F, 4F, -1F, 10, 1, 2);
|
||||
Shape3.setRotationPoint(0F, 16F, 0F);
|
||||
Shape3.setTextureSize(64, 64);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0F, 0F, 0F);
|
||||
Shape4 = new ModelRenderer(this, 0, 38);
|
||||
Shape4.addBox(-5F, -1F, -5F, 10, 2, 1);
|
||||
Shape4.setRotationPoint(0F, 16F, 0F);
|
||||
Shape4.setTextureSize(64, 64);
|
||||
Shape4.mirror = true;
|
||||
setRotation(Shape4, 0F, 0F, 0F);
|
||||
Shape5 = new ModelRenderer(this, 0, 43);
|
||||
Shape5.addBox(-5F, -1F, 4F, 10, 2, 1);
|
||||
Shape5.setRotationPoint(0F, 16F, 0F);
|
||||
Shape5.setTextureSize(64, 64);
|
||||
Shape5.mirror = true;
|
||||
setRotation(Shape5, 0F, 0F, 0F);
|
||||
}
|
||||
public ModelSpellParadigmBlock()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
float xInputRot = 0.0f;
|
||||
float yInputRot = 0.0f;
|
||||
float zInputRot = 0.0f;
|
||||
float xOutputRot = 0.0f;
|
||||
float yOutputRot = 0.0f;
|
||||
float zOutputRot = 0.0f;
|
||||
|
||||
switch (input)
|
||||
{
|
||||
case NORTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
core = new ModelRenderer(this, 0, 0);
|
||||
core.addBox(-3F, -3F, -3F, 6, 6, 6);
|
||||
core.setRotationPoint(0F, 16F, 0F);
|
||||
core.setTextureSize(64, 64);
|
||||
core.mirror = true;
|
||||
setRotation(core, 0F, 0F, 0F);
|
||||
outputMain = new ModelRenderer(this, 0, 13);
|
||||
outputMain.addBox(6F, -2F, -2F, 2, 4, 4);
|
||||
outputMain.setRotationPoint(0F, 16F, 0F);
|
||||
outputMain.setTextureSize(64, 64);
|
||||
outputMain.mirror = true;
|
||||
setRotation(outputMain, 0F, 0F, 0F);
|
||||
output1 = new ModelRenderer(this, 0, 22);
|
||||
output1.addBox(5F, -5F, -5F, 3, 2, 2);
|
||||
output1.setRotationPoint(0F, 16F, 0F);
|
||||
output1.setTextureSize(64, 64);
|
||||
output1.mirror = true;
|
||||
setRotation(output1, 0F, 0F, 0F);
|
||||
output2 = new ModelRenderer(this, 0, 22);
|
||||
output2.addBox(5F, -5F, 3F, 3, 2, 2);
|
||||
output2.setRotationPoint(0F, 16F, 0F);
|
||||
output2.setTextureSize(64, 64);
|
||||
output2.mirror = true;
|
||||
setRotation(output2, 0F, 0F, 0F);
|
||||
output3 = new ModelRenderer(this, 0, 22);
|
||||
output3.addBox(5F, 3F, -5F, 3, 2, 2);
|
||||
output3.setRotationPoint(0F, 16F, 0F);
|
||||
output3.setTextureSize(64, 64);
|
||||
output3.mirror = true;
|
||||
setRotation(output3, 0F, 0F, 0F);
|
||||
output4 = new ModelRenderer(this, 0, 22);
|
||||
output4.addBox(5F, 3F, 3F, 3, 2, 2);
|
||||
output4.setRotationPoint(0F, 16F, 0F);
|
||||
output4.setTextureSize(64, 64);
|
||||
output4.mirror = true;
|
||||
setRotation(output4, 0F, 0F, 0F);
|
||||
Shape1 = new ModelRenderer(this, 0, 28);
|
||||
Shape1.addBox(-5F, -5F, -1F, 10, 1, 2);
|
||||
Shape1.setRotationPoint(0F, 16F, 0F);
|
||||
Shape1.setTextureSize(64, 64);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
Shape2 = new ModelRenderer(this, 25, 28);
|
||||
Shape2.addBox(-5F, -4F, -4F, 1, 8, 8);
|
||||
Shape2.setRotationPoint(0F, 16F, 0F);
|
||||
Shape2.setTextureSize(64, 64);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
Shape3 = new ModelRenderer(this, 0, 33);
|
||||
Shape3.addBox(-5F, 4F, -1F, 10, 1, 2);
|
||||
Shape3.setRotationPoint(0F, 16F, 0F);
|
||||
Shape3.setTextureSize(64, 64);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0F, 0F, 0F);
|
||||
Shape4 = new ModelRenderer(this, 0, 38);
|
||||
Shape4.addBox(-5F, -1F, -5F, 10, 2, 1);
|
||||
Shape4.setRotationPoint(0F, 16F, 0F);
|
||||
Shape4.setTextureSize(64, 64);
|
||||
Shape4.mirror = true;
|
||||
setRotation(Shape4, 0F, 0F, 0F);
|
||||
Shape5 = new ModelRenderer(this, 0, 43);
|
||||
Shape5.addBox(-5F, -1F, 4F, 10, 2, 1);
|
||||
Shape5.setRotationPoint(0F, 16F, 0F);
|
||||
Shape5.setTextureSize(64, 64);
|
||||
Shape5.mirror = true;
|
||||
setRotation(Shape5, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
case EAST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5, ForgeDirection input, ForgeDirection output)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
float xInputRot = 0.0f;
|
||||
float yInputRot = 0.0f;
|
||||
float zInputRot = 0.0f;
|
||||
float xOutputRot = 0.0f;
|
||||
float yOutputRot = 0.0f;
|
||||
float zOutputRot = 0.0f;
|
||||
|
||||
case SOUTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (1.0f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
switch (input)
|
||||
{
|
||||
case NORTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case WEST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (-0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
case EAST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case UP:
|
||||
xInputRot = (float) (-0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
case SOUTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (1.0f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
xInputRot = (float) (0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
case WEST:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = (float) (-0.5f * Math.PI);
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
case UP:
|
||||
xInputRot = (float) (-0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
switch (output)
|
||||
{
|
||||
case NORTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
case DOWN:
|
||||
xInputRot = (float) (0.5f * Math.PI);
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case EAST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (1.0f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (-0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
switch (output)
|
||||
{
|
||||
case NORTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case WEST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
case EAST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (1.0f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case UP:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (-0.5f * Math.PI);
|
||||
break;
|
||||
case SOUTH:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = (float) (-0.5f * Math.PI);
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (0.5f * Math.PI);
|
||||
break;
|
||||
case WEST:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = 0.0f;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
this.setRotation(outputMain, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output1, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output2, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output3, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output4, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(Shape1, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(Shape2, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(Shape3, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(Shape4, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(Shape5, xOutputRot, yOutputRot, zOutputRot);
|
||||
core.render(f5);
|
||||
outputMain.render(f5);
|
||||
output1.render(f5);
|
||||
output2.render(f5);
|
||||
output3.render(f5);
|
||||
output4.render(f5);
|
||||
Shape1.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape3.render(f5);
|
||||
Shape4.render(f5);
|
||||
Shape5.render(f5);
|
||||
}
|
||||
case UP:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (-0.5f * Math.PI);
|
||||
break;
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
case DOWN:
|
||||
xOutputRot = 0.0f;
|
||||
yOutputRot = 0.0f;
|
||||
zOutputRot = (float) (0.5f * Math.PI);
|
||||
break;
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
this.setRotation(outputMain, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output1, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output2, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output3, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(output4, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(Shape1, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(Shape2, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(Shape3, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(Shape4, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(Shape5, xOutputRot, yOutputRot, zOutputRot);
|
||||
core.render(f5);
|
||||
outputMain.render(f5);
|
||||
output1.render(f5);
|
||||
output2.render(f5);
|
||||
output3.render(f5);
|
||||
output4.render(f5);
|
||||
Shape1.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape3.render(f5);
|
||||
Shape4.render(f5);
|
||||
Shape5.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import org.lwjgl.opengl.GL12;
|
|||
public class RenderEnergyBazookaMainProjectile extends Render
|
||||
{
|
||||
public ModelBase model = new ModelEnergyBazookaMainProjectile();
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/EnergyBazookaMainProjectile.png"); //refers to:YourMod/modelsTextureFile/optionalFile/yourTexture.png
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/EnergyBazookaMainProjectile.png");
|
||||
private float scale = 1.0f;
|
||||
|
||||
@Override
|
||||
|
@ -25,7 +25,6 @@ public class RenderEnergyBazookaMainProjectile extends Render
|
|||
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * f1, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(180.0f - entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * f1, 1.0F, 0.0F, 0.0f);
|
||||
model.render(entity, 0, (float) d0, (float) d1, (float) d2, f, f1);
|
||||
//GL11.glRotatef(entity.getRotationYawHead(), 0.0F, 1.0F, 0.0F);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
|
|
@ -1,25 +1,16 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.projectile;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.*;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.IProjectile;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderEnergyBlastProjectile extends Render
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@ import org.lwjgl.opengl.GL12;
|
|||
public class RenderMeteor extends Render
|
||||
{
|
||||
public ModelBase model = new ModelMeteor();
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/Meteor.png"); //refers to:YourMod/modelsTextureFile/optionalFile/yourTexture.png
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/Meteor.png");
|
||||
private float scale = 1.0f;
|
||||
|
||||
@Override
|
||||
|
@ -25,7 +25,6 @@ public class RenderMeteor extends Render
|
|||
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * f1, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(180.0f - entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * f1, 1.0F, 0.0F, 0.0f);
|
||||
model.render(entity, 0, (float) d0, (float) d1, (float) d2, f, f1);
|
||||
//GL11.glRotatef(entity.getRotationYawHead(), 0.0F, 1.0F, 0.0F);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
@ -33,7 +32,6 @@ public class RenderMeteor extends Render
|
|||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity entity)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return field_110833_a;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue