Adding gitignore
This commit is contained in:
parent
a2b006105e
commit
ecf0a7912e
1084 changed files with 90178 additions and 3 deletions
|
@ -0,0 +1,92 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer;
|
||||
|
||||
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");
|
||||
private int colourRed;
|
||||
private int colourGreen;
|
||||
private int colourBlue;
|
||||
private int colourIntensity;
|
||||
private double xOffset;
|
||||
private double yOffset;
|
||||
private double zOffset;
|
||||
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;
|
||||
}
|
||||
|
||||
@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);
|
||||
|
||||
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);
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,155 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer;
|
||||
|
||||
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
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public void setSize(double size)
|
||||
{
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
protected static void bindTexture(ResourceLocation p_147499_1_)
|
||||
{
|
||||
TextureManager texturemanager = TileEntityRendererDispatcher.instance.field_147553_e;
|
||||
|
||||
if (texturemanager != null)
|
||||
{
|
||||
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);
|
||||
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
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);
|
||||
|
||||
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.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer;
|
||||
|
||||
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 void renderAt(TEMasterStone tile, double x, double y, double z);
|
||||
|
||||
protected void bindTexture(ResourceLocation p_147499_1_)
|
||||
{
|
||||
TextureManager texturemanager = TileEntityRendererDispatcher.instance.field_147553_e;
|
||||
|
||||
if (texturemanager != null)
|
||||
{
|
||||
texturemanager.bindTexture(p_147499_1_);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,485 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
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.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()
|
||||
{
|
||||
customRenderItem = new RenderItem()
|
||||
{
|
||||
@Override
|
||||
public boolean shouldBob()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
customRenderItem.setRenderManager(RenderManager.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
if (tileEntity instanceof TEAlchemicCalcinator)
|
||||
{
|
||||
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)
|
||||
{
|
||||
float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(1));
|
||||
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)
|
||||
{
|
||||
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) 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))
|
||||
{
|
||||
GL11.glRotatef(90f, 1.0f, 0.0f, 0.0F);
|
||||
}
|
||||
|
||||
customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (tileAltar.getStackInSlot(0) != null)
|
||||
{
|
||||
float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0));
|
||||
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)
|
||||
{
|
||||
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) 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))
|
||||
{
|
||||
GL11.glRotatef(90f, 1.0f, 0.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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
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(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;
|
||||
|
||||
if (itemStack != null)
|
||||
{
|
||||
if (itemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (customRenderItem.getMiniBlockCount(itemStack,(byte)1))
|
||||
{
|
||||
case 1:
|
||||
return 0.90F * scaleFactor;
|
||||
|
||||
case 2:
|
||||
return 0.90F * scaleFactor;
|
||||
|
||||
case 3:
|
||||
return 0.90F * scaleFactor;
|
||||
|
||||
case 4:
|
||||
return 0.90F * scaleFactor;
|
||||
|
||||
case 5:
|
||||
return 0.80F * scaleFactor;
|
||||
|
||||
default:
|
||||
return 0.90F * scaleFactor;
|
||||
}
|
||||
} else
|
||||
{
|
||||
switch (customRenderItem.getMiniItemCount(itemStack,(byte)1))
|
||||
{
|
||||
case 1:
|
||||
return 0.65F * scaleFactor;
|
||||
|
||||
case 2:
|
||||
return 0.65F * scaleFactor;
|
||||
|
||||
case 3:
|
||||
return 0.65F * scaleFactor;
|
||||
|
||||
case 4:
|
||||
return 0.65F * scaleFactor;
|
||||
|
||||
default:
|
||||
return 0.65F * scaleFactor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return scaleFactor;
|
||||
}
|
||||
|
||||
private float getXDisplacementForSlot(int slot)
|
||||
{
|
||||
switch (slot)
|
||||
{
|
||||
case 0:
|
||||
return 0.0f;
|
||||
|
||||
case 1:
|
||||
return -0.375f;
|
||||
|
||||
case 2:
|
||||
return -0.125f;
|
||||
|
||||
case 3:
|
||||
return 0.3125f;
|
||||
|
||||
case 4:
|
||||
return 0.3125f;
|
||||
|
||||
case 5:
|
||||
return -0.125f;
|
||||
|
||||
default:
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
private float getYDisplacementForSlot(int slot)
|
||||
{
|
||||
switch (slot)
|
||||
{
|
||||
case 0:
|
||||
return 0.4f;
|
||||
|
||||
case 1:
|
||||
return -0.35f;
|
||||
|
||||
case 6:
|
||||
return 0.4f;
|
||||
|
||||
default:
|
||||
return -0.35f;
|
||||
}
|
||||
}
|
||||
|
||||
private float getZDisplacementForSlot(int slot)
|
||||
{
|
||||
switch (slot)
|
||||
{
|
||||
case 0:
|
||||
return 0.0f;
|
||||
|
||||
case 1:
|
||||
return 0.0f;
|
||||
|
||||
case 2:
|
||||
return 0.375f;
|
||||
|
||||
case 3:
|
||||
return 0.25f;
|
||||
|
||||
case 4:
|
||||
return -0.25f;
|
||||
|
||||
case 5:
|
||||
return -0.375f;
|
||||
|
||||
default:
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection)
|
||||
{
|
||||
if (ghostItemStack != null)
|
||||
{
|
||||
if (ghostItemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (forgeDirection)
|
||||
{
|
||||
case DOWN:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UP:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case NORTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F);
|
||||
return;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F);
|
||||
return;
|
||||
}
|
||||
|
||||
case EAST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case WEST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UNKNOWN:
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
switch (forgeDirection)
|
||||
{
|
||||
case DOWN:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UP:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case NORTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F);
|
||||
return;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F);
|
||||
return;
|
||||
}
|
||||
|
||||
case EAST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case WEST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UNKNOWN:
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit;
|
||||
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 RenderConduit extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelConduit modelConduit = new ModelConduit();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
if (tileEntity instanceof TEConduit)
|
||||
{
|
||||
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);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,184 @@
|
|||
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;
|
||||
|
||||
public class RenderCrystalBelljar extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelCrystalBelljar modelConduit = new ModelCrystalBelljar();
|
||||
|
||||
private ResourceLocation resourceLocation = new ResourceLocation("alchemicalwizardry:textures/models/Reagent.png");
|
||||
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
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;
|
||||
|
||||
public class RenderMasterStone extends TileEntitySpecialRenderer
|
||||
{
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
if (tileEntity instanceof TEMasterStone)
|
||||
{
|
||||
String str = ((TEMasterStone) tileEntity).getCurrentRitual();
|
||||
MRSRenderer renderer = Rituals.getRendererForKey(str);
|
||||
|
||||
if(renderer != null)
|
||||
{
|
||||
renderer.renderAt(((TEMasterStone) tileEntity), d0, d1, d2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,273 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
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.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();
|
||||
private final RenderItem customRenderItem;
|
||||
|
||||
public RenderPedestal()
|
||||
{
|
||||
customRenderItem = new RenderItem()
|
||||
{
|
||||
@Override
|
||||
public boolean shouldBob()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
customRenderItem.setRenderManager(RenderManager.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
if (tileEntity instanceof TEPedestal)
|
||||
{
|
||||
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();
|
||||
|
||||
if (tileAltar.getStackInSlot(0) != null)
|
||||
{
|
||||
float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0));
|
||||
float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL);
|
||||
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)
|
||||
{
|
||||
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 + 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);
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private float getGhostItemScaleFactor(ItemStack itemStack)
|
||||
{
|
||||
float scaleFactor = 1.0F;
|
||||
|
||||
if (itemStack != null)
|
||||
{
|
||||
if (itemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (customRenderItem.getMiniBlockCount(itemStack,(byte)1))
|
||||
{
|
||||
case 1:
|
||||
return 0.90F;
|
||||
|
||||
case 2:
|
||||
return 0.90F;
|
||||
|
||||
case 3:
|
||||
return 0.90F;
|
||||
|
||||
case 4:
|
||||
return 0.90F;
|
||||
|
||||
case 5:
|
||||
return 0.80F;
|
||||
|
||||
default:
|
||||
return 0.90F;
|
||||
}
|
||||
} else
|
||||
{
|
||||
switch (customRenderItem.getMiniItemCount(itemStack,(byte)1))
|
||||
{
|
||||
case 1:
|
||||
return 0.65F;
|
||||
|
||||
case 2:
|
||||
return 0.65F;
|
||||
|
||||
case 3:
|
||||
return 0.65F;
|
||||
|
||||
case 4:
|
||||
return 0.65F;
|
||||
|
||||
default:
|
||||
return 0.65F;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return scaleFactor;
|
||||
}
|
||||
|
||||
private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection)
|
||||
{
|
||||
if (ghostItemStack != null)
|
||||
{
|
||||
if (ghostItemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (forgeDirection)
|
||||
{
|
||||
case DOWN:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UP:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case NORTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F);
|
||||
return;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F);
|
||||
return;
|
||||
}
|
||||
|
||||
case EAST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case WEST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UNKNOWN:
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
switch (forgeDirection)
|
||||
{
|
||||
case DOWN:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UP:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case NORTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F);
|
||||
return;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F);
|
||||
return;
|
||||
}
|
||||
|
||||
case EAST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case WEST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UNKNOWN:
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,256 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
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.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();
|
||||
private final RenderItem customRenderItem;
|
||||
|
||||
public RenderPlinth()
|
||||
{
|
||||
customRenderItem = new RenderItem()
|
||||
{
|
||||
@Override
|
||||
public boolean shouldBob()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
customRenderItem.setRenderManager(RenderManager.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
if (tileEntity instanceof TEPlinth)
|
||||
{
|
||||
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();
|
||||
|
||||
if (tileAltar.getStackInSlot(0) != null)
|
||||
{
|
||||
float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0));
|
||||
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)
|
||||
{
|
||||
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.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))
|
||||
{
|
||||
GL11.glRotatef(90f, 1.0f, 0.0f, 0.0F);
|
||||
}
|
||||
|
||||
customRenderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
|
||||
private float getGhostItemScaleFactor(ItemStack itemStack)
|
||||
{
|
||||
float scaleFactor = 2.0F / 0.9F;
|
||||
|
||||
if (itemStack != null)
|
||||
{
|
||||
if (itemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (customRenderItem.getMiniBlockCount(itemStack, (byte) 1))
|
||||
{
|
||||
case 1:
|
||||
return 0.90F * scaleFactor / 2;
|
||||
|
||||
case 2:
|
||||
return 0.90F * scaleFactor / 2;
|
||||
|
||||
case 3:
|
||||
return 0.90F * scaleFactor / 2;
|
||||
|
||||
case 4:
|
||||
return 0.90F * scaleFactor / 2;
|
||||
|
||||
case 5:
|
||||
return 0.80F * scaleFactor / 2;
|
||||
|
||||
default:
|
||||
return 0.90F * scaleFactor / 2;
|
||||
}
|
||||
} else
|
||||
{
|
||||
switch (customRenderItem.getMiniItemCount(itemStack, (byte) 1))
|
||||
{
|
||||
case 1:
|
||||
return 0.65F * scaleFactor;
|
||||
|
||||
case 2:
|
||||
return 0.65F * scaleFactor;
|
||||
|
||||
case 3:
|
||||
return 0.65F * scaleFactor;
|
||||
|
||||
case 4:
|
||||
return 0.65F * scaleFactor;
|
||||
|
||||
default:
|
||||
return 0.65F * scaleFactor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return scaleFactor;
|
||||
}
|
||||
|
||||
private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection)
|
||||
{
|
||||
if (ghostItemStack != null)
|
||||
{
|
||||
if (ghostItemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (forgeDirection)
|
||||
{
|
||||
case DOWN:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UP:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case NORTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F);
|
||||
return;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F);
|
||||
return;
|
||||
}
|
||||
|
||||
case EAST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case WEST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UNKNOWN:
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
switch (forgeDirection)
|
||||
{
|
||||
case DOWN:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UP:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case NORTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F);
|
||||
return;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F);
|
||||
return;
|
||||
}
|
||||
|
||||
case EAST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case WEST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UNKNOWN:
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
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
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
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);
|
||||
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
|
||||
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.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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
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;
|
||||
|
||||
public class RenderSpellEffectBlock extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelSpellEffectBlock modelSpellEffectBlock = new ModelSpellEffectBlock();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
if (tileEntity instanceof TESpellEffectBlock)
|
||||
{
|
||||
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);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
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;
|
||||
|
||||
public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelSpellEnhancementBlock modelSpellEnhancementBlock = new ModelSpellEnhancementBlock();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
if (tileEntity instanceof TESpellEnhancementBlock)
|
||||
{
|
||||
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);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
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;
|
||||
|
||||
public class RenderSpellModifierBlock extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelSpellModifierBlock modelSpellModifierBlock = new ModelSpellModifierBlock();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
if (tileEntity instanceof TESpellModifierBlock)
|
||||
{
|
||||
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);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
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;
|
||||
|
||||
public class RenderSpellParadigmBlock extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelSpellParadigmBlock modelSpellParadigmBlock = new ModelSpellParadigmBlock();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
if (tileEntity instanceof TESpellParadigmBlock)
|
||||
{
|
||||
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);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,328 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
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.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();
|
||||
private final RenderItem customRenderItem;
|
||||
|
||||
public RenderWritingTable()
|
||||
{
|
||||
customRenderItem = new RenderItem()
|
||||
{
|
||||
@Override
|
||||
public boolean shouldBob()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
customRenderItem.setRenderManager(RenderManager.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
if (tileEntity instanceof TEWritingTable)
|
||||
{
|
||||
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();
|
||||
|
||||
for (int i = 1; i <= 6; 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);
|
||||
}
|
||||
}
|
||||
|
||||
private float getGhostItemScaleFactor(ItemStack itemStack)
|
||||
{
|
||||
float scaleFactor = 0.8F;
|
||||
|
||||
if (itemStack != null)
|
||||
{
|
||||
if (itemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (customRenderItem.getMiniBlockCount(itemStack,(byte)1))
|
||||
{
|
||||
case 1:
|
||||
return 0.90F * scaleFactor;
|
||||
|
||||
case 2:
|
||||
return 0.90F * scaleFactor;
|
||||
|
||||
case 3:
|
||||
return 0.90F * scaleFactor;
|
||||
|
||||
case 4:
|
||||
return 0.90F * scaleFactor;
|
||||
|
||||
case 5:
|
||||
return 0.80F * scaleFactor;
|
||||
|
||||
default:
|
||||
return 0.90F * scaleFactor;
|
||||
}
|
||||
} else
|
||||
{
|
||||
switch (customRenderItem.getMiniItemCount(itemStack,(byte)1))
|
||||
{
|
||||
case 1:
|
||||
return 0.65F * scaleFactor;
|
||||
|
||||
case 2:
|
||||
return 0.65F * scaleFactor;
|
||||
|
||||
case 3:
|
||||
return 0.65F * scaleFactor;
|
||||
|
||||
case 4:
|
||||
return 0.65F * scaleFactor;
|
||||
|
||||
default:
|
||||
return 0.65F * scaleFactor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return scaleFactor;
|
||||
}
|
||||
|
||||
private float getXDisplacementForSlot(int slot)
|
||||
{
|
||||
switch (slot)
|
||||
{
|
||||
case 0:
|
||||
return 0.0f;
|
||||
|
||||
case 1:
|
||||
return -0.375f;
|
||||
|
||||
case 2:
|
||||
return -0.125f;
|
||||
|
||||
case 3:
|
||||
return 0.3125f;
|
||||
|
||||
case 4:
|
||||
return 0.3125f;
|
||||
|
||||
case 5:
|
||||
return -0.125f;
|
||||
|
||||
default:
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
private float getYDisplacementForSlot(int slot)
|
||||
{
|
||||
switch (slot)
|
||||
{
|
||||
case 0:
|
||||
return 0.4f;
|
||||
|
||||
case 1:
|
||||
return -0.35f;
|
||||
|
||||
case 6:
|
||||
return 0.4f;
|
||||
|
||||
default:
|
||||
return -0.35f;
|
||||
}
|
||||
}
|
||||
|
||||
private float getZDisplacementForSlot(int slot)
|
||||
{
|
||||
switch (slot)
|
||||
{
|
||||
case 0:
|
||||
return 0.0f;
|
||||
|
||||
case 1:
|
||||
return 0.0f;
|
||||
|
||||
case 2:
|
||||
return 0.375f;
|
||||
|
||||
case 3:
|
||||
return 0.25f;
|
||||
|
||||
case 4:
|
||||
return -0.25f;
|
||||
|
||||
case 5:
|
||||
return -0.375f;
|
||||
|
||||
default:
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection)
|
||||
{
|
||||
if (ghostItemStack != null)
|
||||
{
|
||||
if (ghostItemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (forgeDirection)
|
||||
{
|
||||
case DOWN:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UP:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case NORTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F);
|
||||
return;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F);
|
||||
return;
|
||||
}
|
||||
|
||||
case EAST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case WEST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UNKNOWN:
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
switch (forgeDirection)
|
||||
{
|
||||
case DOWN:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UP:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case NORTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F);
|
||||
return;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F);
|
||||
return;
|
||||
}
|
||||
|
||||
case EAST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case WEST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UNKNOWN:
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,184 @@
|
|||
/**
|
||||
* 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;
|
||||
|
||||
public final class ShaderHelper {
|
||||
|
||||
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 void useShaderWithProps(int shader, Object... props) {
|
||||
// if(!useShaders())
|
||||
// return;
|
||||
|
||||
ARBShaderObjects.glUseProgramObjectARB(shader);
|
||||
|
||||
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 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
|
||||
|
||||
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);
|
||||
|
||||
program = ARBShaderObjects.glCreateProgramObjectARB();
|
||||
if(program == 0)
|
||||
return 0;
|
||||
|
||||
if(vert != null)
|
||||
ARBShaderObjects.glAttachObjectARB(program, vertId);
|
||||
if(frag != null)
|
||||
ARBShaderObjects.glAttachObjectARB(program, fragId);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
private static int createShader(String filename, int shaderType){
|
||||
int shader = 0;
|
||||
try {
|
||||
shader = ARBShaderObjects.glCreateShaderObjectARB(shaderType);
|
||||
|
||||
if(shader == 0)
|
||||
return 0;
|
||||
|
||||
ARBShaderObjects.glShaderSourceARB(shader, readFileAsString(filename));
|
||||
ARBShaderObjects.glCompileShaderARB(shader);
|
||||
|
||||
if (ARBShaderObjects.glGetObjectParameteriARB(shader, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB) == GL11.GL_FALSE)
|
||||
throw new RuntimeException("Error creating shader: " + getLogInfo(shader));
|
||||
|
||||
return shader;
|
||||
}
|
||||
catch(Exception e) {
|
||||
ARBShaderObjects.glDeleteObjectARB(shader);
|
||||
e.printStackTrace();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,241 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
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();
|
||||
private final RenderItem customRenderItem;
|
||||
|
||||
public TEAltarRenderer()
|
||||
{
|
||||
customRenderItem = new RenderItem()
|
||||
{
|
||||
@Override
|
||||
public boolean shouldBob()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
customRenderItem.setRenderManager(RenderManager.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f)
|
||||
{
|
||||
modelBloodAltar.renderBloodAltar((TEAltar) tileEntity, d0, d1, d2);
|
||||
modelBloodAltar.renderBloodLevel((TEAltar) tileEntity, d0, d1, d2);
|
||||
|
||||
if (tileEntity instanceof TEAltar)
|
||||
{
|
||||
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)
|
||||
{
|
||||
float scaleFactor = getGhostItemScaleFactor(tileAltar.getStackInSlot(0));
|
||||
float rotationAngle = (float) (720.0 * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL);
|
||||
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)
|
||||
{
|
||||
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 + 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);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
|
||||
private float getGhostItemScaleFactor(ItemStack itemStack)
|
||||
{
|
||||
float scaleFactor = 1.0F;
|
||||
|
||||
if (itemStack != null)
|
||||
{
|
||||
if (itemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (customRenderItem.getMiniBlockCount(itemStack,(byte)1))
|
||||
{
|
||||
case 1:
|
||||
return 0.90F;
|
||||
|
||||
case 2:
|
||||
return 0.90F;
|
||||
|
||||
case 3:
|
||||
return 0.90F;
|
||||
|
||||
case 4:
|
||||
return 0.90F;
|
||||
|
||||
case 5:
|
||||
return 0.80F;
|
||||
|
||||
default:
|
||||
return 0.90F;
|
||||
}
|
||||
} else
|
||||
{
|
||||
switch (customRenderItem.getMiniItemCount(itemStack,(byte)1))
|
||||
{
|
||||
case 1:
|
||||
return 0.65F;
|
||||
|
||||
case 2:
|
||||
return 0.65F;
|
||||
|
||||
case 3:
|
||||
return 0.65F;
|
||||
|
||||
case 4:
|
||||
return 0.65F;
|
||||
|
||||
default:
|
||||
return 0.65F;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return scaleFactor;
|
||||
}
|
||||
|
||||
private void translateGhostItemByOrientation(ItemStack ghostItemStack, double x, double y, double z, ForgeDirection forgeDirection)
|
||||
{
|
||||
if (ghostItemStack != null)
|
||||
{
|
||||
if (ghostItemStack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
switch (forgeDirection)
|
||||
{
|
||||
case DOWN:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 2.7F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UP:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.25F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case NORTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.7F);
|
||||
return;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.3F);
|
||||
return;
|
||||
}
|
||||
|
||||
case EAST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.3F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case WEST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.70F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UNKNOWN:
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
switch (forgeDirection)
|
||||
{
|
||||
case DOWN:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.6F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UP:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.20F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case NORTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.7F);
|
||||
return;
|
||||
}
|
||||
|
||||
case SOUTH:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.4F, (float) z + 0.3F);
|
||||
return;
|
||||
}
|
||||
|
||||
case EAST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.3F, (float) y + 0.4F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case WEST:
|
||||
{
|
||||
GL11.glTranslatef((float) x + 0.70F, (float) y + 0.4F, (float) z + 0.5F);
|
||||
return;
|
||||
}
|
||||
|
||||
case UNKNOWN:
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
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.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
|
||||
{
|
||||
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
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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:
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelBloodAltar;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
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
|
||||
{
|
||||
private ModelBloodAltar modelBloodAltar;
|
||||
|
||||
public TEAltarItemRenderer()
|
||||
{
|
||||
modelBloodAltar = new ModelBloodAltar();
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
@Override
|
||||
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;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void renderBloodAltar(RenderBlocks render, ItemStack item, float x, float y, float z, float scale)
|
||||
{
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,206 @@
|
|||
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;
|
||||
|
||||
public class TEBellJarItemRenderer implements IItemRenderer
|
||||
{
|
||||
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);
|
||||
|
||||
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.glDepthMask(true);
|
||||
|
||||
ReagentContainerInfo[] info = TEBellJar.getContainerInfoFromItem(item);
|
||||
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(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.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.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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@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:
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
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
|
||||
{
|
||||
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);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@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:
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
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.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
|
||||
{
|
||||
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);
|
||||
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)
|
||||
{
|
||||
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 "";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
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.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
|
||||
{
|
||||
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);
|
||||
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)
|
||||
{
|
||||
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";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
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.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
|
||||
{
|
||||
private ModelSpellModifierBlock modelSpellBlock = new ModelSpellModifierBlock();
|
||||
|
||||
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);
|
||||
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)
|
||||
{
|
||||
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";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
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.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
|
||||
{
|
||||
private ModelSpellParadigmBlock modelSpellBlock = new ModelSpellParadigmBlock();
|
||||
|
||||
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);
|
||||
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)
|
||||
{
|
||||
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";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,82 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelWritingTable;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
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;
|
||||
|
||||
public class TEWritingTableItemRenderer implements IItemRenderer
|
||||
{
|
||||
private ModelWritingTable modelBloodAltar;
|
||||
|
||||
public TEWritingTableItemRenderer()
|
||||
{
|
||||
modelBloodAltar = 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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
float scale = 0.08f;
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
switch (type)
|
||||
{
|
||||
case ENTITY:
|
||||
{
|
||||
renderBloodAltar(0f, 0f, 0f, scale);
|
||||
return;
|
||||
}
|
||||
|
||||
case EQUIPPED:
|
||||
{
|
||||
renderBloodAltar(0f, 0f, 0f, scale);
|
||||
return;
|
||||
}
|
||||
|
||||
case INVENTORY:
|
||||
{
|
||||
renderBloodAltar(0f, -0.25f, 0f, scale);
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void renderBloodAltar(float x, float y, float z, float scale)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
// Disable Lighting Calculations
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
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);
|
||||
// Re-enable Lighting Calculations
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.mob;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityBileDemon;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
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
|
||||
|
||||
public RenderBileDemon(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
super(par1ModelBase, par2);
|
||||
}
|
||||
|
||||
public ResourceLocation func_110832_a(EntityBileDemon par1EntityBileDemon)
|
||||
{
|
||||
return field_110833_a;
|
||||
}
|
||||
|
||||
public ResourceLocation getEntityTexture(Entity par1Entity)
|
||||
{
|
||||
return this.func_110832_a((EntityBileDemon) par1Entity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.mob;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityBoulderFist;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
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
|
||||
|
||||
public RenderBoulderFist(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
super(par1ModelBase, par2);
|
||||
}
|
||||
|
||||
public ResourceLocation func_110832_a(EntityBoulderFist par1EntityBoulderFist)
|
||||
{
|
||||
return field_110833_a;
|
||||
}
|
||||
|
||||
public ResourceLocation getEntityTexture(Entity par1Entity)
|
||||
{
|
||||
return this.func_110832_a((EntityBoulderFist) par1Entity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.mob;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.EntityAirElemental;
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.*;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
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 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");
|
||||
private static final ResourceLocation shadeBeacon = new ResourceLocation("alchemicalwizardry", "textures/models/DarkFloatingBeacon.png");
|
||||
private static final ResourceLocation holyBeacon = new ResourceLocation("alchemicalwizardry", "textures/models/HolyFloatingBeacon.png");
|
||||
|
||||
public RenderElemental(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
super(par1ModelBase, par2);
|
||||
}
|
||||
|
||||
public ResourceLocation func_110832_a(EntityElemental par1EntityElemental)
|
||||
{
|
||||
if (par1EntityElemental instanceof EntityAirElemental)
|
||||
{
|
||||
return airBeacon;
|
||||
}
|
||||
|
||||
if (par1EntityElemental instanceof EntityWaterElemental)
|
||||
{
|
||||
return waterBeacon;
|
||||
}
|
||||
|
||||
if (par1EntityElemental instanceof EntityEarthElemental)
|
||||
{
|
||||
return earthBeacon;
|
||||
}
|
||||
|
||||
if (par1EntityElemental instanceof EntityFireElemental)
|
||||
{
|
||||
return fireBeacon;
|
||||
}
|
||||
|
||||
if (par1EntityElemental instanceof EntityShadeElemental)
|
||||
{
|
||||
return shadeBeacon;
|
||||
}
|
||||
|
||||
if (par1EntityElemental instanceof EntityHolyElemental)
|
||||
{
|
||||
return holyBeacon;
|
||||
}
|
||||
|
||||
return airBeacon;
|
||||
}
|
||||
|
||||
public ResourceLocation getEntityTexture(Entity par1Entity)
|
||||
{
|
||||
return this.func_110832_a((EntityElemental) par1Entity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.mob;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityFallenAngel;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
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
|
||||
|
||||
public RenderFallenAngel(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
super(par1ModelBase, par2);
|
||||
}
|
||||
|
||||
public ResourceLocation func_110832_a(EntityFallenAngel par1EntityFallenAngel)
|
||||
{
|
||||
return field_110833_a;
|
||||
}
|
||||
|
||||
public ResourceLocation getEntityTexture(Entity par1Entity)
|
||||
{
|
||||
return this.func_110832_a((EntityFallenAngel) par1Entity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.mob;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
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
|
||||
|
||||
public RenderIceDemon(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
super(par1ModelBase, par2);
|
||||
}
|
||||
|
||||
public ResourceLocation func_110832_a(EntityIceDemon par1EntityIceDemon)
|
||||
{
|
||||
return field_110833_a;
|
||||
}
|
||||
|
||||
public ResourceLocation getEntityTexture(Entity par1Entity)
|
||||
{
|
||||
return this.func_110832_a((EntityIceDemon) par1Entity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.mob;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
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
|
||||
|
||||
public RenderLowerGuardian(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
super(par1ModelBase, par2);
|
||||
}
|
||||
|
||||
public ResourceLocation func_110832_a(EntityLowerGuardian par1EntityLowerGuardian)
|
||||
{
|
||||
return field_110833_a;
|
||||
}
|
||||
|
||||
public ResourceLocation getEntityTexture(Entity par1Entity)
|
||||
{
|
||||
return this.func_110832_a((EntityLowerGuardian) par1Entity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.mob;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityShade;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
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
|
||||
|
||||
public RenderShade(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
super(par1ModelBase, par2);
|
||||
}
|
||||
|
||||
public ResourceLocation func_110832_a(EntityShade par1EntityShade)
|
||||
{
|
||||
return field_110833_a;
|
||||
}
|
||||
|
||||
public ResourceLocation getEntityTexture(Entity par1Entity)
|
||||
{
|
||||
return this.func_110832_a((EntityShade) par1Entity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.mob;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
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
|
||||
|
||||
public RenderSmallEarthGolem(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
super(par1ModelBase, par2);
|
||||
}
|
||||
|
||||
public ResourceLocation func_110832_a(EntitySmallEarthGolem par1EntitySmallEarthGolem)
|
||||
{
|
||||
return field_110833_a;
|
||||
}
|
||||
|
||||
public ResourceLocation getEntityTexture(Entity par1Entity)
|
||||
{
|
||||
return this.func_110832_a((EntitySmallEarthGolem) par1Entity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.mob;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
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
|
||||
|
||||
public RenderWingedFireDemon(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
super(par1ModelBase, par2);
|
||||
}
|
||||
|
||||
public ResourceLocation func_110832_a(EntityWingedFireDemon par1EntityWingedFireDemon)
|
||||
{
|
||||
return field_110833_a;
|
||||
}
|
||||
|
||||
public ResourceLocation getEntityTexture(Entity par1Entity)
|
||||
{
|
||||
return this.func_110832_a((EntityWingedFireDemon) par1Entity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,140 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelAlchemicalCalcinator extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer top1;
|
||||
ModelRenderer top2;
|
||||
ModelRenderer top3;
|
||||
ModelRenderer top4;
|
||||
ModelRenderer tank;
|
||||
ModelRenderer centreCollumn;
|
||||
ModelRenderer furnaceShape;
|
||||
ModelRenderer glassWindow;
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,181 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ModelBileDemon extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer belly;
|
||||
ModelRenderer chest;
|
||||
ModelRenderer head;
|
||||
ModelRenderer nose;
|
||||
ModelRenderer leftHorn;
|
||||
ModelRenderer leftArmSpacer;
|
||||
ModelRenderer leftArm;
|
||||
ModelRenderer leftChain;
|
||||
ModelRenderer leftBall;
|
||||
ModelRenderer rightHorn;
|
||||
ModelRenderer rightChain;
|
||||
ModelRenderer rightBall;
|
||||
ModelRenderer rightArmSpacer;
|
||||
ModelRenderer rightArm;
|
||||
|
||||
public ModelBileDemon()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 64;
|
||||
belly = new ModelRenderer(this, 0, 31);
|
||||
belly.addBox(-8F, -1F, -10F, 16, 15, 18);
|
||||
belly.setRotationPoint(0F, 10F, 0F);
|
||||
belly.setTextureSize(128, 64);
|
||||
belly.mirror = true;
|
||||
setRotation(belly, 0F, 0F, 0F);
|
||||
chest = new ModelRenderer(this, 70, 46);
|
||||
chest.addBox(-7F, -4F, -6F, 14, 4, 14);
|
||||
chest.setRotationPoint(0F, 10F, 0F);
|
||||
chest.setTextureSize(128, 64);
|
||||
chest.mirror = true;
|
||||
setRotation(chest, -0.1115358F, 0F, 0F);
|
||||
head = new ModelRenderer(this, 0, 0);
|
||||
head.addBox(-4F, -8F, -4F, 8, 8, 8);
|
||||
head.setRotationPoint(0F, 6F, 3F);
|
||||
head.setTextureSize(128, 64);
|
||||
head.mirror = true;
|
||||
setRotation(head, 0F, 0F, 0F);
|
||||
nose = new ModelRenderer(this, 0, 0);
|
||||
nose.addBox(-1F, -4F, -5F, 2, 1, 1);
|
||||
nose.setRotationPoint(0F, 6F, 3F);
|
||||
nose.setTextureSize(128, 64);
|
||||
nose.mirror = true;
|
||||
setRotation(nose, 0F, 0F, 0F);
|
||||
leftHorn = new ModelRenderer(this, 93, 1);
|
||||
leftHorn.addBox(4F, -7F, 0F, 16, 1, 1);
|
||||
leftHorn.setRotationPoint(0F, 6F, 3F);
|
||||
leftHorn.setTextureSize(128, 64);
|
||||
leftHorn.mirror = true;
|
||||
setRotation(leftHorn, 0F, 0F, 0F);
|
||||
leftArmSpacer = new ModelRenderer(this, 80, 1);
|
||||
leftArmSpacer.addBox(0F, -2F, -2F, 1, 4, 4);
|
||||
leftArmSpacer.setRotationPoint(7F, 8F, 3F);
|
||||
leftArmSpacer.setTextureSize(128, 64);
|
||||
leftArmSpacer.mirror = true;
|
||||
setRotation(leftArmSpacer, 0F, 0F, 0F);
|
||||
leftArm = new ModelRenderer(this, 62, 1);
|
||||
leftArm.addBox(1F, -2F, -2F, 4, 18, 4);
|
||||
leftArm.setRotationPoint(7F, 8F, 3F);
|
||||
leftArm.setTextureSize(128, 64);
|
||||
leftArm.mirror = true;
|
||||
setRotation(leftArm, 0F, 0F, 0F);
|
||||
leftChain = new ModelRenderer(this, 95, 5);
|
||||
leftChain.addBox(17F, -6F, 0F, 1, 6, 1);
|
||||
leftChain.setRotationPoint(0F, 6F, 3F);
|
||||
leftChain.setTextureSize(128, 64);
|
||||
leftChain.mirror = true;
|
||||
setRotation(leftChain, 0F, 0F, 0F);
|
||||
leftBall = new ModelRenderer(this, 107, 4);
|
||||
leftBall.addBox(15F, 0F, -2F, 5, 5, 5);
|
||||
leftBall.setRotationPoint(0F, 6F, 3F);
|
||||
leftBall.setTextureSize(128, 64);
|
||||
leftBall.mirror = true;
|
||||
setRotation(leftBall, 0F, 0F, 0F);
|
||||
rightHorn = new ModelRenderer(this, 93, 1);
|
||||
rightHorn.mirror = true;
|
||||
rightHorn.addBox(-20F, -7F, 0F, 16, 1, 1);
|
||||
rightHorn.setRotationPoint(0F, 6F, 3F);
|
||||
rightHorn.setTextureSize(128, 64);
|
||||
rightHorn.mirror = true;
|
||||
setRotation(rightHorn, 0F, 0F, 0F);
|
||||
rightHorn.mirror = false;
|
||||
rightChain = new ModelRenderer(this, 95, 5);
|
||||
rightChain.mirror = true;
|
||||
rightChain.addBox(-18F, -6F, 0F, 1, 6, 1);
|
||||
rightChain.setRotationPoint(0F, 6F, 3F);
|
||||
rightChain.setTextureSize(128, 64);
|
||||
rightChain.mirror = true;
|
||||
setRotation(rightChain, 0F, 0F, 0F);
|
||||
rightChain.mirror = false;
|
||||
rightBall = new ModelRenderer(this, 107, 4);
|
||||
rightBall.mirror = true;
|
||||
rightBall.addBox(-20F, 0F, -2F, 5, 5, 5);
|
||||
rightBall.setRotationPoint(0F, 6F, 3F);
|
||||
rightBall.setTextureSize(128, 64);
|
||||
rightBall.mirror = true;
|
||||
setRotation(rightBall, 0F, 0F, 0F);
|
||||
rightBall.mirror = false;
|
||||
rightArmSpacer = new ModelRenderer(this, 80, 1);
|
||||
rightArmSpacer.mirror = true;
|
||||
rightArmSpacer.addBox(-1F, -2F, -2F, 1, 4, 4);
|
||||
rightArmSpacer.setRotationPoint(-7F, 8F, 3F);
|
||||
rightArmSpacer.setTextureSize(128, 64);
|
||||
rightArmSpacer.mirror = true;
|
||||
setRotation(rightArmSpacer, 0F, 0F, 0F);
|
||||
rightArmSpacer.mirror = false;
|
||||
rightArm = new ModelRenderer(this, 62, 1);
|
||||
rightArm.mirror = true;
|
||||
rightArm.addBox(-5F, -2F, -2F, 4, 18, 4);
|
||||
rightArm.setRotationPoint(-7F, 8F, 3F);
|
||||
rightArm.setTextureSize(128, 64);
|
||||
rightArm.mirror = true;
|
||||
setRotation(rightArm, 0F, 0F, 0F);
|
||||
rightArm.mirror = false;
|
||||
}
|
||||
|
||||
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);
|
||||
float scale = 1.3f;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(0.0f, -(6.0f / 16.0f), 0.0f);
|
||||
belly.render(f5);
|
||||
chest.render(f5);
|
||||
head.render(f5);
|
||||
nose.render(f5);
|
||||
leftHorn.render(f5);
|
||||
leftArmSpacer.render(f5);
|
||||
leftArm.render(f5);
|
||||
leftChain.render(f5);
|
||||
leftBall.render(f5);
|
||||
rightHorn.render(f5);
|
||||
rightChain.render(f5);
|
||||
rightBall.render(f5);
|
||||
rightArmSpacer.render(f5);
|
||||
rightArm.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);
|
||||
this.head.rotateAngleX = f4 / (180F / (float) Math.PI);
|
||||
this.head.rotateAngleY = f3 / (180F / (float) Math.PI);
|
||||
this.rightArm.rotateAngleX = MathHelper.cos(f * 0.3662F + (float) Math.PI) * 1.0F * f1;
|
||||
this.leftArm.rotateAngleX = MathHelper.cos(f * 0.3662F) * 1.0F * f1;
|
||||
this.rightArmSpacer.rotateAngleX = MathHelper.cos(f * 0.3662F + (float) Math.PI) * 1.0F * f1;
|
||||
this.leftArmSpacer.rotateAngleX = MathHelper.cos(f * 0.3662F) * 1.0F * f1;
|
||||
this.leftBall.rotateAngleX = this.head.rotateAngleX;
|
||||
this.leftBall.rotateAngleY = this.head.rotateAngleY;
|
||||
this.rightBall.rotateAngleX = this.head.rotateAngleX;
|
||||
this.rightBall.rotateAngleY = this.head.rotateAngleY;
|
||||
this.leftChain.rotateAngleX = this.head.rotateAngleX;
|
||||
this.leftChain.rotateAngleY = this.head.rotateAngleY;
|
||||
this.rightChain.rotateAngleX = this.head.rotateAngleX;
|
||||
this.rightChain.rotateAngleY = this.head.rotateAngleY;
|
||||
this.leftHorn.rotateAngleX = this.head.rotateAngleX;
|
||||
this.leftHorn.rotateAngleY = this.head.rotateAngleY;
|
||||
this.rightHorn.rotateAngleX = this.head.rotateAngleX;
|
||||
this.rightHorn.rotateAngleY = this.head.rotateAngleY;
|
||||
this.nose.rotateAngleX = this.head.rotateAngleX;
|
||||
this.nose.rotateAngleY = this.head.rotateAngleY;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
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;
|
||||
private IModelCustom modelBloodLevel; //TODO
|
||||
|
||||
public ModelBloodAltar()
|
||||
{
|
||||
modelBloodAltar = AdvancedModelLoader.loadModel(new ResourceLocation("alchemicalwizardry:models/bloodaltar-fixeUV.obj"));
|
||||
modelBloodLevel = AdvancedModelLoader.loadModel(new ResourceLocation("alchemicalwizardry:models/bloodlevel.obj"));
|
||||
}
|
||||
|
||||
public void renderBloodAltar()
|
||||
{
|
||||
modelBloodAltar.renderAll();
|
||||
}
|
||||
|
||||
public void renderBloodLevel()
|
||||
{
|
||||
modelBloodLevel.renderAll();
|
||||
}
|
||||
|
||||
public void renderBloodAltar(TEAltar altar, double x, double y, double z)
|
||||
{
|
||||
float scale = 0.1f;
|
||||
// Push a blank matrix onto the stack
|
||||
GL11.glPushMatrix();
|
||||
// Move the object into the correct position on the block (because the OBJ's origin is the center of the object)
|
||||
GL11.glTranslatef((float) x + 0.5f, (float) y, (float) z + 0.5f);
|
||||
// Scale our object to about half-size in all directions (the OBJ file is a little large)
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
// Bind the texture, so that OpenGL properly textures our block.
|
||||
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);
|
||||
// Render the object, using modelTutBox.renderAll();
|
||||
this.renderBloodAltar();
|
||||
// Pop this matrix from the stack.
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void renderBloodLevel(TEAltar altar, double x, double y, double z)
|
||||
{
|
||||
float scale = 0.1f;
|
||||
// Push a blank matrix onto the stack
|
||||
GL11.glPushMatrix();
|
||||
float level = altar.getFluidAmount();
|
||||
// Move the object into the correct position on the block (because the OBJ's origin is the center of the object)
|
||||
GL11.glTranslatef((float) x + 0.5f, (float) y + 0.6499f + 0.12f * (level / altar.getCapacity()), (float) z + 0.5f);
|
||||
// Scale our object to about half-size in all directions (the OBJ file is a little large)
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
// Bind the texture, so that OpenGL properly textures our block.
|
||||
ResourceLocation test = new ResourceLocation("alchemicalwizardry:textures/models/blood.png");
|
||||
//FMLClientHandler.instance().getClient().renderEngine.bindTexture("/mods/alchemicalwizardry/textures/models/altar.png");
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(test);
|
||||
// Render the object, using modelTutBox.renderAll();
|
||||
this.renderBloodLevel();
|
||||
// Pop this matrix from the stack.
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,153 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ModelBoulderFist extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer leftFist;
|
||||
ModelRenderer leftArm;
|
||||
ModelRenderer body;
|
||||
ModelRenderer leftLeg1;
|
||||
ModelRenderer leftLeg2;
|
||||
ModelRenderer leftFoot;
|
||||
ModelRenderer rightFist;
|
||||
ModelRenderer rightArm;
|
||||
ModelRenderer rightLeg1;
|
||||
ModelRenderer rightLeg2;
|
||||
ModelRenderer rightFoot;
|
||||
ModelRenderer head;
|
||||
|
||||
public ModelBoulderFist()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
leftFist = new ModelRenderer(this, 33, 52);
|
||||
leftFist.addBox(-1F, 12F, -3F, 6, 6, 6);
|
||||
leftFist.setRotationPoint(5F, 6F, -6F);
|
||||
leftFist.setTextureSize(64, 64);
|
||||
leftFist.mirror = true;
|
||||
setRotation(leftFist, 0F, 0F, 0F);
|
||||
leftArm = new ModelRenderer(this, 48, 33);
|
||||
leftArm.addBox(0F, -2F, -2F, 4, 14, 4);
|
||||
leftArm.setRotationPoint(5F, 6F, -6F);
|
||||
leftArm.setTextureSize(64, 64);
|
||||
leftArm.mirror = true;
|
||||
setRotation(leftArm, 0F, 0F, 0F);
|
||||
body = new ModelRenderer(this, 0, 40);
|
||||
body.addBox(-5F, -2F, -3F, 10, 18, 6);
|
||||
body.setRotationPoint(0F, 6F, -6F);
|
||||
body.setTextureSize(64, 64);
|
||||
body.mirror = true;
|
||||
setRotation(body, 1.22173F, 0F, 0F);
|
||||
leftLeg1 = new ModelRenderer(this, 0, 25);
|
||||
leftLeg1.addBox(0F, -1F, -1F, 4, 6, 2);
|
||||
leftLeg1.setRotationPoint(5F, 11F, 7F);
|
||||
leftLeg1.setTextureSize(64, 64);
|
||||
leftLeg1.mirror = true;
|
||||
setRotation(leftLeg1, -((float) Math.PI / 4F), 0F, 0F);
|
||||
leftLeg2 = new ModelRenderer(this, 1, 25);
|
||||
leftLeg2.addBox(0F, 5F, -1F, 4, 2, 12);
|
||||
leftLeg2.setRotationPoint(5F, 11F, 7F);
|
||||
leftLeg2.setTextureSize(64, 64);
|
||||
leftLeg2.mirror = true;
|
||||
setRotation(leftLeg2, -((float) Math.PI / 4F), 0F, 0F);
|
||||
leftFoot = new ModelRenderer(this, 22, 25);
|
||||
leftFoot.addBox(0F, 11F, -1F, 4, 2, 5);
|
||||
leftFoot.setRotationPoint(5F, 11F, 7F);
|
||||
leftFoot.setTextureSize(64, 64);
|
||||
leftFoot.mirror = true;
|
||||
setRotation(leftFoot, 0F, 0F, 0F);
|
||||
rightFist = new ModelRenderer(this, 33, 52);
|
||||
rightFist.mirror = true;
|
||||
rightFist.addBox(-5F, 12F, -3F, 6, 6, 6);
|
||||
rightFist.setRotationPoint(-5F, 6F, -6F);
|
||||
rightFist.setTextureSize(64, 64);
|
||||
rightFist.mirror = true;
|
||||
setRotation(rightFist, 0F, 0F, 0F);
|
||||
rightFist.mirror = false;
|
||||
rightArm = new ModelRenderer(this, 48, 33);
|
||||
rightArm.mirror = true;
|
||||
rightArm.addBox(-4F, -2F, -2F, 4, 14, 4);
|
||||
rightArm.setRotationPoint(-5F, 6F, -6F);
|
||||
rightArm.setTextureSize(64, 64);
|
||||
rightArm.mirror = true;
|
||||
setRotation(rightArm, 0F, 0F, 0F);
|
||||
rightArm.mirror = false;
|
||||
rightLeg1 = new ModelRenderer(this, 0, 25);
|
||||
rightLeg1.mirror = true;
|
||||
rightLeg1.addBox(-4F, -1F, -1F, 4, 6, 2);
|
||||
rightLeg1.setRotationPoint(-5F, 11F, 7F);
|
||||
rightLeg1.setTextureSize(64, 64);
|
||||
rightLeg1.mirror = true;
|
||||
setRotation(rightLeg1, -((float) Math.PI / 4F), 0F, 0F);
|
||||
rightLeg1.mirror = false;
|
||||
rightLeg2 = new ModelRenderer(this, 1, 25);
|
||||
rightLeg2.mirror = true;
|
||||
rightLeg2.addBox(-4F, 5F, -1F, 4, 2, 12);
|
||||
rightLeg2.setRotationPoint(-5F, 11F, 7F);
|
||||
rightLeg2.setTextureSize(64, 64);
|
||||
rightLeg2.mirror = true;
|
||||
setRotation(rightLeg2, -((float) Math.PI / 4F), 0F, 0F);
|
||||
rightLeg2.mirror = false;
|
||||
rightFoot = new ModelRenderer(this, 22, 25);
|
||||
rightFoot.mirror = true;
|
||||
rightFoot.addBox(-4F, 11F, -1F, 4, 2, 5);
|
||||
rightFoot.setRotationPoint(-5F, 11F, 7F);
|
||||
rightFoot.setTextureSize(64, 64);
|
||||
rightFoot.mirror = true;
|
||||
setRotation(rightFoot, 0F, 0F, 0F);
|
||||
rightFoot.mirror = false;
|
||||
head = new ModelRenderer(this, 0, 0);
|
||||
head.addBox(-3F, -5F, -5F, 6, 6, 6);
|
||||
head.setRotationPoint(0F, 5F, -7F);
|
||||
head.setTextureSize(64, 64);
|
||||
head.mirror = true;
|
||||
setRotation(head, 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);
|
||||
leftFist.render(f5);
|
||||
leftArm.render(f5);
|
||||
body.render(f5);
|
||||
leftLeg1.render(f5);
|
||||
leftLeg2.render(f5);
|
||||
leftFoot.render(f5);
|
||||
rightFist.render(f5);
|
||||
rightArm.render(f5);
|
||||
rightLeg1.render(f5);
|
||||
rightLeg2.render(f5);
|
||||
rightFoot.render(f5);
|
||||
head.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);
|
||||
this.head.rotateAngleX = f4 / (180F / (float) Math.PI);
|
||||
this.head.rotateAngleY = f3 / (180F / (float) Math.PI);
|
||||
this.leftFoot.rotateAngleX = MathHelper.cos(f * 0.6662F) * 0.8F * f1;
|
||||
this.rightFoot.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 0.8F * f1;
|
||||
this.leftLeg1.rotateAngleX = leftFoot.rotateAngleX - ((float) Math.PI / 4F);
|
||||
this.rightLeg1.rotateAngleX = rightFoot.rotateAngleX - ((float) Math.PI / 4F);
|
||||
this.leftLeg2.rotateAngleX = leftFoot.rotateAngleX - ((float) Math.PI / 4F);
|
||||
this.rightLeg2.rotateAngleX = rightFoot.rotateAngleX - ((float) Math.PI / 4F);
|
||||
this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 0.9f * f1;
|
||||
this.leftArm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 0.9f * f1;
|
||||
this.leftFist.rotateAngleX = leftArm.rotateAngleX;
|
||||
this.rightFist.rotateAngleX = rightArm.rotateAngleX;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,287 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
//Date: 11/26/2013 1:57:16 PM
|
||||
//Template version 1.1
|
||||
//Java generated by Techne
|
||||
//Keep in mind that you still need to fill in some blanks
|
||||
//- ZeuX
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class ModelConduit extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer curvedInput;
|
||||
ModelRenderer curvedOutput;
|
||||
ModelRenderer straightBar1;
|
||||
ModelRenderer curvedBar1;
|
||||
ModelRenderer spacer1;
|
||||
ModelRenderer straightBar2;
|
||||
ModelRenderer curvedBar2;
|
||||
ModelRenderer spacer2;
|
||||
ModelRenderer straightBar3;
|
||||
ModelRenderer curvedBar3;
|
||||
ModelRenderer straightBar4;
|
||||
ModelRenderer curvedBar4;
|
||||
ModelRenderer spacer3;
|
||||
ModelRenderer spacer4;
|
||||
ModelRenderer spacer5;
|
||||
ModelRenderer spacer6;
|
||||
ModelRenderer spacer7;
|
||||
ModelRenderer spacer8;
|
||||
|
||||
public ModelConduit()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
curvedInput = new ModelRenderer(this, 0, 0);
|
||||
curvedInput.addBox(-2F, -2F, -8F, 4, 4, 10);
|
||||
curvedInput.setRotationPoint(0F, 16F, 0F);
|
||||
curvedInput.setTextureSize(64, 32);
|
||||
curvedInput.mirror = true;
|
||||
setRotation(curvedInput, 0F, 0F, 0F);
|
||||
curvedOutput = new ModelRenderer(this, 18, 0);
|
||||
curvedOutput.addBox(2F, -2F, -2F, 6, 4, 4);
|
||||
curvedOutput.setRotationPoint(0F, 16F, 0F);
|
||||
curvedOutput.setTextureSize(64, 32);
|
||||
curvedOutput.mirror = true;
|
||||
setRotation(curvedOutput, 0F, 0F, 0F);
|
||||
straightBar1 = new ModelRenderer(this, 0, 17);
|
||||
straightBar1.addBox(-5F, 3F, -8F, 2, 2, 13);
|
||||
straightBar1.setRotationPoint(0F, 16F, 0F);
|
||||
straightBar1.setTextureSize(64, 32);
|
||||
straightBar1.mirror = true;
|
||||
setRotation(straightBar1, 0F, 0F, 0F);
|
||||
curvedBar1 = new ModelRenderer(this, 29, 10);
|
||||
curvedBar1.addBox(-5F, 3F, 3F, 13, 2, 2);
|
||||
curvedBar1.setRotationPoint(0F, 16F, 0F);
|
||||
curvedBar1.setTextureSize(64, 32);
|
||||
curvedBar1.mirror = true;
|
||||
setRotation(curvedBar1, 0F, 0F, 0F);
|
||||
spacer1 = new ModelRenderer(this, 40, 0);
|
||||
spacer1.addBox(-5.5F, 2.5F, 2.5F, 3, 3, 3);
|
||||
spacer1.setRotationPoint(0F, 16F, 0F);
|
||||
spacer1.setTextureSize(64, 32);
|
||||
spacer1.mirror = true;
|
||||
setRotation(spacer1, 0F, 0F, 0F);
|
||||
straightBar2 = new ModelRenderer(this, 0, 17);
|
||||
straightBar2.addBox(-5F, -5F, -8F, 2, 2, 13);
|
||||
straightBar2.setRotationPoint(0F, 16F, 0F);
|
||||
straightBar2.setTextureSize(64, 32);
|
||||
straightBar2.mirror = true;
|
||||
setRotation(straightBar2, 0F, 0F, 0F);
|
||||
curvedBar2 = new ModelRenderer(this, 29, 10);
|
||||
curvedBar2.addBox(-5F, -5F, 3F, 13, 2, 2);
|
||||
curvedBar2.setRotationPoint(0F, 16F, 0F);
|
||||
curvedBar2.setTextureSize(64, 32);
|
||||
curvedBar2.mirror = true;
|
||||
setRotation(curvedBar2, 0F, 0F, 0F);
|
||||
spacer2 = new ModelRenderer(this, 40, 0);
|
||||
spacer2.addBox(-5.5F, -5.5F, 2.5F, 3, 3, 3);
|
||||
spacer2.setRotationPoint(0F, 16F, 0F);
|
||||
spacer2.setTextureSize(64, 32);
|
||||
spacer2.mirror = true;
|
||||
setRotation(spacer2, 0F, 0F, 0F);
|
||||
straightBar3 = new ModelRenderer(this, 0, 17);
|
||||
straightBar3.addBox(3F, 3F, -8F, 2, 2, 13);
|
||||
straightBar3.setRotationPoint(0F, 16F, 0F);
|
||||
straightBar3.setTextureSize(64, 32);
|
||||
straightBar3.mirror = true;
|
||||
setRotation(straightBar3, 0F, 0F, 0F);
|
||||
curvedBar3 = new ModelRenderer(this, 29, 10);
|
||||
curvedBar3.addBox(-5F, 3F, -5F, 13, 2, 2);
|
||||
curvedBar3.setRotationPoint(0F, 16F, 0F);
|
||||
curvedBar3.setTextureSize(64, 32);
|
||||
curvedBar3.mirror = true;
|
||||
setRotation(curvedBar3, 0F, 0F, 0F);
|
||||
straightBar4 = new ModelRenderer(this, 0, 17);
|
||||
straightBar4.addBox(3F, -5F, -8F, 2, 2, 13);
|
||||
straightBar4.setRotationPoint(0F, 16F, 0F);
|
||||
straightBar4.setTextureSize(64, 32);
|
||||
straightBar4.mirror = true;
|
||||
setRotation(straightBar4, 0F, 0F, 0F);
|
||||
curvedBar4 = new ModelRenderer(this, 29, 10);
|
||||
curvedBar4.addBox(-5F, -5F, -5F, 13, 2, 2);
|
||||
curvedBar4.setRotationPoint(0F, 16F, 0F);
|
||||
curvedBar4.setTextureSize(64, 32);
|
||||
curvedBar4.mirror = true;
|
||||
setRotation(curvedBar4, 0F, 0F, 0F);
|
||||
spacer3 = new ModelRenderer(this, 40, 0);
|
||||
spacer3.addBox(2.5F, 2.5F, 2.5F, 3, 3, 3);
|
||||
spacer3.setRotationPoint(0F, 16F, 0F);
|
||||
spacer3.setTextureSize(64, 32);
|
||||
spacer3.mirror = true;
|
||||
setRotation(spacer3, 0F, 0F, 0F);
|
||||
spacer4 = new ModelRenderer(this, 40, 0);
|
||||
spacer4.addBox(2.5F, 2.5F, -5.5F, 3, 3, 3);
|
||||
spacer4.setRotationPoint(0F, 16F, 0F);
|
||||
spacer4.setTextureSize(64, 32);
|
||||
spacer4.mirror = true;
|
||||
setRotation(spacer4, 0F, 0F, 0F);
|
||||
spacer5 = new ModelRenderer(this, 40, 0);
|
||||
spacer5.addBox(-5.5F, 2.5F, -5.484F, 3, 3, 3);
|
||||
spacer5.setRotationPoint(0F, 16F, 0F);
|
||||
spacer5.setTextureSize(64, 32);
|
||||
spacer5.mirror = true;
|
||||
setRotation(spacer5, 0F, 0F, 0F);
|
||||
spacer6 = new ModelRenderer(this, 40, 0);
|
||||
spacer6.addBox(2.5F, -5.5F, 2.5F, 3, 3, 3);
|
||||
spacer6.setRotationPoint(0F, 16F, 0F);
|
||||
spacer6.setTextureSize(64, 32);
|
||||
spacer6.mirror = true;
|
||||
setRotation(spacer6, 0F, 0F, 0F);
|
||||
spacer7 = new ModelRenderer(this, 40, 0);
|
||||
spacer7.addBox(2.5F, -5.5F, -5.5F, 3, 3, 3);
|
||||
spacer7.setRotationPoint(0F, 16F, 0F);
|
||||
spacer7.setTextureSize(64, 32);
|
||||
spacer7.mirror = true;
|
||||
setRotation(spacer7, 0F, 0F, 0F);
|
||||
spacer8 = new ModelRenderer(this, 40, 0);
|
||||
spacer8.addBox(-5.5F, -5.5F, -5.5F, 3, 3, 3);
|
||||
spacer8.setRotationPoint(0F, 16F, 0F);
|
||||
spacer8.setTextureSize(64, 32);
|
||||
spacer8.mirror = true;
|
||||
setRotation(spacer8, 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)
|
||||
{
|
||||
case NORTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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(curvedInput, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(curvedOutput, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(straightBar1, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(curvedBar1, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(straightBar2, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(curvedBar2, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(straightBar3, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(curvedBar3, xOutputRot, yOutputRot, zOutputRot);
|
||||
this.setRotation(straightBar4, xInputRot, yInputRot, zInputRot);
|
||||
this.setRotation(curvedBar4, xOutputRot, yOutputRot, zOutputRot);
|
||||
curvedInput.render(f5);
|
||||
curvedOutput.render(f5);
|
||||
//setRotation(curvedOutput,0F,-(float)(Math.PI/2),0F);
|
||||
straightBar1.render(f5);
|
||||
curvedBar1.render(f5);
|
||||
spacer1.render(f5);
|
||||
straightBar2.render(f5);
|
||||
curvedBar2.render(f5);
|
||||
spacer2.render(f5);
|
||||
straightBar3.render(f5);
|
||||
curvedBar3.render(f5);
|
||||
straightBar4.render(f5);
|
||||
curvedBar4.render(f5);
|
||||
spacer3.render(f5);
|
||||
spacer4.render(f5);
|
||||
spacer5.render(f5);
|
||||
spacer6.render(f5);
|
||||
spacer7.render(f5);
|
||||
spacer8.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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelCrystalBelljar extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer handle1;
|
||||
ModelRenderer handle2;
|
||||
ModelRenderer jar1;
|
||||
ModelRenderer woodBottom;
|
||||
ModelRenderer jar2;
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.monster.EntityBlaze;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ModelElemental extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer body;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape3;
|
||||
|
||||
public ModelElemental()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
body = new ModelRenderer(this, 33, 0);
|
||||
body.addBox(-3F, -3F, -3F, 6, 6, 6);
|
||||
body.setRotationPoint(0F, 14F, 0F);
|
||||
body.setTextureSize(64, 32);
|
||||
body.mirror = true;
|
||||
setRotation(body, 0F, 0F, 0F);
|
||||
Shape2 = new ModelRenderer(this, 0, 0);
|
||||
Shape2.addBox(-4F, -4F, -4F, 8, 8, 8);
|
||||
Shape2.setRotationPoint(0F, 14F, 0F);
|
||||
Shape2.setTextureSize(64, 32);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, ((float) Math.PI / 4F), ((float) Math.PI / 4F), 0F);
|
||||
Shape1 = new ModelRenderer(this, 0, 0);
|
||||
Shape1.addBox(-4F, -4F, -4F, 8, 8, 8);
|
||||
Shape1.setRotationPoint(0F, 14F, 0F);
|
||||
Shape1.setTextureSize(64, 32);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, ((float) Math.PI / 4F), ((float) Math.PI / 4F));
|
||||
Shape3 = new ModelRenderer(this, 0, 0);
|
||||
Shape3.addBox(-4F, -4F, -4F, 8, 8, 8);
|
||||
Shape3.setRotationPoint(0F, 14F, 0F);
|
||||
Shape3.setTextureSize(64, 32);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, ((float) Math.PI / 4F), 0F, ((float) Math.PI / 4F));
|
||||
}
|
||||
|
||||
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);
|
||||
body.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape1.render(f5);
|
||||
Shape3.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);
|
||||
World world = entity.worldObj;
|
||||
|
||||
if (world == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int ratio = 20;
|
||||
float rot = (entity.worldObj.getWorldTime() % ratio) / ratio;
|
||||
Shape1.rotateAngleX = f / 5;
|
||||
Shape2.rotateAngleZ = f / 5;
|
||||
Shape3.rotateAngleY = f / 5;
|
||||
EntityBlaze d;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelEnergyBazookaMainProjectile extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer thirdWarHead;
|
||||
ModelRenderer firstWarHead;
|
||||
ModelRenderer secondWarHead;
|
||||
ModelRenderer support1;
|
||||
ModelRenderer mainBody;
|
||||
ModelRenderer support2;
|
||||
ModelRenderer support3;
|
||||
ModelRenderer support4;
|
||||
ModelRenderer base1;
|
||||
ModelRenderer base2;
|
||||
ModelRenderer base3;
|
||||
|
||||
public ModelEnergyBazookaMainProjectile()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
thirdWarHead = new ModelRenderer(this, 43, 0);
|
||||
thirdWarHead.addBox(-1F, -1F, -9F, 2, 2, 1);
|
||||
thirdWarHead.setRotationPoint(0F, 0F, 0F);
|
||||
thirdWarHead.setTextureSize(64, 32);
|
||||
thirdWarHead.mirror = true;
|
||||
setRotation(thirdWarHead, 0F, 0F, 0F);
|
||||
firstWarHead = new ModelRenderer(this, 52, 0);
|
||||
firstWarHead.addBox(-2F, -2F, -8F, 4, 4, 2);
|
||||
firstWarHead.setRotationPoint(0F, 0F, 0F);
|
||||
firstWarHead.setTextureSize(64, 32);
|
||||
firstWarHead.mirror = true;
|
||||
setRotation(firstWarHead, 0F, 0F, 0F);
|
||||
secondWarHead = new ModelRenderer(this, 48, 8);
|
||||
secondWarHead.addBox(-3F, -3F, -6F, 6, 6, 2);
|
||||
secondWarHead.setRotationPoint(0F, 0F, 0F);
|
||||
secondWarHead.setTextureSize(64, 32);
|
||||
secondWarHead.mirror = true;
|
||||
setRotation(secondWarHead, 0F, 0F, 0F);
|
||||
support1 = new ModelRenderer(this, 0, 0);
|
||||
support1.addBox(2F, 2F, -4F, 1, 1, 9);
|
||||
support1.setRotationPoint(0F, 0F, 0F);
|
||||
support1.setTextureSize(64, 32);
|
||||
support1.mirror = true;
|
||||
setRotation(support1, 0F, 0F, 0F);
|
||||
mainBody = new ModelRenderer(this, 0, 19);
|
||||
mainBody.addBox(-2F, -2F, -4F, 4, 4, 9);
|
||||
mainBody.setRotationPoint(0F, 0F, 0F);
|
||||
mainBody.setTextureSize(64, 32);
|
||||
mainBody.mirror = true;
|
||||
setRotation(mainBody, 0F, 0F, 0F);
|
||||
support2 = new ModelRenderer(this, 0, 0);
|
||||
support2.addBox(-3F, 2F, -4F, 1, 1, 9);
|
||||
support2.setRotationPoint(0F, 0F, 0F);
|
||||
support2.setTextureSize(64, 32);
|
||||
support2.mirror = true;
|
||||
setRotation(support2, 0F, 0F, 0F);
|
||||
support3 = new ModelRenderer(this, 0, 0);
|
||||
support3.addBox(-3F, -3F, -4F, 1, 1, 9);
|
||||
support3.setRotationPoint(0F, 0F, 0F);
|
||||
support3.setTextureSize(64, 32);
|
||||
support3.mirror = true;
|
||||
setRotation(support3, 0F, 0F, 0F);
|
||||
support4 = new ModelRenderer(this, 0, 0);
|
||||
support4.addBox(2F, -3F, -4F, 1, 1, 9);
|
||||
support4.setRotationPoint(0F, 0F, 0F);
|
||||
support4.setTextureSize(64, 32);
|
||||
support4.mirror = true;
|
||||
setRotation(support4, 0F, 0F, 0F);
|
||||
base1 = new ModelRenderer(this, 28, 0);
|
||||
base1.addBox(-3F, -3F, 5F, 6, 6, 1);
|
||||
base1.setRotationPoint(0F, 0F, 0F);
|
||||
base1.setTextureSize(64, 32);
|
||||
base1.mirror = true;
|
||||
setRotation(base1, 0F, 0F, 0F);
|
||||
base2 = new ModelRenderer(this, 28, 9);
|
||||
base2.addBox(-2F, -2F, 6F, 4, 4, 1);
|
||||
base2.setRotationPoint(0F, 0F, 0F);
|
||||
base2.setTextureSize(64, 32);
|
||||
base2.mirror = true;
|
||||
setRotation(base2, 0F, 0F, 0F);
|
||||
base3 = new ModelRenderer(this, 28, 15);
|
||||
base3.addBox(-3F, -3F, 7F, 6, 6, 1);
|
||||
base3.setRotationPoint(0F, 0F, 0F);
|
||||
base3.setTextureSize(64, 32);
|
||||
base3.mirror = true;
|
||||
setRotation(base3, 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);
|
||||
thirdWarHead.render(f5);
|
||||
firstWarHead.render(f5);
|
||||
secondWarHead.render(f5);
|
||||
support1.render(f5);
|
||||
mainBody.render(f5);
|
||||
support2.render(f5);
|
||||
support3.render(f5);
|
||||
support4.render(f5);
|
||||
base1.render(f5);
|
||||
base2.render(f5);
|
||||
base3.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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ModelFallenAngel extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer leftWing;
|
||||
ModelRenderer rightWing;
|
||||
ModelRenderer head;
|
||||
ModelRenderer body;
|
||||
ModelRenderer rightarm;
|
||||
ModelRenderer leftarm;
|
||||
ModelRenderer rightleg;
|
||||
ModelRenderer leftleg;
|
||||
|
||||
public ModelFallenAngel()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
leftWing = new ModelRenderer(this, 33, 8);
|
||||
leftWing.mirror = true;
|
||||
leftWing.addBox(0F, 0F, 0F, 10, 7, 0);
|
||||
leftWing.setRotationPoint(0F, 1F, 2F);
|
||||
leftWing.setTextureSize(64, 32);
|
||||
leftWing.mirror = true;
|
||||
setRotation(leftWing, 0F, 0F, 0F);
|
||||
rightWing = new ModelRenderer(this, 33, 8);
|
||||
rightWing.addBox(-10F, 0F, 0F, 10, 7, 0);
|
||||
rightWing.setRotationPoint(0F, 1F, 2F);
|
||||
rightWing.setTextureSize(64, 32);
|
||||
rightWing.mirror = true;
|
||||
setRotation(rightWing, 0F, 0F, 0F);
|
||||
rightWing.mirror = false;
|
||||
head = new ModelRenderer(this, 0, 0);
|
||||
head.addBox(-4F, -8F, -4F, 8, 8, 8);
|
||||
head.setRotationPoint(0F, 0F, 0F);
|
||||
head.setTextureSize(64, 32);
|
||||
head.mirror = true;
|
||||
setRotation(head, 0F, 0F, 0F);
|
||||
body = new ModelRenderer(this, 16, 16);
|
||||
body.addBox(-4F, 0F, -2F, 8, 12, 4);
|
||||
body.setRotationPoint(0F, 0F, 0F);
|
||||
body.setTextureSize(64, 32);
|
||||
body.mirror = true;
|
||||
setRotation(body, 0F, 0F, 0F);
|
||||
rightarm = new ModelRenderer(this, 40, 16);
|
||||
rightarm.addBox(-3F, -2F, -2F, 4, 12, 4);
|
||||
rightarm.setRotationPoint(-5F, 2F, 0F);
|
||||
rightarm.setTextureSize(64, 32);
|
||||
rightarm.mirror = true;
|
||||
setRotation(rightarm, 0F, 0F, 0F);
|
||||
rightarm.mirror = false;
|
||||
leftarm = new ModelRenderer(this, 40, 16);
|
||||
leftarm.mirror = true;
|
||||
leftarm.addBox(-1F, -2F, -2F, 4, 12, 4);
|
||||
leftarm.setRotationPoint(5F, 2F, 0F);
|
||||
leftarm.setTextureSize(64, 32);
|
||||
leftarm.mirror = true;
|
||||
setRotation(leftarm, 0F, 0F, 0F);
|
||||
rightleg = new ModelRenderer(this, 0, 16);
|
||||
rightleg.addBox(-2F, 0F, -2F, 4, 12, 4);
|
||||
rightleg.setRotationPoint(-2F, 12F, 0F);
|
||||
rightleg.setTextureSize(64, 32);
|
||||
rightleg.mirror = true;
|
||||
setRotation(rightleg, 0F, 0F, 0F);
|
||||
rightleg.mirror = false;
|
||||
leftleg = new ModelRenderer(this, 0, 16);
|
||||
leftleg.mirror = true;
|
||||
leftleg.addBox(-2F, 0F, -2F, 4, 12, 4);
|
||||
leftleg.setRotationPoint(2F, 12F, 0F);
|
||||
leftleg.setTextureSize(64, 32);
|
||||
leftleg.mirror = true;
|
||||
setRotation(leftleg, 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);
|
||||
leftWing.render(f5);
|
||||
rightWing.render(f5);
|
||||
head.render(f5);
|
||||
body.render(f5);
|
||||
rightarm.render(f5);
|
||||
leftarm.render(f5);
|
||||
rightleg.render(f5);
|
||||
leftleg.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);
|
||||
this.head.rotateAngleX = f4 / (180F / (float) Math.PI);
|
||||
this.head.rotateAngleY = f3 / (180F / (float) Math.PI);
|
||||
this.leftleg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
this.rightleg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1;
|
||||
this.rightarm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1;
|
||||
this.leftarm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
this.rightWing.rotateAngleY = MathHelper.cos(0.1662F);
|
||||
this.leftWing.rotateAngleY = MathHelper.cos(0.1662F + (float) Math.PI);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,197 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ModelIceDemon extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer head;
|
||||
ModelRenderer leftHorn;
|
||||
ModelRenderer rightHorn;
|
||||
ModelRenderer body;
|
||||
ModelRenderer leftArm;
|
||||
ModelRenderer leftWrist;
|
||||
ModelRenderer leftIcicle1;
|
||||
ModelRenderer leftIcicle2;
|
||||
ModelRenderer leftIcicle3;
|
||||
ModelRenderer leftLeg;
|
||||
ModelRenderer rightArm;
|
||||
ModelRenderer rightWrist;
|
||||
ModelRenderer rightIcicle1;
|
||||
ModelRenderer rightIcicle2;
|
||||
ModelRenderer rightIcicle3;
|
||||
ModelRenderer rightLeg;
|
||||
ModelRenderer Shape1;
|
||||
|
||||
public ModelIceDemon()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
head = new ModelRenderer(this, 40, 0);
|
||||
head.addBox(-3F, -8F, -3F, 6, 8, 6);
|
||||
head.setRotationPoint(0F, -3F, 0F);
|
||||
head.setTextureSize(64, 64);
|
||||
head.mirror = true;
|
||||
setRotation(head, 0F, 0F, 0F);
|
||||
leftHorn = new ModelRenderer(this, 0, 0);
|
||||
leftHorn.addBox(3F, -7F, 2F, 1, 1, 10);
|
||||
leftHorn.setRotationPoint(0F, -3F, 0F);
|
||||
leftHorn.setTextureSize(64, 64);
|
||||
leftHorn.mirror = true;
|
||||
setRotation(leftHorn, 0.4363323F, 0F, 0F);
|
||||
rightHorn = new ModelRenderer(this, 0, 0);
|
||||
rightHorn.mirror = true;
|
||||
rightHorn.addBox(-4F, -7F, 2F, 1, 1, 10);
|
||||
rightHorn.setRotationPoint(0F, -3F, 0F);
|
||||
rightHorn.setTextureSize(64, 64);
|
||||
rightHorn.mirror = true;
|
||||
setRotation(rightHorn, 0.4363323F, 0F, 0F);
|
||||
rightHorn.mirror = false;
|
||||
body = new ModelRenderer(this, 40, 15);
|
||||
body.addBox(-4F, 0F, -2F, 8, 13, 4);
|
||||
body.setRotationPoint(0F, -3F, 0F);
|
||||
body.setTextureSize(64, 64);
|
||||
body.mirror = true;
|
||||
setRotation(body, 0F, 0F, 0F);
|
||||
leftArm = new ModelRenderer(this, 0, 48);
|
||||
leftArm.addBox(0F, -2F, -2F, 4, 12, 4);
|
||||
leftArm.setRotationPoint(4F, -1F, 0F);
|
||||
leftArm.setTextureSize(64, 64);
|
||||
leftArm.mirror = true;
|
||||
setRotation(leftArm, 0F, 0F, 0F);
|
||||
leftWrist = new ModelRenderer(this, 32, 57);
|
||||
leftWrist.addBox(0F, 6F, -2.5F, 5, 2, 5);
|
||||
leftWrist.setRotationPoint(4F, -1F, 0F);
|
||||
leftWrist.setTextureSize(64, 64);
|
||||
leftWrist.mirror = true;
|
||||
setRotation(leftWrist, 0F, 0F, 0F);
|
||||
leftIcicle1 = new ModelRenderer(this, 0, 0);
|
||||
leftIcicle1.addBox(4.9F, 0F, -0.5F, 1, 6, 1);
|
||||
leftIcicle1.setRotationPoint(4F, -1F, 0F);
|
||||
leftIcicle1.setTextureSize(64, 64);
|
||||
leftIcicle1.mirror = true;
|
||||
setRotation(leftIcicle1, 0F, 0F, 0.1396263F);
|
||||
leftIcicle2 = new ModelRenderer(this, 0, 0);
|
||||
leftIcicle2.addBox(5F, 0F, 0F, 1, 6, 1);
|
||||
leftIcicle2.setRotationPoint(4F, -1F, 0F);
|
||||
leftIcicle2.setTextureSize(64, 64);
|
||||
leftIcicle2.mirror = true;
|
||||
setRotation(leftIcicle2, 0F, 0.5585054F, 0.1919862F);
|
||||
leftIcicle3 = new ModelRenderer(this, 0, 0);
|
||||
leftIcicle3.addBox(5F, 0F, -1F, 1, 6, 1);
|
||||
leftIcicle3.setRotationPoint(4F, -1F, 0F);
|
||||
leftIcicle3.setTextureSize(64, 64);
|
||||
leftIcicle3.mirror = true;
|
||||
setRotation(leftIcicle3, 0F, -0.5585054F, 0.1919862F);
|
||||
leftLeg = new ModelRenderer(this, 16, 46);
|
||||
leftLeg.addBox(-2F, 0F, -2F, 4, 14, 4);
|
||||
leftLeg.setRotationPoint(2F, 10F, 0F);
|
||||
leftLeg.setTextureSize(64, 64);
|
||||
leftLeg.mirror = true;
|
||||
setRotation(leftLeg, 0F, 0F, 0F);
|
||||
rightArm = new ModelRenderer(this, 0, 48);
|
||||
rightArm.mirror = true;
|
||||
rightArm.addBox(-4F, -2F, -2F, 4, 12, 4);
|
||||
rightArm.setRotationPoint(-4F, -1F, 0F);
|
||||
rightArm.setTextureSize(64, 64);
|
||||
rightArm.mirror = true;
|
||||
setRotation(rightArm, 0F, 0F, 0F);
|
||||
rightArm.mirror = false;
|
||||
rightWrist = new ModelRenderer(this, 32, 57);
|
||||
rightWrist.mirror = true;
|
||||
rightWrist.addBox(-5F, 6F, -2.5F, 5, 2, 5);
|
||||
rightWrist.setRotationPoint(-4F, -1F, 0F);
|
||||
rightWrist.setTextureSize(64, 64);
|
||||
rightWrist.mirror = true;
|
||||
setRotation(rightWrist, 0F, 0F, 0F);
|
||||
rightWrist.mirror = false;
|
||||
rightIcicle1 = new ModelRenderer(this, 0, 0);
|
||||
rightIcicle1.addBox(-5.9F, 0F, -0.5F, 1, 6, 1);
|
||||
rightIcicle1.setRotationPoint(-4F, -1F, 0F);
|
||||
rightIcicle1.setTextureSize(64, 64);
|
||||
rightIcicle1.mirror = true;
|
||||
setRotation(rightIcicle1, 0F, 0F, -0.1396263F);
|
||||
rightIcicle2 = new ModelRenderer(this, 0, 0);
|
||||
rightIcicle2.addBox(-6F, 0F, 0F, 1, 6, 1);
|
||||
rightIcicle2.setRotationPoint(-4F, -1F, 0F);
|
||||
rightIcicle2.setTextureSize(64, 64);
|
||||
rightIcicle2.mirror = true;
|
||||
setRotation(rightIcicle2, 0F, -0.5585054F, -0.1919862F);
|
||||
rightIcicle3 = new ModelRenderer(this, 0, 0);
|
||||
rightIcicle3.addBox(-6F, 0F, -1F, 1, 6, 1);
|
||||
rightIcicle3.setRotationPoint(-4F, -1F, 0F);
|
||||
rightIcicle3.setTextureSize(64, 64);
|
||||
rightIcicle3.mirror = true;
|
||||
setRotation(rightIcicle3, 0F, 0.5585054F, -0.1919862F);
|
||||
rightLeg = new ModelRenderer(this, 16, 46);
|
||||
rightLeg.mirror = true;
|
||||
rightLeg.addBox(-2F, 0F, -2F, 4, 14, 4);
|
||||
rightLeg.setRotationPoint(-2F, 10F, 0F);
|
||||
rightLeg.setTextureSize(64, 64);
|
||||
rightLeg.mirror = true;
|
||||
setRotation(rightLeg, 0F, 0F, 0F);
|
||||
rightLeg.mirror = false;
|
||||
Shape1 = new ModelRenderer(this, 0, 12);
|
||||
Shape1.addBox(-0.5F, 0F, -0.5F, 1, 10, 1);
|
||||
Shape1.setRotationPoint(0F, 8F, 1.5F);
|
||||
Shape1.setTextureSize(64, 64);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0.5948578F, 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);
|
||||
head.render(f5);
|
||||
leftHorn.render(f5);
|
||||
rightHorn.render(f5);
|
||||
body.render(f5);
|
||||
leftArm.render(f5);
|
||||
leftWrist.render(f5);
|
||||
leftIcicle1.render(f5);
|
||||
leftIcicle2.render(f5);
|
||||
leftIcicle3.render(f5);
|
||||
leftLeg.render(f5);
|
||||
rightArm.render(f5);
|
||||
rightWrist.render(f5);
|
||||
rightIcicle1.render(f5);
|
||||
rightIcicle2.render(f5);
|
||||
rightIcicle3.render(f5);
|
||||
rightLeg.render(f5);
|
||||
Shape1.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);
|
||||
this.head.rotateAngleX = f4 / (180F / (float) Math.PI);
|
||||
this.head.rotateAngleY = f3 / (180F / (float) Math.PI);
|
||||
this.leftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1;
|
||||
this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1;
|
||||
this.leftArm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
this.leftHorn.rotateAngleX = head.rotateAngleX + 0.4363323F;
|
||||
this.leftHorn.rotateAngleY = head.rotateAngleY;
|
||||
this.rightHorn.rotateAngleX = head.rotateAngleX + 0.4363323F;
|
||||
this.rightHorn.rotateAngleY = head.rotateAngleY;
|
||||
this.rightIcicle1.rotateAngleX = rightArm.rotateAngleX;
|
||||
this.rightIcicle2.rotateAngleX = rightArm.rotateAngleX;
|
||||
this.rightIcicle3.rotateAngleX = rightArm.rotateAngleX;
|
||||
this.leftIcicle1.rotateAngleX = leftArm.rotateAngleX;
|
||||
this.leftIcicle2.rotateAngleX = leftArm.rotateAngleX;
|
||||
this.leftIcicle3.rotateAngleX = leftArm.rotateAngleX;
|
||||
this.rightWrist.rotateAngleX = rightArm.rotateAngleX;
|
||||
this.leftWrist.rotateAngleX = leftArm.rotateAngleX;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,207 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityLowerGuardian;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ModelLowerGuardian extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer Body;
|
||||
ModelRenderer Torso;
|
||||
ModelRenderer Head;
|
||||
ModelRenderer leftArm;
|
||||
ModelRenderer rightArm;
|
||||
ModelRenderer leftLeg;
|
||||
ModelRenderer leftFoot;
|
||||
ModelRenderer rightLeg;
|
||||
ModelRenderer rightFoot;
|
||||
ModelRenderer leftHorn;
|
||||
ModelRenderer hornAppendage1;
|
||||
ModelRenderer hornAppendage2;
|
||||
ModelRenderer rightHorn;
|
||||
ModelRenderer hornAppendage3;
|
||||
ModelRenderer hornAppendage4;
|
||||
|
||||
public ModelLowerGuardian()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
Body = new ModelRenderer(this, 0, 0);
|
||||
Body.addBox(-8F, -7F, -4F, 16, 14, 8);
|
||||
Body.setRotationPoint(0F, -3F, 0F);
|
||||
Body.setTextureSize(64, 64);
|
||||
Body.mirror = true;
|
||||
setRotation(Body, 0F, 0F, 0F);
|
||||
Torso = new ModelRenderer(this, 0, 25);
|
||||
Torso.addBox(-4F, 0F, -3F, 8, 4, 6);
|
||||
Torso.setRotationPoint(0F, 4F, 0F);
|
||||
Torso.setTextureSize(64, 64);
|
||||
Torso.mirror = true;
|
||||
setRotation(Torso, 0F, 0F, 0F);
|
||||
Head = new ModelRenderer(this, 29, 25);
|
||||
Head.addBox(-4F, -8F, -4F, 8, 8, 8);
|
||||
Head.setRotationPoint(0F, -10F, 0F);
|
||||
Head.setTextureSize(64, 64);
|
||||
Head.mirror = true;
|
||||
setRotation(Head, 0F, 0F, 0F);
|
||||
leftArm = new ModelRenderer(this, 17, 42);
|
||||
leftArm.addBox(0F, -2F, -2F, 4, 18, 4);
|
||||
leftArm.setRotationPoint(8F, -8F, 0F);
|
||||
leftArm.setTextureSize(64, 64);
|
||||
leftArm.mirror = true;
|
||||
setRotation(leftArm, 0F, 0F, 0F);
|
||||
rightArm = new ModelRenderer(this, 17, 42);
|
||||
rightArm.mirror = true;
|
||||
rightArm.addBox(-4F, -2F, -2F, 4, 18, 4);
|
||||
rightArm.setRotationPoint(-8F, -8F, 0F);
|
||||
rightArm.setTextureSize(64, 64);
|
||||
rightArm.mirror = true;
|
||||
setRotation(rightArm, 0F, 0F, 0F);
|
||||
rightArm.mirror = false;
|
||||
leftLeg = new ModelRenderer(this, 0, 42);
|
||||
leftLeg.addBox(0F, -2F, -2F, 4, 17, 4);
|
||||
leftLeg.setRotationPoint(4F, 6F, 0F);
|
||||
leftLeg.setTextureSize(64, 64);
|
||||
leftLeg.mirror = true;
|
||||
setRotation(leftLeg, 0F, 0F, 0F);
|
||||
leftFoot = new ModelRenderer(this, 34, 42);
|
||||
leftFoot.addBox(0F, 15F, -6F, 4, 3, 8);
|
||||
leftFoot.setRotationPoint(4F, 6F, 0F);
|
||||
leftFoot.setTextureSize(64, 64);
|
||||
leftFoot.mirror = true;
|
||||
setRotation(leftFoot, 0F, 0F, 0F);
|
||||
rightLeg = new ModelRenderer(this, 0, 42);
|
||||
rightLeg.mirror = true;
|
||||
rightLeg.addBox(-4F, -2F, -2F, 4, 17, 4);
|
||||
rightLeg.setRotationPoint(-4F, 6F, 0F);
|
||||
rightLeg.setTextureSize(64, 64);
|
||||
rightLeg.mirror = true;
|
||||
setRotation(rightLeg, 0F, 0F, 0F);
|
||||
rightLeg.mirror = false;
|
||||
rightFoot = new ModelRenderer(this, 34, 42);
|
||||
rightFoot.mirror = true;
|
||||
rightFoot.addBox(-4F, 15F, -6F, 4, 3, 8);
|
||||
rightFoot.setRotationPoint(-4F, 6F, 0F);
|
||||
rightFoot.setTextureSize(64, 64);
|
||||
rightFoot.mirror = true;
|
||||
setRotation(rightFoot, 0F, 0F, 0F);
|
||||
rightFoot.mirror = false;
|
||||
leftHorn = new ModelRenderer(this, 0, 0);
|
||||
leftHorn.addBox(4F, -11F, 0F, 1, 6, 1);
|
||||
leftHorn.setRotationPoint(0F, -10F, 0F);
|
||||
leftHorn.setTextureSize(64, 64);
|
||||
leftHorn.mirror = true;
|
||||
setRotation(leftHorn, 0F, 0F, 0F);
|
||||
hornAppendage1 = new ModelRenderer(this, 0, 0);
|
||||
hornAppendage1.addBox(4F, -7F, -1F, 1, 1, 1);
|
||||
hornAppendage1.setRotationPoint(0F, -10F, 0F);
|
||||
hornAppendage1.setTextureSize(64, 64);
|
||||
hornAppendage1.mirror = true;
|
||||
setRotation(hornAppendage1, 0F, 0F, 0F);
|
||||
hornAppendage2 = new ModelRenderer(this, 0, 0);
|
||||
hornAppendage2.addBox(4F, -6F, 1F, 1, 1, 1);
|
||||
hornAppendage2.setRotationPoint(0F, -10F, 0F);
|
||||
hornAppendage2.setTextureSize(64, 64);
|
||||
hornAppendage2.mirror = true;
|
||||
setRotation(hornAppendage2, 0F, 0F, 0F);
|
||||
rightHorn = new ModelRenderer(this, 0, 0);
|
||||
rightHorn.mirror = true;
|
||||
rightHorn.addBox(-5F, -11F, 0F, 1, 6, 1);
|
||||
rightHorn.setRotationPoint(0F, -10F, 0F);
|
||||
rightHorn.setTextureSize(64, 64);
|
||||
rightHorn.mirror = true;
|
||||
setRotation(rightHorn, 0F, 0F, 0F);
|
||||
rightHorn.mirror = false;
|
||||
hornAppendage3 = new ModelRenderer(this, 0, 0);
|
||||
hornAppendage3.mirror = true;
|
||||
hornAppendage3.addBox(-5F, -7F, -1F, 1, 1, 1);
|
||||
hornAppendage3.setRotationPoint(0F, -10F, 0F);
|
||||
hornAppendage3.setTextureSize(64, 64);
|
||||
hornAppendage3.mirror = true;
|
||||
setRotation(hornAppendage3, 0F, 0F, 0F);
|
||||
hornAppendage3.mirror = false;
|
||||
hornAppendage4 = new ModelRenderer(this, 0, 0);
|
||||
hornAppendage4.mirror = true;
|
||||
hornAppendage4.addBox(-5F, -6F, 1F, 1, 1, 1);
|
||||
hornAppendage4.setRotationPoint(0F, -10F, 0F);
|
||||
hornAppendage4.setTextureSize(64, 64);
|
||||
hornAppendage4.mirror = true;
|
||||
setRotation(hornAppendage4, 0F, 0F, 0F);
|
||||
hornAppendage4.mirror = false;
|
||||
}
|
||||
|
||||
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);
|
||||
Body.render(f5);
|
||||
Torso.render(f5);
|
||||
Head.render(f5);
|
||||
leftArm.render(f5);
|
||||
rightArm.render(f5);
|
||||
leftLeg.render(f5);
|
||||
leftFoot.render(f5);
|
||||
rightLeg.render(f5);
|
||||
rightFoot.render(f5);
|
||||
leftHorn.render(f5);
|
||||
hornAppendage1.render(f5);
|
||||
hornAppendage2.render(f5);
|
||||
rightHorn.render(f5);
|
||||
hornAppendage3.render(f5);
|
||||
hornAppendage4.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setLivingAnimations(EntityLivingBase par1EntityLivingBase, float par2, float par3, float par4)
|
||||
{
|
||||
EntityLowerGuardian entityLowerGuardian = (EntityLowerGuardian) par1EntityLivingBase;
|
||||
int i = entityLowerGuardian.getAttackTimer();
|
||||
|
||||
if (i > 0)
|
||||
{
|
||||
this.rightLeg.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float) i - par4, 10.0F);
|
||||
this.rightFoot.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float) i - par4, 10.0F);
|
||||
//this.ironGolemLeftArm.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - par4, 10.0F);
|
||||
}
|
||||
}
|
||||
|
||||
private float func_78172_a(float par1, float par2)
|
||||
{
|
||||
return (Math.abs(par1 % par2 - par2 * 0.5F) - par2 * 0.25F) / (par2 * 0.25F);
|
||||
}
|
||||
|
||||
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);
|
||||
this.Head.rotateAngleX = f4 / (180F / (float) Math.PI);
|
||||
this.Head.rotateAngleY = f3 / (180F / (float) Math.PI);
|
||||
this.leftLeg.rotateAngleX = MathHelper.cos(f * 0.3662F) * 1.0F * f1;
|
||||
this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.3662F + (float) Math.PI) * 1.0F * f1;
|
||||
this.leftFoot.rotateAngleX = MathHelper.cos(f * 0.3662F) * 1.0F * f1;
|
||||
this.rightFoot.rotateAngleX = MathHelper.cos(f * 0.3662F + (float) Math.PI) * 1.0F * f1;
|
||||
this.rightArm.rotateAngleX = MathHelper.cos(f * 0.3662F + (float) Math.PI) * 1.0F * f1;
|
||||
this.leftArm.rotateAngleX = MathHelper.cos(f * 0.3662F) * 1.0F * f1;
|
||||
this.hornAppendage1.rotateAngleX = this.Head.rotateAngleX;
|
||||
this.hornAppendage1.rotateAngleY = this.Head.rotateAngleY;
|
||||
this.hornAppendage2.rotateAngleX = this.Head.rotateAngleX;
|
||||
this.hornAppendage2.rotateAngleY = this.Head.rotateAngleY;
|
||||
this.hornAppendage3.rotateAngleX = this.Head.rotateAngleX;
|
||||
this.hornAppendage3.rotateAngleY = this.Head.rotateAngleY;
|
||||
this.hornAppendage4.rotateAngleX = this.Head.rotateAngleX;
|
||||
this.hornAppendage4.rotateAngleY = this.Head.rotateAngleY;
|
||||
this.leftHorn.rotateAngleX = this.Head.rotateAngleX;
|
||||
this.leftHorn.rotateAngleY = this.Head.rotateAngleY;
|
||||
this.rightHorn.rotateAngleX = this.Head.rotateAngleX;
|
||||
this.rightHorn.rotateAngleY = this.Head.rotateAngleY;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelMeteor extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
ModelRenderer Shape5;
|
||||
ModelRenderer Shape6;
|
||||
ModelRenderer Shape7;
|
||||
|
||||
public ModelMeteor()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
Shape1 = new ModelRenderer(this, 0, 0);
|
||||
Shape1.addBox(-8F, -8F, -8F, 16, 16, 16);
|
||||
Shape1.setRotationPoint(0F, 0F, 0F);
|
||||
Shape1.setTextureSize(64, 64);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
Shape2 = new ModelRenderer(this, 0, 32);
|
||||
Shape2.addBox(3F, -10F, -1F, 12, 12, 12);
|
||||
Shape2.setRotationPoint(0F, 0F, 0F);
|
||||
Shape2.setTextureSize(64, 64);
|
||||
Shape2.mirror = true;
|
||||
setRotation(Shape2, 0F, 0F, 0F);
|
||||
Shape3 = new ModelRenderer(this, 0, 32);
|
||||
Shape3.addBox(0F, 0F, -10F, 12, 12, 12);
|
||||
Shape3.setRotationPoint(0F, 0F, 0F);
|
||||
Shape3.setTextureSize(64, 64);
|
||||
Shape3.mirror = true;
|
||||
setRotation(Shape3, 0F, 0F, 0F);
|
||||
Shape4 = new ModelRenderer(this, 0, 32);
|
||||
Shape4.addBox(1F, 2F, 2F, 12, 12, 12);
|
||||
Shape4.setRotationPoint(0F, 0F, 0F);
|
||||
Shape4.setTextureSize(64, 64);
|
||||
Shape4.mirror = true;
|
||||
setRotation(Shape4, 0F, 0F, 0F);
|
||||
Shape5 = new ModelRenderer(this, 0, 32);
|
||||
Shape5.addBox(-12F, -5F, 0F, 12, 12, 12);
|
||||
Shape5.setRotationPoint(0F, 0F, 0F);
|
||||
Shape5.setTextureSize(64, 64);
|
||||
Shape5.mirror = true;
|
||||
setRotation(Shape5, 0F, 0F, 0F);
|
||||
Shape6 = new ModelRenderer(this, 0, 32);
|
||||
Shape6.addBox(-13F, -2F, -11F, 12, 12, 12);
|
||||
Shape6.setRotationPoint(0F, 0F, 0F);
|
||||
Shape6.setTextureSize(64, 64);
|
||||
Shape6.mirror = true;
|
||||
setRotation(Shape6, 0F, 0F, 0F);
|
||||
Shape7 = new ModelRenderer(this, 0, 32);
|
||||
Shape7.addBox(-6F, -14F, -9F, 12, 12, 12);
|
||||
Shape7.setRotationPoint(0F, 0F, 0F);
|
||||
Shape7.setTextureSize(64, 64);
|
||||
Shape7.mirror = true;
|
||||
setRotation(Shape7, 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);
|
||||
Shape1.render(f5);
|
||||
Shape2.render(f5);
|
||||
Shape3.render(f5);
|
||||
Shape4.render(f5);
|
||||
Shape5.render(f5);
|
||||
Shape6.render(f5);
|
||||
Shape7.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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,899 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelOmegaArmour extends ModelBiped
|
||||
{
|
||||
// ModelRenderer head;
|
||||
// ModelRenderer body;
|
||||
// ModelRenderer rightarm;
|
||||
// ModelRenderer leftarm;
|
||||
// ModelRenderer rightleg;
|
||||
// ModelRenderer leftleg;
|
||||
ModelRenderer leftFacePlate;
|
||||
ModelRenderer rightFacePlate;
|
||||
ModelRenderer facePlate1;
|
||||
ModelRenderer facePlate2;
|
||||
ModelRenderer facePlate3;
|
||||
ModelRenderer leftWingPlate1;
|
||||
ModelRenderer leftWingPlate2;
|
||||
ModelRenderer rightWingPlate1;
|
||||
ModelRenderer rightWingPlate2;
|
||||
ModelRenderer topPlate1;
|
||||
ModelRenderer topPlate2;
|
||||
ModelRenderer topPlate3;
|
||||
ModelRenderer backPlate1;
|
||||
ModelRenderer backPlate2;
|
||||
ModelRenderer backPlate3;
|
||||
ModelRenderer backPlate4;
|
||||
ModelRenderer backPlate5;
|
||||
ModelRenderer backPlate6;
|
||||
ModelRenderer eyePlate;
|
||||
ModelRenderer rightArmMain;
|
||||
ModelRenderer rightKnucklePlate;
|
||||
ModelRenderer rightKnuckleBrace;
|
||||
ModelRenderer rightKnuckle1;
|
||||
ModelRenderer rightKnuckle2;
|
||||
ModelRenderer rightKnuckle3;
|
||||
ModelRenderer rightKnuckle4;
|
||||
ModelRenderer rightKnuckle5;
|
||||
ModelRenderer rightKnuckle6;
|
||||
ModelRenderer rightShoulder1;
|
||||
ModelRenderer rightShoulder2;
|
||||
ModelRenderer rightShoulder3;
|
||||
ModelRenderer mainPlate;
|
||||
ModelRenderer chestPlate1;
|
||||
ModelRenderer chestPlate2;
|
||||
ModelRenderer chestPlate3;
|
||||
ModelRenderer chestPlate4;
|
||||
ModelRenderer chestPlate5;
|
||||
ModelRenderer chestPlate6;
|
||||
ModelRenderer belt;
|
||||
ModelRenderer leftArmMain;
|
||||
ModelRenderer leftKnucklePlate;
|
||||
ModelRenderer leftKnuckleBrace;
|
||||
ModelRenderer leftKnuckle1;
|
||||
ModelRenderer leftKnuckle2;
|
||||
ModelRenderer leftKnuckle3;
|
||||
ModelRenderer leftKnuckle4;
|
||||
ModelRenderer leftKnuckle5;
|
||||
ModelRenderer leftKnuckle6;
|
||||
ModelRenderer leftShoulder1;
|
||||
ModelRenderer leftShoulder2;
|
||||
ModelRenderer leftShoulder3;
|
||||
ModelRenderer leftBootBottom;
|
||||
ModelRenderer leftBootPlate;
|
||||
ModelRenderer leftBootBrace;
|
||||
ModelRenderer leftBootWing1;
|
||||
ModelRenderer leftBootWing2;
|
||||
ModelRenderer rightBootBottom;
|
||||
ModelRenderer rightBootPlate;
|
||||
ModelRenderer rightBootBrace;
|
||||
ModelRenderer rightBootWing1;
|
||||
ModelRenderer rightBootWing2;
|
||||
ModelRenderer leftLegSidePlate;
|
||||
ModelRenderer leftLegMain;
|
||||
ModelRenderer leftLegPlate1;
|
||||
ModelRenderer leftLegPlate2;
|
||||
ModelRenderer leftLegPlate3;
|
||||
ModelRenderer leftLegPlate4;
|
||||
ModelRenderer rightLegSidePlate;
|
||||
ModelRenderer rightLegMain;
|
||||
ModelRenderer rightLegPlate1;
|
||||
ModelRenderer rightLegPlate2;
|
||||
ModelRenderer rightLegPlate3;
|
||||
ModelRenderer rightLegPlate4;
|
||||
|
||||
public ModelOmegaArmour(float f, boolean addHelmet, boolean addChestPiece, boolean addLeggings, boolean addBoots)
|
||||
{
|
||||
super(f, 0.0f, 128, 128);
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
||||
|
||||
// boolean addHelmet = true;
|
||||
// boolean addChestPiece = true;
|
||||
// boolean addLeggings = true;
|
||||
// boolean addBoots = true;
|
||||
|
||||
/* Duplicate player model */
|
||||
{
|
||||
// head = new ModelRenderer(this, 0, 0);
|
||||
// head.addBox(-4F, -8F, -4F, 8, 8, 8);
|
||||
// head.setRotationPoint(0F, 0F, 0F);
|
||||
// head.setTextureSize(128, 128);
|
||||
// head.mirror = true;
|
||||
// setRotation(head, 0F, 0F, 0F);
|
||||
// body = new ModelRenderer(this, 16, 16);
|
||||
// body.addBox(-4F, 0F, -2F, 8, 12, 4);
|
||||
// body.setRotationPoint(0F, 0F, 0F);
|
||||
// body.setTextureSize(128, 128);
|
||||
// body.mirror = true;
|
||||
// setRotation(body, 0F, 0F, 0F);
|
||||
// rightarm = new ModelRenderer(this, 40, 16);
|
||||
// rightarm.addBox(-3F, -2F, -2F, 4, 12, 4);
|
||||
// rightarm.setRotationPoint(0F, 0F, 0F);
|
||||
// rightarm.setTextureSize(128, 128);
|
||||
// rightarm.mirror = true;
|
||||
// setRotation(rightarm, 0F, 0F, 0F);
|
||||
// leftarm = new ModelRenderer(this, 40, 16);
|
||||
// leftarm.addBox(-1F, -2F, -2F, 4, 12, 4);
|
||||
// leftarm.setRotationPoint(0F, 0F, 0F);
|
||||
// leftarm.setTextureSize(128, 128);
|
||||
// leftarm.mirror = true;
|
||||
// setRotation(leftarm, 0F, 0F, 0F);
|
||||
// rightleg = new ModelRenderer(this, 0, 16);
|
||||
// rightleg.addBox(-2F, 0F, -2F, 4, 12, 4);
|
||||
// rightleg.setRotationPoint(-2F, 12F, 0F);
|
||||
// rightleg.setTextureSize(128, 128);
|
||||
// rightleg.mirror = true;
|
||||
// setRotation(rightleg, 0F, 0F, 0F);
|
||||
// leftleg = new ModelRenderer(this, 0, 16);
|
||||
// leftleg.addBox(-2F, 0F, -2F, 4, 12, 4);
|
||||
// leftleg.setRotationPoint(2F, 12F, 0F);
|
||||
// leftleg.setTextureSize(128, 128);
|
||||
// leftleg.mirror = true;
|
||||
// setRotation(leftleg, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
/* Helmet */
|
||||
{
|
||||
leftFacePlate = new ModelRenderer(this, 66, 52);
|
||||
leftFacePlate.addBox(-2F, -5F, -5F, 5, 4, 1);
|
||||
leftFacePlate.setRotationPoint(0F, 0F, 0F);
|
||||
leftFacePlate.setTextureSize(128, 128);
|
||||
leftFacePlate.mirror = true;
|
||||
setRotation(leftFacePlate, 0.296706F, -0.3490659F, -0.0872665F);
|
||||
|
||||
rightFacePlate = new ModelRenderer(this, 66, 52);
|
||||
rightFacePlate.mirror = true;
|
||||
rightFacePlate.addBox(-3F, -5F, -5F, 5, 4, 1);
|
||||
rightFacePlate.setRotationPoint(0F, 0F, 0F);
|
||||
rightFacePlate.setTextureSize(128, 128);
|
||||
rightFacePlate.mirror = true;
|
||||
setRotation(rightFacePlate, 0.296706F, 0.3490659F, 0.0872665F);
|
||||
rightFacePlate.mirror = false;
|
||||
|
||||
facePlate1 = new ModelRenderer(this, 79, 52);
|
||||
facePlate1.addBox(-5F, -8F, -5F, 10, 3, 1);
|
||||
facePlate1.setRotationPoint(0F, 0F, 0F);
|
||||
facePlate1.setTextureSize(128, 128);
|
||||
facePlate1.mirror = true;
|
||||
setRotation(facePlate1, 0F, 0F, 0F);
|
||||
|
||||
facePlate2 = new ModelRenderer(this, 79, 57);
|
||||
facePlate2.addBox(-1F, -5F, -5F, 2, 1, 1);
|
||||
facePlate2.setRotationPoint(0F, 0F, 0F);
|
||||
facePlate2.setTextureSize(128, 128);
|
||||
facePlate2.mirror = true;
|
||||
setRotation(facePlate2, 0F, 0F, 0F);
|
||||
|
||||
facePlate3 = new ModelRenderer(this, 79, 60);
|
||||
facePlate3.addBox(-3F, -4F, -5F, 6, 1, 1);
|
||||
facePlate3.setRotationPoint(0F, 0F, 0F);
|
||||
facePlate3.setTextureSize(128, 128);
|
||||
facePlate3.mirror = true;
|
||||
setRotation(facePlate3, 0F, 0F, 0F);
|
||||
|
||||
leftWingPlate1 = new ModelRenderer(this, 66, 58);
|
||||
leftWingPlate1.addBox(5F, -5F, -2.5F, 1, 5, 8);
|
||||
leftWingPlate1.setRotationPoint(0F, 0F, 0F);
|
||||
leftWingPlate1.setTextureSize(128, 128);
|
||||
leftWingPlate1.mirror = true;
|
||||
setRotation(leftWingPlate1, 0.2617994F, 0.1745329F, 0F);
|
||||
|
||||
leftWingPlate2 = new ModelRenderer(this, 66, 72);
|
||||
leftWingPlate2.addBox(5F, -8F, -2F, 1, 3, 10);
|
||||
leftWingPlate2.setRotationPoint(0F, 0F, 0F);
|
||||
leftWingPlate2.setTextureSize(128, 128);
|
||||
leftWingPlate2.mirror = true;
|
||||
setRotation(leftWingPlate2, 0.2617994F, 0.1745329F, 0F);
|
||||
|
||||
rightWingPlate1 = new ModelRenderer(this, 66, 58);
|
||||
rightWingPlate1.mirror = true;
|
||||
rightWingPlate1.addBox(-6F, -5F, -2.5F, 1, 5, 8);
|
||||
rightWingPlate1.setRotationPoint(0F, 0F, 0F);
|
||||
rightWingPlate1.setTextureSize(128, 128);
|
||||
rightWingPlate1.mirror = true;
|
||||
setRotation(rightWingPlate1, 0.2617994F, -0.1745329F, 0F);
|
||||
rightWingPlate1.mirror = false;
|
||||
|
||||
rightWingPlate2 = new ModelRenderer(this, 66, 72);
|
||||
rightWingPlate2.mirror = true;
|
||||
rightWingPlate2.addBox(-6F, -8F, -2F, 1, 3, 10);
|
||||
rightWingPlate2.setRotationPoint(0F, 0F, 0F);
|
||||
rightWingPlate2.setTextureSize(128, 128);
|
||||
rightWingPlate2.mirror = true;
|
||||
setRotation(rightWingPlate2, 0.2617994F, -0.1745329F, 0F);
|
||||
rightWingPlate2.mirror = false;
|
||||
|
||||
topPlate1 = new ModelRenderer(this, 79, 72);
|
||||
topPlate1.addBox(-5F, -9F, -0.5F, 10, 1, 5);
|
||||
topPlate1.setRotationPoint(0F, 0F, 0F);
|
||||
topPlate1.setTextureSize(128, 128);
|
||||
topPlate1.mirror = true;
|
||||
setRotation(topPlate1, 0.4363323F, 0F, 0F);
|
||||
|
||||
topPlate2 = new ModelRenderer(this, 79, 72);
|
||||
topPlate2.addBox(-5F, -8F, 1.5F, 10, 1, 5);
|
||||
topPlate2.setRotationPoint(0F, 0F, 0F);
|
||||
topPlate2.setTextureSize(128, 128);
|
||||
topPlate2.mirror = true;
|
||||
setRotation(topPlate2, 0.4363323F, 0F, 0F);
|
||||
|
||||
topPlate3 = new ModelRenderer(this, 79, 72);
|
||||
topPlate3.addBox(-5F, -7F, 3.5F, 10, 1, 5);
|
||||
topPlate3.setRotationPoint(0F, 0F, 0F);
|
||||
topPlate3.setTextureSize(128, 128);
|
||||
topPlate3.mirror = true;
|
||||
setRotation(topPlate3, 0.4363323F, 0F, 0F);
|
||||
|
||||
backPlate1 = new ModelRenderer(this, 66, 86);
|
||||
backPlate1.mirror = true;
|
||||
backPlate1.addBox(-4.5F, -7F, 6F, 6, 4, 1);
|
||||
backPlate1.setRotationPoint(0F, 0F, 0F);
|
||||
backPlate1.setTextureSize(128, 128);
|
||||
backPlate1.mirror = true;
|
||||
setRotation(backPlate1, 0.2617994F, -0.2617994F, 0F);
|
||||
backPlate1.mirror = false;
|
||||
|
||||
backPlate2 = new ModelRenderer(this, 66, 86);
|
||||
backPlate2.mirror = true;
|
||||
backPlate2.addBox(-4.5F, -6.5F, 6F, 6, 4, 1);
|
||||
backPlate2.setRotationPoint(0F, 2F, 0F);
|
||||
backPlate2.setTextureSize(128, 128);
|
||||
backPlate2.mirror = true;
|
||||
setRotation(backPlate2, 0.2617994F, -0.2617994F, 0F);
|
||||
backPlate2.mirror = false;
|
||||
|
||||
backPlate3 = new ModelRenderer(this, 66, 86);
|
||||
backPlate3.mirror = true;
|
||||
backPlate3.addBox(-4.5F, -6F, 6F, 6, 4, 1);
|
||||
backPlate3.setRotationPoint(0F, 4F, 0F);
|
||||
backPlate3.setTextureSize(128, 128);
|
||||
backPlate3.mirror = true;
|
||||
setRotation(backPlate3, 0.2617994F, -0.2617994F, 0F);
|
||||
backPlate3.mirror = false;
|
||||
|
||||
backPlate4 = new ModelRenderer(this, 66, 86);
|
||||
backPlate4.addBox(-1.5F, -7F, 6F, 6, 4, 1);
|
||||
backPlate4.setRotationPoint(0F, 0F, 0F);
|
||||
backPlate4.setTextureSize(128, 128);
|
||||
backPlate4.mirror = true;
|
||||
setRotation(backPlate4, 0.2617994F, 0.2617994F, 0F);
|
||||
|
||||
backPlate5 = new ModelRenderer(this, 66, 86);
|
||||
backPlate5.addBox(-1.5F, -7F, 6F, 6, 4, 1);
|
||||
backPlate5.setRotationPoint(0F, 2.5F, 0F);
|
||||
backPlate5.setTextureSize(128, 128);
|
||||
backPlate5.mirror = true;
|
||||
setRotation(backPlate5, 0.2617994F, 0.2617994F, 0F);
|
||||
|
||||
backPlate6 = new ModelRenderer(this, 66, 86);
|
||||
backPlate6.addBox(-1.5F, -7F, 6F, 6, 4, 1);
|
||||
backPlate6.setRotationPoint(0F, 5F, 0F);
|
||||
backPlate6.setTextureSize(128, 128);
|
||||
backPlate6.mirror = true;
|
||||
setRotation(backPlate6, 0.2617994F, 0.2617994F, 0F);
|
||||
|
||||
eyePlate = new ModelRenderer(this, 63, 38);
|
||||
eyePlate.addBox(-4F, -5F, -4.5F, 8, 2, 1);
|
||||
eyePlate.setRotationPoint(0F, 0F, 0F);
|
||||
eyePlate.setTextureSize(128, 128);
|
||||
eyePlate.mirror = true;
|
||||
setRotation(eyePlate, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
/* Right arm */
|
||||
{
|
||||
rightArmMain = new ModelRenderer(this, 0, 33);
|
||||
rightArmMain.mirror = true;
|
||||
rightArmMain.addBox(-3.5F, -2.5F, -2.5F, 5, 11, 5);
|
||||
rightArmMain.setRotationPoint(0F, 0F, 0F);
|
||||
rightArmMain.setTextureSize(128, 128);
|
||||
rightArmMain.mirror = true;
|
||||
setRotation(rightArmMain, 0F, 0F, 0F);
|
||||
|
||||
rightKnucklePlate = new ModelRenderer(this, 0, 50);
|
||||
rightKnucklePlate.addBox(-4F, 4F, -1.5F, 1, 5, 3);
|
||||
rightKnucklePlate.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnucklePlate.setTextureSize(128, 128);
|
||||
rightKnucklePlate.mirror = true;
|
||||
setRotation(rightKnucklePlate, 0F, 0F, 0F);
|
||||
|
||||
rightKnuckleBrace = new ModelRenderer(this, 9, 50);
|
||||
rightKnuckleBrace.mirror = true;
|
||||
rightKnuckleBrace.addBox(-4F, 3F, -3F, 2, 1, 6);
|
||||
rightKnuckleBrace.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnuckleBrace.setTextureSize(128, 128);
|
||||
setRotation(rightKnuckleBrace, 0F, 0F, 0F);
|
||||
|
||||
rightKnuckle1 = new ModelRenderer(this, 0, 59);
|
||||
rightKnuckle1.mirror = true;
|
||||
rightKnuckle1.addBox(-4F, 7F, -2.5F, 1, 6, 1);
|
||||
rightKnuckle1.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnuckle1.setTextureSize(128, 128);
|
||||
setRotation(rightKnuckle1, 0F, 0F, 0F);
|
||||
|
||||
rightKnuckle2 = new ModelRenderer(this, 5, 59);
|
||||
rightKnuckle2.mirror = true;
|
||||
rightKnuckle2.addBox(-3F, 11F, -2.5F, 1, 3, 1);
|
||||
rightKnuckle2.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnuckle2.setTextureSize(128, 128);
|
||||
setRotation(rightKnuckle2, 0F, 0F, 0F);
|
||||
|
||||
rightKnuckle3 = new ModelRenderer(this, 0, 59);
|
||||
rightKnuckle3.mirror = true;
|
||||
rightKnuckle3.addBox(-4.5F, 8F, -0.5F, 1, 6, 1);
|
||||
rightKnuckle3.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnuckle3.setTextureSize(128, 128);
|
||||
setRotation(rightKnuckle3, 0F, 0F, 0F);
|
||||
|
||||
rightKnuckle4 = new ModelRenderer(this, 5, 59);
|
||||
rightKnuckle4.mirror = true;
|
||||
rightKnuckle4.addBox(-3.5F, 12F, -0.5F, 1, 3, 1);
|
||||
rightKnuckle4.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnuckle4.setTextureSize(128, 128);
|
||||
setRotation(rightKnuckle4, 0F, 0F, 0F);
|
||||
|
||||
rightKnuckle5 = new ModelRenderer(this, 0, 59);
|
||||
rightKnuckle5.mirror = true;
|
||||
rightKnuckle5.addBox(-4F, 7F, 1.5F, 1, 6, 1);
|
||||
rightKnuckle5.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnuckle5.setTextureSize(128, 128);
|
||||
setRotation(rightKnuckle5, 0F, 0F, 0F);
|
||||
|
||||
rightKnuckle6 = new ModelRenderer(this, 5, 59);
|
||||
rightKnuckle6.mirror = true;
|
||||
rightKnuckle6.addBox(-3F, 11F, 1.5F, 1, 3, 1);
|
||||
rightKnuckle6.setRotationPoint(0F, 0F, 0F);
|
||||
rightKnuckle6.setTextureSize(128, 128);
|
||||
setRotation(rightKnuckle6, 0F, 0F, 0F);
|
||||
|
||||
rightShoulder1 = new ModelRenderer(this, 10, 59);
|
||||
rightShoulder1.mirror = true;
|
||||
rightShoulder1.addBox(-5F, -3F, -4F, 1, 4, 8);
|
||||
rightShoulder1.setRotationPoint(0F, 0F, 0F);
|
||||
rightShoulder1.setTextureSize(128, 128);
|
||||
setRotation(rightShoulder1, 0F, 0F, 0.6981317F);
|
||||
|
||||
rightShoulder2 = new ModelRenderer(this, 10, 59);
|
||||
rightShoulder2.mirror = true;
|
||||
rightShoulder2.addBox(-4F, -1.5F, -4F, 1, 4, 8);
|
||||
rightShoulder2.setRotationPoint(0F, 0F, 0F);
|
||||
rightShoulder2.setTextureSize(128, 128);
|
||||
setRotation(rightShoulder2, 0F, 0F, 0.6981317F);
|
||||
|
||||
rightShoulder3 = new ModelRenderer(this, 10, 59);
|
||||
rightShoulder3.mirror = true;
|
||||
rightShoulder3.addBox(-3F, 0F, -4F, 1, 4, 8);
|
||||
rightShoulder3.setRotationPoint(0F, 0F, 0F);
|
||||
rightShoulder3.setTextureSize(128, 128);
|
||||
setRotation(rightShoulder3, 0F, 0F, 0.6981317F);
|
||||
}
|
||||
|
||||
/* Chest piece main body */
|
||||
{
|
||||
mainPlate = new ModelRenderer(this, 31, 33);
|
||||
mainPlate.addBox(-4.5F, -0.5F, -3F, 9, 12, 6);
|
||||
mainPlate.setRotationPoint(0F, 0F, 0F);
|
||||
mainPlate.setTextureSize(128, 128);
|
||||
mainPlate.mirror = true;
|
||||
setRotation(mainPlate, 0F, 0F, 0F);
|
||||
|
||||
chestPlate1 = new ModelRenderer(this, 63, 33);
|
||||
chestPlate1.addBox(-1.5F, 3F, -4.5F, 6, 2, 1);
|
||||
chestPlate1.setRotationPoint(0F, -3F, -1F);
|
||||
chestPlate1.setTextureSize(128, 128);
|
||||
setRotation(chestPlate1, 0.3490659F, 0F, -0.2617994F);
|
||||
|
||||
chestPlate2 = new ModelRenderer(this, 63, 33);
|
||||
chestPlate2.addBox(-1.5F, 3F, -4.5F, 6, 2, 1);
|
||||
chestPlate2.setRotationPoint(0F, -1.5F, -1F);
|
||||
chestPlate2.setTextureSize(128, 128);
|
||||
setRotation(chestPlate2, 0.3490659F, 0F, -0.2617994F);
|
||||
|
||||
chestPlate3 = new ModelRenderer(this, 63, 33);
|
||||
chestPlate3.addBox(-1.5F, 3F, -4.5F, 6, 2, 1);
|
||||
chestPlate3.setRotationPoint(0F, 0F, -1F);
|
||||
chestPlate3.setTextureSize(128, 128);
|
||||
setRotation(chestPlate3, 0.3490659F, 0F, -0.2617994F);
|
||||
|
||||
chestPlate4 = new ModelRenderer(this, 63, 33);
|
||||
chestPlate4.mirror = true;
|
||||
chestPlate4.addBox(-4.5F, 3F, -4.5F, 6, 2, 1);
|
||||
chestPlate4.setRotationPoint(0F, -3F, -1F);
|
||||
chestPlate4.setTextureSize(128, 128);
|
||||
setRotation(chestPlate4, 0.3490659F, 0F, 0.2617994F);
|
||||
|
||||
chestPlate5 = new ModelRenderer(this, 63, 33);
|
||||
chestPlate5.mirror = true;
|
||||
chestPlate5.addBox(-4.5F, 3F, -4.5F, 6, 2, 1);
|
||||
chestPlate5.setRotationPoint(0F, -1.5F, -1F);
|
||||
chestPlate5.setTextureSize(128, 128);
|
||||
setRotation(chestPlate5, 0.3490659F, 0F, 0.2617994F);
|
||||
|
||||
chestPlate6 = new ModelRenderer(this, 63, 33);
|
||||
chestPlate6.mirror = true;
|
||||
chestPlate6.addBox(-4.5F, 3F, -4.5F, 6, 2, 1);
|
||||
chestPlate6.setRotationPoint(0F, 0F, -1F);
|
||||
chestPlate6.setTextureSize(128, 128);
|
||||
setRotation(chestPlate6, 0.3490659F, 0F, 0.2617994F);
|
||||
}
|
||||
|
||||
/* Left arm */
|
||||
{
|
||||
leftArmMain = new ModelRenderer(this, 0, 33);
|
||||
leftArmMain.addBox(-1.5F, -2.533333F, -2.5F, 5, 11, 5);
|
||||
leftArmMain.setRotationPoint(0F, 0F, 0F);
|
||||
leftArmMain.setTextureSize(128, 128);
|
||||
leftArmMain.mirror = true;
|
||||
setRotation(leftArmMain, 0F, 0F, 0F);
|
||||
|
||||
leftKnucklePlate = new ModelRenderer(this, 0, 50);
|
||||
leftKnucklePlate.addBox(3F, 4F, -1.5F, 1, 5, 3);
|
||||
leftKnucklePlate.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnucklePlate.setTextureSize(128, 128);
|
||||
leftKnucklePlate.mirror = true;
|
||||
setRotation(leftKnucklePlate, 0F, 0F, 0F);
|
||||
|
||||
leftKnuckleBrace = new ModelRenderer(this, 9, 50);
|
||||
leftKnuckleBrace.addBox(2F, 3F, -3F, 2, 1, 6);
|
||||
leftKnuckleBrace.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnuckleBrace.setTextureSize(128, 128);
|
||||
leftKnuckleBrace.mirror = true;
|
||||
setRotation(leftKnuckleBrace, 0F, 0F, 0F);
|
||||
|
||||
leftKnuckle1 = new ModelRenderer(this, 0, 59);
|
||||
leftKnuckle1.addBox(3F, 7F, -2.5F, 1, 6, 1);
|
||||
leftKnuckle1.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnuckle1.setTextureSize(128, 128);
|
||||
leftKnuckle1.mirror = true;
|
||||
setRotation(leftKnuckle1, 0F, 0F, 0F);
|
||||
|
||||
leftKnuckle2 = new ModelRenderer(this, 5, 59);
|
||||
leftKnuckle2.addBox(2F, 11F, -2.5F, 1, 3, 1);
|
||||
leftKnuckle2.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnuckle2.setTextureSize(128, 128);
|
||||
leftKnuckle2.mirror = true;
|
||||
setRotation(leftKnuckle2, 0F, 0F, 0F);
|
||||
|
||||
leftKnuckle3 = new ModelRenderer(this, 0, 59);
|
||||
leftKnuckle3.addBox(3.5F, 8F, -0.5F, 1, 6, 1);
|
||||
leftKnuckle3.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnuckle3.setTextureSize(128, 128);
|
||||
leftKnuckle3.mirror = true;
|
||||
setRotation(leftKnuckle3, 0F, 0F, 0F);
|
||||
|
||||
leftKnuckle4 = new ModelRenderer(this, 5, 59);
|
||||
leftKnuckle4.addBox(2.5F, 12F, -0.5F, 1, 3, 1);
|
||||
leftKnuckle4.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnuckle4.setTextureSize(128, 128);
|
||||
leftKnuckle4.mirror = true;
|
||||
setRotation(leftKnuckle4, 0F, 0F, 0F);
|
||||
|
||||
leftKnuckle5 = new ModelRenderer(this, 0, 59);
|
||||
leftKnuckle5.addBox(3F, 7F, 1.5F, 1, 6, 1);
|
||||
leftKnuckle5.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnuckle5.setTextureSize(128, 128);
|
||||
leftKnuckle5.mirror = true;
|
||||
setRotation(leftKnuckle5, 0F, 0F, 0F);
|
||||
|
||||
leftKnuckle6 = new ModelRenderer(this, 5, 59);
|
||||
leftKnuckle6.addBox(2F, 11F, 1.5F, 1, 3, 1);
|
||||
leftKnuckle6.setRotationPoint(0F, 0F, 0F);
|
||||
leftKnuckle6.setTextureSize(128, 128);
|
||||
leftKnuckle6.mirror = true;
|
||||
setRotation(leftKnuckle6, 0F, 0F, 0F);
|
||||
|
||||
leftShoulder1 = new ModelRenderer(this, 10, 59);
|
||||
leftShoulder1.addBox(4F, -3F, -4F, 1, 4, 8);
|
||||
leftShoulder1.setRotationPoint(0F, 0F, 0F);
|
||||
leftShoulder1.setTextureSize(128, 128);
|
||||
leftShoulder1.mirror = true;
|
||||
setRotation(leftShoulder1, 0F, 0F, -0.6981317F);
|
||||
|
||||
leftShoulder2 = new ModelRenderer(this, 10, 59);
|
||||
leftShoulder2.addBox(3F, -1.5F, -4F, 1, 4, 8);
|
||||
leftShoulder2.setRotationPoint(0F, 0F, 0F);
|
||||
leftShoulder2.setTextureSize(128, 128);
|
||||
leftShoulder2.mirror = true;
|
||||
setRotation(leftShoulder2, 0F, 0F, -0.6981317F);
|
||||
|
||||
leftShoulder3 = new ModelRenderer(this, 10, 59);
|
||||
leftShoulder3.addBox(2F, 0F, -4F, 1, 4, 8);
|
||||
leftShoulder3.setRotationPoint(0F, 0F, 0F);
|
||||
leftShoulder3.setTextureSize(128, 128);
|
||||
leftShoulder3.mirror = true;
|
||||
setRotation(leftShoulder3, 0F, 0F, -0.6981317F);
|
||||
}
|
||||
|
||||
/* Left boot */
|
||||
{
|
||||
leftBootBottom = new ModelRenderer(this, 0, 84);
|
||||
leftBootBottom.addBox(-2.5F, 9.5F, -5.5F, 6, 3, 8);
|
||||
leftBootBottom.setRotationPoint(0F, 0F, 0F);
|
||||
leftBootBottom.setTextureSize(128, 128);
|
||||
leftBootBottom.mirror = true;
|
||||
setRotation(leftBootBottom, 0F, 0F, 0F);
|
||||
|
||||
leftBootPlate = new ModelRenderer(this, 0, 96);
|
||||
leftBootPlate.addBox(-2F, 6F, 6F, 5, 3, 1);
|
||||
leftBootPlate.setRotationPoint(0F, 0F, 0F);
|
||||
leftBootPlate.setTextureSize(128, 128);
|
||||
leftBootPlate.mirror = true;
|
||||
setRotation(leftBootPlate, -1.151917F, 0F, 0F);
|
||||
|
||||
leftBootBrace = new ModelRenderer(this, 0, 72);
|
||||
leftBootBrace.addBox(-2F, 7F, -3F, 5, 3, 6);
|
||||
leftBootBrace.setRotationPoint(0F, 0F, 0F);
|
||||
leftBootBrace.setTextureSize(128, 128);
|
||||
leftBootBrace.mirror = true;
|
||||
setRotation(leftBootBrace, 0F, 0F, 0F);
|
||||
|
||||
leftBootWing1 = new ModelRenderer(this, 13, 96);
|
||||
leftBootWing1.addBox(3F, 7F, -4F, 1, 1, 7);
|
||||
leftBootWing1.setRotationPoint(0F, 0F, 0F);
|
||||
leftBootWing1.setTextureSize(128, 128);
|
||||
leftBootWing1.mirror = true;
|
||||
setRotation(leftBootWing1, 0.2617994F, 0.1745329F, 0F);
|
||||
|
||||
leftBootWing2 = new ModelRenderer(this, 13, 96);
|
||||
leftBootWing2.addBox(3F, 8F, -5F, 1, 1, 7);
|
||||
leftBootWing2.setRotationPoint(0F, 0F, 0F);
|
||||
leftBootWing2.setTextureSize(128, 128);
|
||||
leftBootWing2.mirror = true;
|
||||
setRotation(leftBootWing2, 0.2617994F, 0.1745329F, 0F);
|
||||
}
|
||||
|
||||
|
||||
/* Right boot */
|
||||
{
|
||||
rightBootBottom = new ModelRenderer(this, 0, 84);
|
||||
rightBootBottom.mirror = true;
|
||||
rightBootBottom.addBox(-3.5F, 9.5F, -5.5F, 6, 3, 8);
|
||||
rightBootBottom.setRotationPoint(0F, 0F, 0F);
|
||||
rightBootBottom.setTextureSize(128, 128);
|
||||
setRotation(rightBootBottom, 0F, 0F, 0F);
|
||||
|
||||
rightBootPlate = new ModelRenderer(this, 0, 96);
|
||||
rightBootPlate.mirror = true;
|
||||
rightBootPlate.addBox(-3F, 6F, 6F, 5, 3, 1);
|
||||
rightBootPlate.setRotationPoint(0F, 0F, 0F);
|
||||
rightBootPlate.setTextureSize(128, 128);
|
||||
setRotation(rightBootPlate, -1.151917F, 0F, 0F);
|
||||
|
||||
rightBootBrace = new ModelRenderer(this, 0, 72);
|
||||
rightBootBrace.mirror = true;
|
||||
rightBootBrace.addBox(-3F, 7F, -3F, 5, 3, 6);
|
||||
rightBootBrace.setRotationPoint(0F, 0F, 0F);
|
||||
rightBootBrace.setTextureSize(128, 128);
|
||||
setRotation(rightBootBrace, 0F, 0F, 0F);
|
||||
|
||||
rightBootWing1 = new ModelRenderer(this, 13, 96);
|
||||
rightBootWing1.mirror = true;
|
||||
rightBootWing1.addBox(-4F, 7F, -4F, 1, 1, 7);
|
||||
rightBootWing1.setRotationPoint(0F, 0F, 0F);
|
||||
rightBootWing1.setTextureSize(128, 128);
|
||||
setRotation(rightBootWing1, 0.2617994F, -0.1745329F, 0F);
|
||||
|
||||
rightBootWing2 = new ModelRenderer(this, 13, 96);
|
||||
rightBootWing2.mirror = true;
|
||||
rightBootWing2.addBox(-4F, 8F, -5F, 1, 1, 7);
|
||||
rightBootWing2.setRotationPoint(0F, 0F, 0F);
|
||||
rightBootWing2.setTextureSize(128, 128);
|
||||
setRotation(rightBootWing2, 0.2617994F, -0.1745329F, 0F);
|
||||
}
|
||||
|
||||
/* Main legs */
|
||||
{
|
||||
belt = new ModelRenderer(this, 31, 52);
|
||||
belt.addBox(-5F, 9.5F, -3.5F, 10, 2, 7);
|
||||
belt.setRotationPoint(0F, 0F, 0F);
|
||||
belt.setTextureSize(128, 128);
|
||||
belt.mirror = true;
|
||||
setRotation(belt, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
/* Left leg */
|
||||
{
|
||||
leftLegSidePlate = new ModelRenderer(this, 40, 93);
|
||||
leftLegSidePlate.addBox(-0.5F, 12F, -3F, 1, 6, 6);
|
||||
leftLegSidePlate.setRotationPoint(-2F, -12F, 0F);
|
||||
leftLegSidePlate.setTextureSize(128, 128);
|
||||
leftLegSidePlate.mirror = true;
|
||||
setRotation(leftLegSidePlate, 0F, 0F, -0.3490659F);
|
||||
|
||||
leftLegMain = new ModelRenderer(this, 40, 93);
|
||||
leftLegMain.addBox(-0.5F, 11F, -2.5F, 5, 9, 5);
|
||||
leftLegMain.setRotationPoint(-2F, -12F, 0F);
|
||||
leftLegMain.setTextureSize(128, 128);
|
||||
leftLegMain.mirror = true;
|
||||
setRotation(leftLegMain, 0F, 0F, 0F);
|
||||
|
||||
leftLegPlate1 = new ModelRenderer(this, 46, 71);
|
||||
leftLegPlate1.addBox(-2.5F, 11F, -3F, 2, 6, 1);
|
||||
leftLegPlate1.setRotationPoint(-2F, -12F, 0F);
|
||||
leftLegPlate1.setTextureSize(128, 128);
|
||||
leftLegPlate1.mirror = true;
|
||||
setRotation(leftLegPlate1, 0F, 0F, -0.3490659F);
|
||||
|
||||
leftLegPlate2 = new ModelRenderer(this, 46, 71);
|
||||
leftLegPlate2.addBox(-2.5F, 11F, 2F, 2, 6, 1);
|
||||
leftLegPlate2.setRotationPoint(-2F, -12F, 0F);
|
||||
leftLegPlate2.setTextureSize(128, 128);
|
||||
leftLegPlate2.mirror = true;
|
||||
setRotation(leftLegPlate2, 0F, 0F, -0.3490659F);
|
||||
|
||||
leftLegPlate3 = new ModelRenderer(this, 31, 62);
|
||||
leftLegPlate3.addBox(0F, 11.9F, -1F, 4, 7, 1);
|
||||
leftLegPlate3.setRotationPoint(-2F, -12F, 0F);
|
||||
leftLegPlate3.setTextureSize(128, 128);
|
||||
leftLegPlate3.mirror = true;
|
||||
setRotation(leftLegPlate3, -0.1745329F, 0F, 0F);
|
||||
|
||||
leftLegPlate4 = new ModelRenderer(this, 42, 62);
|
||||
leftLegPlate4.addBox(0F, 11.9F, 0F, 4, 7, 1);
|
||||
leftLegPlate4.setRotationPoint(-2F, -12F, 0F);
|
||||
leftLegPlate4.setTextureSize(128, 128);
|
||||
leftLegPlate4.mirror = true;
|
||||
setRotation(leftLegPlate4, 0.1745329F, 0F, 0F);
|
||||
}
|
||||
|
||||
/* Right leg */
|
||||
{
|
||||
rightLegSidePlate = new ModelRenderer(this, 31, 71);
|
||||
rightLegSidePlate.mirror = true;
|
||||
rightLegSidePlate.addBox(-0.5F, 12F, -3F, 1, 6, 6);
|
||||
rightLegSidePlate.setRotationPoint(2F, -12F, 0F);
|
||||
rightLegSidePlate.setTextureSize(128, 128);
|
||||
setRotation(rightLegSidePlate, 0F, 0F, 0.3490659F);
|
||||
|
||||
rightLegMain = new ModelRenderer(this, 40, 93);
|
||||
rightLegMain.mirror = true;
|
||||
rightLegMain.addBox(-4.5F, 11F, -2.5F, 5, 9, 5);
|
||||
rightLegMain.setRotationPoint(2F, -12F, 0F);
|
||||
rightLegMain.setTextureSize(128, 128);
|
||||
setRotation(rightLegMain, 0F, 0F, 0F);
|
||||
|
||||
rightLegPlate1 = new ModelRenderer(this, 46, 71);
|
||||
rightLegPlate1.mirror = true;
|
||||
rightLegPlate1.addBox(0.5F, 11F, -3F, 2, 6, 1);
|
||||
rightLegPlate1.setRotationPoint(2F, -12F, 0F);
|
||||
rightLegPlate1.setTextureSize(128, 128);
|
||||
setRotation(rightLegPlate1, 0F, 0F, 0.3490659F);
|
||||
|
||||
rightLegPlate2 = new ModelRenderer(this, 46, 71);
|
||||
rightLegPlate2.mirror = true;
|
||||
rightLegPlate2.addBox(0.5F, 11F, 2F, 2, 6, 1);
|
||||
rightLegPlate2.setRotationPoint(2F, -12F, 0F);
|
||||
rightLegPlate2.setTextureSize(128, 128);
|
||||
setRotation(rightLegPlate2, 0F, 0F, 0.3490659F);
|
||||
|
||||
rightLegPlate3 = new ModelRenderer(this, 31, 62);
|
||||
rightLegPlate3.mirror = true;
|
||||
rightLegPlate3.addBox(-4F, 11.9F, -1F, 4, 7, 1);
|
||||
rightLegPlate3.setRotationPoint(2F, -12F, 0F);
|
||||
rightLegPlate3.setTextureSize(128, 128);
|
||||
setRotation(rightLegPlate3, -0.1745329F, 0F, 0F);
|
||||
|
||||
rightLegPlate4 = new ModelRenderer(this, 42, 62);
|
||||
rightLegPlate4.mirror = true;
|
||||
rightLegPlate4.addBox(-4F, 11.9F, 0F, 4, 7, 1);
|
||||
rightLegPlate4.setRotationPoint(2F, -12F, 0F);
|
||||
rightLegPlate4.setTextureSize(128, 128);
|
||||
setRotation(rightLegPlate4, 0.1745329F, 0F, 0F);
|
||||
}
|
||||
|
||||
this.bipedHead.cubeList.clear();
|
||||
this.bipedHeadwear.cubeList.clear();
|
||||
if(addHelmet)
|
||||
{
|
||||
this.bipedHead.addChild(this.leftFacePlate);
|
||||
this.bipedHead.addChild(this.rightFacePlate);
|
||||
this.bipedHead.addChild(this.facePlate1);
|
||||
this.bipedHead.addChild(this.facePlate2);
|
||||
this.bipedHead.addChild(this.facePlate3);
|
||||
this.bipedHead.addChild(this.leftWingPlate1);
|
||||
this.bipedHead.addChild(this.leftWingPlate2);
|
||||
this.bipedHead.addChild(this.rightWingPlate1);
|
||||
this.bipedHead.addChild(this.rightWingPlate2);
|
||||
this.bipedHead.addChild(this.topPlate1);
|
||||
this.bipedHead.addChild(this.topPlate2);
|
||||
this.bipedHead.addChild(this.topPlate3);
|
||||
this.bipedHead.addChild(this.backPlate1);
|
||||
this.bipedHead.addChild(this.backPlate2);
|
||||
this.bipedHead.addChild(this.backPlate3);
|
||||
this.bipedHead.addChild(this.backPlate4);
|
||||
this.bipedHead.addChild(this.backPlate5);
|
||||
this.bipedHead.addChild(this.backPlate6);
|
||||
this.bipedHead.addChild(this.eyePlate);
|
||||
}
|
||||
|
||||
this.bipedBody.cubeList.clear();
|
||||
if(addChestPiece)
|
||||
{
|
||||
this.bipedBody.addChild(this.chestPlate1);
|
||||
this.bipedBody.addChild(this.chestPlate2);
|
||||
this.bipedBody.addChild(this.chestPlate3);
|
||||
this.bipedBody.addChild(this.chestPlate4);
|
||||
this.bipedBody.addChild(this.chestPlate5);
|
||||
this.bipedBody.addChild(this.chestPlate6);
|
||||
this.bipedBody.addChild(this.mainPlate);
|
||||
}
|
||||
if(addLeggings)
|
||||
{
|
||||
this.bipedBody.addChild(this.belt);
|
||||
}
|
||||
|
||||
this.bipedRightArm.cubeList.clear();
|
||||
if(addChestPiece)
|
||||
{
|
||||
this.bipedRightArm.addChild(rightArmMain);
|
||||
this.bipedRightArm.addChild(this.rightKnucklePlate);
|
||||
this.bipedRightArm.addChild(this.rightKnuckleBrace);
|
||||
this.bipedRightArm.addChild(this.rightKnuckle1);
|
||||
this.bipedRightArm.addChild(this.rightKnuckle2);
|
||||
this.bipedRightArm.addChild(this.rightKnuckle3);
|
||||
this.bipedRightArm.addChild(this.rightKnuckle4);
|
||||
this.bipedRightArm.addChild(this.rightKnuckle5);
|
||||
this.bipedRightArm.addChild(this.rightKnuckle6);
|
||||
this.bipedRightArm.addChild(this.rightArmMain);
|
||||
this.bipedRightArm.addChild(this.rightShoulder1);
|
||||
this.bipedRightArm.addChild(this.rightShoulder2);
|
||||
this.bipedRightArm.addChild(this.rightShoulder3);
|
||||
}
|
||||
|
||||
this.bipedLeftArm.cubeList.clear();
|
||||
if(addChestPiece)
|
||||
{
|
||||
this.bipedLeftArm.addChild(leftArmMain);
|
||||
this.bipedLeftArm.addChild(this.leftKnucklePlate);
|
||||
this.bipedLeftArm.addChild(this.leftKnuckleBrace);
|
||||
this.bipedLeftArm.addChild(this.leftKnuckle1);
|
||||
this.bipedLeftArm.addChild(this.leftKnuckle2);
|
||||
this.bipedLeftArm.addChild(this.leftKnuckle3);
|
||||
this.bipedLeftArm.addChild(this.leftKnuckle4);
|
||||
this.bipedLeftArm.addChild(this.leftKnuckle5);
|
||||
this.bipedLeftArm.addChild(this.leftKnuckle6);
|
||||
this.bipedLeftArm.addChild(this.leftArmMain);
|
||||
this.bipedLeftArm.addChild(this.leftShoulder1);
|
||||
this.bipedLeftArm.addChild(this.leftShoulder2);
|
||||
this.bipedLeftArm.addChild(this.leftShoulder3);
|
||||
}
|
||||
|
||||
this.bipedLeftLeg.cubeList.clear();
|
||||
if(addBoots)
|
||||
{
|
||||
this.bipedLeftLeg.addChild(this.leftBootBottom);
|
||||
this.bipedLeftLeg.addChild(this.leftBootBrace);
|
||||
this.bipedLeftLeg.addChild(this.leftBootPlate);
|
||||
this.bipedLeftLeg.addChild(this.leftBootWing1);
|
||||
this.bipedLeftLeg.addChild(this.leftBootWing2);
|
||||
}
|
||||
if(addLeggings)
|
||||
{
|
||||
this.bipedLeftLeg.addChild(this.leftLegMain);
|
||||
this.bipedLeftLeg.addChild(this.leftLegSidePlate);
|
||||
this.bipedLeftLeg.addChild(this.leftLegPlate1);
|
||||
this.bipedLeftLeg.addChild(this.leftLegPlate2);
|
||||
this.bipedLeftLeg.addChild(this.leftLegPlate3);
|
||||
this.bipedLeftLeg.addChild(this.leftLegPlate4);
|
||||
}
|
||||
|
||||
this.bipedRightLeg.cubeList.clear();
|
||||
if(addBoots)
|
||||
{
|
||||
this.bipedRightLeg.addChild(this.rightBootBottom);
|
||||
this.bipedRightLeg.addChild(this.rightBootBrace);
|
||||
this.bipedRightLeg.addChild(this.rightBootPlate);
|
||||
this.bipedRightLeg.addChild(this.rightBootWing1);
|
||||
this.bipedRightLeg.addChild(this.rightBootWing2);
|
||||
}
|
||||
if(addLeggings)
|
||||
{
|
||||
this.bipedRightLeg.addChild(this.rightLegMain);
|
||||
this.bipedRightLeg.addChild(this.rightLegSidePlate);
|
||||
this.bipedRightLeg.addChild(this.rightLegPlate1);
|
||||
this.bipedRightLeg.addChild(this.rightLegPlate2);
|
||||
this.bipedRightLeg.addChild(this.rightLegPlate3);
|
||||
this.bipedRightLeg.addChild(this.rightLegPlate4);
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
this.bipedHead.render(f5);
|
||||
this.bipedBody.render(f5);
|
||||
this.bipedLeftArm.render(f5);
|
||||
this.bipedRightArm.render(f5);
|
||||
this.bipedLeftLeg.render(f5);
|
||||
this.bipedRightLeg.render(f5);
|
||||
|
||||
// head.render(f5);
|
||||
// body.render(f5);
|
||||
// rightarm.render(f5);
|
||||
// leftarm.render(f5);
|
||||
// rightleg.render(f5);
|
||||
// leftleg.render(f5);
|
||||
// rightArmMain.render(f5);
|
||||
// rightKnucklePlate.render(f5);
|
||||
// rightKnuckleBrace.render(f5);
|
||||
// rightKnuckle1.render(f5);
|
||||
// rightKnuckle2.render(f5);
|
||||
// rightKnuckle3.render(f5);
|
||||
// rightKnuckle4.render(f5);
|
||||
// rightKnuckle5.render(f5);
|
||||
// rightKnuckle6.render(f5);
|
||||
// rightShoulder1.render(f5);
|
||||
// rightShoulder2.render(f5);
|
||||
// rightShoulder3.render(f5);
|
||||
// mainPlate.render(f5);
|
||||
// chestPlate1.render(f5);
|
||||
// chestPlate2.render(f5);
|
||||
// chestPlate3.render(f5);
|
||||
// chestPlate4.render(f5);
|
||||
// chestPlate5.render(f5);
|
||||
// chestPlate6.render(f5);
|
||||
// belt.render(f5);
|
||||
// leftArmMain.render(f5);
|
||||
// leftKnucklePlate.render(f5);
|
||||
// leftKnuckleBrace.render(f5);
|
||||
// leftKnuckle1.render(f5);
|
||||
// leftKnuckle2.render(f5);
|
||||
// leftKnuckle3.render(f5);
|
||||
// leftKnuckle4.render(f5);
|
||||
// leftKnuckle5.render(f5);
|
||||
// leftKnuckle6.render(f5);
|
||||
// leftShoulder1.render(f5);
|
||||
// leftShoulder2.render(f5);
|
||||
// leftShoulder3.render(f5);
|
||||
// leftBootBottom.render(f5);
|
||||
// leftBootPlate.render(f5);
|
||||
// leftBootBrace.render(f5);
|
||||
// leftBootWing1.render(f5);
|
||||
// leftBootWing2.render(f5);
|
||||
// rightBootBottom.render(f5);
|
||||
// rightBootPlate.render(f5);
|
||||
// rightBootBrace.render(f5);
|
||||
// rightBootWing1.render(f5);
|
||||
// rightBootWing2.render(f5);
|
||||
//
|
||||
// {
|
||||
// leftLegSidePlate.render(f5);
|
||||
// leftLegMain.render(f5);
|
||||
// leftLegPlate1.render(f5);
|
||||
// leftLegPlate2.render(f5);
|
||||
// leftLegPlate3.render(f5);
|
||||
// leftLegPlate4.render(f5);
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// rightLegSidePlate.render(f5);
|
||||
// rightLegMain.render(f5);
|
||||
// rightLegPlate1.render(f5);
|
||||
// rightLegPlate2.render(f5);
|
||||
// rightLegPlate3.render(f5);
|
||||
// rightLegPlate4.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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelPedestal extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer base;
|
||||
ModelRenderer top;
|
||||
ModelRenderer middle;
|
||||
|
||||
public ModelPedestal()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
base = new ModelRenderer(this, 0, 0);
|
||||
base.addBox(0F, 0F, 0F, 10, 1, 10);
|
||||
base.setRotationPoint(-5F, 23F, -5F);
|
||||
base.setTextureSize(64, 32);
|
||||
base.mirror = true;
|
||||
setRotation(base, 0F, 0F, 0F);
|
||||
top = new ModelRenderer(this, 0, 19);
|
||||
top.addBox(0F, 0F, 0F, 6, 1, 6);
|
||||
top.setRotationPoint(-3F, 14F, -3F);
|
||||
top.setTextureSize(64, 32);
|
||||
top.mirror = true;
|
||||
setRotation(top, 0F, 0F, 0F);
|
||||
middle = new ModelRenderer(this, 50, 0);
|
||||
middle.addBox(0F, 0F, 0F, 2, 8, 2);
|
||||
middle.setRotationPoint(-1F, 15F, -1F);
|
||||
middle.setTextureSize(64, 32);
|
||||
middle.mirror = true;
|
||||
setRotation(middle, 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);
|
||||
base.render(f5);
|
||||
top.render(f5);
|
||||
middle.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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelPlinth extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer base;
|
||||
ModelRenderer table;
|
||||
ModelRenderer pillar;
|
||||
ModelRenderer edge1;
|
||||
ModelRenderer edge2;
|
||||
ModelRenderer edge3;
|
||||
ModelRenderer edge4;
|
||||
|
||||
public ModelPlinth()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
base = new ModelRenderer(this, 0, 16);
|
||||
base.addBox(0F, 0F, 0F, 10, 2, 10);
|
||||
base.setRotationPoint(-5F, 22F, -5F);
|
||||
base.setTextureSize(64, 64);
|
||||
base.mirror = true;
|
||||
setRotation(base, 0F, 0F, 0F);
|
||||
table = new ModelRenderer(this, 0, 0);
|
||||
table.addBox(0F, 0F, 0F, 14, 1, 14);
|
||||
table.setRotationPoint(-7F, 11F, -7F);
|
||||
table.setTextureSize(64, 64);
|
||||
table.mirror = true;
|
||||
setRotation(table, 0F, 0F, 0F);
|
||||
pillar = new ModelRenderer(this, 0, 32);
|
||||
pillar.addBox(0F, 0F, 0F, 6, 10, 6);
|
||||
pillar.setRotationPoint(-3F, 12F, -3F);
|
||||
pillar.setTextureSize(64, 64);
|
||||
pillar.mirror = true;
|
||||
setRotation(pillar, 0F, 0F, 0F);
|
||||
edge1 = new ModelRenderer(this, 0, 29);
|
||||
edge1.addBox(0F, 0F, 0F, 14, 1, 1);
|
||||
edge1.setRotationPoint(-7F, 10F, 6F);
|
||||
edge1.setTextureSize(64, 64);
|
||||
edge1.mirror = true;
|
||||
setRotation(edge1, 0F, 0F, 0F);
|
||||
edge2 = new ModelRenderer(this, 0, 29);
|
||||
edge2.addBox(0F, 0F, 0F, 14, 1, 1);
|
||||
edge2.setRotationPoint(-7F, 10F, -7F);
|
||||
edge2.setTextureSize(64, 64);
|
||||
edge2.mirror = true;
|
||||
setRotation(edge2, 0F, 0F, 0F);
|
||||
edge3 = new ModelRenderer(this, 25, 32);
|
||||
edge3.addBox(0F, 0F, 0F, 1, 1, 12);
|
||||
edge3.setRotationPoint(-7F, 10F, -6F);
|
||||
edge3.setTextureSize(64, 64);
|
||||
edge3.mirror = true;
|
||||
setRotation(edge3, 0F, 0F, 0F);
|
||||
edge4 = new ModelRenderer(this, 25, 32);
|
||||
edge4.addBox(0F, 0F, 0F, 1, 1, 12);
|
||||
edge4.setRotationPoint(6F, 10F, -6F);
|
||||
edge4.setTextureSize(64, 64);
|
||||
edge4.mirror = true;
|
||||
setRotation(edge4, 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);
|
||||
base.render(f5);
|
||||
table.render(f5);
|
||||
pillar.render(f5);
|
||||
edge1.render(f5);
|
||||
edge2.render(f5);
|
||||
edge3.render(f5);
|
||||
edge4.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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelShade extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer body;
|
||||
ModelRenderer tail1;
|
||||
ModelRenderer leftArm;
|
||||
ModelRenderer rightArm;
|
||||
ModelRenderer tail2;
|
||||
ModelRenderer head;
|
||||
|
||||
public ModelShade()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
body = new ModelRenderer(this, 0, 45);
|
||||
body.addBox(-6F, 0F, -3F, 12, 12, 6);
|
||||
body.setRotationPoint(0F, -4F, 0F);
|
||||
body.setTextureSize(64, 64);
|
||||
body.mirror = true;
|
||||
setRotation(body, 0F, 0F, 0F);
|
||||
tail1 = new ModelRenderer(this, 37, 43);
|
||||
tail1.addBox(-2F, 1F, -2F, 4, 6, 4);
|
||||
tail1.setRotationPoint(0F, 8F, 0F);
|
||||
tail1.setTextureSize(64, 64);
|
||||
tail1.mirror = true;
|
||||
setRotation(tail1, 0.122173F, 0F, 0F);
|
||||
leftArm = new ModelRenderer(this, 0, 0);
|
||||
leftArm.addBox(0F, -4F, -2F, 4, 20, 4);
|
||||
leftArm.setRotationPoint(6F, -2F, 0F);
|
||||
leftArm.setTextureSize(64, 64);
|
||||
leftArm.mirror = true;
|
||||
setRotation(leftArm, 0F, 0F, 0F);
|
||||
rightArm = new ModelRenderer(this, 0, 0);
|
||||
rightArm.mirror = true;
|
||||
rightArm.addBox(-4F, -4F, -2F, 4, 20, 4);
|
||||
rightArm.setRotationPoint(-6F, -2F, 0F);
|
||||
rightArm.setTextureSize(64, 64);
|
||||
rightArm.mirror = true;
|
||||
setRotation(rightArm, 0F, 0F, 0F);
|
||||
rightArm.mirror = false;
|
||||
tail2 = new ModelRenderer(this, 37, 54);
|
||||
tail2.addBox(-1.5F, 6F, -3F, 3, 6, 3);
|
||||
tail2.setRotationPoint(0F, 8F, 0F);
|
||||
tail2.setTextureSize(64, 64);
|
||||
tail2.mirror = true;
|
||||
setRotation(tail2, 0.4363323F, 0F, 0F);
|
||||
head = new ModelRenderer(this, 17, 0);
|
||||
head.addBox(-4F, -8F, -4F, 8, 8, 8);
|
||||
head.setRotationPoint(0F, -4F, -1F);
|
||||
head.setTextureSize(64, 64);
|
||||
head.mirror = true;
|
||||
setRotation(head, 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);
|
||||
body.render(f5);
|
||||
tail1.render(f5);
|
||||
leftArm.render(f5);
|
||||
rightArm.render(f5);
|
||||
tail2.render(f5);
|
||||
head.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);
|
||||
this.head.rotateAngleX = f4 / (180F / (float) Math.PI);
|
||||
this.head.rotateAngleY = f3 / (180F / (float) Math.PI);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ModelSmallEarthGolem extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer leftLeg;
|
||||
ModelRenderer rightLeg;
|
||||
ModelRenderer body;
|
||||
ModelRenderer head;
|
||||
ModelRenderer chest1;
|
||||
ModelRenderer chest2;
|
||||
ModelRenderer chest3;
|
||||
ModelRenderer leftArm;
|
||||
ModelRenderer rightArm;
|
||||
ModelRenderer back1;
|
||||
|
||||
public ModelSmallEarthGolem()
|
||||
{
|
||||
textureWidth = 32;
|
||||
textureHeight = 32;
|
||||
leftLeg = new ModelRenderer(this, 13, 0);
|
||||
leftLeg.addBox(-1F, 0F, -1F, 2, 5, 2);
|
||||
leftLeg.setRotationPoint(1F, 19F, 0F);
|
||||
leftLeg.setTextureSize(32, 32);
|
||||
leftLeg.mirror = true;
|
||||
setRotation(leftLeg, 0F, 0F, 0F);
|
||||
rightLeg = new ModelRenderer(this, 13, 0);
|
||||
rightLeg.mirror = true;
|
||||
rightLeg.addBox(-1F, 0F, -1F, 2, 5, 2);
|
||||
rightLeg.setRotationPoint(-1F, 19F, 0F);
|
||||
rightLeg.setTextureSize(32, 32);
|
||||
rightLeg.mirror = true;
|
||||
setRotation(rightLeg, 0F, 0F, 0F);
|
||||
rightLeg.mirror = false;
|
||||
body = new ModelRenderer(this, 0, 7);
|
||||
body.addBox(-2F, 0F, -1F, 4, 5, 2);
|
||||
body.setRotationPoint(0F, 14F, 0F);
|
||||
body.setTextureSize(32, 32);
|
||||
body.mirror = true;
|
||||
setRotation(body, 0F, 0F, 0F);
|
||||
head = new ModelRenderer(this, 0, 0);
|
||||
head.addBox(-1.5F, -3F, -2F, 3, 3, 3);
|
||||
head.setRotationPoint(0F, 14F, 0F);
|
||||
head.setTextureSize(32, 32);
|
||||
head.mirror = true;
|
||||
setRotation(head, 0F, 0F, 0F);
|
||||
chest1 = new ModelRenderer(this, 22, 0);
|
||||
chest1.addBox(-1F, 0.5F, -2F, 2, 3, 1);
|
||||
chest1.setRotationPoint(0F, 14F, 0F);
|
||||
chest1.setTextureSize(32, 32);
|
||||
chest1.mirror = true;
|
||||
setRotation(chest1, 0F, 0F, 0F);
|
||||
chest2 = new ModelRenderer(this, 22, 5);
|
||||
chest2.addBox(1F, 1.5F, -2F, 1, 1, 1);
|
||||
chest2.setRotationPoint(0F, 14F, 0F);
|
||||
chest2.setTextureSize(32, 32);
|
||||
chest2.mirror = true;
|
||||
setRotation(chest2, 0F, 0F, 0F);
|
||||
chest3 = new ModelRenderer(this, 22, 5);
|
||||
chest3.mirror = true;
|
||||
chest3.addBox(-2F, 1.5F, -2F, 1, 1, 1);
|
||||
chest3.setRotationPoint(0F, 14F, 0F);
|
||||
chest3.setTextureSize(32, 32);
|
||||
chest3.mirror = true;
|
||||
setRotation(chest3, 0F, 0F, 0F);
|
||||
chest3.mirror = false;
|
||||
leftArm = new ModelRenderer(this, 13, 7);
|
||||
leftArm.addBox(0F, -1F, -1F, 2, 5, 2);
|
||||
leftArm.setRotationPoint(2F, 15F, 0F);
|
||||
leftArm.setTextureSize(32, 32);
|
||||
leftArm.mirror = true;
|
||||
setRotation(leftArm, 0F, 0F, 0F);
|
||||
rightArm = new ModelRenderer(this, 13, 7);
|
||||
rightArm.mirror = true;
|
||||
rightArm.addBox(-2F, -1F, -1F, 2, 5, 2);
|
||||
rightArm.setRotationPoint(-2F, 15F, 0F);
|
||||
rightArm.setTextureSize(32, 32);
|
||||
rightArm.mirror = true;
|
||||
setRotation(rightArm, 0F, 0F, 0F);
|
||||
rightArm.mirror = false;
|
||||
back1 = new ModelRenderer(this, 22, 8);
|
||||
back1.addBox(-1.5F, 1.5F, 1F, 3, 1, 1);
|
||||
back1.setRotationPoint(0F, 14F, 0F);
|
||||
back1.setTextureSize(32, 32);
|
||||
back1.mirror = true;
|
||||
setRotation(back1, 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);
|
||||
leftLeg.render(f5);
|
||||
rightLeg.render(f5);
|
||||
body.render(f5);
|
||||
head.render(f5);
|
||||
chest1.render(f5);
|
||||
chest2.render(f5);
|
||||
chest3.render(f5);
|
||||
leftArm.render(f5);
|
||||
rightArm.render(f5);
|
||||
back1.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);
|
||||
this.head.rotateAngleX = f4 / (180F / (float) Math.PI);
|
||||
this.head.rotateAngleY = f3 / (180F / (float) Math.PI);
|
||||
this.leftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1;
|
||||
this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.4F * f1;
|
||||
this.leftArm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,332 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class ModelSpellEffectBlock extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer core;
|
||||
ModelRenderer frame1;
|
||||
ModelRenderer frame2;
|
||||
ModelRenderer frame3;
|
||||
ModelRenderer frame4;
|
||||
ModelRenderer frame5;
|
||||
ModelRenderer frame6;
|
||||
ModelRenderer frame7;
|
||||
ModelRenderer frame8;
|
||||
ModelRenderer frame9;
|
||||
ModelRenderer frame10;
|
||||
ModelRenderer frame11;
|
||||
ModelRenderer frame12;
|
||||
ModelRenderer inputSpacer1;
|
||||
ModelRenderer inputFace;
|
||||
ModelRenderer inputSpacer2;
|
||||
ModelRenderer inputSpacer3;
|
||||
ModelRenderer inputSpacer4;
|
||||
ModelRenderer outputFace;
|
||||
ModelRenderer outputPlug;
|
||||
ModelRenderer outputSpacer1;
|
||||
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)
|
||||
{
|
||||
case NORTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,334 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
|
||||
public class ModelSpellEnhancementBlock extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer core;
|
||||
ModelRenderer frame1;
|
||||
ModelRenderer frame2;
|
||||
ModelRenderer frame3;
|
||||
ModelRenderer frame4;
|
||||
ModelRenderer frame5;
|
||||
ModelRenderer frame6;
|
||||
ModelRenderer frame7;
|
||||
ModelRenderer frame8;
|
||||
ModelRenderer frame9;
|
||||
ModelRenderer frame10;
|
||||
ModelRenderer frame11;
|
||||
ModelRenderer frame12;
|
||||
ModelRenderer outputMain;
|
||||
ModelRenderer inputMain;
|
||||
ModelRenderer output1;
|
||||
ModelRenderer output2;
|
||||
ModelRenderer output3;
|
||||
ModelRenderer output4;
|
||||
ModelRenderer input1;
|
||||
ModelRenderer input2;
|
||||
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)
|
||||
{
|
||||
case NORTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,303 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class ModelSpellModifierBlock extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer core;
|
||||
ModelRenderer inputMain;
|
||||
ModelRenderer Shape2;
|
||||
ModelRenderer Shape3;
|
||||
ModelRenderer Shape4;
|
||||
ModelRenderer Shape5;
|
||||
ModelRenderer Shape6;
|
||||
ModelRenderer Shape7;
|
||||
ModelRenderer Shape8;
|
||||
ModelRenderer Shape9;
|
||||
ModelRenderer outputMain;
|
||||
ModelRenderer Shape11;
|
||||
ModelRenderer Shape12;
|
||||
ModelRenderer Shape13;
|
||||
ModelRenderer Shape14;
|
||||
ModelRenderer output1;
|
||||
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)
|
||||
{
|
||||
case NORTH:
|
||||
xInputRot = 0.0f;
|
||||
yInputRot = 0.0f;
|
||||
zInputRot = 0.0f;
|
||||
break;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,234 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
//Date: 07/03/2014 9:30:25 PM
|
||||
//Template version 1.1
|
||||
//Java generated by Techne
|
||||
//Keep in mind that you still need to fill in some blanks
|
||||
//- ZeuX
|
||||
|
||||
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
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;
|
||||
|
||||
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 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;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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(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);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,203 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ModelWingedFireDemon extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer leftLegPlate;
|
||||
ModelRenderer leftLeg;
|
||||
ModelRenderer codPiece;
|
||||
ModelRenderer rightLegPlate;
|
||||
ModelRenderer rightLeg;
|
||||
ModelRenderer body;
|
||||
ModelRenderer leftShoulder;
|
||||
ModelRenderer leftArm;
|
||||
ModelRenderer head;
|
||||
ModelRenderer rightShoulder;
|
||||
ModelRenderer rightArm;
|
||||
ModelRenderer leftWing;
|
||||
ModelRenderer rightWing;
|
||||
ModelRenderer leftHorn1;
|
||||
ModelRenderer rightHorn1;
|
||||
ModelRenderer leftHorn2;
|
||||
ModelRenderer rightHorn2;
|
||||
|
||||
public ModelWingedFireDemon()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
leftLegPlate = new ModelRenderer(this, 40, 36);
|
||||
leftLegPlate.addBox(0F, -3F, -3F, 6, 6, 6);
|
||||
leftLegPlate.setRotationPoint(2F, 5F, 0F);
|
||||
leftLegPlate.setTextureSize(64, 64);
|
||||
leftLegPlate.mirror = true;
|
||||
setRotation(leftLegPlate, 0F, 0F, 0F);
|
||||
leftLeg = new ModelRenderer(this, 48, 16);
|
||||
leftLeg.addBox(1F, 3F, -2F, 4, 16, 4);
|
||||
leftLeg.setRotationPoint(2F, 5F, 0F);
|
||||
leftLeg.setTextureSize(64, 64);
|
||||
leftLeg.mirror = true;
|
||||
setRotation(leftLeg, 0F, 0F, 0F);
|
||||
codPiece = new ModelRenderer(this, 48, 0);
|
||||
codPiece.addBox(-2F, 0F, -2F, 4, 6, 4);
|
||||
codPiece.setRotationPoint(0F, 1F, 0F);
|
||||
codPiece.setTextureSize(64, 64);
|
||||
codPiece.mirror = true;
|
||||
setRotation(codPiece, 0F, 0F, 0F);
|
||||
rightLegPlate = new ModelRenderer(this, 40, 36);
|
||||
rightLegPlate.mirror = true;
|
||||
rightLegPlate.addBox(-6F, -3F, -3F, 6, 6, 6);
|
||||
rightLegPlate.setRotationPoint(-2F, 5F, 0F);
|
||||
rightLegPlate.setTextureSize(64, 64);
|
||||
rightLegPlate.mirror = true;
|
||||
setRotation(rightLegPlate, 0F, 0F, 0F);
|
||||
rightLegPlate.mirror = false;
|
||||
rightLeg = new ModelRenderer(this, 48, 16);
|
||||
rightLeg.mirror = true;
|
||||
rightLeg.addBox(-5F, 3F, -2F, 4, 16, 4);
|
||||
rightLeg.setRotationPoint(-2F, 5F, 0F);
|
||||
rightLeg.setTextureSize(64, 64);
|
||||
rightLeg.mirror = true;
|
||||
setRotation(rightLeg, 0F, 0F, 0F);
|
||||
rightLeg.mirror = false;
|
||||
body = new ModelRenderer(this, 0, 44);
|
||||
body.addBox(-5F, -14F, -3F, 10, 14, 6);
|
||||
body.setRotationPoint(0F, 1F, 0F);
|
||||
body.setTextureSize(64, 64);
|
||||
body.mirror = true;
|
||||
setRotation(body, 0F, 0F, 0F);
|
||||
leftShoulder = new ModelRenderer(this, 0, 29);
|
||||
leftShoulder.addBox(0F, -5F, -4F, 8, 7, 8);
|
||||
leftShoulder.setRotationPoint(5F, -10F, 0F);
|
||||
leftShoulder.setTextureSize(64, 64);
|
||||
leftShoulder.mirror = true;
|
||||
setRotation(leftShoulder, 0F, 0F, 0F);
|
||||
leftArm = new ModelRenderer(this, 32, 0);
|
||||
leftArm.addBox(3F, 2F, -2F, 4, 12, 4);
|
||||
leftArm.setRotationPoint(5F, -10F, 0F);
|
||||
leftArm.setTextureSize(64, 64);
|
||||
leftArm.mirror = true;
|
||||
setRotation(leftArm, 0F, 0F, 0F);
|
||||
head = new ModelRenderer(this, 32, 48);
|
||||
head.addBox(-4F, -7F, -4F, 8, 8, 8);
|
||||
head.setRotationPoint(0F, -14F, -1F);
|
||||
head.setTextureSize(64, 64);
|
||||
head.mirror = true;
|
||||
setRotation(head, 0F, 0F, 0F);
|
||||
rightShoulder = new ModelRenderer(this, 0, 29);
|
||||
rightShoulder.mirror = true;
|
||||
rightShoulder.mirror = true;
|
||||
rightShoulder.addBox(-8F, -5F, -4F, 8, 7, 8);
|
||||
rightShoulder.setRotationPoint(-5F, -10F, 0F);
|
||||
rightShoulder.setTextureSize(64, 64);
|
||||
rightShoulder.mirror = true;
|
||||
setRotation(rightShoulder, 0F, 0F, 0F);
|
||||
rightShoulder.mirror = false;
|
||||
rightArm = new ModelRenderer(this, 32, 0);
|
||||
rightArm.mirror = true;
|
||||
rightArm.mirror = true;
|
||||
rightArm.addBox(-7F, 2F, -2F, 4, 12, 4);
|
||||
rightArm.setRotationPoint(-5F, -10F, 0F);
|
||||
rightArm.setTextureSize(64, 64);
|
||||
rightArm.mirror = true;
|
||||
setRotation(rightArm, 0F, 0F, 0F);
|
||||
rightArm.mirror = false;
|
||||
leftWing = new ModelRenderer(this, 0, 0);
|
||||
leftWing.addBox(0F, -2F, 0F, 16, 12, 0);
|
||||
leftWing.setRotationPoint(0F, -11F, 3F);
|
||||
leftWing.setTextureSize(64, 64);
|
||||
leftWing.mirror = true;
|
||||
setRotation(leftWing, 0F, -0.5061455F, 0F);
|
||||
rightWing = new ModelRenderer(this, 0, 0);
|
||||
rightWing.mirror = true;
|
||||
rightWing.addBox(-16F, -2F, 0F, 16, 12, 0);
|
||||
rightWing.setRotationPoint(0F, -11F, 3F);
|
||||
rightWing.setTextureSize(64, 64);
|
||||
rightWing.mirror = true;
|
||||
setRotation(rightWing, 0F, 0.5061455F, 0F);
|
||||
rightWing.mirror = false;
|
||||
leftHorn1 = new ModelRenderer(this, 0, 12);
|
||||
leftHorn1.addBox(4F, -9F, -1F, 1, 5, 1);
|
||||
leftHorn1.setRotationPoint(0F, -14F, -1F);
|
||||
leftHorn1.setTextureSize(64, 64);
|
||||
leftHorn1.mirror = true;
|
||||
setRotation(leftHorn1, 0F, 0F, 0F);
|
||||
rightHorn1 = new ModelRenderer(this, 0, 12);
|
||||
rightHorn1.mirror = true;
|
||||
rightHorn1.addBox(-5F, -9F, -1F, 1, 5, 1);
|
||||
rightHorn1.setRotationPoint(0F, -14F, -1F);
|
||||
rightHorn1.setTextureSize(64, 64);
|
||||
rightHorn1.mirror = true;
|
||||
setRotation(rightHorn1, 0F, 0F, 0F);
|
||||
rightHorn1.mirror = false;
|
||||
leftHorn2 = new ModelRenderer(this, 4, 12);
|
||||
leftHorn2.addBox(4F, -10F, 0F, 1, 5, 1);
|
||||
leftHorn2.setRotationPoint(0F, -14F, -1F);
|
||||
leftHorn2.setTextureSize(64, 64);
|
||||
leftHorn2.mirror = true;
|
||||
setRotation(leftHorn2, 0F, 0F, 0F);
|
||||
rightHorn2 = new ModelRenderer(this, 4, 12);
|
||||
rightHorn2.mirror = true;
|
||||
rightHorn2.addBox(-5F, -10F, 0F, 1, 5, 1);
|
||||
rightHorn2.setRotationPoint(0F, -14F, -1F);
|
||||
rightHorn2.setTextureSize(64, 64);
|
||||
rightHorn2.mirror = true;
|
||||
setRotation(rightHorn2, 0F, 0F, 0F);
|
||||
rightHorn2.mirror = false;
|
||||
}
|
||||
|
||||
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);
|
||||
leftLegPlate.render(f5);
|
||||
leftLeg.render(f5);
|
||||
codPiece.render(f5);
|
||||
rightLegPlate.render(f5);
|
||||
rightLeg.render(f5);
|
||||
body.render(f5);
|
||||
leftShoulder.render(f5);
|
||||
leftArm.render(f5);
|
||||
head.render(f5);
|
||||
rightShoulder.render(f5);
|
||||
rightArm.render(f5);
|
||||
leftWing.render(f5);
|
||||
rightWing.render(f5);
|
||||
leftHorn1.render(f5);
|
||||
rightHorn1.render(f5);
|
||||
leftHorn2.render(f5);
|
||||
rightHorn2.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);
|
||||
this.head.rotateAngleX = f4 / (180F / (float) Math.PI);
|
||||
this.head.rotateAngleY = f3 / (180F / (float) Math.PI);
|
||||
this.leftHorn1.rotateAngleX = head.rotateAngleX;
|
||||
this.leftHorn1.rotateAngleY = head.rotateAngleY;
|
||||
this.leftHorn2.rotateAngleX = head.rotateAngleX;
|
||||
this.leftHorn2.rotateAngleY = head.rotateAngleY;
|
||||
this.rightHorn1.rotateAngleX = head.rotateAngleX;
|
||||
this.rightHorn1.rotateAngleY = head.rotateAngleY;
|
||||
this.rightHorn2.rotateAngleX = head.rotateAngleX;
|
||||
this.rightHorn2.rotateAngleY = head.rotateAngleY;
|
||||
this.leftLeg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
this.rightLeg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.0F * f1;
|
||||
this.rightArm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.0F * f1;
|
||||
this.leftArm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
this.leftShoulder.rotateAngleX = this.leftArm.rotateAngleX;
|
||||
this.rightShoulder.rotateAngleX = this.rightArm.rotateAngleX;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelWritingTable extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer base;
|
||||
ModelRenderer support;
|
||||
ModelRenderer appendage1;
|
||||
ModelRenderer appendage2;
|
||||
ModelRenderer appendage3;
|
||||
ModelRenderer appendage4;
|
||||
ModelRenderer appendage5;
|
||||
ModelRenderer outputPad;
|
||||
ModelRenderer input1;
|
||||
ModelRenderer input5;
|
||||
ModelRenderer input4;
|
||||
ModelRenderer input3;
|
||||
ModelRenderer Shape1;
|
||||
|
||||
public ModelWritingTable()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
base = new ModelRenderer(this, 0, 0);
|
||||
base.addBox(0F, 0F, 0F, 16, 2, 16);
|
||||
base.setRotationPoint(-8F, 22F, -8F);
|
||||
base.setTextureSize(64, 32);
|
||||
base.mirror = true;
|
||||
setRotation(base, 0F, 0F, 0F);
|
||||
support = new ModelRenderer(this, 0, 0);
|
||||
support.addBox(0F, 0F, 0F, 2, 12, 2);
|
||||
support.setRotationPoint(-1F, 10F, -1F);
|
||||
support.setTextureSize(64, 32);
|
||||
support.mirror = true;
|
||||
setRotation(support, 0F, 0F, 0F);
|
||||
appendage1 = new ModelRenderer(this, 48, 0);
|
||||
appendage1.addBox(1F, 0F, 0F, 7, 11, 0);
|
||||
appendage1.setRotationPoint(0F, 10F, 0F);
|
||||
appendage1.setTextureSize(64, 32);
|
||||
appendage1.mirror = true;
|
||||
setRotation(appendage1, 0F, 0F, 0F);
|
||||
appendage2 = new ModelRenderer(this, 48, 0);
|
||||
appendage2.addBox(1F, 0F, 0F, 7, 11, 0);
|
||||
appendage2.setRotationPoint(0F, 10F, 0F);
|
||||
appendage2.setTextureSize(64, 32);
|
||||
appendage2.mirror = true;
|
||||
setRotation(appendage2, 0F, ((float) Math.PI * 2F / 5F), 0F);
|
||||
appendage3 = new ModelRenderer(this, 48, 0);
|
||||
appendage3.addBox(1F, 0F, 0F, 7, 11, 0);
|
||||
appendage3.setRotationPoint(0F, 10F, 0F);
|
||||
appendage3.setTextureSize(64, 32);
|
||||
appendage3.mirror = true;
|
||||
setRotation(appendage3, 0F, 2.513274F, 0F);
|
||||
appendage4 = new ModelRenderer(this, 48, 0);
|
||||
appendage4.addBox(1F, 0F, 0F, 7, 11, 0);
|
||||
appendage4.setRotationPoint(0F, 10F, 0F);
|
||||
appendage4.setTextureSize(64, 32);
|
||||
appendage4.mirror = true;
|
||||
setRotation(appendage4, 0F, -2.513274F, 0F);
|
||||
appendage5 = new ModelRenderer(this, 48, 0);
|
||||
appendage5.addBox(1F, 0F, 0F, 7, 11, 0);
|
||||
appendage5.setRotationPoint(0F, 10F, 0F);
|
||||
appendage5.setTextureSize(64, 32);
|
||||
appendage5.mirror = true;
|
||||
setRotation(appendage5, 0F, -((float) Math.PI * 2F / 5F), 0F);
|
||||
outputPad = new ModelRenderer(this, 0, 20);
|
||||
outputPad.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
outputPad.setRotationPoint(-2F, 9F, -2F);
|
||||
outputPad.setTextureSize(64, 64);
|
||||
outputPad.mirror = true;
|
||||
setRotation(outputPad, 0F, 0F, 0F);
|
||||
input1 = new ModelRenderer(this, 0, 20);
|
||||
input1.addBox(4F, 0F, -2F, 4, 1, 4);
|
||||
input1.setRotationPoint(0F, 21F, 0F);
|
||||
input1.setTextureSize(64, 64);
|
||||
input1.mirror = true;
|
||||
setRotation(input1, 0F, 0F, 0F);
|
||||
input5 = new ModelRenderer(this, 0, 20);
|
||||
input5.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
input5.setRotationPoint(0F, 21F, -8F);
|
||||
input5.setTextureSize(64, 64);
|
||||
input5.mirror = true;
|
||||
setRotation(input5, 0F, 0F, 0F);
|
||||
input4 = new ModelRenderer(this, 0, 20);
|
||||
input4.addBox(-7F, 0F, -6F, 4, 1, 4);
|
||||
input4.setRotationPoint(0F, 21F, 0F);
|
||||
input4.setTextureSize(64, 64);
|
||||
input4.mirror = true;
|
||||
setRotation(input4, 0F, 0F, 0F);
|
||||
input3 = new ModelRenderer(this, 0, 20);
|
||||
input3.addBox(-7F, 0F, 2F, 4, 1, 4);
|
||||
input3.setRotationPoint(0F, 21F, 0F);
|
||||
input3.setTextureSize(64, 64);
|
||||
input3.mirror = true;
|
||||
setRotation(input3, 0F, 0F, 0F);
|
||||
Shape1 = new ModelRenderer(this, 0, 20);
|
||||
Shape1.addBox(0F, 0F, 4F, 4, 1, 4);
|
||||
Shape1.setRotationPoint(0F, 21F, 0F);
|
||||
Shape1.setTextureSize(64, 64);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 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);
|
||||
base.render(f5);
|
||||
support.render(f5);
|
||||
appendage1.render(f5);
|
||||
appendage2.render(f5);
|
||||
appendage3.render(f5);
|
||||
appendage4.render(f5);
|
||||
appendage5.render(f5);
|
||||
outputPad.render(f5);
|
||||
input1.render(f5);
|
||||
input5.render(f5);
|
||||
input4.render(f5);
|
||||
input3.render(f5);
|
||||
Shape1.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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.projectile;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelEnergyBazookaMainProjectile;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
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 float scale = 1.0f;
|
||||
|
||||
@Override
|
||||
public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0, (float) d1, (float) d2);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
this.bindTexture(this.getEntityTexture(entity));
|
||||
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();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity entity)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return field_110833_a;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.projectile;
|
||||
|
||||
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
|
||||
{
|
||||
public void doRenderEnergyBlastProjectile(Entity entityShot, double par2, double par4, double par6, float par8, float par9)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) par2, (float) par4, (float) par6);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glScalef(0.1F, 0.1F, 0.1F);
|
||||
this.bindTexture(this.getEntityTexture(entityShot));
|
||||
Tessellator var12 = Tessellator.instance;
|
||||
GL11.glRotatef(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
var12.startDrawingQuads();
|
||||
var12.setNormal(0.0F, 1.0F, 0.0F);
|
||||
var12.addVertexWithUV(-0.5F, -0.25F, 0.0D, 0, 1);
|
||||
var12.addVertexWithUV(0.5F, -0.25F, 0.0D, 1, 1);
|
||||
var12.addVertexWithUV(0.5F, 0.75F, 0.0D, 1, 0);
|
||||
var12.addVertexWithUV(-0.5F, 0.75F, 0.0D, 0, 0);
|
||||
var12.draw();
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
|
||||
{
|
||||
if (par1Entity instanceof IProjectile)
|
||||
{
|
||||
this.doRenderEnergyBlastProjectile(par1Entity, par2, par4, par6, par8, par9);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity entity)
|
||||
{
|
||||
if (entity instanceof IceProjectile)
|
||||
{
|
||||
return new ResourceLocation("alchemicalwizardry", "textures/entities/iceProjectile.png");
|
||||
}
|
||||
|
||||
if (entity instanceof FireProjectile)
|
||||
{
|
||||
return new ResourceLocation("alchemicalwizardry", "textures/entities/fireProjectile.png");
|
||||
}
|
||||
|
||||
if (entity instanceof ExplosionProjectile)
|
||||
{
|
||||
return new ResourceLocation("alchemicalwizardry", "textures/entities/explosionProjectile.png");
|
||||
}
|
||||
|
||||
if (entity instanceof HolyProjectile)
|
||||
{
|
||||
return new ResourceLocation("alchemicalwizardry", "textures/entities/holyProjectile.png");
|
||||
}
|
||||
|
||||
if (entity instanceof WindGustProjectile)
|
||||
{
|
||||
return new ResourceLocation("alchemicalwizardry", "textures/entities/windGustProjectile.png");
|
||||
}
|
||||
|
||||
if (entity instanceof LightningBoltProjectile)
|
||||
{
|
||||
return new ResourceLocation("alchemicalwizardry", "textures/entities/lightningProjectile.png");
|
||||
}
|
||||
|
||||
if (entity instanceof WaterProjectile)
|
||||
{
|
||||
return new ResourceLocation("alchemicalwizardry", "textures/entities/waterProjectile.png");
|
||||
}
|
||||
|
||||
if (entity instanceof MudProjectile)
|
||||
{
|
||||
return new ResourceLocation("alchemicalwizardry", "textures/entities/mudProjectile.png");
|
||||
}
|
||||
|
||||
return new ResourceLocation("alchemicalwizardry", "textures/entities/energyBlastProjectile.png");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.projectile;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderFireProjectile
|
||||
{
|
||||
// public void doRenderProjectile(FireProjectile entityShot, double par2, double par4, double par6, float par8, float par9)
|
||||
// {
|
||||
// GL11.glPushMatrix();
|
||||
// GL11.glTranslatef((float)par2, (float)par4, (float)par6);
|
||||
// GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
// GL11.glScalef(0.1F, 0.1F, 0.1F);
|
||||
// this.func_110776_a(this.func_110775_a(entityShot));
|
||||
// Tessellator var12 = Tessellator.instance;
|
||||
// GL11.glRotatef(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
// GL11.glRotatef(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
// var12.startDrawingQuads();
|
||||
// var12.setNormal(0.0F, 1.0F, 0.0F);
|
||||
// var12.addVertexWithUV(-0.5F, -0.25F, 0.0D, 0, 1);
|
||||
// var12.addVertexWithUV(0.5F, -0.25F, 0.0D, 1, 1);
|
||||
// var12.addVertexWithUV(0.5F, 0.75F, 0.0D, 1, 0);
|
||||
// var12.addVertexWithUV(-0.5F, 0.75F, 0.0D, 0, 0);
|
||||
// var12.draw();
|
||||
// GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
// GL11.glPopMatrix();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
|
||||
// {
|
||||
// this.doRenderProjectile((FireProjectile)par1Entity, par2, par4, par6, par8, par9);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected ResourceLocation func_110775_a(Entity entity)
|
||||
// {
|
||||
// return new ResourceLocation("alchemicalwizardry:/textures/entities/fireProjectile.png");
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.projectile;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelMeteor;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
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 float scale = 1.0f;
|
||||
|
||||
@Override
|
||||
public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d0, (float) d1, (float) d2);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
this.bindTexture(this.getEntityTexture(entity));
|
||||
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();
|
||||
}
|
||||
|
||||
@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