Fix the errors that were left, I commeneted our some code in SmelteryLogic for right now, Also changed the way ArrowEntity Sends the ChangeGameState

This commit is contained in:
Alexander committed 2014-02-03 10:02:49 -05:00
1 parent 840e0cee04
commit fffe2800bd
18 files changed
+45 -33

No files matched your search

@@ -37,6 +37,8 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
public String[] oreTypes;
public int itemMeat;
private int subitems;
@SideOnly(Side.CLIENT)
protected int field_150127_b;
public OreberryBush(String[] textureNames, int meta, int sub, String[] oreTypes)
{
@@ -324,5 +326,12 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
{
return EnumPlantType.Cave;
}
@SideOnly(Side.CLIENT)
public void func_150122_b(boolean p_150122_1_)
{
this.field_150121_P = p_150122_1_;
this.field_150127_b = (p_150122_1_ ? 0 : 1);
}
}
@@ -918,10 +918,11 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (servant.verifyMaster(this, field_145850_b, this.field_145851_c, this.field_145848_d, this.field_145849_e))
tempBricks++;
}
else if (servant.setMaster(this.field_145851_c, this.field_145848_d, this.field_145849_e))
// Temp comment out
/*else if (servant.setMaster(this.field_145851_c, this.field_145848_d, this.field_145849_e))
{
tempBricks++;
}
}*/
if (te instanceof LavaTankLogic)
{
@@ -61,7 +61,7 @@ public class ToolStationLogic extends InventoryLogic implements ISidedInventory
if (this.getWorld() != null)
{
this.field_145847_g = this.getWorld().getBlockMetadata(this.field_145851_c, this.field_145848_d, this.field_145849_e);
this.getWorld().markTileEntityChunkModified(this.field_145851_c, this.field_145848_d, this.field_145849_e, this);
this.getWorld().func_147476_b(this.field_145851_c, this.field_145848_d, this.field_145849_e, this);
}
}
@@ -5,6 +5,7 @@ import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockBush;
import net.minecraft.block.BlockFlower;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -19,7 +20,7 @@ import tconstruct.library.TConstructRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class SlimeTallGrass extends BlockFlower implements IShearable
public class SlimeTallGrass extends BlockBush implements IShearable
{
private static final String[] grassTypes = new String[] { "slimegrass_blue_tall" };
@SideOnly(Side.CLIENT)
@@ -99,7 +100,7 @@ public class SlimeTallGrass extends BlockFlower implements IShearable
}
@Override
public ArrayList<ItemStack> getBlockDropped (World world, int x, int y, int z, int meta, int fortune)
public ArrayList<ItemStack> getDrops (World world, int x, int y, int z, int meta, int fortune)
{
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
if (world.rand.nextInt(8) != 0)
@@ -297,7 +297,8 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
if (this.shootingEntity != null && movingobjectposition.entityHit != this.shootingEntity && movingobjectposition.entityHit instanceof EntityPlayer
&& this.shootingEntity instanceof EntityPlayerMP)
{
TConstruct.packetPipeline.sendTo(new S2BPacketChangeGameState(6, 0), (EntityPlayerMP) this.shootingEntity);
((EntityPlayerMP) this.shootingEntity).playerNetServerHandler.func_147359_a(new S2BPacketChangeGameState(6, 0));
//TConstruct.packetPipeline.sendTo(new S2BPacketChangeGameState(6, 0), (EntityPlayerMP) this.shootingEntity);
}
}
@@ -27,7 +27,7 @@ public class WoolSlab1Item extends MultiItemBlock
Block b = world.func_147439_a(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
int trueMeta = meta % 8;
boolean flag = (id & 8) != 0;
boolean flag = (b) != null;
if ((side == 1 && flag || side == 0 && !flag) && b == this.block && trueMeta == stack.getItemDamage())
{
@@ -27,7 +27,7 @@ public class WoolSlab2Item extends MultiItemBlock
Block block = world.func_147439_a(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
int trueMeta = meta % 8;
boolean flag = (id & 8) != 0;
boolean flag = (block) != null;
if ((side == 1 && flag || side == 0 && !flag) && block == this.block && trueMeta == stack.getItemDamage())
{
@@ -245,7 +245,7 @@ public class Excavator extends HarvestTool
}
@Override
public float getStrVsBlock (ItemStack stack, Block block, int meta)
public float getDigSpeed (ItemStack stack, Block block, int meta)
{
if (!stack.hasTagCompound())
return 1.0f;
@@ -291,7 +291,7 @@ public class Excavator extends HarvestTool
return 0.1f;
}
}
return super.getStrVsBlock(stack, block, meta);
return super.getDigSpeed(stack, block, meta);
}
@Override
@@ -342,7 +342,7 @@ public class Hammer extends HarvestTool
}
@Override
public float getStrVsBlock (ItemStack stack, Block block, int meta)
public float getDigSpeed (ItemStack stack, Block block, int meta)
{
if (!stack.hasTagCompound())
return 1.0f;
@@ -363,7 +363,7 @@ public class Hammer extends HarvestTool
/*if (block == Block.silverfish)
return getblockSpeed(tags, block, meta);*/
return super.getStrVsBlock(stack, block, meta);
return super.getDigSpeed(stack, block, meta);
}
float getblockSpeed (NBTTagCompound tags, Block block, int meta)
@@ -83,7 +83,7 @@ public class LumberAxe extends HarvestTool
}*/
@Override
public float getStrVsBlock (ItemStack stack, Block block, int meta)
public float getDigSpeed (ItemStack stack, Block block, int meta)
{
if (!stack.hasTagCompound())
return 1.0f;
@@ -129,7 +129,7 @@ public class LumberAxe extends HarvestTool
return 0.1f;
}
}
return super.getStrVsBlock(stack, block, meta);
return super.getDigSpeed(stack, block, meta);
}
@Override
@@ -13,9 +13,9 @@ public class Smeltery
{
public static Smeltery instance = new Smeltery();
private final HashMap<List<Item>, FluidStack> smeltingList = new HashMap<List<Item>, FluidStack>();
private final HashMap<List<Item>, Integer> temperatureList = new HashMap<List<Item>, Integer>();
private final HashMap<List<Item>, ItemStack> renderIndex = new HashMap<List<Item>, ItemStack>();
private final HashMap<List<ItemStack>, FluidStack> smeltingList = new HashMap<List<ItemStack>, FluidStack>();
private final HashMap<List<ItemStack>, Integer> temperatureList = new HashMap<List<ItemStack>, Integer>();
private final HashMap<List<ItemStack>, ItemStack> renderIndex = new HashMap<List<ItemStack>, ItemStack>();
private final ArrayList<AlloyMix> alloys = new ArrayList<AlloyMix>();
/** Adds mappings between an itemstack and an output liquid
@@ -67,9 +67,9 @@ public class Smeltery
*/
public static void addMelting (ItemStack input, Item item, int metadata, int temperature, FluidStack liquid)
{
instance.smeltingList.put(Arrays.asList((Item)input.getItem(), input.getItemDamage()), liquid);
instance.temperatureList.put(Arrays.asList((Item)input.getItem(), input.getItemDamage()), temperature);
instance.renderIndex.put(Arrays.asList((Item)input.getItem(), input.getItemDamage()), new ItemStack(item, input.stackSize, metadata));
instance.smeltingList.put(Arrays.asList(new ItemStack(input.getItem(), input.getItemDamage())), liquid);
instance.temperatureList.put(Arrays.asList(new ItemStack(input.getItem(), input.getItemDamage())), temperature);
instance.renderIndex.put(Arrays.asList(new ItemStack(input.getItem(), input.getItemDamage())), new ItemStack(item, input.stackSize, metadata));
}
/** Adds an alloy mixing recipe.
@@ -161,17 +161,17 @@ public class Smeltery
return liquids;
}
public static HashMap<List<Item>, FluidStack> getSmeltingList ()
public static HashMap<List<ItemStack>, FluidStack> getSmeltingList ()
{
return instance.smeltingList;
}
public static HashMap<List<Item>, Integer> getTemperatureList ()
public static HashMap<List<ItemStack>, Integer> getTemperatureList ()
{
return instance.temperatureList;
}
public static HashMap<List<Item>, ItemStack> getRenderIndex ()
public static HashMap<List<ItemStack>, ItemStack> getRenderIndex ()
{
return instance.renderIndex;
}
@@ -56,7 +56,7 @@ public abstract class DualHarvestTool extends HarvestTool
}
@Override
public float getStrVsBlock (ItemStack stack, Block block, int meta)
public float getDigSpeed (ItemStack stack, Block block, int meta)
{
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
@@ -99,7 +99,7 @@ public abstract class DualHarvestTool extends HarvestTool
return 0.1f;
}
}
return super.getStrVsBlock(stack, block, meta);
return super.getDigSpeed(stack, block, meta);
}
public boolean canHarvestBlock (Block block)
@@ -58,7 +58,7 @@ public abstract class HarvestTool extends ToolCore
}
@Override
public float getStrVsBlock (ItemStack stack, Block block, int meta)
public float getDigSpeed (ItemStack stack, Block block, int meta)
{
if (!stack.hasTagCompound())
return 1.0f;
@@ -79,7 +79,7 @@ public abstract class HarvestTool extends ToolCore
{
return calculateStrength(tags, block, meta); //No issue if the harvest level is too low
}
return super.getStrVsBlock(stack, block, meta);
return super.getDigSpeed(stack, block, meta);
}
float calculateStrength (NBTTagCompound tags, Block block, int meta)
@@ -621,7 +621,7 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa
}
@Override
public float getStrVsBlock (ItemStack stack, Block block, int meta)
public float getDigSpeed (ItemStack stack, Block block, int meta)
{
NBTTagCompound tags = stack.getTagCompound();
if (tags.getCompoundTag("InfiTool").getBoolean("Broken"))
@@ -30,7 +30,7 @@ public abstract class Weapon extends ToolCore
}
@Override
public float getStrVsBlock (ItemStack stack, Block block, int meta)
public float getDigSpeed (ItemStack stack, Block block, int meta)
{
if (stack.getTagCompound().getCompoundTag("InfiTool").getBoolean("Broken"))
return 0.1f;
@@ -94,13 +94,13 @@ public class OreberryBushGen extends WorldGenerator
}*/
Block block = world.func_147439_a(x, y, z);
if (block == null || (block != Blocks.end_portal_frame && !world.func_147439_a(x, y, z).isGenMineableReplaceable))
if (block == null || (block != Blocks.end_portal_frame && !world.func_147439_a(x, y, z).func_149730_j()))
world.func_147465_d(x, y, z, this.blockB, metadata, 2);
else
{
for (int iter = 0; iter < replaceBlocks.length; iter++)
{
if (block.isGenMineableReplaceable(world, x, y, z, replaceBlocks[iter]))
if (world.func_147439_a(x, y, z).isReplaceableOreGen(world, x, y, z, replaceBlocks[iter]))
{
world.func_147465_d(x, y, z, this.blockB, metadata, 2);
break;
@@ -123,7 +123,7 @@ public class SurfaceOreGen extends WorldGenerator
{
for (int iter = 0; iter < replaceBlocks.length; iter++)
{
if (block.isGenMineableReplaceable(world, k2, l2, i3, replaceBlocks[iter]))
if (world.func_147439_a(k2, l2, i3).isReplaceableOreGen(world, k2, l2, i3, replaceBlocks[iter]))
{
world.func_147465_d(k2, l2, i3, this.minableBlock, minableBlockMeta, 2);
break;