Upload my Code Changes/Format/imports

This commit is contained in:
Alexander committed 2014-02-16 14:23:50 -05:00
1 parent 5bcdb7ca46
commit 5d4e38c0cb
264 files changed
+4014 -3972

No files matched your search

@@ -54,7 +54,7 @@ public class CustomBowRenderer implements IItemRenderer
block = BlockUtils.getBlockFromItem(stack.getItem());
}
IIcon icon = null; //living.getItemIcon(stack, renderPass);
IIcon icon = null; // living.getItemIcon(stack, renderPass);
if (living instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) living;
+70 -52
View File
@@ -19,9 +19,9 @@ import org.lwjgl.opengl.GL11;
/**
*
* @author TheObliterator
*
* A class to create and draw true type
* fonts onto the Minecraft game engine.
*
* A class to create and draw true type fonts onto the Minecraft game
* engine.
*/
public class CustomFont
{
@@ -33,15 +33,17 @@ public class CustomFont
private FontMetrics metrics;
/**
* Instantiates the font, filling in default start
* and end character parameters.
* Instantiates the font, filling in default start and end character
* parameters.
*
* 'new CustomFont(ModLoader.getMinecraftInstance(),
* "Arial", 12);
* 'new CustomFont(ModLoader.getMinecraftInstance(), "Arial", 12);
*
* @param mc The Minecraft instance for the font to be bound to.
* @param fontName The name of the font to be drawn.
* @param size The size of the font to be drawn.
* @param mc
* The Minecraft instance for the font to be bound to.
* @param fontName
* The name of the font to be drawn.
* @param size
* The size of the font to be drawn.
*/
public CustomFont(Minecraft mc, Object font, int size)
{
@@ -49,19 +51,22 @@ public class CustomFont
}
/**
* Instantiates the font, pre-rendering a sprite
* font image by using a true type font on a
* bitmap. Then allocating that bitmap to the
* Minecraft rendering engine for later use.
* Instantiates the font, pre-rendering a sprite font image by using a true
* type font on a bitmap. Then allocating that bitmap to the Minecraft
* rendering engine for later use.
*
* 'new CustomFont(ModLoader.getMinecraftInstance(),
* "Arial", 12, 32, 126);'
* 'new CustomFont(ModLoader.getMinecraftInstance(), "Arial", 12, 32, 126);'
*
* @param mc The Minecraft instance for the font to be bound to.
* @param fontName The name of the font to be drawn.
* @param size The size of the font to be drawn.
* @param startChar The starting ASCII character id to be drawable. (Default 32)
* @param endChar The ending ASCII character id to be drawable. (Default 126)
* @param mc
* The Minecraft instance for the font to be bound to.
* @param fontName
* The name of the font to be drawn.
* @param size
* The size of the font to be drawn.
* @param startChar
* The starting ASCII character id to be drawable. (Default 32)
* @param endChar
* The ending ASCII character id to be drawable. (Default 126)
*/
public CustomFont(Minecraft mc, Object font, int size, int startChar, int endChar)
{
@@ -128,17 +133,22 @@ public class CustomFont
// Render the finished bitmap into the Minecraft
// graphics engine.
// Sadly broken by 1.6
//texID = mc.renderEngine.allocateAndSetupTexture(img);
// texID = mc.renderEngine.allocateAndSetupTexture(img);
}
/**
* Draws a given string with an automatically
* calculated shadow below it.
* @param gui The gui/subclass to be drawn on
* @param text The string to be drawn
* @param x The x position to start drawing
* @param y The y position to start drawing
* @param color The color of the non-shadowed text (Hex)
* Draws a given string with an automatically calculated shadow below it.
*
* @param gui
* The gui/subclass to be drawn on
* @param text
* The string to be drawn
* @param x
* The x position to start drawing
* @param y
* The y position to start drawing
* @param color
* The color of the non-shadowed text (Hex)
*/
public void drawStringS (Gui gui, String text, int x, int y, int color)
{
@@ -151,17 +161,23 @@ public class CustomFont
/**
* Draws a given string onto a gui/subclass.
* @param gui The gui/subclass to be drawn on
* @param text The string to be drawn
* @param x The x position to start drawing
* @param y The y position to start drawing
* @param color The color of the non-shadowed text (Hex)
*
* @param gui
* The gui/subclass to be drawn on
* @param text
* The string to be drawn
* @param x
* The x position to start drawing
* @param y
* The y position to start drawing
* @param color
* The color of the non-shadowed text (Hex)
*/
public void drawString (Gui gui, String text, int x, int y, int color)
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glEnable(3553 /*GL_TEXTURE_2D*/);
GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, texID);
GL11.glEnable(3553 /* GL_TEXTURE_2D */);
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, texID);
float red = (float) (color >> 16 & 0xff) / 255F;
float green = (float) (color >> 8 & 0xff) / 255F;
float blue = (float) (color & 0xff) / 255F;
@@ -188,9 +204,9 @@ public class CustomFont
}
/**
* Returns the created FontMetrics
* which is used to retrive various
* Returns the created FontMetrics which is used to retrive various
* information about the True Type Font
*
* @return FontMetrics of the created font.
*/
public FontMetrics getMetrics ()
@@ -199,9 +215,10 @@ public class CustomFont
}
/**
* Gets the drawing width of a given
* string of string.
* @param text The string to be measured
* Gets the drawing width of a given string of string.
*
* @param text
* The string to be measured
* @return The width of the given string.
*/
public int getStringWidth (String text)
@@ -210,9 +227,10 @@ public class CustomFont
}
/**
* Gets the drawing height of a given
* string of string.
* @param text The string to be measured
* Gets the drawing height of a given string of string.
*
* @param text
* The string to be measured
* @return The height of the given string.
*/
public int getStringHeight (String text)
@@ -221,12 +239,13 @@ public class CustomFont
}
/**
* A method that returns a Rectangle that
* contains the width and height demensions
* of the given string.
* @param text The string to be measured
* @return Rectangle containing width and height that
* the text will consume when drawn.
* A method that returns a Rectangle that contains the width and height
* demensions of the given string.
*
* @param text
* The string to be measured
* @return Rectangle containing width and height that the text will consume
* when drawn.
*/
private Rectangle getBounds (String text)
{
@@ -259,8 +278,7 @@ public class CustomFont
}
/**
* Private drawing method used within other
* drawing methods.
* Private drawing method used within other drawing methods.
*/
private void drawChar (Gui gui, char c, int x, int y)
{
@@ -47,12 +47,13 @@ public class TClientEvents
initSounds = true;
try
{
/* SoundManager soundmanager = event.manager;
soundmanager.addSound("tinker:frypan_hit.ogg");
soundmanager.addSound("tinker:little_saw.ogg");
soundmanager.addSound("tinker:launcher_clank.ogg");
TConstruct.logger.info("Successfully loaded sounds.");
*/
/*
* SoundManager soundmanager = event.manager;
* soundmanager.addSound("tinker:frypan_hit.ogg");
* soundmanager.addSound("tinker:little_saw.ogg");
* soundmanager.addSound("tinker:launcher_clank.ogg");
* TConstruct.logger.info("Successfully loaded sounds.");
*/
}
catch (Exception e)
{
@@ -92,8 +93,8 @@ public class TClientEvents
private static final ResourceLocation hearts = new ResourceLocation("tinker", "textures/gui/newhearts.png");
private static final ResourceLocation icons = new ResourceLocation("textures/gui/icons.png");
//public static int left_height = 39;
//public static int right_height = 39;
// public static int left_height = 39;
// public static int right_height = 39;
Random rand = new Random();
int updateCounter = 0;
@@ -103,7 +104,8 @@ public class TClientEvents
@SubscribeEvent
public void renderHealthbar (RenderGameOverlayEvent.Pre event)
{
if (!Loader.isModLoaded("tukmc_Vz"))// Loader check to avoid conflicting with a GUI mod (thanks Vazkii!)
if (!Loader.isModLoaded("tukmc_Vz"))// Loader check to avoid conflicting
// with a GUI mod (thanks Vazkii!)
{
if (event.type == ElementType.HEALTH)
{
@@ -171,25 +173,25 @@ public class TClientEvents
if (highlight)
{
if (i * 2 + 1 < healthLast)
drawTexturedModalRect(x, y, MARGIN + 54, TOP, 9, 9); //6
drawTexturedModalRect(x, y, MARGIN + 54, TOP, 9, 9); // 6
else if (i * 2 + 1 == healthLast)
drawTexturedModalRect(x, y, MARGIN + 63, TOP, 9, 9); //7
drawTexturedModalRect(x, y, MARGIN + 63, TOP, 9, 9); // 7
}
if (absorbRemaining > 0.0F)
{
if (absorbRemaining == absorb && absorb % 2.0F == 1.0F)
drawTexturedModalRect(x, y, MARGIN + 153, TOP, 9, 9); //17
drawTexturedModalRect(x, y, MARGIN + 153, TOP, 9, 9); // 17
else
drawTexturedModalRect(x, y, MARGIN + 144, TOP, 9, 9); //16
drawTexturedModalRect(x, y, MARGIN + 144, TOP, 9, 9); // 16
absorbRemaining -= 2.0F;
}
else
{
if (i * 2 + 1 < health)
drawTexturedModalRect(x, y, MARGIN + 36, TOP, 9, 9); //4
drawTexturedModalRect(x, y, MARGIN + 36, TOP, 9, 9); // 4
else if (i * 2 + 1 == health)
drawTexturedModalRect(x, y, MARGIN + 45, TOP, 9, 9); //5
drawTexturedModalRect(x, y, MARGIN + 45, TOP, 9, 9); // 5
}
}
@@ -200,7 +202,7 @@ public class TClientEvents
if (potion != null)
return;
//Extra hearts
// Extra hearts
this.mc.getTextureManager().bindTexture(hearts);
int hp = MathHelper.ceiling_float_int(this.mc.thePlayer.getHealth());
@@ -248,43 +250,28 @@ public class TClientEvents
double zLevel = 0;
/*@SubscribeEvent
public void fovModifier(FOVUpdateEvent event)
{
float f = 1.0F;
if (event.entity.capabilities.isFlying)
{
f *= 1.1F;
}
if (event.entity.isUsingItem() && event.entity.getItemInUse().getItem() == Items.bow)
{
int i = event.entity.getItemInUseDuration();
float f1 = (float) i / 20.0F;
if (f1 > 1.0F)
{
f1 = 1.0F;
}
else
{
f1 *= f1;
}
f *= 1.0F - f1 * 0.15F;
}
event.newfov = f;
}*/
/*
* @SubscribeEvent public void fovModifier(FOVUpdateEvent event) { float f =
* 1.0F;
*
* if (event.entity.capabilities.isFlying) { f *= 1.1F; }
*
* if (event.entity.isUsingItem() && event.entity.getItemInUse().getItem()
* == Items.bow) { int i = event.entity.getItemInUseDuration(); float f1 =
* (float) i / 20.0F;
*
* if (f1 > 1.0F) { f1 = 1.0F; } else { f1 *= f1; }
*
* f *= 1.0F - f1 * 0.15F; } event.newfov = f; }
*/
/* Armor */
ModelBiped model = new ModelBiped(5f);
WingModel wings = new WingModel();
/*static
{
model.bipedHead.showModel = false;
}*/
/*
* static { model.bipedHead.showModel = false; }
*/
private float interpolateRotation (float par1, float par2, float par3)
{
@@ -33,10 +33,8 @@ public class TClientTickHandler
}
}
/* @Override
public EnumSet<TickType> ticks ()
{
return EnumSet.of(TickType.RENDER);
}
*/
/*
* @Override public EnumSet<TickType> ticks () { return
* EnumSet.of(TickType.RENDER); }
*/
}
+25 -33
View File
@@ -16,8 +16,8 @@ import cpw.mods.fml.common.gameevent.TickEvent.Type;
public class TControls extends TKeyHandler
{
//static KeyBinding grabKey = new KeyBinding("key.grab", 29);
//static KeyBinding stiltsKey = new KeyBinding("key.stilts", 46);
// static KeyBinding grabKey = new KeyBinding("key.grab", 29);
// static KeyBinding stiltsKey = new KeyBinding("key.stilts", 46);
public static KeyBinding armorKey = new KeyBinding("key.tarmor", 24, null);
public static KeyBinding refreshCapes = new KeyBinding("key.tcapes.reload", 88, null);
static KeyBinding jumpKey;
@@ -32,12 +32,12 @@ public class TControls extends TKeyHandler
int currentTab = 1;
//boolean onStilts = false;
// boolean onStilts = false;
public TControls()
{
super(new KeyBinding[] { armorKey, refreshCapes }, new boolean[] { false, false }, getVanillaKeyBindings(), new boolean[] { false, false });
//TConstruct.logger.info("Controls registered");
// TConstruct.logger.info("Controls registered");
}
private static KeyBinding[] getVanillaKeyBindings ()
@@ -53,11 +53,12 @@ public class TControls extends TKeyHandler
{
if (tickEnd && mc.theWorld != null)
{
if (kb == armorKey && mc.currentScreen == null) //Extended Armor
if (kb == armorKey && mc.currentScreen == null) // Extended Armor
{
openArmorGui();//mc.thePlayer.username);
openArmorGui();// mc.thePlayer.username);
}
if (kb == invKey && mc.currentScreen != null && mc.currentScreen.getClass() == GuiInventory.class)// && !mc.playerController.isInCreativeMode())
if (kb == invKey && mc.currentScreen != null && mc.currentScreen.getClass() == GuiInventory.class)// &&
// !mc.playerController.isInCreativeMode())
{
TabRegistry.addTabsToInventory((GuiContainer) mc.currentScreen);
}
@@ -65,7 +66,7 @@ public class TControls extends TKeyHandler
{
EventCloakRender.instance.refreshCapes();
}
if (kb == jumpKey) //Double jump
if (kb == jumpKey) // Double jump
{
if (mc.thePlayer.capabilities.isCreativeMode)
return;
@@ -88,29 +89,19 @@ public class TControls extends TKeyHandler
jumping = mc.thePlayer.isAirBorne;
}
}
/*else if (kb == stiltsKey) //Stilts
{
float size = 1.8F;
if (!onStilts)
size = 0.8F;
TConstruct.playerTracker.updateSize(mc.thePlayer.username, size);
onStilts = !onStilts;
//updateServer(mc.thePlayer.username, (byte) 11);
if (onStilts)
{
onStilts = false;
}
else
{
onStilts = true;
}
}*/
/*
* else if (kb == stiltsKey) //Stilts { float size = 1.8F; if
* (!onStilts) size = 0.8F;
* TConstruct.playerTracker.updateSize(mc.thePlayer.username, size);
* onStilts = !onStilts; //updateServer(mc.thePlayer.username, (byte)
* 11); if (onStilts) { onStilts = false; } else { onStilts = true; } }
*/
}
@Override
public void keyUp (Type types, KeyBinding kb, boolean tickEnd)
{
//landOnGround();
// landOnGround();
}
public void landOnGround ()
@@ -216,14 +207,15 @@ public class TControls extends TKeyHandler
static void updateServer (ByteArrayOutputStream bos)
{
/*Packet250CustomPayload packet = new Packet250CustomPayload();
packet.channel = "TConstruct";
packet.data = bos.toByteArray();
packet.length = bos.size();
/*
* Packet250CustomPayload packet = new Packet250CustomPayload();
* packet.channel = "TConstruct"; packet.data = bos.toByteArray();
* packet.length = bos.size();
*
* PacketDispatcher.sendPacketToServer(packet);
*/
PacketDispatcher.sendPacketToServer(packet);*/
//TODO Find out what packet should be used here
// TODO Find out what packet should be used here
TConstruct.packetPipeline.sendToServer(new PacketDoubleJump());
}
@@ -24,7 +24,7 @@ public abstract class TKeyHandler
/**
* Pass an array of keybindings and a repeat flag for each one
*
*
* @param keyBindings
* @param repeatings
*/
@@ -40,9 +40,9 @@ public abstract class TKeyHandler
}
/**
* Register the keys into the system. You will do your own keyboard management elsewhere. No events will fire
* if you use this method
*
* Register the keys into the system. You will do your own keyboard
* management elsewhere. No events will fire if you use this method
*
* @param keyBindings
*/
public TKeyHandler(KeyBinding[] keyBindings)
@@ -116,24 +116,30 @@ public abstract class TKeyHandler
}
/**
* Called when the key is first in the down position on any tick from the {@link #ticks()}
* set. Will be called subsequently with isRepeat set to true
*
* Called when the key is first in the down position on any tick from the
* {@link #ticks()} set. Will be called subsequently with isRepeat set to
* true
*
* @see #keyUp(EnumSet, KeyBinding, boolean)
*
* @param types the type(s) of tick that fired when this key was first down
* @param tickEnd was it an end or start tick which fired the key
* @param isRepeat is it a repeat key event
*
* @param types
* the type(s) of tick that fired when this key was first down
* @param tickEnd
* was it an end or start tick which fired the key
* @param isRepeat
* is it a repeat key event
*/
public abstract void keyDown (Type types, KeyBinding kb, boolean tickEnd, boolean isRepeat);
/**
* Fired once when the key changes state from down to up
*
*
* @see #keyDown(EnumSet, KeyBinding, boolean, boolean)
*
* @param types the type(s) of tick that fired when this key was first down
* @param tickEnd was it an end or start tick which fired the key
*
* @param types
* the type(s) of tick that fired when this key was first down
* @param tickEnd
* was it an end or start tick which fired the key
*/
public abstract void keyUp (Type types, KeyBinding kb, boolean tickEnd);
@@ -219,7 +219,7 @@ public class TProxyClient extends TProxyCommon
tessellator.draw();
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 1.0F, 0.0F);
renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, getIcon(block.getIcon(1, meta)));//block.getIcon(1, meta));
renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, getIcon(block.getIcon(1, meta)));// block.getIcon(1, meta));
tessellator.draw();
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 0.0F, -1F);
@@ -597,12 +597,12 @@ public class TProxyClient extends TProxyCommon
MantleClientRegistry.registerManualLargeRecipe("smelterybasin", new ItemStack(TRepo.searedBlock, 1, 2), searedbrick, null, searedbrick, searedbrick, null, searedbrick, searedbrick,
searedbrick, searedbrick);
//Traps
// Traps
ItemStack reed = new ItemStack(Items.sugar);
MantleClientRegistry.registerManualLargeRecipe("punji", new ItemStack(TRepo.punji), reed, null, reed, null, reed, null, reed, null, reed);
MantleClientRegistry.registerManualSmallRecipe("barricade", new ItemStack(TRepo.barricadeOak), null, log, null, log);
//Machines
// Machines
ItemStack alubrassIngot = new ItemStack(TRepo.materials, 1, 14);
ItemStack bronzeIngot = new ItemStack(TRepo.materials, 1, 13);
ItemStack blankCast = new ItemStack(TRepo.blankPattern, 1, 1);
@@ -1034,7 +1034,8 @@ public class TProxyClient extends TProxyCommon
@Override
public void postInit ()
{
//MinecraftForgeClient.registerItemRenderer(TRepo.armorPattern.itemID, new RenderArmorCast());
// MinecraftForgeClient.registerItemRenderer(TRepo.armorPattern.itemID,
// new RenderArmorCast());
}
private static IIcon getIcon (IIcon icon)
@@ -52,7 +52,7 @@ public class ToolCoreRenderer implements IItemRenderer
if (data.length > 1)
ent = (Entity) data[1];
int iconParts = toolIcons;//tool.getRenderPasses(item.getItemDamage());
int iconParts = toolIcons;// tool.getRenderPasses(item.getItemDamage());
IIcon[] tempParts = new IIcon[iconParts];
label:
@@ -78,7 +78,8 @@ public class ToolCoreRenderer implements IItemRenderer
for (int i = 0; i < iconParts; ++i)
{
IIcon part = tempParts[i];
if (part == null)// || part == ToolCore.blankSprite | part == ToolCore.emptyIcon)
if (part == null)// || part == ToolCore.blankSprite | part ==
// ToolCore.emptyIcon)
++count;
else
parts[i - count] = part;
@@ -24,16 +24,17 @@ public class WingModel extends ModelBase
textureWidth = 64;
textureHeight = 64;
//Right Wing
// Right Wing
WingBaseRight = new ModelRenderer(this, 0, 41);
WingBaseRight.addBox(-0.5F, -1F, 0F, 1, 2, 10);
WingBaseRight.setRotationPoint(-1F, 1F, 0F);
setRotation(WingBaseRight, 0.5235988F, -0.5235988F, 0F);
WingEdgeRight = new ModelRenderer(this, 0, 53); //Texture position
WingEdgeRight.addBox(0F, 0F, -2F, 1, 9, 2); //Offset, Size
WingEdgeRight.setRotationPoint(-0.502F, -1F, 10F); //Negative x, y - 1, Position
setRotation(WingEdgeRight, 0.5235988F, 0F, 0F); //Angle in radians
WingEdgeRight = new ModelRenderer(this, 0, 53); // Texture position
WingEdgeRight.addBox(0F, 0F, -2F, 1, 9, 2); // Offset, Size
WingEdgeRight.setRotationPoint(-0.502F, -1F, 10F); // Negative x, y - 1,
// Position
setRotation(WingEdgeRight, 0.5235988F, 0F, 0F); // Angle in radians
WingInsetRight = new ModelRenderer(this, 6, 53);
WingInsetRight.addBox(0F, 0F, -1F, 1, 9, 2);
@@ -61,7 +62,7 @@ public class WingModel extends ModelBase
WingBaseRight.addChild(WingFlangeRight);
WingBaseRight.addChild(WingAuxRight);
//Left Wing
// Left Wing
WingBaseLeft = new ModelRenderer(this, 42, 41);
WingBaseLeft.addBox(-0.5F, -1F, 0F, 1, 2, 10);
WingBaseLeft.setRotationPoint(1F, 1F, 0F);
@@ -26,8 +26,8 @@ public class BarricadeRender implements ISimpleBlockRenderingHandler
if (meta / 4 == 0)
{
//if (type >= 0)
//TODO setRenderBounds
// if (type >= 0)
// TODO setRenderBounds
renderer.setRenderBounds(0.125, 0.0, 0.5, 0.375, 1.0, 0.75);
renderer.renderStandardBlock(barricade, x, y, z);
@@ -52,7 +52,7 @@ public class BarricadeRender implements ISimpleBlockRenderingHandler
if (meta / 4 == 1)
{
//if (type >= 0)
// if (type >= 0)
renderer.setRenderBounds(0.25, 0.0, 0.125, 0.5, 1.0, 0.375);
renderer.renderStandardBlock(barricade, x, y, z);
@@ -77,7 +77,7 @@ public class BarricadeRender implements ISimpleBlockRenderingHandler
if (meta / 4 == 2)
{
//if (type >= 0)
// if (type >= 0)
renderer.setRenderBounds(0.125, 0.0, 0.25, 0.375, 1.0, 0.5);
renderer.renderStandardBlock(barricade, x, y, z);
@@ -102,7 +102,7 @@ public class BarricadeRender implements ISimpleBlockRenderingHandler
if (meta / 4 == 3)
{
//if (type >= 0)
// if (type >= 0)
renderer.setRenderBounds(0.5, 0.0, 0.125, 0.75, 1.0, 0.375);
renderer.renderStandardBlock(barricade, x, y, z);
@@ -25,27 +25,27 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
@Override
public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer)
{
//Floor
// Floor
renderer.setRenderBounds(0.3125D, 0.375D, 0.3125D, 0.6875D, 0.5D, 0.6875D);
this.renderStandardBlock(block, metadata, renderer);
//Channel Z-
// Channel Z-
renderer.setRenderBounds(0.3125D, 0.375D, 0D, 0.6875D, 0.5D, 0.3125D);
this.renderStandardBlock(block, metadata, renderer);
renderer.setRenderBounds(0.3125D, 0.5D, 0D, 0.375D, 0.625D, 0.3125D);
this.renderStandardBlock(block, metadata, renderer);
renderer.setRenderBounds(0.625D, 0.5D, 0D, 0.6875D, 0.625D, 0.3125D);
this.renderStandardBlock(block, metadata, renderer);
//Channel Z+
// Channel Z+
renderer.setRenderBounds(0.3125D, 0.375D, 0.6875D, 0.6875D, 0.5D, 1D);
this.renderStandardBlock(block, metadata, renderer);
renderer.setRenderBounds(0.3125D, 0.5D, 0.6875D, 0.375D, 0.625D, 1D);
this.renderStandardBlock(block, metadata, renderer);
renderer.setRenderBounds(0.625D, 0.5D, 0.6875D, 0.6875D, 0.625D, 1D);
this.renderStandardBlock(block, metadata, renderer);
//Wall X-
// Wall X-
renderer.setRenderBounds(0.3125D, 0.375D, 0.3125D, 0.375D, 0.625D, 0.6875D);
this.renderStandardBlock(block, metadata, renderer);
//Wall X+
// Wall X+
renderer.setRenderBounds(0.625D, 0.375D, 0.3125D, 0.6875D, 0.625D, 0.6875D);
this.renderStandardBlock(block, metadata, renderer);
}
@@ -57,13 +57,16 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
{
CastingChannelLogic tile = (CastingChannelLogic) world.getTileEntity(x, y, z);
if (!tile.hasTankConnected(ForgeDirection.DOWN))//CentrePiece, floor is removed if tank below is found
if (!tile.hasTankConnected(ForgeDirection.DOWN))// CentrePiece,
// floor is removed
// if tank below is
// found
{
renderer.setRenderBounds(0.3125D, 0.375D, 0.3125D, 0.6875D, 0.5D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
}
else
//"Guiding Borders" when tank below is found
// "Guiding Borders" when tank below is found
{
renderer.setRenderBounds(0.375D, 0.125D, 0.3125D, 0.625D, 0.5D, 0.375D);
renderer.renderStandardBlock(block, x, y, z);
@@ -74,15 +77,17 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.625D, 0.125D, 0.3125D, 0.6875D, 0.5D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
}
/*renderer.setRenderBounds(0.3125D, 0.375D, 0.3125D, 0.375D, 0.625D, 0.375D);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.3125D, 0.375D, 0.625D, 0.375D, 0.625D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.625D, 0.375D, 0.3125D, 0.6875D, 0.625D, 0.375D);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.625D, 0.375D, 0.625D, 0.6875D, 0.625D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);*/
if (tile.hasTankConnected(ForgeDirection.NORTH))//Channel to Z-
/*
* renderer.setRenderBounds(0.3125D, 0.375D, 0.3125D, 0.375D,
* 0.625D, 0.375D); renderer.renderStandardBlock(block, x, y, z);
* renderer.setRenderBounds(0.3125D, 0.375D, 0.625D, 0.375D, 0.625D,
* 0.6875D); renderer.renderStandardBlock(block, x, y, z);
* renderer.setRenderBounds(0.625D, 0.375D, 0.3125D, 0.6875D,
* 0.625D, 0.375D); renderer.renderStandardBlock(block, x, y, z);
* renderer.setRenderBounds(0.625D, 0.375D, 0.625D, 0.6875D, 0.625D,
* 0.6875D); renderer.renderStandardBlock(block, x, y, z);
*/
if (tile.hasTankConnected(ForgeDirection.NORTH))// Channel to Z-
{
renderer.setRenderBounds(0.3125D, 0.375D, 0D, 0.6875D, 0.5D, 0.3125D);
renderer.renderStandardBlock(block, x, y, z);
@@ -92,13 +97,13 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
renderer.renderStandardBlock(block, x, y, z);
}
else
//Wall to Z-
// Wall to Z-
{
renderer.setRenderBounds(0.375D, 0.5D, 0.3125D, 0.625D, 0.625D, 0.375D);
renderer.renderStandardBlock(block, x, y, z);
}
if (tile.hasTankConnected(ForgeDirection.SOUTH))//Channel to Z+
if (tile.hasTankConnected(ForgeDirection.SOUTH))// Channel to Z+
{
renderer.setRenderBounds(0.3125D, 0.375D, 0.6875D, 0.6875D, 0.5D, 1D);
renderer.renderStandardBlock(block, x, y, z);
@@ -108,13 +113,13 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
renderer.renderStandardBlock(block, x, y, z);
}
else
//Wall to Z+
// Wall to Z+
{
renderer.setRenderBounds(0.375D, 0.5D, 0.625D, 0.625D, 0.625D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
}
if (tile.hasTankConnected(ForgeDirection.WEST))//Channel to X-
if (tile.hasTankConnected(ForgeDirection.WEST))// Channel to X-
{
renderer.setRenderBounds(0D, 0.375D, 0.3125D, 0.3125D, 0.5D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
@@ -124,13 +129,13 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
renderer.renderStandardBlock(block, x, y, z);
}
else
//Wall to X-
// Wall to X-
{
renderer.setRenderBounds(0.3125D, 0.5D, 0.3125D, 0.375D, 0.625D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
}
if (tile.hasTankConnected(ForgeDirection.EAST))//Channel to X+
if (tile.hasTankConnected(ForgeDirection.EAST))// Channel to X+
{
renderer.setRenderBounds(0.6875D, 0.375D, 0.3125D, 1D, 0.5D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
@@ -140,7 +145,7 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
renderer.renderStandardBlock(block, x, y, z);
}
else
//Wall to X+
// Wall to X+
{
renderer.setRenderBounds(0.625D, 0.5D, 0.3125D, 0.6875D, 0.625D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
@@ -151,12 +156,13 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
float height = tile.getLiquidAmount() / (tile.getCapacity() * 1.05F);
float j = tile.liquid.amount / tile.fillMax;
double startY = tile.tankBelow();
//if(tile.nearbyChannel(ForgeDirection.DOWN))startY = -0.5D;
//else if(tile.hasTankConnected(ForgeDirection.DOWN))startY = 0D;
// if(tile.nearbyChannel(ForgeDirection.DOWN))startY = -0.5D;
// else if(tile.hasTankConnected(ForgeDirection.DOWN))startY =
// 0D;
float liquidAmount = tile.liquid.amount / 288f * 0.125f;
renderer.setRenderBounds(0.375D, startY, 0.375D, 0.625D, 0.5 + liquidAmount, 0.625D); //Center
renderer.setRenderBounds(0.375D, startY, 0.375D, 0.625D, 0.5 + liquidAmount, 0.625D); // Center
renderLiquidPart(world, x, y, z, block, renderer, tile);
//TConstruct.logger.info(tile.recentlyFilledDelay);
// TConstruct.logger.info(tile.recentlyFilledDelay);
if (tile.hasTankConnected(ForgeDirection.NORTH))
{
@@ -223,84 +229,71 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
}
}
/*if(tile.lastProvider==ForgeDirection.UP && tile.recentlyFilledDelay != 0)
{
renderer.setRenderBounds(0.375D, 0.5D, 0.375D, 0.625D, 1D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}*/
/*
* if(tile.lastProvider==ForgeDirection.UP &&
* tile.recentlyFilledDelay != 0) {
* renderer.setRenderBounds(0.375D, 0.5D, 0.375D, 0.625D, 1D,
* 0.625D); renderLiquidPart(world, x, y, z, block, renderer,
* tile); }
*/
/*if(tile.hasTankConnected(ForgeDirection.NORTH)&&tile.lastProvider!=ForgeDirection.NORTH)//Channel to Z-
{
if(tile.recentlyFilledDelay == 0 || tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0.375D, 0.5D, 0D, 0.625D, 0.625D, 0.375D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
if(tile.recentlyFilledDelay != 0 && tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
}
if(tile.hasTankConnected(ForgeDirection.SOUTH)&&tile.lastProvider!=ForgeDirection.SOUTH)//Channel to Z+
{
if(tile.recentlyFilledDelay == 0 || tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0.375D, 0.5D, 0.625D, 0.625D, 0.625D, 1D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
if(tile.recentlyFilledDelay != 0 && tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
}
if(tile.hasTankConnected(ForgeDirection.WEST)&&tile.lastProvider!=ForgeDirection.WEST)//Channel to X-
{
if(tile.recentlyFilledDelay == 0 || tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0D, 0.5D, 0.375D, 0.375D, 0.625D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
if(tile.recentlyFilledDelay != 0 && tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
}
if(tile.hasTankConnected(ForgeDirection.EAST)&&tile.lastProvider!=ForgeDirection.EAST)//Channel to X+
{
if(tile.recentlyFilledDelay == 0 || tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0.625D, 0.5D, 0.375D, 1D, 0.625D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
if(tile.recentlyFilledDelay != 0 && tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
}
if(tile.lastProvider==ForgeDirection.NORTH && tile.recentlyFilledDelay != 0)
{
renderer.setRenderBounds(0.375D, 0.5D, 0.625D, 0.625D, 0.625D, 1D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
if(tile.lastProvider==ForgeDirection.SOUTH && tile.recentlyFilledDelay != 0)
{
renderer.setRenderBounds(0.375D, 0.5D, 0D, 0.625D, 0.625D, 0.375D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
if(tile.lastProvider==ForgeDirection.WEST && tile.recentlyFilledDelay != 0)
{
renderer.setRenderBounds(0.625D, 0.5D, 0.375D, 1D, 0.625D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
if(tile.lastProvider==ForgeDirection.EAST && tile.recentlyFilledDelay != 0)
{
renderer.setRenderBounds(0D, 0.5D, 0.375D, 0.375D, 0.625D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}*/
/*
* if(tile.hasTankConnected(ForgeDirection.NORTH)&&tile.lastProvider
* !=ForgeDirection.NORTH)//Channel to Z- {
* if(tile.recentlyFilledDelay == 0 || tile.lastProvider ==
* ForgeDirection.UP) { renderer.setRenderBounds(0.375D, 0.5D,
* 0D, 0.625D, 0.625D, 0.375D); renderLiquidPart(world, x, y, z,
* block, renderer, tile); } if(tile.recentlyFilledDelay != 0 &&
* tile.lastProvider == ForgeDirection.UP) {
* renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D,
* 0.625D); renderLiquidPart(world, x, y, z, block, renderer,
* tile); } }
* if(tile.hasTankConnected(ForgeDirection.SOUTH)&&tile
* .lastProvider!=ForgeDirection.SOUTH)//Channel to Z+ {
* if(tile.recentlyFilledDelay == 0 || tile.lastProvider ==
* ForgeDirection.UP) { renderer.setRenderBounds(0.375D, 0.5D,
* 0.625D, 0.625D, 0.625D, 1D); renderLiquidPart(world, x, y, z,
* block, renderer, tile); } if(tile.recentlyFilledDelay != 0 &&
* tile.lastProvider == ForgeDirection.UP) {
* renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D,
* 0.625D); renderLiquidPart(world, x, y, z, block, renderer,
* tile); } }
* if(tile.hasTankConnected(ForgeDirection.WEST)&&tile
* .lastProvider!=ForgeDirection.WEST)//Channel to X- {
* if(tile.recentlyFilledDelay == 0 || tile.lastProvider ==
* ForgeDirection.UP) { renderer.setRenderBounds(0D, 0.5D,
* 0.375D, 0.375D, 0.625D, 0.625D); renderLiquidPart(world, x,
* y, z, block, renderer, tile); } if(tile.recentlyFilledDelay
* != 0 && tile.lastProvider == ForgeDirection.UP) {
* renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D,
* 0.625D); renderLiquidPart(world, x, y, z, block, renderer,
* tile); } }
* if(tile.hasTankConnected(ForgeDirection.EAST)&&tile
* .lastProvider!=ForgeDirection.EAST)//Channel to X+ {
* if(tile.recentlyFilledDelay == 0 || tile.lastProvider ==
* ForgeDirection.UP) { renderer.setRenderBounds(0.625D, 0.5D,
* 0.375D, 1D, 0.625D, 0.625D); renderLiquidPart(world, x, y, z,
* block, renderer, tile); } if(tile.recentlyFilledDelay != 0 &&
* tile.lastProvider == ForgeDirection.UP) {
* renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D,
* 0.625D); renderLiquidPart(world, x, y, z, block, renderer,
* tile); } } if(tile.lastProvider==ForgeDirection.NORTH &&
* tile.recentlyFilledDelay != 0) {
* renderer.setRenderBounds(0.375D, 0.5D, 0.625D, 0.625D,
* 0.625D, 1D); renderLiquidPart(world, x, y, z, block,
* renderer, tile); } if(tile.lastProvider==ForgeDirection.SOUTH
* && tile.recentlyFilledDelay != 0) {
* renderer.setRenderBounds(0.375D, 0.5D, 0D, 0.625D, 0.625D,
* 0.375D); renderLiquidPart(world, x, y, z, block, renderer,
* tile); } if(tile.lastProvider==ForgeDirection.WEST &&
* tile.recentlyFilledDelay != 0) {
* renderer.setRenderBounds(0.625D, 0.5D, 0.375D, 1D, 0.625D,
* 0.625D); renderLiquidPart(world, x, y, z, block, renderer,
* tile); } if(tile.lastProvider==ForgeDirection.EAST &&
* tile.recentlyFilledDelay != 0) { renderer.setRenderBounds(0D,
* 0.5D, 0.375D, 0.375D, 0.625D, 0.625D);
* renderLiquidPart(world, x, y, z, block, renderer, tile); }
*/
}
}
@@ -13,7 +13,7 @@ public class BlockSkinRenderHelper
{
public static boolean renderMetadataBlock (Block block, int metadata, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
{
//TODO CHECK THESE!!!!
// TODO CHECK THESE!!!!
int var5 = block.colorMultiplier(world, x, y, z);
float var6 = (float) (var5 >> 16 & 255) / 255.0F;
float var7 = (float) (var5 >> 8 & 255) / 255.0F;
@@ -52,7 +52,7 @@ public class CastingBasinSpecialRender extends TileEntitySpecialRenderer
entityitem.hoverStart = 0.0F;
GL11.glPushMatrix();
GL11.glTranslatef(1F, 0.675F, 1.0F);
//GL11.glRotatef(90F, 1, 0F, 0F);
// GL11.glRotatef(90F, 1, 0F, 0F);
GL11.glScalef(1.75F, 1.75F, 1.75F);
if (stack.getItem() instanceof ItemBlock)
{
@@ -23,7 +23,7 @@ public class CastingTableSpecialRenderer extends TileEntitySpecialRenderer
@Override
public void renderTileEntityAt (TileEntity logic, double var2, double var4, double var6, float var8)
{
//TConstruct.logger.info("Render!!!");
// TConstruct.logger.info("Render!!!");
this.render((CastingTableLogic) logic, var2, var4, var6, var8);
}
@@ -69,7 +69,7 @@ public class DryingRackSpecialRender extends TileEntitySpecialRenderer
GL11.glScalef(2F, 2F, 2F);
if (stack.getItem() instanceof ItemBlock)
{
//GL11.glRotatef(90F, -1, 0F, 0F);
// GL11.glRotatef(90F, -1, 0F, 0F);
GL11.glTranslatef(0F, 0.2125F, 0.0375F);
}
@@ -13,7 +13,7 @@ public class FrypanRender implements ISimpleBlockRenderingHandler
@Override
public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer)
{
//Inventory should be an item. This is not here!
// Inventory should be an item. This is not here!
}
@Override
@@ -29,8 +29,8 @@ public class FrypanRender implements ISimpleBlockRenderingHandler
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.125F, 0.125F, 0.0F, 0.875F, 0.25F, 0.125F);
renderer.renderStandardBlock(block, x, y, z);
// renderer.setRenderBounds(1F, 0.0F, 0.4375F, 2F, 0.125F, 0.5625F);
// renderer.renderStandardBlock(block, x, y, z);
// renderer.setRenderBounds(1F, 0.0F, 0.4375F, 2F, 0.125F, 0.5625F);
// renderer.renderStandardBlock(block, x, y, z);
renderHandle(world, x, y, z, block, renderer);
return true;
}
@@ -47,11 +47,11 @@ public class PaneConnectedRender implements ISimpleBlockRenderingHandler
}
else
{
// renderer.setRenderBounds(0.45D, 0D, 0.45D, 0.55D, 1D, 0.55D);
// renderer.renderStandardBlock(block, x, y, z);
// renderer.setRenderBounds(0.45D, 0D, 0.45D, 0.55D, 1D, 0.55D);
// renderer.renderStandardBlock(block, x, y, z);
}
// renderer.setOverrideBlockTexture(sideTexture);
// renderer.setOverrideBlockTexture(sideTexture);
if (flag)
{
@@ -96,27 +96,22 @@ public class PaneRender implements ISimpleBlockRenderingHandler
double d8 = (double) icon1.getInterpolatedV(8.0D);
double d9 = (double) icon1.getMaxV();
/*int blockTextureIndex;
int blockSideIndex;
int j1 = iblockaccess.getBlockMetadata(x, y, z);
blockTextureIndex = pane.getBlockTextureFromSideAndMetadata(0, j1);
blockSideIndex = pane.getSideTextureIndex(j1);
int k1 = (blockTextureIndex & 0xf) << 4;
int j2 = blockTextureIndex & 0xf0;
double d = (float) k1 / 256F;
double d1 = ((float) k1 + 7.99F) / 256F;
double d2 = ((float) k1 + 15.99F) / 256F;
double d3 = (float) j2 / 256F;
double d4 = ((float) j2 + 15.99F) / 256F;
int k2 = (blockSideIndex & 0xf) << 4;
int l2 = blockSideIndex & 0xf0;
double d5 = (float) (k2 + 7) / 256F;
double d6 = ((float) k2 + 8.99F) / 256F;
double d7 = (float) l2 / 256F;
double d8 = (float) (l2 + 8) / 256F;
double d9 = ((float) l2 + 15.99F) / 256F;*/
/*
* int blockTextureIndex; int blockSideIndex;
*
* int j1 = iblockaccess.getBlockMetadata(x, y, z); blockTextureIndex =
* pane.getBlockTextureFromSideAndMetadata(0, j1); blockSideIndex =
* pane.getSideTextureIndex(j1);
*
* int k1 = (blockTextureIndex & 0xf) << 4; int j2 = blockTextureIndex &
* 0xf0; double d = (float) k1 / 256F; double d1 = ((float) k1 + 7.99F)
* / 256F; double d2 = ((float) k1 + 15.99F) / 256F; double d3 = (float)
* j2 / 256F; double d4 = ((float) j2 + 15.99F) / 256F; int k2 =
* (blockSideIndex & 0xf) << 4; int l2 = blockSideIndex & 0xf0; double
* d5 = (float) (k2 + 7) / 256F; double d6 = ((float) k2 + 8.99F) /
* 256F; double d7 = (float) l2 / 256F; double d8 = (float) (l2 + 8) /
* 256F; double d9 = ((float) l2 + 15.99F) / 256F;
*/
double xBot = x;
double xMid = (double) x + 0.5D;
@@ -52,24 +52,20 @@ public class PunjiRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.75, 0.0, 0.125, 0.875, 0.375f, 0.25);
renderer.renderStandardBlock(block, x, y, z);
}
/*if (metadata == 5)
{
renderer.setRenderBounds(0.0F, 0.0, 0.0F, 1.0F, 0.875F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
}
else
{
renderer.setRenderBounds(0.0F, 0.75F, 0.0F, 1.0F, 1.0F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.25F, 0.75F, 0.25F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.75F, 0.0F, 0.0F, 1.0F, 0.75F, 0.25F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.0F, 0.0F, 0.75F, 0.25F, 0.75F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.75F, 0.0F, 0.75F, 1.0F, 0.75F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
}*/
/*
* if (metadata == 5) { renderer.setRenderBounds(0.0F, 0.0, 0.0F,
* 1.0F, 0.875F, 1.0F); renderer.renderStandardBlock(block, x, y,
* z); } else { renderer.setRenderBounds(0.0F, 0.75F, 0.0F, 1.0F,
* 1.0F, 1.0F); renderer.renderStandardBlock(block, x, y, z);
* renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.25F, 0.75F, 0.25F);
* renderer.renderStandardBlock(block, x, y, z);
* renderer.setRenderBounds(0.75F, 0.0F, 0.0F, 1.0F, 0.75F, 0.25F);
* renderer.renderStandardBlock(block, x, y, z);
* renderer.setRenderBounds(0.0F, 0.0F, 0.75F, 0.25F, 0.75F, 1.0F);
* renderer.renderStandardBlock(block, x, y, z);
* renderer.setRenderBounds(0.75F, 0.0F, 0.75F, 1.0F, 0.75F, 1.0F);
* renderer.renderStandardBlock(block, x, y, z); }
*/
}
return true;
}
@@ -14,7 +14,7 @@ import cpw.mods.fml.client.registry.RenderingRegistry;
/**
*
* @author fuj1n
*
*
*/
public class RenderLandmine implements ISimpleBlockRenderingHandler
{
@@ -56,7 +56,7 @@ public class RenderLandmine implements ISimpleBlockRenderingHandler
ForgeDirection dir = Helper.convertMetaToForgeOrientation(i1);
//TConstruct.logger.info(i1 + " for " + dir);
// TConstruct.logger.info(i1 + " for " + dir);
switch (dir)
{
@@ -14,7 +14,7 @@ import net.minecraft.world.IBlockAccess;
*/
public class RenderLiquid
{//TODO CHECK THIS!!!!
{// TODO CHECK THIS!!!!
public static boolean renderMetadataBlock (Block block, int metadata, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
{
int var5 = block.colorMultiplier(world, x, y, z);
@@ -26,11 +26,11 @@ public class SearedRender implements ISimpleBlockRenderingHandler
{
if (metadata == 0)
{
//Top
// Top
renderer.setRenderBounds(0.0F, 0.625F, 0.0F, 1.0F, 0.9375F, 1.0F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
//Lip
// Lip
renderer.setRenderBounds(0.0F, 0.9375, 0.0F, 0.0625, 1.0, 1.0F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.0625, 0.9375, 0.9375, 0.9375, 1.0, 1.0F);
@@ -40,7 +40,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.0625, 0.9375, 0.0F, 0.9375, 1.0, 0.0625);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
//Legs
// Legs
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.3125F, 0.625F, 0.3125F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.6875, 0.0F, 0.0F, 1.0F, 0.625F, 0.25F);
@@ -65,7 +65,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.125F, 0.125f, 0.125F, 0.875F, 0.25F, 0.875F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
//Details
// Details
renderer.setRenderBounds(0.001f, 0.1245f, 0.001f, 0.1245f, 0.999f, 0.4375f);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.001f, 0.1245f, 0.5625f, 0.1245f, 0.999f, 0.999f);
@@ -102,7 +102,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.4375f, 0.1245f, 0.001f, 0.5625f, 0.25F, 0.1245f);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
//Legs
// Legs
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.3125F, 0.125, 0.3125F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.6875F, 0.0F, 0.0F, 1.0F, 0.125, 0.3125F);
@@ -112,7 +112,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.6875F, 0.0F, 0.6875F, 1.0F, 0.125, 1.0F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
//Outside
// Outside
renderer.setRenderBounds(0.0f, 0.125, 0f, 0.125, 1.0F, 1);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.875f, 0.125, 0f, 1, 1.0F, 1);
@@ -138,11 +138,11 @@ public class SearedRender implements ISimpleBlockRenderingHandler
int metadata = world.getBlockMetadata(x, y, z);
if (metadata == 0)
{
//Top
// Top
renderer.setRenderBounds(0.0F, 0.625F, 0.0F, 1.0F, 0.9375F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
//Lip
// Lip
renderer.setRenderBounds(0.0F, 0.9375, 0.0F, 0.0625, 1.0, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.0625, 0.9375, 0.9375, 0.9375, 1.0, 1.0F);
@@ -152,7 +152,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.0625, 0.9375, 0.0F, 0.9375, 1.0, 0.0625);
renderer.renderStandardBlock(block, x, y, z);
//Legs
// Legs
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.3125F, 0.625F, 0.3125F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.6875, 0.0F, 0.0F, 1.0F, 0.625F, 0.25F);
@@ -193,7 +193,8 @@ public class SearedRender implements ISimpleBlockRenderingHandler
float percent = (float) logic.getLiquidAmount() / (float) logic.getCapacity();
float height = percent * (maxHeight - minHeight);
//float height = logic.getLiquidAmount() / (logic.getCapacity() * 1.03F) / 16F;
// float height = logic.getLiquidAmount() /
// (logic.getCapacity() * 1.03F) / 16F;
renderer.setRenderBounds(minX, minHeight, minZ, maxX, minHeight + height, maxZ);
Fluid fluid = logic.liquid.getFluid();
@@ -218,7 +219,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.375, 0.375, 0.625, 0.625, 0.625, 1);
zMin = 0.5F;
//zMin = 0.625F;
// zMin = 0.625F;
break;
case 3:
renderer.setRenderBounds(0.25, 0.25, 0, 0.75, 0.375, 0.375);
@@ -278,7 +279,8 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(xMin, yMin, zMin, xMax, 0.625, zMax);
BlockSkinRenderHelper.renderLiquidBlock(fluid.getStillIcon(), fluid.getFlowingIcon(), x, y, z, renderer, world);
//float xMin = 0.375F, zMin = 0.375F, xMax = 0.625F, zMax = 0.625F;
// float xMin = 0.375F, zMin = 0.375F, xMax = 0.625F,
// zMax = 0.625F;
switch (logic.getRenderDirection())
{
case 3:
@@ -308,7 +310,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.125F, 0.125f, 0.125F, 0.875F, 0.25F, 0.875F);
renderer.renderStandardBlock(block, x, y, z);
//Outside
// Outside
renderer.setRenderBounds(0.0f, 0.125, 0f, 0.125, 1.0F, 1);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.875f, 0.125, 0f, 1, 1.0F, 1);
@@ -318,7 +320,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.125f, 0.125, 0.875f, 0.875f, 1.0F, 1);
renderer.renderStandardBlock(block, x, y, z);
//Details
// Details
renderer.setRenderBounds(0.001f, 0.1245f, 0.001f, 0.1245f, 0.999f, 0.4375f);
renderer.renderStandardBlock(block, x, y, z);
@@ -356,7 +358,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.4375f, 0.1245f, 0.001f, 0.5625f, 0.25F, 0.1245f);
renderer.renderStandardBlock(block, x, y, z);
//Legs
// Legs
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.3125F, 0.125, 0.3125F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.6875F, 0.0F, 0.0F, 1.0F, 0.125, 0.3125F);
@@ -366,7 +368,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.6875F, 0.0F, 0.6875F, 1.0F, 0.125, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
//Liquids
// Liquids
if (world.getTileEntity(x, y, z) instanceof CastingBasinLogic)
{
CastingBasinLogic logic = (CastingBasinLogic) world.getTileEntity(x, y, z);
@@ -398,7 +400,8 @@ public class SearedRender implements ISimpleBlockRenderingHandler
float percent = (float) logic.getLiquidAmount() / (float) logic.getCapacity();
float height = percent * (maxHeight - minHeight);
//float height = (logic.getLiquidAmount() / (logic.getCapacity() * 1.05F) * 0.6875F) / maxHeight;
// float height = (logic.getLiquidAmount() /
// (logic.getCapacity() * 1.05F) * 0.6875F) / maxHeight;
renderer.setRenderBounds(minX, minHeight, minZ, maxX, minHeight + height, maxZ);
Fluid fluid = logic.liquid.getFluid();
@@ -46,7 +46,7 @@ public class SlimeChannelRender implements ISimpleBlockRenderingHandler
Tessellator tessellator = Tessellator.instance;
int bMeta = world.getBlockMetadata(x, y, z);
IIcon iconStill = block.getIcon(1, bMeta);
float flowDir = (float) (bMeta / 8f * 2 * Math.PI); //Tau, radians
float flowDir = (float) (bMeta / 8f * 2 * Math.PI); // Tau, radians
double u1, u2, u3, u4, v1, v2, v3, v4;
@@ -87,19 +87,15 @@ public class SlimeChannelRender implements ISimpleBlockRenderingHandler
tessellator.addVertexWithUV(x + 1, y + 0.5, z + 0, u3, v3);
}
renderer.renderStandardBlock(block, x, y, z);
/*int direction = world.getBlockMetadata(x, y, z) % 4;
if (direction == 0)
renderer.uvRotateTop = 2;
if (direction == 1)
renderer.uvRotateTop = 1;
if (direction == 2)
renderer.uvRotateTop = 0;
if (direction == 3)
renderer.uvRotateTop = 3;
boolean flag = renderer.renderStandardBlock(block, x, y, z);
renderer.uvRotateTop = 0;
return flag;*/
/*
* int direction = world.getBlockMetadata(x, y, z) % 4; if (direction ==
* 0) renderer.uvRotateTop = 2; if (direction == 1) renderer.uvRotateTop
* = 1; if (direction == 2) renderer.uvRotateTop = 0; if (direction ==
* 3) renderer.uvRotateTop = 3;
*
* boolean flag = renderer.renderStandardBlock(block, x, y, z);
* renderer.uvRotateTop = 0; return flag;
*/
return true;
}
@@ -41,7 +41,7 @@ public class SlimePadRender implements ISimpleBlockRenderingHandler
float[] size (int meta)
{
//xMin, zMin, xMax, zMax
// xMin, zMin, xMax, zMax
switch (meta)
{
case 0:
@@ -47,7 +47,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
if (logic.validStructure)
{
int posX = logic.centerPos.x - 1, posY = logic.centerPos.y, posZ = logic.centerPos.z - 1;
//Melting
// Melting
if (logic.getSizeInventory() > 0)
{
for (int i = 0; i < logic.layers; i++)
@@ -56,7 +56,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
}
}
//Liquids
// Liquids
float base = 0F;
int yBase = 0;
int liquidBase = 0;
@@ -70,7 +70,8 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
liquidSize -= countSize;
float height = countSize > 20000 ? 1.0F : countSize / 20000F;
//renderer.setRenderBounds(0, base, 0, 1, height + base, 1);
// renderer.setRenderBounds(0, base, 0, 1, height + base,
// 1);
float renderBase = base;
float renderHeight = height + base;
base += height;
@@ -89,33 +90,27 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
else
BlockSkinRenderHelper.renderLiquidBlock(fluid.getStillIcon(), fluid.getFlowingIcon(), posX + i % 3, posY + yBase, posZ + i / 3, renderer, world);
}
/*if (liquid.itemID < 4096) //Block
{
Block liquidBlock = Block.blocksList[liquid.itemID];
for (int i = 0; i < 9; i++)
{
float minX = i % 3 == 0 ? -0.001F : 0F;
float minZ = i / 3 == 0 ? -0.001F : 0F;
float maxX = i % 3 == 2 ? 1.001F : 1F;
float maxZ = i / 3 == 2 ? 1.001F : 1F;
renderer.setRenderBounds(minX, renderBase, minZ, maxX, renderHeight, maxZ);
BlockSkinRenderHelper.renderMetadataBlock(liquidBlock, liquid.itemMeta, posX + i % 3, posY + yBase, posZ + i / 3, renderer, world);
}
}
else
//Item
{
Item liquidItem = Item.itemsList[liquid.itemID];
for (int i = 0; i < 9; i++)
{
float minX = i % 3 == 0 ? -0.001F : 0F;
float minZ = i / 3 == 0 ? -0.001F : 0F;
float maxX = i % 3 == 2 ? 1.001F : 1F;
float maxZ = i / 3 == 2 ? 1.001F : 1F;
renderer.setRenderBounds(minX, renderBase, minZ, maxX, renderHeight, maxZ);
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(liquid.itemMeta), posX, posY + yBase, posZ, renderer, world);
}
}*/
/*
* if (liquid.itemID < 4096) //Block { Block liquidBlock =
* Block.blocksList[liquid.itemID]; for (int i = 0; i < 9;
* i++) { float minX = i % 3 == 0 ? -0.001F : 0F; float minZ
* = i / 3 == 0 ? -0.001F : 0F; float maxX = i % 3 == 2 ?
* 1.001F : 1F; float maxZ = i / 3 == 2 ? 1.001F : 1F;
* renderer.setRenderBounds(minX, renderBase, minZ, maxX,
* renderHeight, maxZ);
* BlockSkinRenderHelper.renderMetadataBlock(liquidBlock,
* liquid.itemMeta, posX + i % 3, posY + yBase, posZ + i /
* 3, renderer, world); } } else //Item { Item liquidItem =
* Item.itemsList[liquid.itemID]; for (int i = 0; i < 9;
* i++) { float minX = i % 3 == 0 ? -0.001F : 0F; float minZ
* = i / 3 == 0 ? -0.001F : 0F; float maxX = i % 3 == 2 ?
* 1.001F : 1F; float maxZ = i / 3 == 2 ? 1.001F : 1F;
* renderer.setRenderBounds(minX, renderBase, minZ, maxX,
* renderHeight, maxZ);
* BlockSkinRenderHelper.renderFakeBlock
* (liquidItem.getIconFromDamage(liquid.itemMeta), posX,
* posY + yBase, posZ, renderer, world); } }
*/
if (countSize == room)
{
@@ -143,20 +138,21 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
float blockHeight = input.stackSize / (float) blockToRender.stackSize;
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, MathHelper.clamp_float(blockHeight, 0.01F, 1.0F), 1.0F);
//TODO is this needed???
//if (blockToRender.itemID < 4096) //Block
// TODO is this needed???
// if (blockToRender.itemID < 4096) //Block
// {
Block liquidBlock = BlockUtils.getBlockFromItemStack(blockToRender);
BlockSkinRenderHelper.renderMetadataBlock(liquidBlock, blockToRender.getItemDamage(), posX + i % 3, posY, posZ + i / 3, renderer, world);
//}
// }
/*else //No items, only blocks
//Item
{
Item liquidItem = Item.itemsList[blockToRender.itemID];
int metadata = blockToRender.getItemDamage();
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(metadata), posX + i % 3, posY, posZ + i / 3, renderer, world);
}*/
/*
* else //No items, only blocks //Item { Item liquidItem =
* Item.itemsList[blockToRender.itemID]; int metadata =
* blockToRender.getItemDamage();
* BlockSkinRenderHelper.renderFakeBlock
* (liquidItem.getIconFromDamage(metadata), posX + i % 3,
* posY, posZ + i / 3, renderer, world); }
*/
}
}
}
@@ -21,7 +21,7 @@ public class TankAirRender implements ISimpleBlockRenderingHandler
@Override
public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer)
{
//No inventory block
// No inventory block
}
@Override
@@ -47,7 +47,8 @@ public class TankAirRender implements ISimpleBlockRenderingHandler
for (FluidStack fluidstack : logic.getFluids())
{
Fluid fluid = fluidstack.getFluid();
//System.out.println("Base: "+getBaseAmount(base)+", Height: "+getHeightAmount(base, fluidstack.amount)+", fluid amount: "+fluidstack.amount);
// System.out.println("Base: "+getBaseAmount(base)+", Height: "+getHeightAmount(base,
// fluidstack.amount)+", fluid amount: "+fluidstack.amount);
renderer.setRenderBounds(0.0, getBaseAmount(base), 0.0, 1.0, getHeightAmount(base, fluidstack.amount), 1.0);
if (fluid.canBePlacedInWorld())
BlockSkinRenderHelper.renderMetadataBlock(fluid.getBlock(), 0, x, y, z, renderer, world);
@@ -38,7 +38,7 @@ public class TankRender implements ISimpleBlockRenderingHandler
{
if (modelID == tankModelID)
{
//Liquid
// Liquid
LavaTankLogic logic = (LavaTankLogic) world.getTileEntity(x, y, z);
if (logic.containsFluid())
{
@@ -53,7 +53,7 @@ public class TankRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(00, 0.001, 0.001, 0.999, logic.getFluidAmountScaled(), 0.999);
}
//Block
// Block
int meta = world.getBlockMetadata(x, y, z);
if (meta == 0 && world.getBlock(x, y + 1, z) == Blocks.air)
{
@@ -90,7 +90,7 @@ public class CartRender extends Render
if (cart.getCartType() != 0)
{
//this.loadTexture("/terrain.png");
// this.loadTexture("/terrain.png");
float var29 = 0.75F;
GL11.glScalef(var29, var29, var29);
@@ -111,20 +111,22 @@ public class CartRender extends Render
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
//GL11.glScalef(1.0F / var29, 1.0F / var29, 1.0F / var29);
// GL11.glScalef(1.0F / var29, 1.0F / var29, 1.0F / var29);
}
//this.loadTexture("/tinkertextures/entity/pullcart.png");
// this.loadTexture("/tinkertextures/entity/pullcart.png");
GL11.glScalef(-1.0F, -1.0F, 1.0F);
this.modelCart.render(cart, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
GL11.glPopMatrix();
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
* Actually renders the given argument. This is a synthetic bridge method,
* always casting down its argument and then handing it off to a worker
* function which does the actual work. In all probabilty, the class Render
* is generic (Render<T extends Entity) and this method has signature public
* void doRender(T entity, double d, double d1, double d2, float f, float
* f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender (Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
@@ -4,47 +4,31 @@ import net.minecraft.client.model.ModelBase;
public class CrystalModelSmall extends ModelBase
{
/*ModelRenderer body;
ModelRendererTurbo top;
ModelRendererTurbo bottom;
public CrystalModelSmall()
{
textureWidth = 32;
textureHeight = 32;
body = new ModelRenderer(this, 0, 8);
body.addBox(-2F, 0F, -2F, 4, 6, 4);
body.setRotationPoint(0F, 0F, 0F);
setRotation(body, 0, 0.7853982F, 0);
top = new ModelRendererTurbo(this, 0, 0, 32, 32);
top.addCone(0, 0, 0, 2.8F, 4, 4, 0, ModelRendererTurbo.MR_BOTTOM, 4, 8);
top.setRotationPoint(0F, -4F, 0F);
setRotation(top, 0F, 0F, 0F);
bottom = new ModelRendererTurbo(this, 0, 18, 32, 32);
top.addCone(0, 10, 0, 2.8F, 4, 4, 0, ModelRendererTurbo.MR_TOP, 4, 8);
bottom.setRotationPoint(0F, 6F, 0F);
//setRotation(bottom, 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);
top.render(f5);
bottom.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);
}*/
/*
* ModelRenderer body; ModelRendererTurbo top; ModelRendererTurbo bottom;
*
* public CrystalModelSmall() { textureWidth = 32; textureHeight = 32;
*
* body = new ModelRenderer(this, 0, 8); body.addBox(-2F, 0F, -2F, 4, 6, 4);
* body.setRotationPoint(0F, 0F, 0F); setRotation(body, 0, 0.7853982F, 0);
* top = new ModelRendererTurbo(this, 0, 0, 32, 32); top.addCone(0, 0, 0,
* 2.8F, 4, 4, 0, ModelRendererTurbo.MR_BOTTOM, 4, 8);
* top.setRotationPoint(0F, -4F, 0F); setRotation(top, 0F, 0F, 0F); bottom =
* new ModelRendererTurbo(this, 0, 18, 32, 32); top.addCone(0, 10, 0, 2.8F,
* 4, 4, 0, ModelRendererTurbo.MR_TOP, 4, 8); bottom.setRotationPoint(0F,
* 6F, 0F); //setRotation(bottom, 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);
* top.render(f5); bottom.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); }
*/
}
@@ -35,16 +35,17 @@ public class CrystalRender extends RenderLiving
}
/**
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
* entityLiving, partialTickTime
* Allows the render to do any OpenGL state modifications necessary before
* the model is rendered. Args: entityLiving, partialTickTime
*/
/*
* protected void preRenderCallback(EntityLiving par1EntityLiving, float
* par2) { this.updateCreeperScale((Skyla)par1EntityLiving, par2); }
*/
/*protected void preRenderCallback(EntityLiving par1EntityLiving, float par2)
{
this.updateCreeperScale((Skyla)par1EntityLiving, par2);
}*/
/**
* Returns an ARGB int color back. Args: entityLiving, lightBrightness, partialTickTime
* Returns an ARGB int color back. Args: entityLiving, lightBrightness,
* partialTickTime
*/
protected int getColorMultiplier (EntityLiving par1EntityLiving, float par2, float par3)
{
@@ -242,7 +242,8 @@ public class FancyItemRender extends Render
for (int k = 0; k < b0; ++k)
{
// Makes items offset when in 3D, like when in 2D, looks much better. Considered a vanilla bug...
// Makes items offset when in 3D, like when in 2D, looks much
// better. Considered a vanilla bug...
if (k > 0 && shouldSpreadItems())
{
float x = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
@@ -320,7 +321,7 @@ public class FancyItemRender extends Render
int i1;
float f1;
float f2;
//TODO make this be the block equivalent to k
// TODO make this be the block equivalent to k
Block block = BlockUtils.getBlockFromItem(k);
if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(block.getRenderType()))
{
@@ -439,25 +440,20 @@ public class FancyItemRender extends Render
this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5, true);
}
/* Modders must handle this themselves if they use custom renderers!
if (par3ItemStack.hasEffect())
{
GL11.glDepthFunc(GL11.GL_GREATER);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDepthMask(false);
par2TextureManager.bindTexture(RES_ITEM_GLINT);
this.zLevel -= 50.0F;
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_DST_COLOR);
GL11.glColor4f(0.5F, 0.25F, 0.8F, 1.0F);
this.renderGlint(par4 * 431278612 + par5 * 32178161, par4 - 2, par5 - 2, 20, 20);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
this.zLevel += 50.0F;
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDepthFunc(GL11.GL_LEQUAL);
}
*/
/*
* Modders must handle this themselves if they use custom renderers!
* if (par3ItemStack.hasEffect()) {
* GL11.glDepthFunc(GL11.GL_GREATER);
* GL11.glDisable(GL11.GL_LIGHTING); GL11.glDepthMask(false);
* par2TextureManager.bindTexture(RES_ITEM_GLINT); this.zLevel -=
* 50.0F; GL11.glEnable(GL11.GL_BLEND);
* GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_DST_COLOR);
* GL11.glColor4f(0.5F, 0.25F, 0.8F, 1.0F); this.renderGlint(par4 *
* 431278612 + par5 * 32178161, par4 - 2, par5 - 2, 20, 20);
* GL11.glDisable(GL11.GL_BLEND); GL11.glDepthMask(true);
* this.zLevel += 50.0F; GL11.glEnable(GL11.GL_LIGHTING);
* GL11.glDepthFunc(GL11.GL_LEQUAL); }
*/
}
}
@@ -498,8 +494,8 @@ public class FancyItemRender extends Render
}
/**
* Renders the item's overlay information. Examples being stack count or damage on top of the item's image at the
* specified position.
* Renders the item's overlay information. Examples being stack count or
* damage on top of the item's image at the specified position.
*/
public void renderItemOverlayIntoGUI (FontRenderer par1FontRenderer, TextureManager par2TextureManager, ItemStack par3ItemStack, int par4, int par5)
{
@@ -542,8 +538,8 @@ public class FancyItemRender extends Render
}
/**
* Adds a quad to the tesselator at the specified position with the set width and height and color. Args:
* tessellator, x, y, width, height, color
* Adds a quad to the tesselator at the specified position with the set
* width and height and color. Args: tessellator, x, y, width, height, color
*/
private void renderQuad (Tessellator par1Tessellator, int par2, int par3, int par4, int par5, int par6)
{
@@ -573,10 +569,12 @@ public class FancyItemRender extends Render
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
* Actually renders the given argument. This is a synthetic bridge method,
* always casting down its argument and then handing it off to a worker
* function which does the actual work. In all probabilty, the class Render
* is generic (Render<T extends Entity) and this method has signature public
* void doRender(T entity, double d, double d1, double d2, float f, float
* f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender (Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
@@ -585,6 +583,7 @@ public class FancyItemRender extends Render
/**
* Items should spread out when rendered in 3d?
*
* @return
*/
public boolean shouldSpreadItems ()
@@ -594,6 +593,7 @@ public class FancyItemRender extends Render
/**
* Items should have a bob effect
*
* @return
*/
public boolean shouldBob ()
@@ -618,6 +618,7 @@ public class FancyItemRender extends Render
/**
* Allows for a subclass to override how many rendered items appear in a
* "mini item 3d stack"
*
* @param stack
* @return
*/
@@ -80,8 +80,8 @@ public class SlimeRender extends RenderLiving
}
/**
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
* entityLiving, partialTickTime
* Allows the render to do any OpenGL state modifications necessary before
* the model is rendered. Args: entityLiving, partialTickTime
*/
@Override
protected void preRenderCallback (EntityLivingBase par1EntityLiving, float par2)
@@ -77,7 +77,8 @@ public class ExplosiveRender extends Render
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
* Returns the location of an entity's texture. Doesn't seem to be called
* unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture (Entity par1Entity)
{
@@ -85,10 +86,12 @@ public class ExplosiveRender extends Render
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
* Actually renders the given argument. This is a synthetic bridge method,
* always casting down its argument and then handing it off to a worker
* function which does the actual work. In all probabilty, the class Render
* is generic (Render<T extends Entity) and this method has signature public
* void doRender(T entity, double d, double d1, double d2, float f, float
* f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender (Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
@@ -206,7 +206,8 @@ public class ArrowRender extends Render
{
GL11.glRotatef(arrow.prevRotationYaw + (arrow.rotationYaw - arrow.prevRotationYaw) * par4 - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(arrow.prevRotationPitch + (arrow.rotationPitch - arrow.prevRotationPitch) * par4 - 45.0F, 0.0F, 0.0F, 1.0F);
// Makes items offset when in 3D, like when in 2D, looks much better. Considered a vanilla bug...
// Makes items offset when in 3D, like when in 2D, looks much
// better. Considered a vanilla bug...
if (k > 0 && shouldSpreadItems())
{
float x = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
@@ -273,10 +274,12 @@ public class ArrowRender extends Render
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
* Actually renders the given argument. This is a synthetic bridge method,
* always casting down its argument and then handing it off to a worker
* function which does the actual work. In all probabilty, the class Render
* is generic (Render<T extends Entity) and this method has signature public
* void doRender(T entity, double d, double d1, double d2, float f, float
* f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender (Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
@@ -285,6 +288,7 @@ public class ArrowRender extends Render
/**
* Items should spread out when rendered in 3d?
*
* @return
*/
public boolean shouldSpreadItems ()
@@ -294,6 +298,7 @@ public class ArrowRender extends Render
/**
* Items should have a bob effect
*
* @return
*/
public boolean shouldBob ()
@@ -216,8 +216,10 @@ public class DaggerRender extends Render
float f11;
float rotation = dagger.prevRotationPitch + (dagger.rotationPitch - dagger.prevRotationPitch) * par7 * -20;
//GL11.glRotatef(arrow.prevRotationYaw + (arrow.rotationYaw - arrow.prevRotationYaw) * par4 - 90.0F, 0.0F, 1.0F, 0.0F);
//GL11.glRotatef(arrow.prevRotationPitch + (arrow.rotationPitch - arrow.prevRotationPitch) * par4 - 45.0F, 0.0F, 0.0F, 1.0F);
// GL11.glRotatef(arrow.prevRotationYaw + (arrow.rotationYaw -
// arrow.prevRotationYaw) * par4 - 90.0F, 0.0F, 1.0F, 0.0F);
// GL11.glRotatef(arrow.prevRotationPitch + (arrow.rotationPitch -
// arrow.prevRotationPitch) * par4 - 45.0F, 0.0F, 0.0F, 1.0F);
GL11.glPushMatrix();
@@ -240,7 +242,8 @@ public class DaggerRender extends Render
for (int k = 0; k < b0; ++k)
{
// Makes items offset when in 3D, like when in 2D, looks much better. Considered a vanilla bug...
// Makes items offset when in 3D, like when in 2D, looks much
// better. Considered a vanilla bug...
GL11.glTranslatef(0f, 0f, f12 + f11);
if (itemstack.getItemSpriteNumber() == 0)
@@ -257,36 +260,28 @@ public class DaggerRender extends Render
GL11.glRotatef(rotation, 0.0F, 0.0F, 1.0F);
ItemRenderer.renderItemIn2D(tessellator, f5, f6, f4, f7, ((IIcon) par2Icon).getIconWidth(), ((IIcon) par2Icon).getIconHeight(), f12);
/*if (itemstack.hasEffect(pass))
{
GL11.glDepthFunc(GL11.GL_EQUAL);
GL11.glDisable(GL11.GL_LIGHTING);
this.renderManager.renderEngine.bindTexture(RES_ITEM_GLINT);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
float f13 = 0.76F;
GL11.glColor4f(0.5F * f13, 0.25F * f13, 0.8F * f13, 1.0F);
GL11.glMatrixMode(GL11.GL_TEXTURE);
GL11.glPushMatrix();
float f14 = 0.125F;
GL11.glScalef(f14, f14, f14);
float f15 = (float) (Minecraft.getSystemTime() % 3000L) / 3000.0F * 8.0F;
GL11.glTranslatef(f15, 0.0F, 0.0F);
GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
ItemRenderer.renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F, 255, 255, f12);
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glScalef(f14, f14, f14);
f15 = (float) (Minecraft.getSystemTime() % 4873L) / 4873.0F * 8.0F;
GL11.glTranslatef(-f15, 0.0F, 0.0F);
GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
ItemRenderer.renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F, 255, 255, f12);
GL11.glPopMatrix();
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDepthFunc(GL11.GL_LEQUAL);
}*/
/*
* if (itemstack.hasEffect(pass)) { GL11.glDepthFunc(GL11.GL_EQUAL);
* GL11.glDisable(GL11.GL_LIGHTING);
* this.renderManager.renderEngine.bindTexture(RES_ITEM_GLINT);
* GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_COLOR,
* GL11.GL_ONE); float f13 = 0.76F; GL11.glColor4f(0.5F * f13, 0.25F
* * f13, 0.8F * f13, 1.0F); GL11.glMatrixMode(GL11.GL_TEXTURE);
* GL11.glPushMatrix(); float f14 = 0.125F; GL11.glScalef(f14, f14,
* f14); float f15 = (float) (Minecraft.getSystemTime() % 3000L) /
* 3000.0F * 8.0F; GL11.glTranslatef(f15, 0.0F, 0.0F);
* GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
* ItemRenderer.renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F,
* 255, 255, f12); GL11.glPopMatrix(); GL11.glPushMatrix();
* GL11.glScalef(f14, f14, f14); f15 = (float)
* (Minecraft.getSystemTime() % 4873L) / 4873.0F * 8.0F;
* GL11.glTranslatef(-f15, 0.0F, 0.0F); GL11.glRotatef(10.0F, 0.0F,
* 0.0F, 1.0F); ItemRenderer.renderItemIn2D(tessellator, 0.0F, 0.0F,
* 1.0F, 1.0F, 255, 255, f12); GL11.glPopMatrix();
* GL11.glMatrixMode(GL11.GL_MODELVIEW);
* GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LIGHTING);
* GL11.glDepthFunc(GL11.GL_LEQUAL); }
*/
}
GL11.glPopMatrix();
@@ -428,25 +423,20 @@ public class DaggerRender extends Render
this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5, true);
}
/* Modders must handle this themselves if they use custom renderers!
if (par3ItemStack.hasEffect())
{
GL11.glDepthFunc(GL11.GL_GREATER);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDepthMask(false);
par2TextureManager.bindTexture(RES_ITEM_GLINT);
this.zLevel -= 50.0F;
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_DST_COLOR);
GL11.glColor4f(0.5F, 0.25F, 0.8F, 1.0F);
this.renderGlint(par4 * 431278612 + par5 * 32178161, par4 - 2, par5 - 2, 20, 20);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
this.zLevel += 50.0F;
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDepthFunc(GL11.GL_LEQUAL);
}
*/
/*
* Modders must handle this themselves if they use custom renderers!
* if (par3ItemStack.hasEffect()) {
* GL11.glDepthFunc(GL11.GL_GREATER);
* GL11.glDisable(GL11.GL_LIGHTING); GL11.glDepthMask(false);
* par2TextureManager.bindTexture(RES_ITEM_GLINT); this.zLevel -=
* 50.0F; GL11.glEnable(GL11.GL_BLEND);
* GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_DST_COLOR);
* GL11.glColor4f(0.5F, 0.25F, 0.8F, 1.0F); this.renderGlint(par4 *
* 431278612 + par5 * 32178161, par4 - 2, par5 - 2, 20, 20);
* GL11.glDisable(GL11.GL_BLEND); GL11.glDepthMask(true);
* this.zLevel += 50.0F; GL11.glEnable(GL11.GL_LIGHTING);
* GL11.glDepthFunc(GL11.GL_LEQUAL); }
*/
}
}
@@ -487,8 +477,8 @@ public class DaggerRender extends Render
}
/**
* Renders the item's overlay information. Examples being stack count or damage on top of the item's image at the
* specified position.
* Renders the item's overlay information. Examples being stack count or
* damage on top of the item's image at the specified position.
*/
public void renderItemOverlayIntoGUI (FontRenderer par1FontRenderer, TextureManager par2TextureManager, ItemStack par3ItemStack, int par4, int par5)
{
@@ -531,8 +521,8 @@ public class DaggerRender extends Render
}
/**
* Adds a quad to the tesselator at the specified position with the set width and height and color. Args:
* tessellator, x, y, width, height, color
* Adds a quad to the tesselator at the specified position with the set
* width and height and color. Args: tessellator, x, y, width, height, color
*/
private void renderQuad (Tessellator par1Tessellator, int par2, int par3, int par4, int par5, int par6)
{
@@ -562,10 +552,12 @@ public class DaggerRender extends Render
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
* Actually renders the given argument. This is a synthetic bridge method,
* always casting down its argument and then handing it off to a worker
* function which does the actual work. In all probabilty, the class Render
* is generic (Render<T extends Entity) and this method has signature public
* void doRender(T entity, double d, double d1, double d2, float f, float
* f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender (Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
@@ -574,6 +566,7 @@ public class DaggerRender extends Render
/**
* Items should spread out when rendered in 3d?
*
* @return
*/
public boolean shouldSpreadItems ()
@@ -583,6 +576,7 @@ public class DaggerRender extends Render
/**
* Items should have a bob effect
*
* @return
*/
public boolean shouldBob ()
@@ -607,6 +601,7 @@ public class DaggerRender extends Render
/**
* Allows for a subclass to override how many rendered items appear in a
* "mini item 3d stack"
*
* @param stack
* @return
*/
@@ -35,10 +35,12 @@ public class LaunchedItemRender extends Render
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
* Actually renders the given argument. This is a synthetic bridge method,
* always casting down its argument and then handing it off to a worker
* function which does the actual work. In all probabilty, the class Render
* is generic (Render<T extends Entity) and this method has signature public
* void doRender(T entity, double d, double d1, double d2, float f, float
* f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender (Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
@@ -15,10 +15,10 @@ import java.util.HashMap;
import javax.swing.ImageIcon;
import tconstruct.TConstruct;
import mantle.lib.environment.EnvironmentChecks;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraftforge.client.event.RenderPlayerEvent;
import tconstruct.TConstruct;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@@ -70,10 +70,10 @@ public class AdaptiveSmelteryGui extends NewContainerGui
int topo = this.guiTop;
int xScroll = lefto + 67;
int yScroll = topo + 8;
int scrollwidth = xScroll + 14;
int scrollheight = yScroll + 144;
int scrollWidth = xScroll + 14;
int scrollHeight = yScroll + 144;
if (!this.wasClicking && mouseDown && mouseX >= xScroll && mouseY >= yScroll && mouseX < scrollwidth && mouseY < scrollheight)
if (!this.wasClicking && mouseDown && mouseX >= xScroll && mouseY >= yScroll && mouseX < scrollWidth && mouseY < scrollHeight)
{
this.isScrolling = true;
}
@@ -92,7 +92,7 @@ public class AdaptiveSmelteryGui extends NewContainerGui
if (this.isScrolling)
{
this.currentScroll = (mouseY - yScroll - 7.5F) / (scrollheight - yScroll - 15.0F);
this.currentScroll = (mouseY - yScroll - 7.5F) / (scrollHeight - yScroll - 15.0F);
if (this.currentScroll < 0.0F)
{
@@ -182,7 +182,7 @@ public class AdaptiveSmelteryGui extends NewContainerGui
int cornerY = (height - ySize) / 2;
drawTexturedModalRect(cornerX + 46, cornerY, 0, 0, 176, ySize);
//Fuel - Lava
// Fuel - Lava
this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
if (scomp.fuelGague > 0)
{
@@ -208,7 +208,7 @@ public class AdaptiveSmelteryGui extends NewContainerGui
capacity += info[i].capacity;
}
//Liquids - molten metal
// Liquids - molten metal
int base = 0;
for (int i = 0; i < info.length - 1; i++)
{
@@ -234,35 +234,32 @@ public class AdaptiveSmelteryGui extends NewContainerGui
}
}
//Liquid gague
// Liquid gague
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(background);
drawTexturedModalRect(cornerX + 54, cornerY + 16, 176, 76, 52, 52);
//Side inventory
// Side inventory
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(backgroundSide);
//if (logic.layers > 0)
// if (logic.layers > 0)
{
/*if (logic.layers == 1)
{
drawTexturedModalRect(cornerX - 46, cornerY, 0, 0, 98, 43);
drawTexturedModalRect(cornerX - 46, cornerY + 43, 0, 133, 98, 25);
}
else if (logic.layers == 2)
{
drawTexturedModalRect(cornerX - 46, cornerY, 0, 0, 98, 61);
drawTexturedModalRect(cornerX - 46, cornerY + 61, 0, 97, 98, 61);
}
else*/
/*
* if (logic.layers == 1) { drawTexturedModalRect(cornerX - 46,
* cornerY, 0, 0, 98, 43); drawTexturedModalRect(cornerX - 46,
* cornerY + 43, 0, 133, 98, 25); } else if (logic.layers == 2) {
* drawTexturedModalRect(cornerX - 46, cornerY, 0, 0, 98, 61);
* drawTexturedModalRect(cornerX - 46, cornerY + 61, 0, 97, 98, 61);
* } else
*/
{
drawTexturedModalRect(cornerX - 46, cornerY, 0, 0, 98, ySize - 8);
}
drawTexturedModalRect(cornerX + 32, (int) (cornerY + 8 + 127 * currentScroll), 98, 0, 12, 15);
}
//Temperature
// Temperature
int slotSize = logic.getSizeInventory();
if (slotSize > 24)
slotSize = 24;
@@ -297,7 +294,7 @@ public class AdaptiveSmelteryGui extends NewContainerGui
ArrayList list = new ArrayList();
if (liquid.fluidID == -37)
{
list.add("\u00A7f" + (StatCollector.translateToLocal("gui.smeltery1")));
list.add("\u00A7f" + StatCollector.translateToLocal("gui.smeltery1"));
list.add("mB: " + liquid.amount);
}
else
@@ -431,80 +428,54 @@ public class AdaptiveSmelteryGui extends NewContainerGui
{
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(startU + 0, startV + endV, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());//Bottom left
tessellator.addVertexWithUV(startU + endU, startV + endV, this.zLevel, par3Icon.getMaxU(), par3Icon.getMaxV());//Bottom right
tessellator.addVertexWithUV(startU + endU, startV + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());//Top right
tessellator.addVertexWithUV(startU + 0, startV + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV()); //Top left
tessellator.addVertexWithUV(startU + 0, startV + endV, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());// Bottom left
tessellator.addVertexWithUV(startU + endU, startV + endV, this.zLevel, par3Icon.getMaxU(), par3Icon.getMaxV());// Bottom right
tessellator.addVertexWithUV(startU + endU, startV + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());// Top right
tessellator.addVertexWithUV(startU + 0, startV + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV()); // Top left
tessellator.draw();
}
/*@Override
public void mouseClicked(int mouseX, int mouseY, int mouseButton)
{
super.mouseClicked(mouseX, mouseY, mouseButton);
int base = 0;
int cornerX = (width - xSize) / 2 + 36;
int cornerY = (height - ySize) / 2;
int fluidToBeBroughtUp = -1;
for (FluidStack liquid : multitank.getAllFluids())
{
int basePos = 54;
int initialLiquidSize = 0;
int liquidSize = 0;//liquid.amount * 52 / liquidLayers;
if (multitank.getCapacity() > 0)
{
int total = multitank.getFluidAmount();
int liquidLayers = (total / 20000 + 1) * 20000;
if (liquidLayers > 0)
{
liquidSize = liquid.amount * 52 / liquidLayers;
if (liquidSize == 0)
liquidSize = 1;
base += liquidSize;
}
}
int leftX = cornerX + basePos;
int topY = (cornerY + 68) - base;
int sizeX = 52;
int sizeY = liquidSize;
if (mouseX >= leftX && mouseX <= leftX + sizeX && mouseY >= topY && mouseY < topY + sizeY)
{
fluidToBeBroughtUp = liquid.fluidID;
Packet250CustomPayload packet = new Packet250CustomPayload();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(bos);
try
{
dos.write(11);
dos.writeInt(logic.getWorld().provider.dimensionId);
dos.writeInt(logic.xCoord);
dos.writeInt(logic.yCoord);
dos.writeInt(logic.zCoord);
dos.writeBoolean(this.isShiftKeyDown());
dos.writeInt(fluidToBeBroughtUp);
}
catch (Exception e)
{
e.printStackTrace();
}
packet.channel = "TConstruct";
packet.data = bos.toByteArray();
packet.length = bos.size();
PacketDispatcher.sendPacketToServer(packet);
}
}
}*/
/*
* @Override public void mouseClicked(int mouseX, int mouseY, int
* mouseButton) { super.mouseClicked(mouseX, mouseY, mouseButton);
*
* int base = 0; int cornerX = (width - xSize) / 2 + 36; int cornerY =
* (height - ySize) / 2; int fluidToBeBroughtUp = -1;
*
* for (FluidStack liquid : multitank.getAllFluids()) { int basePos = 54;
* int initialLiquidSize = 0; int liquidSize = 0;//liquid.amount * 52 /
* liquidLayers; if (multitank.getCapacity() > 0) { int total =
* multitank.getFluidAmount(); int liquidLayers = (total / 20000 + 1) *
* 20000; if (liquidLayers > 0) { liquidSize = liquid.amount * 52 /
* liquidLayers; if (liquidSize == 0) liquidSize = 1; base += liquidSize; }
* }
*
* int leftX = cornerX + basePos; int topY = (cornerY + 68) - base; int
* sizeX = 52; int sizeY = liquidSize; if (mouseX >= leftX && mouseX <=
* leftX + sizeX && mouseY >= topY && mouseY < topY + sizeY) {
* fluidToBeBroughtUp = liquid.fluidID;
*
* Packet250CustomPayload packet = new Packet250CustomPayload();
*
* ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream
* dos = new DataOutputStream(bos);
*
* try { dos.write(11);
*
* dos.writeInt(logic.worldObj.provider.dimensionId);
* dos.writeInt(logic.xCoord); dos.writeInt(logic.yCoord);
* dos.writeInt(logic.zCoord);
*
* dos.writeBoolean(this.isShiftKeyDown());
*
* dos.writeInt(fluidToBeBroughtUp); } catch (Exception e) {
* e.printStackTrace(); }
*
* packet.channel = "TConstruct"; packet.data = bos.toByteArray();
* packet.length = bos.size();
*
* PacketDispatcher.sendPacketToServer(packet); } } }
*/
@Override
public void onGuiClosed ()
@@ -39,11 +39,13 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
int cornerY = (this.width - this.ySize) / 2;
this.buttonList.clear();
// InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new ItemStack(Block.workbench), 0);
// this.buttonList.add(tab);
// tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new ItemStack(Item.plateDiamond), 1);
// tab.enabled = false;
// this.buttonList.add(tab);
// InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new
// ItemStack(Block.workbench), 0);
// this.buttonList.add(tab);
// tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new
// ItemStack(Item.plateDiamond), 1);
// tab.enabled = false;
// this.buttonList.add(tab);
TabRegistry.updateTabValues(cornerX, cornerY, InventoryTabArmorExtended.class);
TabRegistry.addTabsToList(this.buttonList);
@@ -51,8 +53,10 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
protected void drawGuiContainerForegroundLayer (int par1, int par2)
{
//fontRenderer.drawString(StatCollector.translateToLocal("inventory.armorextended"), 60, 6, 0x404040);
//fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 17, (ySize - 96) + 2, 0x404040);
// fontRenderer.drawString(StatCollector.translateToLocal("inventory.armorextended"),
// 60, 6, 0x404040);
// fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"),
// 17, (ySize - 96) + 2, 0x404040);
}
public void drawScreen (int par1, int par2, float par3)
@@ -60,23 +64,25 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
super.drawScreen(par1, par2, par3);
this.xSize_lo = (float) par1;
this.ySize_lo = (float) par2;
// if (stats.inventory[2] != null && stats.inventory[2].getItem() == TContent.knapsack)
// {
// if (this.buttonList.size() < 3)
// {
// int cornerX = guiLeft;
// int cornerY = (this.height - this.ySize) / 2;
// InventoryTab tab = new InventoryTab(4, cornerX + 56, cornerY - 28, new ItemStack(TContent.knapsack), 1);
// this.buttonList.add(tab);
// }
// }
// else
// {
// if (this.buttonList.size() >= 3)
// {
// buttonList.remove(2);
// }
// }
// if (stats.inventory[2] != null && stats.inventory[2].getItem() ==
// TContent.knapsack)
// {
// if (this.buttonList.size() < 3)
// {
// int cornerX = guiLeft;
// int cornerY = (this.height - this.ySize) / 2;
// InventoryTab tab = new InventoryTab(4, cornerX + 56, cornerY - 28,
// new ItemStack(TContent.knapsack), 1);
// this.buttonList.add(tab);
// }
// }
// else
// {
// if (this.buttonList.size() >= 3)
// {
// buttonList.remove(2);
// }
// }
}
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/armorextended.png");
@@ -84,7 +90,7 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
protected void drawGuiContainerBackgroundLayer (float f, int i, int j)
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
//mc.renderEngine.bindTexture("/mods/tinker/textures/gui/armorextended.png");
// mc.renderEngine.bindTexture("/mods/tinker/textures/gui/armorextended.png");
this.mc.getTextureManager().bindTexture(background);
int cornerX = guiLeft;
int cornerY = (width - ySize) / 2;
@@ -143,13 +149,10 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
}
/*protected void keyTyped(char par1, int par2)
{
if (par2 == TControls.armorKey.keyCode)
{
this.mc.thePlayer.closeScreen();
}
super.keyTyped(par1, par2);
}*/
/*
* protected void keyTyped(char par1, int par2) { if (par2 ==
* TControls.armorKey.keyCode) { this.mc.thePlayer.closeScreen(); }
*
* super.keyTyped(par1, par2); }
*/
}
@@ -32,8 +32,9 @@ public class CraftingStationGui extends GuiContainer
{
super(logic.getGuiContainer(inventory, world, x, y, z));
this.logic = logic;
//text = new GuiTextField(this.fontRendererObj, this.xSize / 2 - 5, 8, 30, 12);
//this.text.setText("");
// text = new GuiTextField(this.fontRendererObj, this.xSize / 2 - 5, 8,
// 30, 12);
// this.text.setText("");
title = "\u00A7n" + StatCollector.translateToLocal("gui.toolforge1");
body = StatCollector.translateToLocal("gui.toolforge2");
toolName = "";
@@ -46,7 +47,8 @@ public class CraftingStationGui extends GuiContainer
this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 0x202020);
if (logic.chest != null)
this.fontRendererObj.drawString(StatCollector.translateToLocal(logic.chest.get().getInventoryName()), -108, this.ySize - 160, 0x202020);
//this.fontRendererObj.drawString(toolName + "_", this.xSize / 2 - 18, 8, 0xffffff);
// this.fontRendererObj.drawString(toolName + "_", this.xSize / 2 - 18,
// 8, 0xffffff);
if (logic.tinkerTable)
{
@@ -111,7 +113,7 @@ public class CraftingStationGui extends GuiContainer
final int maxDur = tags.getInteger("TotalDurability");
int availableDurability = maxDur - durability;
//Durability
// Durability
int base = 24;
int offset = 0;
if (maxDur > 0)
@@ -131,7 +133,7 @@ public class CraftingStationGui extends GuiContainer
}
final float stonebound = tags.getFloat("Shoddy");
//Attack
// Attack
if (categories.contains("weapon"))
{
int attack = (int) (tags.getInteger("Attack"));
@@ -202,12 +204,15 @@ public class CraftingStationGui extends GuiContainer
offset++;
this.fontRendererObj.drawString(StatCollector.translateToLocal("gui.toolstation9") + df.format(accuracy - 4) + "%", xSize + 8, base + offset * 10, 0xffffff);
offset++;
/*this.fontRendererObj.drawString("Chance to break: " + df.format(shatter)+"%", xSize + 8, base + offset * 10, 0xffffff);
offset++;*/
/*
* this.fontRendererObj.drawString("Chance to break: " +
* df.format(shatter)+"%", xSize + 8, base + offset * 10, 0xffffff);
* offset++;
*/
offset++;
}
//Mining
// Mining
if (categories.contains("dualharvest"))
{
float mineSpeed = tags.getInteger("MiningSpeed") / 100f;
@@ -371,7 +376,7 @@ public class CraftingStationGui extends GuiContainer
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(icons);
//Draw chest side
// Draw chest side
if (logic.chest != null)
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
@@ -25,7 +25,8 @@ public class FurnaceGui extends GuiContainer
}
/**
* Draw the foreground layer for the GuiContainer (everything in front of the items)
* Draw the foreground layer for the GuiContainer (everything in front of
* the items)
*/
protected void drawGuiContainerForegroundLayer (int par1, int par2)
{
@@ -35,7 +36,8 @@ public class FurnaceGui extends GuiContainer
}
/**
* Draw the background layer for the GuiContainer (everything behind the items)
* Draw the background layer for the GuiContainer (everything behind the
* items)
*/
protected void drawGuiContainerBackgroundLayer (float par1, int par2, int par3)
{
@@ -14,13 +14,16 @@ import cpw.mods.fml.relauncher.SideOnly;
public class GuiButtonTool extends GuiButton
{
/**
* True for pointing right (next page), false for pointing left (previous page).
* True for pointing right (next page), false for pointing left (previous
* page).
*/
int textureX;
int textureY;
public String texture;
public ToolGuiElement element;
private static ResourceLocation background;// = new ResourceLocation("tinker", "textures/gui/armorextended.png");
private static ResourceLocation background;// = new
// ResourceLocation("tinker",
// "textures/gui/armorextended.png");
public GuiButtonTool(int id, int posX, int posY, int texX, int texY, String domain, String tex, ToolGuiElement e)
{
@@ -47,7 +47,7 @@ public class GuiLandmine extends GuiContainer
{
if (k == 0)
{
list.set(k, par1ItemStack.getRarity().rarityColor + (String)list.get(k));
list.set(k, par1ItemStack.getRarity().rarityColor + (String) list.get(k));
}
else
{
@@ -35,13 +35,16 @@ public class KnapsackGui extends GuiContainer
TabRegistry.updateTabValues(cornerX, cornerY, InventoryTabKnapsack.class);
TabRegistry.addTabsToList(this.buttonList);
// InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new ItemStack(Block.workbench), 0);
// this.buttonList.add(tab);
// tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new ItemStack(Item.plateDiamond), 1);
// this.buttonList.add(tab);
// tab = new InventoryTab(4, cornerX + 56, cornerY - 28, new ItemStack(TContent.knapsack), 1);
// tab.enabled = false;
// this.buttonList.add(tab);
// InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new
// ItemStack(Block.workbench), 0);
// this.buttonList.add(tab);
// tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new
// ItemStack(Item.plateDiamond), 1);
// this.buttonList.add(tab);
// tab = new InventoryTab(4, cornerX + 56, cornerY - 28, new
// ItemStack(TContent.knapsack), 1);
// tab.enabled = false;
// this.buttonList.add(tab);
}
protected void drawGuiContainerForegroundLayer (int par1, int par2)
@@ -61,13 +64,10 @@ public class KnapsackGui extends GuiContainer
drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
}
/*protected void keyTyped(char par1, int par2)
{
if (par2 == TControls.armorKey.keyCode)
{
this.mc.thePlayer.closeScreen();
}
super.keyTyped(par1, par2);
}*/
/*
* protected void keyTyped(char par1, int par2) { if (par2 ==
* TControls.armorKey.keyCode) { this.mc.thePlayer.closeScreen(); }
*
* super.keyTyped(par1, par2); }
*/
}
@@ -145,26 +145,20 @@ public abstract class NewContainerGui extends GuiScreen
}
}
/*for (int slotIter = 0; slotIter < this.container.otherInventorySlots.size(); ++slotIter)
{
ActiveSlot slot = (ActiveSlot) this.container.otherInventorySlots.get(slotIter);
if (slot.getActive())
{
this.drawSlotInventory(slot);
if (this.isMouseOverSlot(slot, mouseX, mouseY))
{
this.mainSlot = slot;
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_DEPTH_TEST);
slotXPos = slot.xDisplayPosition;
slotYPos = slot.yDisplayPosition;
this.drawGradientRect(slotXPos, slotYPos, slotXPos + 16, slotYPos + 16, -2130706433, -2130706433);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_DEPTH_TEST);
}
}
}*/
/*
* for (int slotIter = 0; slotIter <
* this.container.otherInventorySlots.size(); ++slotIter) { ActiveSlot
* slot = (ActiveSlot) this.container.otherInventorySlots.get(slotIter);
* if (slot.getActive()) { this.drawSlotInventory(slot);
*
* if (this.isMouseOverSlot(slot, mouseX, mouseY)) { this.mainSlot =
* slot; GL11.glDisable(GL11.GL_LIGHTING);
* GL11.glDisable(GL11.GL_DEPTH_TEST); slotXPos = slot.xDisplayPosition;
* slotYPos = slot.yDisplayPosition; this.drawGradientRect(slotXPos,
* slotYPos, slotXPos + 16, slotYPos + 16, -2130706433, -2130706433);
* GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); }
* } }
*/
this.drawGuiContainerForegroundLayer(mouseX, mouseY);
InventoryPlayer inventoryplayer = this.mc.thePlayer.inventory;
@@ -256,8 +250,9 @@ public abstract class NewContainerGui extends GuiScreen
}
/**
* Draws the text when mouse is over creative inventory tab. Params: current creative tab to be checked, current
* mouse x position, current mouse y position.
* Draws the text when mouse is over creative inventory tab. Params: current
* creative tab to be checked, current mouse x position, current mouse y
* position.
*/
protected void drawCreativeTabHoveringText (String par1Str, int par2, int par3)
{
@@ -343,14 +338,16 @@ public abstract class NewContainerGui extends GuiScreen
}
/**
* Draw the foreground layer for the GuiContainer (everything in front of the items)
* Draw the foreground layer for the GuiContainer (everything in front of
* the items)
*/
protected void drawGuiContainerForegroundLayer (int par1, int par2)
{
}
/**
* Draw the background layer for the GuiContainer (everything behind the items)
* Draw the background layer for the GuiContainer (everything behind the
* items)
*/
protected abstract void drawGuiContainerBackgroundLayer (float f, int i, int j);
@@ -635,8 +632,9 @@ public abstract class NewContainerGui extends GuiScreen
}
/**
* Called when the mouse is moved or a mouse button is released. Signature: (mouseX, mouseY, which) which==-1 is
* mouseMove, which==0 or which==1 is mouseUp
* Called when the mouse is moved or a mouse button is released. Signature:
* (mouseX, mouseY, which) which==-1 is mouseMove, which==0 or which==1 is
* mouseUp
*/
protected void mouseMovedOrUp (int par1, int par2, int par3)
{
@@ -802,8 +800,8 @@ public abstract class NewContainerGui extends GuiScreen
}
/**
* Args: left, top, width, height, pointX, pointY. Note: left, top are local to Gui, pointX, pointY are local to
* screen
* Args: left, top, width, height, pointX, pointY. Note: left, top are local
* to Gui, pointX, pointY are local to screen
*/
protected boolean isPointInRegion (int par1, int par2, int par3, int par4, int par5, int par6)
{
@@ -825,7 +823,8 @@ public abstract class NewContainerGui extends GuiScreen
}
/**
* Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e).
* Fired when a key is typed. This is the equivalent of
* KeyListener.keyTyped(KeyEvent e).
*/
protected void keyTyped (char par1, int par2)
{
@@ -850,7 +849,8 @@ public abstract class NewContainerGui extends GuiScreen
}
/**
* This function is what controls the hotbar shortcut check when you press a number key when hovering a stack.
* This function is what controls the hotbar shortcut check when you press a
* number key when hovering a stack.
*/
protected boolean checkHotbarKeys (int par1)
{
@@ -870,7 +870,8 @@ public abstract class NewContainerGui extends GuiScreen
}
/**
* Called when the screen is unloaded. Used to disable keyboard repeat events
* Called when the screen is unloaded. Used to disable keyboard repeat
* events
*/
public void onGuiClosed ()
{
@@ -881,7 +882,8 @@ public abstract class NewContainerGui extends GuiScreen
}
/**
* Returns true if this GUI should pause the game when it is displayed in single-player
* Returns true if this GUI should pause the game when it is displayed in
* single-player
*/
public boolean doesGuiPauseGame ()
{
@@ -57,9 +57,9 @@ public class PartCrafterGui extends NewContainerGui
void drawMaterialInformation ()
{
ItemStack top = logic.getStackInSlot(2);
//ItemStack topResult = logic.getStackInSlot(4);
// ItemStack topResult = logic.getStackInSlot(4);
ItemStack bottom = logic.getStackInSlot(3);
//ItemStack bottomResult = logic.getStackInSlot(6);
// ItemStack bottomResult = logic.getStackInSlot(6);
if (topMaterial != top)
{
topMaterial = top;
@@ -62,10 +62,10 @@ public class SmelteryGui extends NewContainerGui
int topo = this.guiTop;
int xScroll = lefto + 67;
int yScroll = topo + 8;
int scrollwidth = xScroll + 14;
int scrollheight = yScroll + 144;
int scrollWidth = xScroll + 14;
int scrollHeight = yScroll + 144;
if (!this.wasClicking && mouseDown && mouseX >= xScroll && mouseY >= yScroll && mouseX < scrollwidth && mouseY < scrollheight)
if (!this.wasClicking && mouseDown && mouseX >= xScroll && mouseY >= yScroll && mouseX < scrollWidth && mouseY < scrollHeight)
{
this.isScrolling = true;
}
@@ -84,7 +84,7 @@ public class SmelteryGui extends NewContainerGui
if (this.isScrolling)
{
this.currentScroll = (mouseY - yScroll - 7.5F) / (scrollheight - yScroll - 15.0F);
this.currentScroll = (mouseY - yScroll - 7.5F) / (scrollHeight - yScroll - 15.0F);
if (this.currentScroll < 0.0F)
{
@@ -117,7 +117,7 @@ public class SmelteryGui extends NewContainerGui
{
int basePos = 54;
int initialLiquidSize = 0;
int liquidSize = 0;//liquid.amount * 52 / liquidLayers;
int liquidSize = 0;// liquid.amount * 52 / liquidLayers;
if (logic.getCapacity() > 0)
{
int total = logic.getTotalLiquid();
@@ -167,7 +167,7 @@ public class SmelteryGui extends NewContainerGui
int cornerY = (height - ySize) / 2;
drawTexturedModalRect(cornerX + 46, cornerY, 0, 0, 176, ySize);
//Fuel - Lava
// Fuel - Lava
this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
if (logic.fuelGague > 0)
{
@@ -183,7 +183,7 @@ public class SmelteryGui extends NewContainerGui
}
}
//Liquids - molten metal
// Liquids - molten metal
int base = 0;
for (FluidStack liquid : logic.moltenMetal)
{
@@ -215,13 +215,13 @@ public class SmelteryGui extends NewContainerGui
}
}
//Liquid gague
// Liquid gague
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(background);
drawTexturedModalRect(cornerX + 54, cornerY + 16, 176, 76, 52, 52);
//Side inventory
// Side inventory
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(backgroundSide);
if (logic.layers > 0)
@@ -243,7 +243,7 @@ public class SmelteryGui extends NewContainerGui
drawTexturedModalRect(cornerX + 32, (int) (cornerY + 8 + 127 * currentScroll), 98, 0, 12, 15);
}
//Temperature
// Temperature
int slotSize = logic.layers * 9;
if (slotSize > 24)
slotSize = 24;
@@ -412,10 +412,10 @@ public class SmelteryGui extends NewContainerGui
{
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(startU + 0, startV + endV, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());//Bottom left
tessellator.addVertexWithUV(startU + endU, startV + endV, this.zLevel, par3Icon.getMaxU(), par3Icon.getMaxV());//Bottom right
tessellator.addVertexWithUV(startU + endU, startV + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());//Top right
tessellator.addVertexWithUV(startU + 0, startV + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV()); //Top left
tessellator.addVertexWithUV(startU + 0, startV + endV, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());// Bottom left
tessellator.addVertexWithUV(startU + endU, startV + endV, this.zLevel, par3Icon.getMaxU(), par3Icon.getMaxV());// Bottom right
tessellator.addVertexWithUV(startU + endU, startV + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());// Top right
tessellator.addVertexWithUV(startU + 0, startV + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV()); // Top left
tessellator.draw();
}
@@ -433,7 +433,7 @@ public class SmelteryGui extends NewContainerGui
{
int basePos = 54;
int initialLiquidSize = 0;
int liquidSize = 0;//liquid.amount * 52 / liquidLayers;
int liquidSize = 0;// liquid.amount * 52 / liquidLayers;
if (logic.getCapacity() > 0)
{
int total = logic.getTotalLiquid();
@@ -453,38 +453,8 @@ public class SmelteryGui extends NewContainerGui
int sizeY = liquidSize;
if (mouseX >= leftX && mouseX <= leftX + sizeX && mouseY >= topY && mouseY < topY + sizeY)
{
//TODO Update fluid stuff
fluidToBeBroughtUp = liquid.fluidID;
/*Packet250CustomPayload packet = new Packet250CustomPayload();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(bos);
try
{
dos.write(11);
dos.writeInt(logic.getWorld().provider.dimensionId);
dos.writeInt(logic.xCoord);
dos.writeInt(logic.yCoord);
dos.writeInt(logic.zCoord);
dos.writeBoolean(this.isShiftKeyDown());
dos.writeInt(fluidToBeBroughtUp);
}
catch (Exception e)
{
e.printStackTrace();
}
packet.channel = "TConstruct";
packet.data = bos.toByteArray();
packet.length = bos.size();
PacketDispatcher.sendPacketToServer(packet);*/
TConstruct.packetPipeline
.sendToServer(new PacketSmeltery(logic.getWorldObj().provider.dimensionId, logic.xCoord, logic.yCoord, logic.zCoord, this.isShiftKeyDown(), fluidToBeBroughtUp));
}
@@ -1,8 +1,5 @@
package tconstruct.client.gui;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -15,7 +12,6 @@ import org.lwjgl.opengl.GL11;
import tconstruct.TConstruct;
import tconstruct.blocks.logic.StencilTableLogic;
import tconstruct.common.TContent;
import tconstruct.common.TRepo;
import tconstruct.inventory.PatternShaperContainer;
import tconstruct.util.network.packet.PacketStencilTable;
@@ -66,20 +62,27 @@ public class StencilTableGui extends GuiContainer
int cornerY = (this.height - this.ySize) / 2;
this.buttonList.clear();
/*ToolGuiElement repair = TConstruct.toolButtons.get(0);
GuiButtonTool repairButton = new GuiButtonTool(0, cornerX - 110, cornerY, repair.buttonIconX, repair.buttonIconY, repair.texture); // Repair
repairButton.enabled = false;
this.buttonList.add(repairButton);*/
/*
* ToolGuiElement repair = TConstruct.toolButtons.get(0); GuiButtonTool
* repairButton = new GuiButtonTool(0, cornerX - 110, cornerY,
* repair.buttonIconX, repair.buttonIconY, repair.texture); // Repair
* repairButton.enabled = false; this.buttonList.add(repairButton);
*/
this.buttonList.add(new GuiButton(0, cornerX - 120, cornerY, 120, 20, (StatCollector.translateToLocal("gui.stenciltable1"))));
this.buttonList.add(new GuiButton(1, cornerX - 120, cornerY + 20, 120, 20, (StatCollector.translateToLocal("gui.stenciltable2"))));
//for (int iter = 0; iter < TConstructContent.patternOutputs.length; iter++)
//{
// for (int iter = 0; iter < TConstructContent.patternOutputs.length;
// iter++)
// {
/*ToolGuiElement element = TConstruct.toolButtons.get(iter);
GuiButtonTool button = new GuiButtonTool(iter, cornerX - 110 + 22 * (iter % 5), cornerY + 22 * (iter / 5), element.buttonIconX, element.buttonIconY, element.texture); // Repair
this.buttonList.add(button);*/
//}
/*
* ToolGuiElement element = TConstruct.toolButtons.get(iter);
* GuiButtonTool button = new GuiButtonTool(iter, cornerX - 110 + 22 *
* (iter % 5), cornerY + 22 * (iter / 5), element.buttonIconX,
* element.buttonIconY, element.texture); // Repair
* this.buttonList.add(button);
*/
// }
}
protected void actionPerformed (GuiButton button)
@@ -110,12 +113,11 @@ public class StencilTableGui extends GuiContainer
logic.setInventorySlotContents(1, stack);
updateServer(stack);
}
/*else if (meta == 1 || meta == 2)
{
ItemStack stack = new ItemStack(TContent.metalPattern, 1, 0);
logic.setInventorySlotContents(1, stack);
updateServer(stack);
}*/
/*
* else if (meta == 1 || meta == 2) { ItemStack stack = new
* ItemStack(TContent.metalPattern, 1, 0);
* logic.setInventorySlotContents(1, stack); updateServer(stack); }
*/
}
}
@@ -151,7 +151,8 @@ public class ToolStationGui extends NewContainerGui
}
/**
* Draw the foreground layer for the GuiContainer (everything in front of the items)
* Draw the foreground layer for the GuiContainer (everything in front of
* the items)
*/
protected void drawGuiContainerForegroundLayer (int par1, int par2)
{
@@ -185,7 +186,7 @@ public class ToolStationGui extends NewContainerGui
final int maxDur = tags.getInteger("TotalDurability");
int availableDurability = maxDur - durability;
//Durability
// Durability
int base = 24;
int offset = 0;
if (maxDur > 0)
@@ -205,7 +206,7 @@ public class ToolStationGui extends NewContainerGui
}
final float stonebound = tags.getFloat("Shoddy");
//Attack
// Attack
if (categories.contains("weapon"))
{
int attack = (int) (tags.getInteger("Attack"));
@@ -276,12 +277,15 @@ public class ToolStationGui extends NewContainerGui
offset++;
this.fontRendererObj.drawString(StatCollector.translateToLocal("gui.toolstation9") + df.format(accuracy - 4) + "%", xSize + 8, base + offset * 10, 0xffffff);
offset++;
/*this.fontRendererObj.drawString("Chance to break: " + df.format(shatter)+"%", xSize + 8, base + offset * 10, 0xffffff);
offset++;*/
/*
* this.fontRendererObj.drawString("Chance to break: " +
* df.format(shatter)+"%", xSize + 8, base + offset * 10, 0xffffff);
* offset++;
*/
offset++;
}
//Mining
// Mining
if (categories.contains("dualharvest"))
{
float mineSpeed = tags.getInteger("MiningSpeed") / 100f;
@@ -406,7 +410,7 @@ public class ToolStationGui extends NewContainerGui
case 2:
return StatCollector.translateToLocal("gui.partcrafter.mining3");
case 3:
return StatCollector.translateToLocal("gui.partcrafter.mining4"); //Mithril
return StatCollector.translateToLocal("gui.partcrafter.mining4"); // Mithril
case 4:
return StatCollector.translateToLocal("gui.partcrafter.mining5");
case 5:
@@ -421,7 +425,8 @@ public class ToolStationGui extends NewContainerGui
private static final ResourceLocation description = new ResourceLocation("tinker", "textures/gui/description.png");
/**
* Draw the background layer for the GuiContainer (everything behind the items)
* Draw the background layer for the GuiContainer (everything behind the
* items)
*/
protected void drawGuiContainerBackgroundLayer (float par1, int par2, int par3)
{
@@ -479,35 +484,29 @@ public class ToolStationGui extends NewContainerGui
void updateServer (String name)
{
/*ByteArrayOutputStream bos = new ByteArrayOutputStream(8);
DataOutputStream outputStream = new DataOutputStream(bos);
try
{
outputStream.writeByte(1);
outputStream.writeInt(logic.getWorld().provider.dimensionId);
outputStream.writeInt(logic.xCoord);
outputStream.writeInt(logic.yCoord);
outputStream.writeInt(logic.zCoord);
outputStream.writeUTF(name);
}
catch (Exception ex)
{
ex.printStackTrace();
}
Packet250CustomPayload packet = new Packet250CustomPayload();
packet.channel = "TConstruct";
packet.data = bos.toByteArray();
packet.length = bos.size();
PacketDispatcher.sendPacketToServer(packet);*/
/*
* ByteArrayOutputStream bos = new ByteArrayOutputStream(8);
* DataOutputStream outputStream = new DataOutputStream(bos); try {
* outputStream.writeByte(1);
* outputStream.writeInt(logic.getWorld().provider.dimensionId);
* outputStream.writeInt(logic.xCoord);
* outputStream.writeInt(logic.yCoord);
* outputStream.writeInt(logic.zCoord); outputStream.writeUTF(name); }
* catch (Exception ex) { ex.printStackTrace(); }
*
* Packet250CustomPayload packet = new Packet250CustomPayload();
* packet.channel = "TConstruct"; packet.data = bos.toByteArray();
* packet.length = bos.size();
*
* PacketDispatcher.sendPacketToServer(packet);
*/
TConstruct.packetPipeline.sendToServer(new PacketToolStation(logic.xCoord, logic.yCoord, logic.zCoord, name));
}
/*protected void mouseClicked(int par1, int par2, int par3)
{
super.mouseClicked(par1, par2, par3);
text.mouseClicked(par1, par2, par3);
}*/
/*
* protected void mouseClicked(int par1, int par2, int par3) {
* super.mouseClicked(par1, par2, par3); text.mouseClicked(par1, par2,
* par3); }
*/
}
@@ -107,7 +107,8 @@ public class MaterialPage extends BookPage
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
RenderHelper.enableGUIStandardItemLighting();
manual.renderitem.zLevel = 100;
//renderitem.renderItemAndEffectIntoGUI(fonts, getMC().renderEngine, icons[0], localWidth + 50, localHeight + 0);
// renderitem.renderItemAndEffectIntoGUI(fonts, getMC().renderEngine,
// icons[0], localWidth + 50, localHeight + 0);
manual.renderitem.renderItemAndEffectIntoGUI(manual.fonts, manual.getMC().renderEngine, icons[1], localWidth + 108, localHeight + 50);
manual.renderitem.renderItemAndEffectIntoGUI(manual.fonts, manual.getMC().renderEngine, icons[2], localWidth + 108, localHeight + 82);
manual.renderitem.renderItemAndEffectIntoGUI(manual.fonts, manual.getMC().renderEngine, icons[3], localWidth + 108, localHeight + 114);
@@ -26,7 +26,7 @@ public class TabRegistry
{
if (gui.getClass() == GuiInventory.class)
{
//Values are public at runtime.
// Values are public at runtime.
int cornerX = gui.xSize;
int cornerY = gui.guiTop;
gui.buttonList.clear();