more fixes

This commit is contained in:
Progwml6 committed 2014-01-09 04:08:38 -05:00
1 parent eba66e0182
commit fb04e8eb08
55 files changed
+1446 -1442

No files matched your search

@@ -35,9 +35,9 @@ public class EnvironmentGui extends GuiScreen
public void initGui ()
{
Keyboard.enableRepeatEvents(true);
this.buttonList.clear();
this.buttonList.add(new GuiButton(0, this.field_146294_l / 2 - 175, this.field_146295_m / 4 + 96 + 24, 350, 20, I18n.getStringParams("I accept responsibility for all cross-mod bugs in this modpack.")));
this.buttonList.add(new GuiButton(1, this.field_146294_l / 2 - 175, this.field_146295_m / 4 + 120 + 24, 350, 20, I18n.getStringParams("I do not want to run these mods together. (Exits Minecraft)")));
this.field_146292_n.clear();
this.field_146292_n.add(new GuiButton(0, this.field_146294_l / 2 - 175, this.field_146295_m / 4 + 96 + 24, 350, 20, I18n.getStringParams("I accept responsibility for all cross-mod bugs in this modpack.")));
this.field_146292_n.add(new GuiButton(1, this.field_146294_l / 2 - 175, this.field_146295_m / 4 + 120 + 24, 350, 20, I18n.getStringParams("I do not want to run these mods together. (Exits Minecraft)")));
}
/**
@@ -53,15 +53,15 @@ public class EnvironmentGui extends GuiScreen
*/
protected void actionPerformed (GuiButton button)
{
if (button.enabled)
if (button.field_146124_l)
{
if (button.id == 0)
if (button.field_146127_k == 0)
{
count++;
if (count >= mods.size())
this.field_146297_k.displayGuiScreen(this.parentGuiScreen);
}
if (button.id == 1)
if (button.field_146127_k == 1)
{
System.exit(0);
}
@@ -70,11 +70,11 @@ public class MiningExplosion extends Explosion
int l = MathHelper.floor_double(d0);
int i1 = MathHelper.floor_double(d1);
int j1 = MathHelper.floor_double(d2);
int k1 = this.world.getBlockId(l, i1, j1);
Block k1 = this.world.getBlock(l, i1, j1);
if (k1 > 0)
if (k1 != Blocks.air)
{
Block block = Block.blocksList[k1];
Block block = k1;
float f3 = this.exploder != null ? this.exploder.getBlockExplosionResistance(this, this.world, l, i1, j1, block) : block.getExplosionResistance(this.exploder, world,
l, i1, j1, explosionX, explosionY, explosionZ);
f1 -= (f3 + 0.8F) * f2 * 0.25f;
@@ -160,7 +160,7 @@ public class MiningExplosion extends Explosion
int i;
int j;
int k;
int l;
Block l;
if (this.isSmoking)
{
@@ -172,7 +172,7 @@ public class MiningExplosion extends Explosion
i = chunkposition.x;
j = chunkposition.y;
k = chunkposition.z;
l = this.world.getBlockId(i, j, k);
l = this.world.getBlock(i, j, k);
if (par1)
{
@@ -195,9 +195,9 @@ public class MiningExplosion extends Explosion
this.world.spawnParticle("smoke", d0, d1, d2, d3, d4, d5);
}
if (l > 0)
if (l != Blocks.air)
{
Block block = Block.blocksList[l];
Block block = l;
if (block.canDropFromExplosion(this))
{
@@ -219,10 +219,10 @@ public class MiningExplosion extends Explosion
i = chunkposition.x;
j = chunkposition.y;
k = chunkposition.z;
l = this.world.getBlockId(i, j, k);
int i1 = this.world.getBlockId(i, j - 1, k);
l = this.world.getBlock(i, j, k);
Block i1 = this.world.getBlock(i, j - 1, k);
if (l == 0 && Block.opaqueCubeLookup[i1] && this.random.nextInt(3) == 0)
if (l == Blocks.air && Block.opaqueCubeLookup[i1] && this.random.nextInt(3) == 0)
{
this.world.setBlock(i, j, k, Blocks.fire);
}
@@ -1,13 +1,14 @@
package tconstruct.util;
import tconstruct.achievements.TAchievements;
import tconstruct.TConstruct;
import tconstruct.common.TRepo;
import tconstruct.library.tools.AbilityHelper;
import tconstruct.util.player.TPlayerStats;
import mantle.common.ComparisonHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import cpw.mods.fml.common.ICraftingHandler;
@@ -16,12 +17,12 @@ public class TCraftingHandler implements ICraftingHandler
{
@Override
public void onCrafting (EntityPlayer player, ItemStack item, IInventory craftMatrix)
public void onCrafting (EntityPlayer player, ItemStack itemstack, IInventory craftMatrix)
{
int itemID = item.getItem().itemID;
Item item = itemstack.getItem();
if (!player.worldObj.isRemote)
{
if (itemID == TRepo.toolStationWood.blockID)
if (ComparisonHelper.areEquivalent(item,TRepo.toolStationWood))
{
TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.getDisplayName());
NBTTagCompound tags = player.getEntityData().getCompoundTag("TConstruct");
@@ -32,7 +33,7 @@ public class TCraftingHandler implements ICraftingHandler
AbilityHelper.spawnItemAtPlayer(player, new ItemStack(TRepo.manualBook, 1, 1));
}
}
if (itemID == TRepo.smeltery.blockID || itemID == TRepo.lavaTank.blockID)
if (ComparisonHelper.areEquivalent(item,TRepo.smeltery) || ComparisonHelper.areEquivalent(item,TRepo.lavaTank))
{
TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.getDisplayName());
NBTTagCompound tags = player.getEntityData().getCompoundTag("TConstruct");
@@ -45,7 +46,7 @@ public class TCraftingHandler implements ICraftingHandler
player.addStat(TAchievements.achievements.get("tconstruct.smelteryMaker"), 1);
}
if (itemID == TRepo.craftingStationWood.blockID){
if (ComparisonHelper.areEquivalent(item,TRepo.craftingStationWood)){
player.addStat(TAchievements.achievements.get("tconstruct.betterCrafting"), 1);
}
}
@@ -1,6 +1,7 @@
package tconstruct.util;
import tconstruct.util.player.ArmorExtended;
import mantle.blocks.BlockUtils;
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
import java.util.Random;
@@ -224,7 +225,7 @@ public class TEventHandler
{
if (stack.itemID >= 4096)
return false;
Block block = Block.blocksList[stack.itemID];
Block block = BlockUtils.getBlockFromItem(stack.getItem());
if (block != null)
{
if (block.isLeaves(null, 0, 0, 0))
@@ -2,6 +2,7 @@ package tconstruct.util.landmine.behavior;
import java.util.List;
import mantle.common.ComparisonHelper;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -24,7 +25,7 @@ public class BehaviorExplosive extends Behavior
public void executeLogic (World par1World, int par2, int par3, int par4, ItemStack par5ItemStack, Entity triggerer, boolean willBlockBeRemoved)
{
float explodeStrenght = 0;
if (par5ItemStack.itemID == Blocks.tnt.blockID)
if (ComparisonHelper.areEquivalent(par5ItemStack.getItem(), Blocks.tnt))
{
explodeStrenght = 4.0F * par5ItemStack.stackSize;
}
@@ -40,7 +41,7 @@ public class BehaviorExplosive extends Behavior
public void getInformation (ItemStack par1ItemStack, List par2List)
{
String str = "UNDEFINED";
if (par1ItemStack.itemID == Blocks.tnt.blockID)
if (ComparisonHelper.areEquivalent(par1ItemStack.getItem(), Blocks.tnt))
{
str = "medium";
}