mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 12:19:48 +00:00
more fixes
This commit is contained in:
1 parent
eba66e0182
commit
fb04e8eb08
55 files changed
+1446
-1442
No files matched your search
@@ -4,6 +4,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import mantle.blocks.BlockUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.EnumMobType;
|
||||
@@ -55,9 +56,9 @@ public class BlockLandmine extends BlockContainer
|
||||
@Override
|
||||
public int getLightValue (IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
if (world.func_147439_a(x, y, z) == (Block) this && world.getBlockTileEntity(x, y, z) instanceof TileEntityLandmine)
|
||||
if (world.func_147439_a(x, y, z) == (Block) this && world.func_147438_o(x, y, z) instanceof TileEntityLandmine)
|
||||
{
|
||||
TileEntityLandmine te = (TileEntityLandmine) world.getBlockTileEntity(x, y, z);
|
||||
TileEntityLandmine te = (TileEntityLandmine) world.func_147438_o(x, y, z);
|
||||
|
||||
if (te != null)
|
||||
{
|
||||
@@ -79,12 +80,12 @@ public class BlockLandmine extends BlockContainer
|
||||
@Override
|
||||
public IIcon getBlockTexture (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
TileEntityLandmine te = (TileEntityLandmine) par1IBlockAccess.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntityLandmine te = (TileEntityLandmine) par1IBlockAccess.func_147438_o(par2, par3, par4);
|
||||
|
||||
ItemStack camo = te.getStackInSlot(3);
|
||||
if (camo != null && camo.itemID < blocksList.length)
|
||||
if (camo != null)
|
||||
{
|
||||
return Block.blocksList[camo.itemID].getIcon(par5, camo.getItemDamage());
|
||||
return BlockUtils.getBlockFromItem(camo.getItem()).getIcon(par5, camo.getItemDamage());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -137,7 +138,7 @@ public class BlockLandmine extends BlockContainer
|
||||
@Override
|
||||
public void breakBlock (World par1World, int par2, int par3, int par4, int par5, int par6)
|
||||
{
|
||||
TileEntityLandmine tileentity = (TileEntityLandmine) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntityLandmine tileentity = (TileEntityLandmine) par1World.func_147438_o(par2, par3, par4);
|
||||
|
||||
int metadata = par1World.getBlockMetadata(par2, par3, par4);
|
||||
|
||||
@@ -295,7 +296,7 @@ public class BlockLandmine extends BlockContainer
|
||||
|
||||
if (par6ItemStack.hasDisplayName())
|
||||
{
|
||||
((TileEntityLandmine) par1World.getBlockTileEntity(par2, par3, par4)).setGuiDisplayName(par6ItemStack.getDisplayName());
|
||||
((TileEntityLandmine) par1World.func_147438_o(par2, par3, par4)).setGuiDisplayName(par6ItemStack.getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -420,7 +421,7 @@ public class BlockLandmine extends BlockContainer
|
||||
{
|
||||
if (hasItems(par1World, par2, par3, par4))
|
||||
{
|
||||
TileEntityLandmine te = (TileEntityLandmine) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntityLandmine te = (TileEntityLandmine) par1World.func_147438_o(par2, par3, par4);
|
||||
if (te.soundcountything <= 0)
|
||||
{
|
||||
par1World.playSoundEffect((double) par2 + 0.5D, (double) par3 + 0.1D, (double) par4 + 0.5D, "random.click", 0.3F, 0.6F);
|
||||
@@ -439,7 +440,7 @@ public class BlockLandmine extends BlockContainer
|
||||
|
||||
private boolean hasItems (World par1World, int par2, int par3, int par4)
|
||||
{
|
||||
TileEntityLandmine te = (TileEntityLandmine) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntityLandmine te = (TileEntityLandmine) par1World.func_147438_o(par2, par3, par4);
|
||||
if (te != null && te.getStackInSlot(0) != null || te.getStackInSlot(1) != null || te.getStackInSlot(2) != null)
|
||||
{
|
||||
return true;
|
||||
@@ -454,7 +455,7 @@ public class BlockLandmine extends BlockContainer
|
||||
{
|
||||
EnumMobType triggerMobType;
|
||||
|
||||
TileEntityLandmine te = (TileEntityLandmine) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntityLandmine te = (TileEntityLandmine) par1World.func_147438_o(par2, par3, par4);
|
||||
|
||||
// Change to return 1 if you want the landmine to blow up when the block
|
||||
// holding it is broken
|
||||
@@ -552,7 +553,7 @@ public class BlockLandmine extends BlockContainer
|
||||
|
||||
EnumMobType triggerMobType;
|
||||
|
||||
TileEntityLandmine te = (TileEntityLandmine) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntityLandmine te = (TileEntityLandmine) par1World.func_147438_o(par2, par3, par4);
|
||||
|
||||
// Change to return 1 if you want the landmine to blow up when the
|
||||
// block holding it is broken
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package tconstruct.blocks;
|
||||
|
||||
import mantle.common.ComparisonHelper;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -34,7 +35,7 @@ public class CastingChannelBlock extends BlockContainer
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
CastingChannelLogic tile = (CastingChannelLogic) world.getBlockTileEntity(x, y, z);
|
||||
CastingChannelLogic tile = (CastingChannelLogic) world.func_147438_o(x, y, z);
|
||||
if (player.isSneaking())
|
||||
{
|
||||
}
|
||||
@@ -49,7 +50,7 @@ public class CastingChannelBlock extends BlockContainer
|
||||
}
|
||||
|
||||
ItemStack stack = player.getCurrentEquippedItem();
|
||||
if (stack != null && stack.itemID == this.blockID)
|
||||
if (stack != null && ComparisonHelper.areEquivalent(stack.getItem(), this))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -57,7 +58,7 @@ public class CastingChannelBlock extends BlockContainer
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState (IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
CastingChannelLogic tile = (CastingChannelLogic) world.getBlockTileEntity(x, y, z);
|
||||
CastingChannelLogic tile = (CastingChannelLogic) world.func_147438_o(x, y, z);
|
||||
float minX = 0.3125F;
|
||||
float maxX = 0.6875F;
|
||||
float minZ = 0.3125F;
|
||||
|
||||
@@ -20,7 +20,7 @@ import mantle.blocks.abstracts.InventoryBlock;
|
||||
|
||||
public class CraftingStationBlock extends InventoryBlock
|
||||
{
|
||||
public CraftingStationBlock(int id, Material material)
|
||||
public CraftingStationBlock(Material material)
|
||||
{
|
||||
super(material);
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
|
||||
@@ -27,7 +27,7 @@ public class DryingRack extends InventoryBlock
|
||||
|
||||
public DryingRack()
|
||||
{
|
||||
super(Material.wood);
|
||||
super(Material.field_151575_d);
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
setHardness(2.0f);
|
||||
setStepSound(soundMetalFootstep);
|
||||
@@ -87,7 +87,7 @@ public class DryingRack extends InventoryBlock
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
DryingRackLogic logic = (DryingRackLogic) world.getBlockTileEntity(x, y, z);
|
||||
DryingRackLogic logic = (DryingRackLogic) world.func_147438_o(x, y, z);
|
||||
|
||||
if (!logic.isStackInSlot(0))
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@ import tconstruct.util.config.PHConstruct;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -43,9 +44,9 @@ public class GlassBlockConnectedMeta extends GlassBlockConnected
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldConnectToBlock (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5, int par6)
|
||||
public boolean shouldConnectToBlock (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, Block par5, int par6)
|
||||
{
|
||||
return par5 == this.blockID && (par6 == par1IBlockAccess.getBlockMetadata(par2, par3, par4) || ignoreMetaForConnectedGlass);
|
||||
return par5 == this && (par6 == par1IBlockAccess.getBlockMetadata(par2, par3, par4) || ignoreMetaForConnectedGlass);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -55,7 +56,7 @@ public class GlassBlockConnectedMeta extends GlassBlockConnected
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (Block b, CreativeTabs par2CreativeTabs, List par3List)
|
||||
public void getSubBlocks (Item b, CreativeTabs par2CreativeTabs, List par3List)
|
||||
{
|
||||
for (int i = 0; i < textures.length; i++)
|
||||
{
|
||||
|
||||
@@ -37,8 +37,8 @@ public class GlassPaneConnected extends GlassBlockConnected
|
||||
{
|
||||
if (par5 == 0 || par5 == 1)
|
||||
{
|
||||
return par1IBlockAccess.getBlockId(par2, par3 - 1, par4) == this.blockID && par5 == 0 ? icons[15]
|
||||
: par1IBlockAccess.getBlockId(par2, par3 + 1, par4) == this.blockID && par5 == 1 ? icons[15] : getSideTextureIndex();
|
||||
return par1IBlockAccess.getBlock(par2, par3 - 1, par4) == this && par5 == 0 ? icons[15]
|
||||
: par1IBlockAccess.getBlock(par2, par3 + 1, par4) == this && par5 == 1 ? icons[15] : getSideTextureIndex();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -64,22 +64,22 @@ public class GlassPaneConnected extends GlassBlockConnected
|
||||
switch (par5)
|
||||
{
|
||||
case 0:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4)))
|
||||
{
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4)))
|
||||
{
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1)))
|
||||
{
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1)))
|
||||
{
|
||||
isOpenRight = true;
|
||||
}
|
||||
@@ -146,22 +146,22 @@ public class GlassPaneConnected extends GlassBlockConnected
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4)))
|
||||
{
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4)))
|
||||
{
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1)))
|
||||
{
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1)))
|
||||
{
|
||||
isOpenRight = true;
|
||||
}
|
||||
@@ -228,22 +228,22 @@ public class GlassPaneConnected extends GlassBlockConnected
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4)))
|
||||
{
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4)))
|
||||
{
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4)))
|
||||
{
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4)))
|
||||
{
|
||||
isOpenRight = true;
|
||||
}
|
||||
@@ -310,22 +310,22 @@ public class GlassPaneConnected extends GlassBlockConnected
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4)))
|
||||
{
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4)))
|
||||
{
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4)))
|
||||
{
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4)))
|
||||
{
|
||||
isOpenRight = true;
|
||||
}
|
||||
@@ -392,22 +392,22 @@ public class GlassPaneConnected extends GlassBlockConnected
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4)))
|
||||
{
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4)))
|
||||
{
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1)))
|
||||
{
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1)))
|
||||
{
|
||||
isOpenRight = true;
|
||||
}
|
||||
@@ -474,22 +474,22 @@ public class GlassPaneConnected extends GlassBlockConnected
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4)))
|
||||
{
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4)))
|
||||
{
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1)))
|
||||
{
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlockId(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1)))
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1)))
|
||||
{
|
||||
isOpenRight = true;
|
||||
}
|
||||
@@ -688,7 +688,7 @@ public class GlassPaneConnected extends GlassBlockConnected
|
||||
public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
// if(par5 == 0 || par5 == 1){
|
||||
// return par1IBlockAccess.getBlockId(par2, par3, par4) != this.blockID;
|
||||
// return par1IBlockAccess.getBlock(par2, par3, par4) != this.blockID;
|
||||
// }else{
|
||||
// return true;
|
||||
// }
|
||||
|
||||
@@ -21,7 +21,7 @@ public class MeatBlock extends Block
|
||||
|
||||
public MeatBlock()
|
||||
{
|
||||
super(Material.wood);
|
||||
super(Material.field_151575_d);
|
||||
this.setHardness(1.0F);
|
||||
this.setStepSound(Block.soundWoodFootstep);
|
||||
//setBurnProperties(this.blockID, 5, 20);
|
||||
@@ -88,11 +88,11 @@ public class MeatBlock extends Block
|
||||
{
|
||||
for (int i2 = -b0; i2 <= b0; ++i2)
|
||||
{
|
||||
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);
|
||||
Block j2 = par1World.getBlock(par2 + k1, par3 + l1, par4 + i2);
|
||||
|
||||
if (Block.blocksList[j2] != null)
|
||||
if (j2 != null)
|
||||
{
|
||||
Block.blocksList[j2].beginLeavesDecay(par1World, par2 + k1, par3 + l1, par4 + i2);
|
||||
j2.beginLeavesDecay(par1World, par2 + k1, par3 + l1, par4 + i2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -144,7 +144,7 @@ public class MeatBlock extends Block
|
||||
|
||||
protected ItemStack createStackedBlock (int par1)
|
||||
{
|
||||
return new ItemStack(this.blockID, 1, limitToValidMetadata(par1));
|
||||
return new ItemStack(this, 1, limitToValidMetadata(par1));
|
||||
}
|
||||
|
||||
public boolean isBlockReplaceable (World world, int x, int y, int z)
|
||||
@@ -165,7 +165,7 @@ public class MeatBlock extends Block
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks (Block b, CreativeTabs par2CreativeTabs, List par3List)
|
||||
public void getSubBlocks (Item b, CreativeTabs par2CreativeTabs, List par3List)
|
||||
{
|
||||
for (int i = 0; i < icons.length / 2; i++)
|
||||
par3List.add(new ItemStack(b, 1, i));
|
||||
|
||||
@@ -186,7 +186,7 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta >= 12)
|
||||
{
|
||||
world.setBlock(x, y, z, blockID, meta - 4, 3);
|
||||
world.setBlock(x, y, z, this, meta - 4, 3);
|
||||
AbilityHelper.spawnItemAtPlayer(player, new ItemStack(TRepo.oreBerries, 1, meta % 4 + itemMeat));
|
||||
}
|
||||
}
|
||||
@@ -205,7 +205,7 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
if (world.isRemote)
|
||||
return true;
|
||||
|
||||
world.setBlock(x, y, z, blockID, meta - 4, 3);
|
||||
world.setBlock(x, y, z, this, meta - 4, 3);
|
||||
AbilityHelper.spawnItemAtPlayer(player, new ItemStack(TRepo.oreBerries, random.nextInt(3) + 1, meta % 4 + itemMeat));
|
||||
return true;
|
||||
}
|
||||
@@ -266,7 +266,7 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta < 12)
|
||||
{
|
||||
world.setBlock(x, y, z, blockID, meta + 4, 3);
|
||||
world.setBlock(x, y, z, this, meta + 4, 3);
|
||||
}
|
||||
}
|
||||
/*else if (meta < 8)
|
||||
|
||||
@@ -27,7 +27,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class ToolStationBlock extends InventoryBlock
|
||||
{
|
||||
public ToolStationBlock(int id, Material material)
|
||||
public ToolStationBlock(Material material)
|
||||
{
|
||||
super(material);
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package tconstruct.blocks.logic;
|
||||
|
||||
import tconstruct.inventory.FrypanContainer;
|
||||
import mantle.blocks.BlockUtils;
|
||||
import mantle.blocks.iface.IActiveLogic;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -227,12 +228,11 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
|
||||
}
|
||||
else
|
||||
{
|
||||
int itemID = stack.getItem().itemID;
|
||||
Item item = stack.getItem();
|
||||
|
||||
if (stack.getItem() instanceof ItemBlock && Block.blocksList[itemID] != null)
|
||||
if (stack.getItem() instanceof ItemBlock && BlockUtils.getBlockFromItem(item) != null)
|
||||
{
|
||||
Block block = Block.blocksList[itemID];
|
||||
Block block = BlockUtils.getBlockFromItem(item);
|
||||
|
||||
if (block == Blocks.wooden_slab)
|
||||
{
|
||||
@@ -244,7 +244,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
|
||||
return 2400;
|
||||
}
|
||||
|
||||
if (block.func_149688_o() == Material.wood)
|
||||
if (block.func_149688_o() == Material.field_151575_d)
|
||||
{
|
||||
return 300;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import tconstruct.inventory.FurnaceContainer;
|
||||
import mantle.blocks.BlockUtils;
|
||||
import mantle.blocks.abstracts.InventoryLogic;
|
||||
import mantle.blocks.iface.IActiveLogic;
|
||||
import mantle.blocks.iface.IFacingLogic;
|
||||
@@ -208,9 +209,9 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
|
||||
{
|
||||
Item item = stack.getItem();
|
||||
|
||||
if (stack.getItem() instanceof ItemBlock && Block.blocksList[i] != null)
|
||||
if (stack.getItem() instanceof ItemBlock && BlockUtils.getBlockFromItem(item) != null)
|
||||
{
|
||||
Block block = Block.blocksList[i];
|
||||
Block block = BlockUtils.getBlockFromItem(item);
|
||||
|
||||
if (block == Blocks.wooden_slab)
|
||||
{
|
||||
@@ -222,7 +223,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
|
||||
return 1200;
|
||||
}
|
||||
|
||||
if (block.func_149688_o() == Material.wood)
|
||||
if (block.func_149688_o() == Material.field_151575_d)
|
||||
{
|
||||
return 300;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class SlimeTallGrass extends BlockFlower implements IShearable
|
||||
|
||||
public SlimeTallGrass()
|
||||
{
|
||||
super(Material.vine);
|
||||
super(Material.field_151582_l);
|
||||
float f = 0.4F;
|
||||
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.8F, 0.5F + f);
|
||||
setCreativeTab(TConstructRegistry.blockTab);
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package tconstruct.blocks.traps;
|
||||
|
||||
import mantle.blocks.MantleBlock;
|
||||
import mantle.common.ComparisonHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -21,9 +23,9 @@ public class BarricadeBlock extends MantleBlock
|
||||
Block modelBlock;
|
||||
int modelMeta;
|
||||
|
||||
public BarricadeBlock( Block model, int meta)
|
||||
public BarricadeBlock(Block model, int meta)
|
||||
{
|
||||
super(Material.wood);
|
||||
super(Material.field_151575_d);
|
||||
this.modelBlock = model;
|
||||
this.modelMeta = meta;
|
||||
func_149711_c(4.0F);
|
||||
@@ -61,7 +63,7 @@ public class BarricadeBlock extends MantleBlock
|
||||
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
|
||||
}
|
||||
|
||||
public void setBlockBoundsBasedOnState (IBlockAccess par1IBlockAccess, int x, int y, int z)
|
||||
public void func_147465_dBoundsBasedOnState (IBlockAccess par1IBlockAccess, int x, int y, int z)
|
||||
{
|
||||
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
@@ -70,7 +72,7 @@ public class BarricadeBlock extends MantleBlock
|
||||
{
|
||||
if (meta % 4 > 0)
|
||||
{
|
||||
world.setBlock(x, y, z, this.blockID, meta - 1, 3);
|
||||
world.func_147465_d(x, y, z, this, meta - 1, 3);
|
||||
dropBlockAsItem_do(world, x, y, z, new ItemStack(this));
|
||||
}
|
||||
else
|
||||
@@ -83,14 +85,14 @@ public class BarricadeBlock extends MantleBlock
|
||||
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
ItemStack stack = player.getCurrentEquippedItem();
|
||||
if ((stack != null) && (stack.itemID == this.blockID) && (!player.isSneaking()))
|
||||
if ((stack != null) && (ComparisonHelper.areEquivalent(stack.getItem(), this)) && (!player.isSneaking()))
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta % 4 != 3)
|
||||
{
|
||||
world.setBlock(x, y, z, this, meta + 1, 3);
|
||||
this..onBlockPlacedBy(world, x, y, z, player, stack);
|
||||
this.blockID.onPostBlockPlaced(world, x, y, z, meta);
|
||||
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);
|
||||
|
||||
Block var9 = this;
|
||||
world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, var9.stepSound.getStepSound(), (var9.stepSound.getVolume() + 1.0F) / 2.0F, var9.stepSound.getPitch() * 0.8F);
|
||||
@@ -114,7 +116,7 @@ public class BarricadeBlock extends MantleBlock
|
||||
int trueMeta = meta % 4;
|
||||
trueMeta -= power;
|
||||
if (trueMeta < 0)
|
||||
world.setBlockToAir(x, y, z);
|
||||
world.func_147465_d(x, y, z, Blocks.air, 0, 0);
|
||||
else
|
||||
world.setBlockMetadataWithNotify(x, y, z, (int) (meta - power), 3);
|
||||
onBlockDestroyedByExplosion(world, x, y, z, explosion);
|
||||
|
||||
@@ -233,8 +233,8 @@ public class Landmine extends MantleBlock
|
||||
{
|
||||
if (par6 > 0)
|
||||
{
|
||||
par1World.notifyBlocksOfNeighborChange(par2, par3, par4, this.blockID);
|
||||
par1World.notifyBlocksOfNeighborChange(par2, par3 - 1, par4, this.blockID);
|
||||
par1World.notifyBlocksOfNeighborChange(par2, par3, par4, this);
|
||||
par1World.notifyBlocksOfNeighborChange(par2, par3 - 1, par4, this);
|
||||
}
|
||||
|
||||
super.breakBlock(par1World, par2, par3, par4, par5, par6);
|
||||
|
||||
Reference in new issue
Block a user