Skip to content

Commit

Permalink
moar fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Jan 1, 2014
1 parent 48be78c commit 50a001d
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 87 deletions.
@@ -1,6 +1,7 @@
package mods.battlegear2.api.quiver;

import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;

import java.util.Comparator;
Expand All @@ -11,8 +12,8 @@ public class QuiverArrowRegistry {

private static Map<ItemStack, Class<? extends EntityArrow>> map = new TreeMap<ItemStack, Class<? extends EntityArrow>>(new StackComparator());

public static void addArrowToRegistry(int itemId, int itemMetadata, Class<? extends EntityArrow> entityArrow){
ItemStack stack = new ItemStack(itemId, 1, itemMetadata);
public static void addArrowToRegistry(Item i, int itemMetadata, Class<? extends EntityArrow> entityArrow){
ItemStack stack = new ItemStack(i, 1, itemMetadata);
map.put(stack, entityArrow);
}

Expand Down
29 changes: 12 additions & 17 deletions src/main/java/tconstruct/blocks/MultiBrick.java
Expand Up @@ -23,39 +23,39 @@ public MultiBrick(int id)
}

@Override
public float getBlockHardness (World world, int x, int y, int z)
public float func_149712_f (World world, int x, int y, int z)
{
int meta = world.getBlockMetadata(x, y, z);
switch (meta)
{
case 0:
return Blocks.obsidian.getBlockHardness(world, x, y, z);
return Blocks.obsidian.func_149712_f(world, x, y, z);
case 1:
return Blocks.sandstone.getBlockHardness(world, x, y, z);
return Blocks.sandstone.func_149712_f(world, x, y, z);
case 2:
return Blocks.netherrack.getBlockHardness(world, x, y, z);
return Blocks.netherrack.func_149712_f(world, x, y, z);
case 3:
return Blocks.stone.getBlockHardness(world, x, y, z);
return Blocks.stone.func_149712_f(world, x, y, z);
case 4:
return Blocks.iron_block.getBlockHardness(world, x, y, z);
return Blocks.iron_block.func_149712_f(world, x, y, z);
case 5:
return Blocks.gold_block.getBlockHardness(world, x, y, z);
return Blocks.gold_block.func_149712_f(world, x, y, z);
case 6:
return Blocks.lapis_block.getBlockHardness(world, x, y, z);
return Blocks.lapis_block.func_149712_f(world, x, y, z);
case 7:
return Blocks.diamond_block.getBlockHardness(world, x, y, z);
return Blocks.diamond_block.func_149712_f(world, x, y, z);
case 8:
return Blocks.redstone_block.getBlockHardness(world, x, y, z);
return Blocks.redstone_block.func_149712_f(world, x, y, z);
case 9:
return 1.0F;
case 10:
return 1.5F;
case 11:
return 1.5F;
case 12:
return Blocks.end_stone.getBlockHardness(world, x, y, z);
return Blocks.end_stone.func_149712_f(world, x, y, z);
case 13:
return Blocks.obsidian.getBlockHardness(world, x, y, z);
return Blocks.obsidian.func_149712_f(world, x, y, z);
default:
return blockHardness;
}
Expand Down Expand Up @@ -132,11 +132,6 @@ public boolean isBlockNormalCube (World world, int x, int y, int z)
return world.getBlockMetadata(x, y, z) != 8;
}

@Override
{
return true;
}

@Override
public int isProvidingWeakPower (IBlockAccess world, int x, int y, int z, int side)
{
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/tconstruct/blocks/logic/FrypanLogic.java
Expand Up @@ -234,7 +234,7 @@ public static int getItemBurnTime (ItemStack stack)
{
Block block = Block.blocksList[itemID];

if (block == Block.woodSingleSlab)
if (block == Blocks.wooden_slab)
{
return 150;
}
Expand All @@ -255,15 +255,15 @@ public static int getItemBurnTime (ItemStack stack)
return 200;
if (item instanceof ItemHoe && ((ItemHoe) item).getMaterialName().equals("WOOD"))
return 200;
if (itemID == Items.stick.itemID)
if (item == Items.stick)
return 100;
if (itemID == Items.coal.itemID)
if (item == Items.coal)
return 800;
if (itemID == Items.lava_bucket.itemID)
if (item == Items.lava_bucket)
return 20000;
if (itemID == Blocks.sapling.blockID)
if (new ItemStack(item).equals(new ItemStack(Blocks.sapling)))
return 100;
if (itemID == Items.blaze_rod.itemID)
if (item == Items.blaze_rod)
return 2400;
return GameRegistry.getFuelValue(stack);
}
Expand Down
21 changes: 11 additions & 10 deletions src/main/java/tconstruct/client/gui/AdaptiveSmelteryGui.java
Expand Up @@ -6,6 +6,7 @@
import net.minecraft.client.renderer.*;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.util.*;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
Expand Down Expand Up @@ -105,8 +106,8 @@ protected void updateScrollbar (int mouseX, int mouseY, float par3)
@Override
protected void drawGuiContainerForegroundLayer (int mouseX, int mouseY)
{
fontRenderer.drawString(StatCollector.translateToLocal("crafters.Smeltery"), 86, 5, 0x404040);
fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 90, (ySize - 96) + 2, 0x404040);
field_146289_q.drawString(StatCollector.translateToLocal("crafters.Smeltery"), 86, 5, 0x404040);
field_146289_q.drawString(StatCollector.translateToLocal("container.inventory"), 90, (ySize - 96) + 2, 0x404040);

int base = 0;
int cornerX = (width - xSize) / 2 + 36;
Expand Down Expand Up @@ -168,16 +169,16 @@ protected void drawGuiContainerForegroundLayer (int mouseX, int mouseY)
protected void drawGuiContainerBackgroundLayer (float f, int mouseX, int mouseY)
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(background);
this.field_146297_k.getTextureManager().bindTexture(background);
int cornerX = (width - xSize) / 2 + 36;
int cornerY = (height - ySize) / 2;
drawTexturedModalRect(cornerX + 46, cornerY, 0, 0, 176, ySize);

//Fuel - Lava
this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
this.field_146297_k.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
if (scomp.fuelGague > 0)
{
IIcon lavaIcon = Block.lavaStill.getIcon(0, 0);
IIcon lavaIcon = Blocks.lava.getIcon(0, 0);
int fuel = scomp.getScaledFuelGague(52);
int count = 0;
while (fuel > 0)
Expand Down Expand Up @@ -228,12 +229,12 @@ protected void drawGuiContainerBackgroundLayer (float f, int mouseX, int mouseY)
//Liquid gague
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);

this.mc.getTextureManager().bindTexture(background);
this.field_146297_k.getTextureManager().bindTexture(background);
drawTexturedModalRect(cornerX + 54, cornerY + 16, 176, 76, 52, 52);

//Side inventory
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(backgroundSide);
this.field_146297_k.getTextureManager().bindTexture(backgroundSide);
//if (logic.layers > 0)
{
/*if (logic.layers == 1)
Expand Down Expand Up @@ -272,7 +273,7 @@ else if (logic.layers == 2)
protected void drawFluidStackTooltip (FluidStack par1ItemStack, int par2, int par3)
{
this.zLevel = 100;
List list = getLiquidTooltip(par1ItemStack, this.mc.gameSettings.advancedItemTooltips);
List list = getLiquidTooltip(par1ItemStack, this.field_146297_k.gameSettings.advancedItemTooltips);

for (int k = 0; k < list.size(); ++k)
{
Expand Down Expand Up @@ -358,7 +359,7 @@ protected void drawToolTip (List par1List, int par2, int par3)
while (iterator.hasNext())
{
String s = (String) iterator.next();
int l = this.fontRenderer.getStringWidth(s);
int l = this.field_146289_q.getStringWidth(s);

if (l > k)
{
Expand Down Expand Up @@ -403,7 +404,7 @@ protected void drawToolTip (List par1List, int par2, int par3)
for (int k2 = 0; k2 < par1List.size(); ++k2)
{
String s1 = (String) par1List.get(k2);
this.fontRenderer.drawStringWithShadow(s1, i1, j1, -1);
this.field_146289_q.drawStringWithShadow(s1, i1, j1, -1);

if (k2 == 0)
{
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/tconstruct/client/gui/FurnaceGui.java
Expand Up @@ -29,9 +29,9 @@ public FurnaceGui(InventoryPlayer inventory, FurnaceLogic furnace)
*/
protected void drawGuiContainerForegroundLayer (int par1, int par2)
{
String s = this.logic.isInvNameLocalized() ? this.logic.getInvName() : I18n.getString(this.logic.getInvName());
this.fontRenderer.drawString(s, this.xSize / 2 - this.fontRenderer.getStringWidth(s) / 2, 6, 4210752);
this.fontRenderer.drawString(I18n.getString("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
String s = this.logic.isInvNameLocalized() ? this.logic.getInvName() : I18n.getStringParams(this.logic.getInvName());
this.field_146289_q.drawString(s, this.xSize / 2 - this.field_146289_q.getStringWidth(s) / 2, 6, 4210752);
this.field_146289_q.drawString(I18n.getStringParams("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}

/**
Expand All @@ -40,7 +40,7 @@ protected void drawGuiContainerForegroundLayer (int par1, int par2)
protected void drawGuiContainerBackgroundLayer (float par1, int par2, int par3)
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(furnaceGuiTextures);
this.field_146297_k.getTextureManager().bindTexture(furnaceGuiTextures);
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
Expand Down

0 comments on commit 50a001d

Please sign in to comment.