mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 13:09:53 +00:00
run through remap script
This commit is contained in:
1 parent
689aeba09b
commit
b8cf7cdc5e
208 files changed
+4117
-4117
No files matched your search
@@ -32,14 +32,14 @@ public class BarricadeItem extends ItemBlock
|
||||
|
||||
public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
Block b = world.func_147439_a(x, y, z);
|
||||
Block b = world.getBlock(x, y, z);
|
||||
|
||||
if (b == Blocks.snow && (world.getBlockMetadata(x, y, z) & 7) < 1)
|
||||
{
|
||||
side = 1;
|
||||
}
|
||||
else if (b != Blocks.vine && b != Blocks.tallgrass && b != Blocks.deadbush
|
||||
&& (b == null || !b.func_149742_c(world, x, y, z)))
|
||||
&& (b == null || !b.canPlaceBlockAt(world, x, y, z)))
|
||||
{
|
||||
if (side == 0)
|
||||
{
|
||||
@@ -80,22 +80,22 @@ public class BarricadeItem extends ItemBlock
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (y == 255 && this.b.func_149688_o().isSolid())
|
||||
else if (y == 255 && this.b.getMaterial().isSolid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (world.func_147472_a(this.b, x, y, z, false, side, player, stack))
|
||||
else if (world.canPlaceEntityOnSide(this.b, x, y, z, false, side, player, stack))
|
||||
{
|
||||
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 = this.b.func_149660_a(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))
|
||||
{
|
||||
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), block.field_149762_H.field_150501_a,
|
||||
(block.field_149762_H.func_150497_c() + 1.0F) / 2.0F, block.field_149762_H.func_150494_d() * 0.8F);
|
||||
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), block.stepSound.soundName,
|
||||
(block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
|
||||
--stack.stackSize;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,25 +59,25 @@ public class ItemBlockLandmine extends ItemBlock
|
||||
@Override
|
||||
public boolean placeBlockAt (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata)
|
||||
{
|
||||
if (!world.func_147465_d(x, y, z, TRepo.landmine, metadata, 3))
|
||||
if (!world.setBlock(x, y, z, TRepo.landmine, metadata, 3))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (world.func_147439_a(x, y, z) == TRepo.landmine)
|
||||
if (world.getBlock(x, y, z) == TRepo.landmine)
|
||||
{
|
||||
TRepo.landmine.func_149689_a(world, x, y, z, player, stack);
|
||||
TRepo.landmine.onBlockPlacedBy(world, x, y, z, player, stack);
|
||||
|
||||
TileEntityLandmine te = (TileEntityLandmine) world.func_147438_o(x, y, z);
|
||||
TileEntityLandmine te = (TileEntityLandmine) world.getTileEntity(x, y, z);
|
||||
if (te == null)
|
||||
{
|
||||
te = (TileEntityLandmine) TRepo.landmine.createTileEntity(world, metadata);
|
||||
}
|
||||
|
||||
te.triggerType = stack.getItemDamage();
|
||||
world.func_147455_a(x, y, z, te);
|
||||
world.setTileEntity(x, y, z, te);
|
||||
|
||||
TRepo.landmine.func_149714_e(world, x, y, z, metadata);
|
||||
TRepo.landmine.onPostBlockPlaced(world, x, y, z, metadata);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -42,15 +42,15 @@ public class OreberryBushItem extends MultiItemBlock
|
||||
|
||||
else if (player.canPlayerEdit(x, y, z, side, stack) && player.canPlayerEdit(x, y + 1, z, side, stack))
|
||||
{
|
||||
Block block = world.func_147439_a(x, y, z);
|
||||
Block block = world.getBlock(x, y, z);
|
||||
|
||||
if (block != null && block.canSustainPlant(world, x, y, z, ForgeDirection.UP, (IPlantable) TRepo.oreBerry) && WorldHelper.isAirBlock(world, x, y + 1, z))
|
||||
{
|
||||
world.func_147465_d(x, y + 1, z, blockB, stack.getItemDamage() % 4, 3);
|
||||
world.setBlock(x, y + 1, z, blockB, stack.getItemDamage() % 4, 3);
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
stack.stackSize--;
|
||||
if (!world.isRemote)
|
||||
world.playAuxSFX(2001, x, y, z, Block.func_149682_b(block));
|
||||
world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -48,15 +48,15 @@ public class OreberryBushSecondItem extends MultiItemBlock
|
||||
|
||||
else if (player.canPlayerEdit(x, y, z, side, stack) && player.canPlayerEdit(x, y + 1, z, side, stack))
|
||||
{
|
||||
Block block = world.func_147439_a(x, y, z);
|
||||
Block block = world.getBlock(x, y, z);
|
||||
|
||||
if (block != null && block.canSustainPlant(world, x, y, z, ForgeDirection.UP, (IPlantable) TRepo.oreBerrySecond) && WorldHelper.isAirBlock(world, x, y + 1, z))
|
||||
{
|
||||
world.func_147465_d(x, y + 1, z, blockB, stack.getItemDamage() % 4, 3);
|
||||
world.setBlock(x, y + 1, z, blockB, stack.getItemDamage() % 4, 3);
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
stack.stackSize--;
|
||||
if (!world.isRemote)
|
||||
world.playAuxSFX(2001, x, y, z, Block.func_149682_b(block));
|
||||
world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -24,7 +24,7 @@ public class SlimeTallGrassItem extends MultiItemBlock
|
||||
public IIcon getIconFromDamage (int meta)
|
||||
{
|
||||
int arr = MathHelper.clamp_int(meta, 0, this.blockType.length);
|
||||
return TRepo.slimeTallGrass.func_149691_a(0, arr);
|
||||
return TRepo.slimeTallGrass.getIcon(0, arr);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -24,17 +24,17 @@ public class WoolSlab1Item 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)
|
||||
{
|
||||
Block b = world.func_147439_a(x, y, z);
|
||||
Block b = world.getBlock(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
int trueMeta = meta % 8;
|
||||
boolean flag = (b) != null;
|
||||
|
||||
if ((side == 1 && flag || side == 0 && !flag) && b == this.block && trueMeta == stack.getItemDamage())
|
||||
{
|
||||
if (world.func_147465_d(x, y, z, Blocks.wool, 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.field_149762_H.field_150501_a,
|
||||
(this.block.field_149762_H.func_150497_c() + 1.0F) / 2.0F, this.block.field_149762_H.func_150494_d() * 0.8F);
|
||||
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), this.block.stepSound.soundName,
|
||||
(this.block.stepSound.getVolume() + 1.0F) / 2.0F, this.block.stepSound.getPitch() * 0.8F);
|
||||
--stack.stackSize;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,17 +24,17 @@ 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)
|
||||
{
|
||||
Block block = world.func_147439_a(x, y, z);
|
||||
Block block = world.getBlock(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
int trueMeta = meta % 8;
|
||||
boolean flag = (block) != null;
|
||||
|
||||
if ((side == 1 && flag || side == 0 && !flag) && block == this.block && trueMeta == stack.getItemDamage())
|
||||
{
|
||||
if (world.func_147465_d(x, y, z, Blocks.wool, trueMeta + 8, 3))
|
||||
if (world.setBlock(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.field_149762_H.field_150501_a,
|
||||
(this.block.field_149762_H.func_150497_c() + 1.0F) / 2.0F, this.block.field_149762_H.func_150494_d() * 0.8F);
|
||||
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), this.block.stepSound.soundName,
|
||||
(this.block.stepSound.getVolume() + 1.0F) / 2.0F, this.block.stepSound.getPitch() * 0.8F);
|
||||
--stack.stackSize;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user