Finished fixing the raw Tile altar, and finished the Omega structure.

This commit is contained in:
WayofTime 2015-07-29 15:04:00 -04:00
parent cd5a52c7fb
commit 977b6ce29d
18 changed files with 121 additions and 118 deletions

View file

@ -1,9 +1,10 @@
package WayofTime.alchemicalWizardry.common.omega; package WayofTime.alchemicalWizardry.common.omega;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
public interface IEnchantmentGlyph extends IStabilityGlyph public interface IEnchantmentGlyph extends IStabilityGlyph
{ {
public int getEnchantability(World world, int x, int y, int z, int meta); public int getEnchantability(World world, BlockPos pos, int meta);
public int getEnchantmentLevel(World world, int x, int y, int z, int meta); public int getEnchantmentLevel(World world, BlockPos pos, int meta);
} }

View file

@ -1,8 +1,9 @@
package WayofTime.alchemicalWizardry.common.omega; package WayofTime.alchemicalWizardry.common.omega;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
public interface IStabilityGlyph public interface IStabilityGlyph
{ {
public int getAdditionalStabilityForFaceCount(World world, int x, int y, int z, int meta, int faceCount); public int getAdditionalStabilityForFaceCount(World world, BlockPos pos, int meta, int faceCount);
} }

View file

@ -1,6 +1,5 @@
package WayofTime.alchemicalWizardry.common.omega; package WayofTime.alchemicalWizardry.common.omega;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;
@ -44,12 +43,6 @@ public class OmegaParadigmEarth extends OmegaParadigm
} }
} }
@Override
public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z)
{
return true;
}
@Override @Override
public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack) public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack)
{ {

View file

@ -1,7 +1,6 @@
package WayofTime.alchemicalWizardry.common.omega; package WayofTime.alchemicalWizardry.common.omega;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;
@ -57,12 +56,6 @@ public class OmegaParadigmFire extends OmegaParadigm
} }
} }
@Override
public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z)
{
return true;
}
@Override @Override
public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack) public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack)
{ {

View file

@ -49,7 +49,7 @@ public class OmegaParadigmWater extends OmegaParadigm
} }
@Override @Override
public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z) public boolean getBlockEffectWhileInside(Entity entity, BlockPos pos)
{ {
if(entity instanceof EntityLivingBase) if(entity instanceof EntityLivingBase)
{ {

View file

@ -1,6 +1,5 @@
package WayofTime.alchemicalWizardry.common.omega; package WayofTime.alchemicalWizardry.common.omega;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;
@ -39,12 +38,6 @@ public class OmegaParadigmWind extends OmegaParadigm
player.fallDistance = 0; player.fallDistance = 0;
} }
@Override
public boolean getBlockEffectWhileInside(Entity entity, int x, int y, int z)
{
return true;
}
@Override @Override
public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack) public void onOmegaKeyPressed(EntityPlayer player, ItemStack stack)
{ {

View file

@ -129,17 +129,20 @@ public class OmegaStructureHandler
indTally++; indTally++;
} }
Block block = world.getBlock(x - range + i, y - range + j, z - range + k); BlockPos newPos = pos.add(i - range, j - range, k - range);
int meta = world.getBlockMetadata(x - range + i, y - range + j, z - range + k);
IBlockState state = world.getBlockState(newPos);
Block block = state.getBlock();
int meta = block.getMetaFromState(state);
if(block instanceof IEnchantmentGlyph) if(block instanceof IEnchantmentGlyph)
{ {
tally += ((IEnchantmentGlyph)block).getAdditionalStabilityForFaceCount(world, x-range+i, y-range+j, z-range+k, meta, indTally); tally += ((IEnchantmentGlyph)block).getAdditionalStabilityForFaceCount(world, newPos, meta, indTally);
enchantability += ((IEnchantmentGlyph)block).getEnchantability(world, x-range+i, y-range+j, z-range+k, meta); enchantability += ((IEnchantmentGlyph)block).getEnchantability(world, newPos, meta);
enchantmentLevel += ((IEnchantmentGlyph)block).getEnchantmentLevel(world, x-range+i, y-range+j, z-range+k, meta); enchantmentLevel += ((IEnchantmentGlyph)block).getEnchantmentLevel(world, newPos, meta);
}else if(block instanceof IStabilityGlyph) }else if(block instanceof IStabilityGlyph)
{ {
tally += ((IStabilityGlyph)block).getAdditionalStabilityForFaceCount(world, x-range+i, y-range+j, z-range+k, meta, indTally); tally += ((IStabilityGlyph)block).getAdditionalStabilityForFaceCount(world, newPos, meta, indTally);
}else }else
{ {
tally += indTally; tally += indTally;
@ -151,8 +154,8 @@ public class OmegaStructureHandler
return new OmegaStructureParameters(tally, enchantability, enchantmentLevel); return new OmegaStructureParameters(tally, enchantability, enchantmentLevel);
} }
public static OmegaStructureParameters getStructureStabilityFactor(World world, int x, int y, int z, int expLim) public static OmegaStructureParameters getStructureStabilityFactor(World world, BlockPos pos, int expLim)
{ {
return getStructureStabilityFactor(world, x, y, z, expLim, new Int3(0, 0, 0)); return getStructureStabilityFactor(world, pos, expLim, new Int3(0, 0, 0));
} }
} }

View file

@ -1,20 +1,22 @@
package WayofTime.alchemicalWizardry.common.renderer.block; 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.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.client.FMLClientHandler;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit;
import WayofTime.alchemicalWizardry.common.tileEntity.TEConduit;
public class RenderConduit extends TileEntitySpecialRenderer public class RenderConduit extends TileEntitySpecialRenderer
{ {
private ModelConduit modelConduit = new ModelConduit(); private ModelConduit modelConduit = new ModelConduit();
@Override @Override
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i)
{ {
if (tileEntity instanceof TEConduit) if (tileEntity instanceof TEConduit)
{ {

View file

@ -1,18 +1,21 @@
package WayofTime.alchemicalWizardry.common.renderer.block; package WayofTime.alchemicalWizardry.common.renderer.block;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.client.FMLClientHandler;
import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent; import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack; import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar; import WayofTime.alchemicalWizardry.common.renderer.model.ModelCrystalBelljar;
import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar; import WayofTime.alchemicalWizardry.common.tileEntity.TEBellJar;
import cpw.mods.fml.client.FMLClientHandler;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
import org.lwjgl.opengl.GL11;
public class RenderCrystalBelljar extends TileEntitySpecialRenderer public class RenderCrystalBelljar extends TileEntitySpecialRenderer
{ {
@ -22,7 +25,7 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer
@Override @Override
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i)
{ {
if (tileEntity instanceof TEBellJar) if (tileEntity instanceof TEBellJar)
{ {
@ -37,7 +40,7 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer
GL11.glPopMatrix(); GL11.glPopMatrix();
GL11.glPopMatrix(); GL11.glPopMatrix();
ReagentContainerInfo[] info = tileAltar.getContainerInfo(ForgeDirection.UNKNOWN); ReagentContainerInfo[] info = tileAltar.getContainerInfo(EnumFacing.UP);
if (info.length >= 1 && info[0] != null) if (info.length >= 1 && info[0] != null)
{ {
ReagentStack reagentStack = info[0].reagent; ReagentStack reagentStack = info[0].reagent;
@ -55,7 +58,7 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer
{ {
GL11.glPushMatrix(); GL11.glPushMatrix();
float f1 = 1.0f; float f1 = 1.0f;
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.getInstance();
this.bindTexture(resourceLocation); 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_S, 10497.0F);
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F);
@ -66,10 +69,11 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer
GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glDepthMask(false); GL11.glDepthMask(false);
tessellator.startDrawingQuads(); WorldRenderer wr = tessellator.getWorldRenderer();
tessellator.setColorRGBA(colourRed, colourGreen, colourBlue, colourIntensity); wr.startDrawingQuads();
wr.func_178961_b(colourRed, colourGreen, colourBlue, colourIntensity); //setColourRGBA
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5); GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
tessellator.setBrightness(240); wr.func_178963_b(240); //setBrightness
double x1 = -4d / 16d; double x1 = -4d / 16d;
double x2 = 4d / 16d; double x2 = 4d / 16d;
@ -83,26 +87,26 @@ public class RenderCrystalBelljar extends TileEntitySpecialRenderer
double resy1 = 1.0d; double resy1 = 1.0d;
double resy2 = 1.0d; double resy2 = 1.0d;
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1); wr.addVertexWithUV(x1, y1, z1, resx1, resy1);
tessellator.addVertexWithUV(x2, y1, z1, resx2, resy1); wr.addVertexWithUV(x2, y1, z1, resx2, resy1);
tessellator.addVertexWithUV(x2, y2, z1, resx2, resy2); wr.addVertexWithUV(x2, y2, z1, resx2, resy2);
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2); wr.addVertexWithUV(x1, y2, z1, resx1, resy2);
tessellator.addVertexWithUV(x1, y1, z1, resx1, resy1); wr.addVertexWithUV(x1, y1, z1, resx1, resy1);
tessellator.addVertexWithUV(x1, y1, z2, resx2, resy1); wr.addVertexWithUV(x1, y1, z2, resx2, resy1);
tessellator.addVertexWithUV(x1, y2, z2, resx2, resy2); wr.addVertexWithUV(x1, y2, z2, resx2, resy2);
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy2); wr.addVertexWithUV(x1, y2, z1, resx1, resy2);
tessellator.addVertexWithUV(x1, y1, z2, resx1, resy1); wr.addVertexWithUV(x1, y1, z2, resx1, resy1);
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1); wr.addVertexWithUV(x2, y1, z2, resx2, resy1);
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); wr.addVertexWithUV(x2, y2, z2, resx2, resy2);
tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2); wr.addVertexWithUV(x1, y2, z2, resx1, resy2);
tessellator.addVertexWithUV(x2, y1, z1, resx1, resy1); wr.addVertexWithUV(x2, y1, z1, resx1, resy1);
tessellator.addVertexWithUV(x2, y1, z2, resx2, resy1); wr.addVertexWithUV(x2, y1, z2, resx2, resy1);
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); wr.addVertexWithUV(x2, y2, z2, resx2, resy2);
tessellator.addVertexWithUV(x2, y2, z1, resx1, resy2); wr.addVertexWithUV(x2, y2, z1, resx1, resy2);
tessellator.addVertexWithUV(x1, y2, z1, resx1, resy1); wr.addVertexWithUV(x1, y2, z1, resx1, resy1);
tessellator.addVertexWithUV(x2, y2, z1, resx2, resy1); wr.addVertexWithUV(x2, y2, z1, resx2, resy1);
tessellator.addVertexWithUV(x2, y2, z2, resx2, resy2); wr.addVertexWithUV(x2, y2, z2, resx2, resy2);
tessellator.addVertexWithUV(x1, y2, z2, resx1, resy2); wr.addVertexWithUV(x1, y2, z2, resx1, resy2);
tessellator.draw(); tessellator.draw();
GL11.glDepthMask(true); GL11.glDepthMask(true);

View file

@ -1,15 +1,15 @@
package WayofTime.alchemicalWizardry.common.renderer.block; package WayofTime.alchemicalWizardry.common.renderer.block;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import WayofTime.alchemicalWizardry.api.renderer.MRSRenderer; import WayofTime.alchemicalWizardry.api.renderer.MRSRenderer;
import WayofTime.alchemicalWizardry.api.rituals.Rituals; import WayofTime.alchemicalWizardry.api.rituals.Rituals;
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone; import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
public class RenderMasterStone extends TileEntitySpecialRenderer public class RenderMasterStone extends TileEntitySpecialRenderer
{ {
@Override @Override
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i)
{ {
if (tileEntity instanceof TEMasterStone) if (tileEntity instanceof TEMasterStone)
{ {

View file

@ -1,8 +1,5 @@
package WayofTime.alchemicalWizardry.common.renderer.block; package WayofTime.alchemicalWizardry.common.renderer.block;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelPedestal;
import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal;
import cpw.mods.fml.client.FMLClientHandler;
import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
@ -11,9 +8,13 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fml.client.FMLClientHandler;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelPedestal;
import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal;
public class RenderPedestal extends TileEntitySpecialRenderer public class RenderPedestal extends TileEntitySpecialRenderer
{ {
private ModelPedestal modelPedestal = new ModelPedestal(); private ModelPedestal modelPedestal = new ModelPedestal();

View file

@ -1,29 +1,34 @@
package WayofTime.alchemicalWizardry.common.renderer.block; package WayofTime.alchemicalWizardry.common.renderer.block;
import WayofTime.alchemicalWizardry.api.Int3;
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.api.Int3;
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
public class RenderReagentConduit extends TileEntitySpecialRenderer public class RenderReagentConduit extends TileEntitySpecialRenderer
{ {
private static final ResourceLocation field_110629_a = new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"); private static final ResourceLocation field_110629_a = new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png");
@Override @Override
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i)
{ {
if (tileEntity instanceof TEReagentConduit) if (tileEntity instanceof TEReagentConduit)
{ {
int renderCount = ((TEReagentConduit) tileEntity).renderCount; int renderCount = ((TEReagentConduit) tileEntity).renderCount;
float key1 = (tileEntity.xCoord * 54f - tileEntity.yCoord * 38.72f + tileEntity.zCoord * 10.432f); BlockPos pos = tileEntity.getPos();
float key2 = (tileEntity.xCoord * 21.43f - tileEntity.yCoord * 9.96f + tileEntity.zCoord * 12.8f); float key1 = (pos.getX() * 54f - pos.getY() * 38.72f + pos.getZ() * 10.432f);
float key2 = (pos.getX() * 21.43f - pos.getY() * 9.96f + pos.getZ() * 12.8f);
Int3 colourMap = ((TEReagentConduit) tileEntity).getColour(); Int3 colourMap = ((TEReagentConduit) tileEntity).getColour();
GL11.glPushMatrix(); GL11.glPushMatrix();
Tessellator tessellator = Tessellator.instance; Tessellator tessellator = Tessellator.getInstance();
WorldRenderer wr = tessellator.getWorldRenderer();
this.bindTexture(field_110629_a); 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_S, 10497.0F);
GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F); GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, 10497.0F);
@ -32,17 +37,17 @@ public class RenderReagentConduit extends TileEntitySpecialRenderer
GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glDepthMask(false); GL11.glDepthMask(false);
tessellator.startDrawingQuads(); wr.startDrawingQuads();
tessellator.setColorRGBA(colourMap.xCoord, colourMap.yCoord, colourMap.zCoord, 200); wr.func_178961_b(colourMap.xCoord, colourMap.yCoord, colourMap.zCoord, 200);
GL11.glTranslated(d0 + 0.5, d1 + 0.5, d2 + 0.5); 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(tileEntity.getWorld().getWorldTime() / 3.0f, 0F, 1F, 0F); //Rotate on planar axis
GL11.glRotatef(renderCount + key1, 0F, 0F, 1F); //Rotate vertical axis GL11.glRotatef(renderCount + key1, 0F, 0F, 1F); //Rotate vertical axis
GL11.glRotatef(renderCount * 2f + key2, 1F, 0F, 0F); //Rotate cylindrically GL11.glRotatef(renderCount * 2f + key2, 1F, 0F, 0F); //Rotate cylindrically
tessellator.setBrightness(240); wr.func_178963_b(240);
tessellator.addVertexWithUV(-0.5d, 0, -0.5d, 0.0d, 0.0d); wr.addVertexWithUV(-0.5d, 0, -0.5d, 0.0d, 0.0d);
tessellator.addVertexWithUV(0.5d, 0, -0.5d, 1.0d, 0.0d); wr.addVertexWithUV(0.5d, 0, -0.5d, 1.0d, 0.0d);
tessellator.addVertexWithUV(0.5d, 0, 0.5d, 1.0d, 1.0d); wr.addVertexWithUV(0.5d, 0, 0.5d, 1.0d, 1.0d);
tessellator.addVertexWithUV(-0.5d, 0, 0.5d, 0.0d, 1.0d); wr.addVertexWithUV(-0.5d, 0, 0.5d, 0.0d, 1.0d);
tessellator.draw(); tessellator.draw();

View file

@ -1,19 +1,21 @@
package WayofTime.alchemicalWizardry.common.renderer.block; package WayofTime.alchemicalWizardry.common.renderer.block;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEffectBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock;
import cpw.mods.fml.client.FMLClientHandler;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.client.FMLClientHandler;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEffectBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock;
public class RenderSpellEffectBlock extends TileEntitySpecialRenderer public class RenderSpellEffectBlock extends TileEntitySpecialRenderer
{ {
private ModelSpellEffectBlock modelSpellEffectBlock = new ModelSpellEffectBlock(); private ModelSpellEffectBlock modelSpellEffectBlock = new ModelSpellEffectBlock();
@Override @Override
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i)
{ {
if (tileEntity instanceof TESpellEffectBlock) if (tileEntity instanceof TESpellEffectBlock)
{ {
@ -21,7 +23,7 @@ public class RenderSpellEffectBlock extends TileEntitySpecialRenderer
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
ResourceLocation test; ResourceLocation test;
int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); int meta = tileEntity.getBlockMetadata();
String resource = tileSpellBlock.getResourceLocationForMeta(meta); String resource = tileSpellBlock.getResourceLocationForMeta(meta);
test = new ResourceLocation(resource); test = new ResourceLocation(resource);

View file

@ -1,19 +1,21 @@
package WayofTime.alchemicalWizardry.common.renderer.block; package WayofTime.alchemicalWizardry.common.renderer.block;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock;
import cpw.mods.fml.client.FMLClientHandler;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.client.FMLClientHandler;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellEnhancementBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock;
public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer
{ {
private ModelSpellEnhancementBlock modelSpellEnhancementBlock = new ModelSpellEnhancementBlock(); private ModelSpellEnhancementBlock modelSpellEnhancementBlock = new ModelSpellEnhancementBlock();
@Override @Override
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i)
{ {
if (tileEntity instanceof TESpellEnhancementBlock) if (tileEntity instanceof TESpellEnhancementBlock)
{ {
@ -21,7 +23,7 @@ public class RenderSpellEnhancementBlock extends TileEntitySpecialRenderer
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
ResourceLocation test; ResourceLocation test;
int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); int meta = tileEntity.getBlockMetadata();
String resource = tileSpellBlock.getResourceLocationForMeta(meta); String resource = tileSpellBlock.getResourceLocationForMeta(meta);
test = new ResourceLocation(resource); test = new ResourceLocation(resource);

View file

@ -1,19 +1,21 @@
package WayofTime.alchemicalWizardry.common.renderer.block; package WayofTime.alchemicalWizardry.common.renderer.block;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock;
import cpw.mods.fml.client.FMLClientHandler;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.client.FMLClientHandler;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellModifierBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellModifierBlock;
public class RenderSpellModifierBlock extends TileEntitySpecialRenderer public class RenderSpellModifierBlock extends TileEntitySpecialRenderer
{ {
private ModelSpellModifierBlock modelSpellModifierBlock = new ModelSpellModifierBlock(); private ModelSpellModifierBlock modelSpellModifierBlock = new ModelSpellModifierBlock();
@Override @Override
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i)
{ {
if (tileEntity instanceof TESpellModifierBlock) if (tileEntity instanceof TESpellModifierBlock)
{ {
@ -21,7 +23,7 @@ public class RenderSpellModifierBlock extends TileEntitySpecialRenderer
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
ResourceLocation test; ResourceLocation test;
int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); int meta = tileEntity.getBlockMetadata();
String resource = tileSpellBlock.getResourceLocationForMeta(meta); String resource = tileSpellBlock.getResourceLocationForMeta(meta);
test = new ResourceLocation(resource); test = new ResourceLocation(resource);

View file

@ -1,19 +1,21 @@
package WayofTime.alchemicalWizardry.common.renderer.block; package WayofTime.alchemicalWizardry.common.renderer.block;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
import cpw.mods.fml.client.FMLClientHandler;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.client.FMLClientHandler;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelSpellParadigmBlock;
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
public class RenderSpellParadigmBlock extends TileEntitySpecialRenderer public class RenderSpellParadigmBlock extends TileEntitySpecialRenderer
{ {
private ModelSpellParadigmBlock modelSpellParadigmBlock = new ModelSpellParadigmBlock(); private ModelSpellParadigmBlock modelSpellParadigmBlock = new ModelSpellParadigmBlock();
@Override @Override
public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f, int i)
{ {
if (tileEntity instanceof TESpellParadigmBlock) if (tileEntity instanceof TESpellParadigmBlock)
{ {
@ -21,7 +23,7 @@ public class RenderSpellParadigmBlock extends TileEntitySpecialRenderer
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F); GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
ResourceLocation test; ResourceLocation test;
int meta = tileEntity.getWorldObj().getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord); int meta = tileEntity.getBlockMetadata();
String resource = tileSpellBlock.getResourceLocationForMeta(meta); String resource = tileSpellBlock.getResourceLocationForMeta(meta);
test = new ResourceLocation(resource); test = new ResourceLocation(resource);

View file

@ -1,17 +1,16 @@
package WayofTime.alchemicalWizardry.common.renderer.block.itemRender; package WayofTime.alchemicalWizardry.common.renderer.block.itemRender;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.IItemRenderer; import net.minecraftforge.client.IItemRenderer;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fml.client.FMLClientHandler;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit; import WayofTime.alchemicalWizardry.common.renderer.model.ModelConduit;
import cpw.mods.fml.client.FMLClientHandler;
@SuppressWarnings("deprecation")
public class TEConduitItemRenderer implements IItemRenderer public class TEConduitItemRenderer implements IItemRenderer
{ {
private ModelConduit modelConduit = new ModelConduit(); private ModelConduit modelConduit = new ModelConduit();

View file

@ -901,7 +901,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
sortList[1] = 0; sortList[1] = 0;
} else } else
{ {
sortList[0] = this.fluid.fluidID; sortList[0] = this.fluid.getFluidID();
sortList[1] = this.fluid.amount; sortList[1] = this.fluid.amount;
} }
@ -911,7 +911,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
sortList[3] = 0; sortList[3] = 0;
} else } else
{ {
sortList[2] = this.fluidInput.fluidID; sortList[2] = this.fluidInput.getFluidID();
sortList[3] = this.fluidInput.amount; sortList[3] = this.fluidInput.amount;
} }
@ -921,7 +921,7 @@ public class TEAltar extends TEInventory implements IFluidTank, IFluidHandler, I
sortList[5] = 0; sortList[5] = 0;
} else } else
{ {
sortList[4] = this.fluidOutput.fluidID; sortList[4] = this.fluidOutput.getFluidID();
sortList[5] = this.fluidOutput.amount; sortList[5] = this.fluidOutput.amount;
} }