mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +00:00
more fixes
This commit is contained in:
1 parent
eba66e0182
commit
fb04e8eb08
55 files changed
+1446
-1442
No files matched your search
@@ -15,11 +15,12 @@ import net.minecraft.util.StatCollector;
|
||||
|
||||
public class BarricadeItem extends ItemBlock
|
||||
{
|
||||
private int bID;
|
||||
private Block b;
|
||||
|
||||
public BarricadeItem(Block b)
|
||||
{
|
||||
super(b);
|
||||
this.b = b;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -79,17 +80,17 @@ public class BarricadeItem extends ItemBlock
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (y == 255 && Block.blocksList[this.bID].blockMaterial.isSolid())
|
||||
else if (y == 255 && this.b.func_149688_o().isSolid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (world.canPlaceEntityOnSide(this.bID, x, y, z, false, side, player, stack))
|
||||
else if (world.canPlaceEntityOnSide(this.b, x, y, z, false, side, player, stack))
|
||||
{
|
||||
Block block = Block.blocksList[this.bID];
|
||||
Block block = this.b;
|
||||
//int meta = this.getMetadata(stack.getItemDamage());
|
||||
int rotation = MathHelper.floor_double((double) (player.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
|
||||
int meta = rotation * 4;
|
||||
int metadata = Block.blocksList[this.bID].onBlockPlaced(world, x, y, z, side, hitX, hitY, hitZ, meta);
|
||||
int metadata = this.b.onBlockPlaced(world, x, y, z, side, hitX, hitY, hitZ, meta);
|
||||
|
||||
if (placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata))
|
||||
{
|
||||
|
||||
@@ -10,15 +10,13 @@ import net.minecraft.world.World;
|
||||
|
||||
public class WoolSlab1Item extends MultiItemBlock
|
||||
{
|
||||
int blockID;
|
||||
Block block;
|
||||
|
||||
public WoolSlab1Item(Block b)
|
||||
{
|
||||
super(b, "", "slab", ItemDye.dyeColorNames);
|
||||
this.setSpecialIndex(7, 15);
|
||||
this.blockID = id + 256;
|
||||
this.block = Block.blocksList[id + 256];
|
||||
this.block = b;
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
@@ -31,9 +29,9 @@ public class WoolSlab1Item extends MultiItemBlock
|
||||
int trueMeta = meta % 8;
|
||||
boolean flag = (id & 8) != 0;
|
||||
|
||||
if ((side == 1 && flag || side == 0 && !flag) && id == this.blockID && trueMeta == stack.getItemDamage())
|
||||
if ((side == 1 && flag || side == 0 && !flag) && id == this && trueMeta == stack.getItemDamage())
|
||||
{
|
||||
if (world.setBlock(x, y, z, Blocks.wool.blockID, trueMeta, 3))
|
||||
if (world.setBlock(x, y, z, Blocks.wool, trueMeta, 3))
|
||||
{
|
||||
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), this.block.stepSound.getPlaceSound(),
|
||||
(this.block.stepSound.getVolume() + 1.0F) / 2.0F, this.block.stepSound.getPitch() * 0.8F);
|
||||
|
||||
@@ -27,14 +27,14 @@ public class WoolSlab2Item extends MultiItemBlock
|
||||
@Override
|
||||
public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
int id = world.getBlockId(x, y, z);
|
||||
int id = world.func_147439_a(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
int trueMeta = meta % 8;
|
||||
boolean flag = (id & 8) != 0;
|
||||
|
||||
if ((side == 1 && flag || side == 0 && !flag) && id == this.blockID && trueMeta == stack.getItemDamage())
|
||||
{
|
||||
if (world.setBlock(x, y, z, Blocks.wool.blockID, trueMeta + 8, 3))
|
||||
if (world.func_147465_d(x, y, z, Blocks.wool, trueMeta + 8, 3))
|
||||
{
|
||||
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), this.block.stepSound.getPlaceSound(),
|
||||
(this.block.stepSound.getVolume() + 1.0F) / 2.0F, this.block.stepSound.getPitch() * 0.8F);
|
||||
|
||||
Reference in new issue
Block a user