Skip to content

Commit

Permalink
moar fixy thingies
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Jan 31, 2014
1 parent 4326ff3 commit bb98f77
Show file tree
Hide file tree
Showing 26 changed files with 178 additions and 144 deletions.
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/blocks/ConveyorBase.java
Expand Up @@ -42,7 +42,7 @@ public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y,
}

@Override
public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity)
public void func_149670_a (World world, int x, int y, int z, Entity entity)
{
if (!world.isBlockIndirectlyGettingPowered(x, y, z))
{
Expand Down Expand Up @@ -94,7 +94,7 @@ public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity
}

@Override
public void onBlockPlacedBy (World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack)
public void func_149689_a (World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack)
{
int face = MathHelper.floor_double((double) (entity.rotationYaw * 8.0F / 360.0F) + 0.5D) + (entity.isSneaking() ? 4 : 0) & 7;
int meta = world.getBlockMetadata(x, y, z) & 8;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/tconstruct/blocks/EquipBlock.java
Expand Up @@ -94,9 +94,9 @@ public void randomDisplayTick (World world, int x, int y, int z, Random random)
}
}

public void onBlockPlacedBy (World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack)
public void func_149689_a (World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack)
{
super.onBlockPlacedBy(par1World, par2, par3, par4, par5EntityLivingBase, par6ItemStack);
super.func_149689_a(par1World, par2, par3, par4, par5EntityLivingBase, par6ItemStack);
int i3 = MathHelper.floor_double((par5EntityLivingBase.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;

int newMeta = 0;
Expand All @@ -120,7 +120,7 @@ public void onBlockPlacedBy (World par1World, int par2, int par3, int par4, Enti
}

@Override
public void breakBlock (World par1World, int x, int y, int z, int par5, int meta)
public void func_149749_a (World par1World, int x, int y, int z, int par5, int meta)
{
TileEntity te = par1World.getBlockTileEntity(x, y, z);

Expand Down Expand Up @@ -165,7 +165,7 @@ public void breakBlock (World par1World, int x, int y, int z, int par5, int meta
}
}

super.breakBlock(par1World, x, y, z, par5, meta);
super.func_149749_a(par1World, x, y, z, par5, meta);
}

public int getLightValue (IBlockAccess world, int x, int y, int z)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/GlueBlock.java
Expand Up @@ -17,7 +17,7 @@ public GlueBlock()
}

@Override
public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity)
public void func_149670_a (World world, int x, int y, int z, Entity entity)
{
entity.motionX *= 0.1;
entity.motionZ *= 0.1;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/LavaTankBlock.java
Expand Up @@ -303,7 +303,7 @@ public void harvestBlock (World par1World, EntityPlayer par2EntityPlayer, int pa
}

@Override
public void onBlockPlacedBy (World world, int x, int y, int z, EntityLivingBase living, ItemStack stack)
public void func_149689_a (World world, int x, int y, int z, EntityLivingBase living, ItemStack stack)
{
if (stack.hasTagCompound())
{
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/tconstruct/blocks/logic/StencilTableLogic.java
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;

public class StencilTableLogic extends InventoryLogic implements ISidedInventory
Expand Down Expand Up @@ -120,4 +121,16 @@ public boolean canExtractItem (int i, ItemStack itemstack, int j)
{
return false;
}

@Override
public String func_145825_b ()
{
return StatCollector.translateToLocal("toolstation.PatternShaper");
}

@Override
public boolean func_145818_k_ ()
{
return true;
}
}
12 changes: 12 additions & 0 deletions src/main/java/tconstruct/blocks/logic/TankAirLogic.java
Expand Up @@ -193,5 +193,17 @@ public Packet getDescriptionPacket ()
return new Packet132TileEntityData(field_145851_c, field_145848_d, field_145849_e, 1, tag);
}

@Override
public String func_145825_b ()
{
return this.func_145825_b();
}

@Override
public boolean func_145818_k_ ()
{
return false;
}


}
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/slime/SlimeGel.java
Expand Up @@ -41,7 +41,7 @@ public int damageDropped (int meta)
}

@Override
public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity)
public void func_149670_a (World world, int x, int y, int z, Entity entity)
{
if (entity.motionY < 0)
{
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/blocks/traps/BarricadeBlock.java
Expand Up @@ -91,8 +91,8 @@ public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer
if (meta % 4 != 3)
{
world.func_147465_d(x, y, z, this, meta + 1, 3);
this.onBlockPlacedBy(world, x, y, z, player, stack);
this.onPostBlockPlaced(world, x, y, z, meta);
this.func_149689_a(world, x, y, z, player, stack);
this.func_149714_e(world, x, y, z, meta);

Block var9 = this;
world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, var9.field_149762_H.getStepSound(), (var9.field_149762_H.getVolume() + 1.0F) / 2.0F, var9.field_149762_H.getPitch() * 0.8F);
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/tconstruct/blocks/traps/Landmine.java
Expand Up @@ -234,11 +234,11 @@ public void breakBlock (World par1World, int par2, int par3, int par4, int par5,
{
if (par6 > 0)
{
par1World.notifyBlocksOfNeighborChange(par2, par3, par4, this);
par1World.notifyBlocksOfNeighborChange(par2, par3 - 1, par4, this);
par1World.func_147459_d(par2, par3, par4, this);
par1World.func_147459_d(par2, par3 - 1, par4, this);
}

super.breakBlock(par1World, par2, par3, par4, par5, par6);
super.func_149749_a(par1World, par2, par3, par4, par5, par6);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/traps/Punji.java
Expand Up @@ -34,7 +34,7 @@ public Punji()
}

@Override
public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity)
public void func_149670_a (World world, int x, int y, int z, Entity entity)
{
if (entity instanceof EntityLivingBase)
{
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/tconstruct/client/gui/NewContainerGui.java
Expand Up @@ -279,7 +279,7 @@ protected void func_102021_a (List par1List, int par2, int par3)
while (iterator.hasNext())
{
String s = (String) iterator.next();
int l = this.field_146289_q.getStringfield_146294_l(s);
int l = this.field_146289_q.getStringWidth(s);

if (l > k)
{
Expand Down Expand Up @@ -492,7 +492,7 @@ protected Slot getSlotAtPosition (int mouseX, int mouseY)
protected void mouseClicked (int mouseX, int mouseY, int mouseButton)
{
super.mouseClicked(mouseX, mouseY, mouseButton);
boolean flag = mouseButton == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode + 100;
boolean flag = mouseButton == this.field_146297_k.gameSettings.keyBindPickBlock.func_151463_i() + 100;
Slot slot = this.getSlotAtPosition(mouseX, mouseY);
long l = Minecraft.getSystemTime();
this.field_94074_J = this.field_94072_H == slot && l - this.field_94070_G < 250L && this.field_94073_I == mouseButton;
Expand All @@ -517,7 +517,7 @@ protected void mouseClicked (int mouseX, int mouseY, int mouseButton)

if (this.field_146297_k.gameSettings.touchscreen && flag1 && this.field_146297_k.thePlayer.inventory.getItemStack() == null)
{
this.field_146297_k.displayGuiScreen((GuiScreen) null);
this.field_146297_k.func_147108_a((GuiScreen) null);
return;
}

Expand All @@ -540,7 +540,7 @@ else if (!this.field_94076_q)
{
if (this.field_146297_k.thePlayer.inventory.getItemStack() == null)
{
if (mouseButton == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode + 100)
if (mouseButton == this.field_146297_k.gameSettings.keyBindPickBlock.func_151463_i() + 100)
{
this.handleMouseClick(slot, k1, mouseButton, 3);
}
Expand Down Expand Up @@ -662,7 +662,7 @@ protected void mouseMovedOrUp (int par1, int par2, int par3)

if (this.field_94074_J && slot != null && par3 == 0 && this.container.func_94530_a((ItemStack) null, slot))
{
if (isShiftKeyDown())
if (func_146272_n())
{
if (slot != null && slot.inventory != null && this.field_94075_K != null)
{
Expand Down Expand Up @@ -764,7 +764,7 @@ else if (this.field_94076_q && !this.field_94077_p.isEmpty())
}
else if (this.field_146297_k.thePlayer.inventory.getItemStack() != null)
{
if (par3 == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode + 100)
if (par3 == this.field_146297_k.gameSettings.keyBindPickBlock.func_151463_i() + 100)
{
this.handleMouseClick(slot, j1, par3, 3);
}
Expand Down Expand Up @@ -830,7 +830,7 @@ protected void handleMouseClick (Slot par1Slot, int par2, int par3, int par4)
*/
protected void keyTyped (char par1, int par2)
{
if (par2 == 1 || par2 == this.field_146297_k.gameSettings.field_151445_Q.keyCode)
if (par2 == 1 || par2 == this.field_146297_k.gameSettings.field_151445_Q.func_151463_i())
{
this.field_146297_k.thePlayer.closeScreen();
}
Expand All @@ -839,13 +839,13 @@ protected void keyTyped (char par1, int par2)

if (this.mainSlot != null && this.mainSlot.getHasStack())
{
if (par2 == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode)
if (par2 == this.field_146297_k.gameSettings.keyBindPickBlock.func_151463_i())
{
this.handleMouseClick(this.mainSlot, this.mainSlot.slotNumber, 0, 3);
}
else if (par2 == this.field_146297_k.gameSettings.keyBindDrop.keyCode)
else if (par2 == this.field_146297_k.gameSettings.keyBindDrop.func_151463_i())
{
this.handleMouseClick(this.mainSlot, this.mainSlot.slotNumber, isCtrlKeyDown() ? 1 : 0, 4);
this.handleMouseClick(this.mainSlot, this.mainSlot.slotNumber, func_146271_m() ? 1 : 0, 4);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/client/gui/PartCrafterGui.java
Expand Up @@ -199,7 +199,7 @@ protected void drawGuiContainerBackgroundLayer (float par1, int par2, int par3)
@Override
protected void mouseClicked (int mouseX, int mouseY, int clickNum)
{
boolean flag = clickNum == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode + 100;
boolean flag = clickNum == this.field_146297_k.gameSettings.keyBindPickBlock.func_151463_i() + 100;
Slot slot = this.getSlotAtPosition(mouseX, mouseY);
long l = Minecraft.getSystemTime();
this.field_94074_J = this.field_94072_H == slot && l - this.field_94070_G < 250L && this.field_94073_I == clickNum;
Expand Down Expand Up @@ -249,7 +249,7 @@ else if (!this.field_94076_q)
{
if (this.field_146297_k.thePlayer.inventory.getItemStack() == null)
{
if (clickNum == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode + 100)
if (clickNum == this.field_146297_k.gameSettings.keyBindPickBlock.func_151463_i() + 100)
{
this.handleMouseClick(slot, k1, clickNum, 3);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/client/gui/ToolStationGui.java
Expand Up @@ -464,7 +464,7 @@ protected void drawGuiContainerBackgroundLayer (float par1, int par2, int par3)

protected void keyTyped (char par1, int keyCode)
{
if (keyCode == 1 || (!active && keyCode == this.field_146297_k.gameSettings.field_151445_Q.keyCode))
if (keyCode == 1 || (!active && keyCode == this.field_146297_k.gameSettings.field_151445_Q.func_151463_i()))
{
logic.setToolname("");
updateServer("");
Expand Down

0 comments on commit bb98f77

Please sign in to comment.