mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-28 16:06:07 +00:00
Updating more Block clases for 1.7
This commit is contained in:
1 parent
bfcf4f84f1
commit
16cff3ca16
27 files changed
+63
-65
No files matched your search
@@ -16,23 +16,19 @@ package vazkii.tinkerer.common.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.audio.SoundList;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import vazkii.tinkerer.client.core.helper.IconHelper;
|
||||
import vazkii.tinkerer.common.ThaumicTinkerer;
|
||||
@@ -85,15 +81,15 @@ public class BlockAnimationTablet extends BlockModContainer {
|
||||
b0 = 4;
|
||||
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2);
|
||||
TileAnimationTablet tablet = (TileAnimationTablet) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileAnimationTablet tablet = (TileAnimationTablet) par1World.getTileEntity(par2, par3, par4);
|
||||
//if(par5EntityLiving instanceof EntityPlayer) {
|
||||
// tablet.Owner = ((EntityPlayer) par5EntityLiving).username;
|
||||
//}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) {
|
||||
TileAnimationTablet tablet = (TileAnimationTablet) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6) {
|
||||
TileAnimationTablet tablet = (TileAnimationTablet) par1World.getTileEntity(par2, par3, par4);
|
||||
|
||||
if (tablet != null) {
|
||||
if(tablet.getIsBreaking()) {
|
||||
@@ -116,7 +112,7 @@ public class BlockAnimationTablet extends BlockModContainer {
|
||||
k1 = itemstack.stackSize;
|
||||
|
||||
itemstack.stackSize -= k1;
|
||||
entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.itemID, k1, itemstack.getItemDamage()));
|
||||
entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.getItem(), k1, itemstack.getItemDamage()));
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float)random.nextGaussian() * f3;
|
||||
entityitem.motionY = (float)random.nextGaussian() * f3 + 0.2F;
|
||||
@@ -128,14 +124,16 @@ public class BlockAnimationTablet extends BlockModContainer {
|
||||
}
|
||||
}
|
||||
|
||||
par1World.func_96440_m(par2, par3, par4, par5);
|
||||
|
||||
//Look here if something breaks in 1.7
|
||||
par1World.func_147453_f(par2, par3, par4, par5);
|
||||
}
|
||||
|
||||
super.breakBlock(par1World, par2, par3, par4, par5, par6);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) {
|
||||
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, Block par5) {
|
||||
if(par1World.isRemote)
|
||||
return;
|
||||
|
||||
@@ -144,7 +142,7 @@ public class BlockAnimationTablet extends BlockModContainer {
|
||||
boolean on = (meta & 8) != 0;
|
||||
|
||||
if (power && !on) {
|
||||
par1World.scheduleBlockUpdate(par2, par3, par4, blockID, tickRate(par1World));
|
||||
par1World.scheduleBlockUpdate(par2, par3, par4, this, tickRate(par1World));
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, meta | 8, 4);
|
||||
} else if (!power && on)
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, meta & 7, 4);
|
||||
@@ -157,13 +155,13 @@ public class BlockAnimationTablet extends BlockModContainer {
|
||||
|
||||
@Override
|
||||
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {
|
||||
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntity tile = par1World.getTileEntity(par2, par3, par4);
|
||||
if(tile != null && tile instanceof TileAnimationTablet) {
|
||||
TileAnimationTablet tablet = (TileAnimationTablet) tile;
|
||||
if(tablet.redstone && tablet.swingProgress == 0) {
|
||||
tablet.findEntities(tablet.getTargetLoc());
|
||||
tablet.initiateSwing();
|
||||
par1World.addBlockEvent(par2, par3, par4, ModBlocks.animationTablet.blockID, 0, 0);
|
||||
par1World.addBlockEvent(par2, par3, par4, ModBlocks.animationTablet, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -171,7 +169,7 @@ public class BlockAnimationTablet extends BlockModContainer {
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
|
||||
if(!par1World.isRemote) {
|
||||
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntity tile = par1World.getTileEntity(par2, par3, par4);
|
||||
if(tile != null) {
|
||||
TileAnimationTablet tablet = (TileAnimationTablet) tile;
|
||||
if(par5EntityPlayer.getCurrentEquippedItem() != null && par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof ItemWandCasting) {
|
||||
@@ -180,7 +178,7 @@ public class BlockAnimationTablet extends BlockModContainer {
|
||||
if(!activated && !tablet.getIsBreaking() && tablet.swingProgress == 0) {
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, meta == 5 ? 2 : meta + 1, 1 | 2);
|
||||
par1World.playSoundEffect(par2, par3, par4, "thaumcraft:tool", 0.6F, 1F);
|
||||
} else par5EntityPlayer.addChatMessage(StatCollector.translateToLocal("ttmisc.animationTablet.notRotatable"));
|
||||
} else par5EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.animationTablet.notRotatable"));
|
||||
// Rare chance this might happen, but better to cope for it.
|
||||
|
||||
return true;
|
||||
|
||||
@@ -47,7 +47,7 @@ public class BlockAspectAnalyzer extends BlockModContainer {
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
|
||||
if(!par1World.isRemote) {
|
||||
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntity tile = par1World.getTileEntity(par2, par3, par4);
|
||||
if(tile != null)
|
||||
par5EntityPlayer.openGui(ThaumicTinkerer.instance, LibGuiIDs.GUI_ID_ASPECT_ANALYZER, par1World, par2, par3, par4);
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public class BlockAspectAnalyzer extends BlockModContainer {
|
||||
|
||||
@Override
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) {
|
||||
TileAspectAnalyzer analyzer = (TileAspectAnalyzer) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileAspectAnalyzer analyzer = (TileAspectAnalyzer) par1World.getTileEntity(par2, par3, par4);
|
||||
|
||||
if (analyzer != null) {
|
||||
for (int j1 = 0; j1 < analyzer.getSizeInventory(); ++j1) {
|
||||
|
||||
@@ -41,7 +41,7 @@ public abstract class BlockCamo extends BlockModContainer<TileCamo> {
|
||||
|
||||
@Override
|
||||
public Icon getBlockTexture(IBlockAccess world, int x, int y, int z, int side) {
|
||||
TileEntity tile = world.getBlockTileEntity(x, y, z);
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if (tile instanceof TileCamo) {
|
||||
@@ -62,7 +62,7 @@ public abstract class BlockCamo extends BlockModContainer<TileCamo> {
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
|
||||
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntity tile = par1World.getTileEntity(par2, par3, par4);
|
||||
|
||||
if (tile instanceof TileCamo) {
|
||||
TileCamo camo = (TileCamo) tile;
|
||||
@@ -131,7 +131,7 @@ public abstract class BlockCamo extends BlockModContainer<TileCamo> {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public int colorMultiplier(IBlockAccess par1World, int par2, int par3, int par4) {
|
||||
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntity tile = par1World.getTileEntity(par2, par3, par4);
|
||||
if (tile instanceof TileCamo) {
|
||||
TileCamo camo = (TileCamo) tile;
|
||||
if (camo.camo >= 0 && camo.camo < 4096) {
|
||||
|
||||
@@ -54,7 +54,7 @@ public class BlockEnchanter extends BlockModContainer {
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
|
||||
if(!par1World.isRemote) {
|
||||
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntity tile = par1World.getTileEntity(par2, par3, par4);
|
||||
if(tile != null) {
|
||||
PacketDispatcher.sendPacketToAllInDimension(tile.getDescriptionPacket(), par1World.provider.dimensionId);
|
||||
par5EntityPlayer.openGui(ThaumicTinkerer.instance, LibGuiIDs.GUI_ID_ENCHANTER, par1World, par2, par3, par4);
|
||||
@@ -66,7 +66,7 @@ public class BlockEnchanter extends BlockModContainer {
|
||||
|
||||
@Override
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) {
|
||||
TileEnchanter enchanter = (TileEnchanter) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEnchanter enchanter = (TileEnchanter) par1World.getTileEntity(par2, par3, par4);
|
||||
|
||||
if (enchanter != null) {
|
||||
for (int j1 = 0; j1 < enchanter.getSizeInventory(); ++j1) {
|
||||
|
||||
@@ -93,7 +93,7 @@ public class BlockFunnel extends BlockModContainer {
|
||||
|
||||
@Override
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) {
|
||||
TileFunnel funnel = (TileFunnel) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileFunnel funnel = (TileFunnel) par1World.getTileEntity(par2, par3, par4);
|
||||
|
||||
if (funnel != null) {
|
||||
for (int j1 = 0; j1 < funnel.getSizeInventory(); ++j1) {
|
||||
@@ -131,7 +131,7 @@ public class BlockFunnel extends BlockModContainer {
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
|
||||
TileFunnel funnel = (TileFunnel) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileFunnel funnel = (TileFunnel) par1World.getTileEntity(par2, par3, par4);
|
||||
ItemStack stack = funnel.getStackInSlot(0);
|
||||
|
||||
if(stack == null) {
|
||||
|
||||
@@ -54,7 +54,7 @@ public class BlockMagnet extends BlockModContainer {
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
|
||||
if(par5EntityPlayer.getCurrentEquippedItem() != null) {
|
||||
if(par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof ItemWandCasting) {
|
||||
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntity tile = par1World.getTileEntity(par2, par3, par4);
|
||||
if(tile != null && tile instanceof TileMobMagnet) {
|
||||
par5EntityPlayer.openGui(ThaumicTinkerer.instance, LibGuiIDs.GUI_ID_MOB_MAGNET, par1World, par2, par3, par4);
|
||||
if(!par1World.isRemote) {
|
||||
@@ -75,7 +75,7 @@ public class BlockMagnet extends BlockModContainer {
|
||||
|
||||
@Override
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) {
|
||||
TileMagnet magnet = (TileMagnet) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileMagnet magnet = (TileMagnet) par1World.getTileEntity(par2, par3, par4);
|
||||
TileMobMagnet mobMagnet = magnet instanceof TileMobMagnet ? (TileMobMagnet) magnet : null;
|
||||
|
||||
if (mobMagnet != null) {
|
||||
|
||||
@@ -48,7 +48,7 @@ public class BlockRepairer extends BlockModContainer {
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
|
||||
TileRepairer repairer = (TileRepairer) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileRepairer repairer = (TileRepairer) par1World.getTileEntity(par2, par3, par4);
|
||||
ItemStack stack = repairer.getStackInSlot(0);
|
||||
|
||||
if(stack == null) {
|
||||
@@ -96,7 +96,7 @@ public class BlockRepairer extends BlockModContainer {
|
||||
|
||||
@Override
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) {
|
||||
TileRepairer repairer = (TileRepairer) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileRepairer repairer = (TileRepairer) par1World.getTileEntity(par2, par3, par4);
|
||||
|
||||
if (repairer != null) {
|
||||
for (int j1 = 0; j1 < repairer.getSizeInventory(); ++j1) {
|
||||
|
||||
@@ -51,7 +51,7 @@ public class BlockWarpGate extends BlockModContainer {
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
|
||||
if(!par1World.isRemote) {
|
||||
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntity tile = par1World.getTileEntity(par2, par3, par4);
|
||||
if(tile != null) {
|
||||
PacketDispatcher.sendPacketToPlayer(tile.getDescriptionPacket(), (Player) par5EntityPlayer);
|
||||
par5EntityPlayer.openGui(ThaumicTinkerer.instance, LibGuiIDs.GUI_ID_WARP_GATE, par1World, par2, par3, par4);
|
||||
@@ -63,7 +63,7 @@ public class BlockWarpGate extends BlockModContainer {
|
||||
|
||||
@Override
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) {
|
||||
TileWarpGate warpGate = (TileWarpGate) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileWarpGate warpGate = (TileWarpGate) par1World.getTileEntity(par2, par3, par4);
|
||||
|
||||
if (warpGate != null) {
|
||||
for (int j1 = 0; j1 < warpGate.getSizeInventory(); ++j1) {
|
||||
|
||||
@@ -19,7 +19,7 @@ public class BlockMobilizer extends BlockMod {
|
||||
@Override
|
||||
public void onBlockPreDestroy(World par1World, int par2, int par3,
|
||||
int par4, int par5) {
|
||||
TileEntity tile=par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntity tile=par1World.getTileEntity(par2, par3, par4);
|
||||
if(tile!=null&& tile instanceof TileEntityMobilizer)
|
||||
{
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ public class TileAspectAnalyzer extends TileEntity implements IInventory, IPerip
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
return worldObj.getTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -388,7 +388,7 @@ public class TileEnchanter extends TileEntity implements ISidedInventory, IMovab
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
return worldObj.getTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -57,7 +57,7 @@ public class TileEntityMobilizer extends TileEntity {
|
||||
|
||||
|
||||
public void verifyRelay(){
|
||||
TileEntity te = worldObj.getBlockTileEntity(firstRelayX, yCoord, firstRelayZ);
|
||||
TileEntity te = worldObj.getTileEntity(firstRelayX, yCoord, firstRelayZ);
|
||||
if(te instanceof TileEntityRelay){
|
||||
((TileEntityRelay) te).verifyPartner();
|
||||
}
|
||||
@@ -107,7 +107,7 @@ public class TileEntityMobilizer extends TileEntity {
|
||||
//Move the block on top of the mobilizer
|
||||
if(!worldObj.isRemote){
|
||||
|
||||
TileEntity passenger = worldObj.getBlockTileEntity(xCoord, yCoord+1, zCoord);
|
||||
TileEntity passenger = worldObj.getTileEntity(xCoord, yCoord+1, zCoord);
|
||||
IAppEngApi api = Util.getAppEngApi();
|
||||
|
||||
//Prevent the passenger from popping off. Not sent to clients.
|
||||
|
||||
@@ -14,7 +14,7 @@ public class TileEntityRelay extends TileEntity implements IMovableTile {
|
||||
|
||||
|
||||
public void verifyPartner(){
|
||||
TileEntity te = worldObj.getBlockTileEntity(partnerX, yCoord, partnerZ);
|
||||
TileEntity te = worldObj.getTileEntity(partnerX, yCoord, partnerZ);
|
||||
if(!(hasPartner && te instanceof TileEntityRelay && ((TileEntityRelay) te).partnerX == this.xCoord && ((TileEntityRelay) te).partnerZ == this.zCoord)){
|
||||
hasPartner=false;
|
||||
}
|
||||
@@ -81,8 +81,8 @@ public class TileEntityRelay extends TileEntity implements IMovableTile {
|
||||
|
||||
int j=zCoord;
|
||||
do{
|
||||
if(worldObj.getBlockTileEntity(i, yCoord, j) instanceof TileEntityMobilizer){
|
||||
TileEntityMobilizer te = (TileEntityMobilizer) worldObj.getBlockTileEntity(i, yCoord, j);
|
||||
if(worldObj.getTileEntity(i, yCoord, j) instanceof TileEntityMobilizer){
|
||||
TileEntityMobilizer te = (TileEntityMobilizer) worldObj.getTileEntity(i, yCoord, j);
|
||||
te.verifyRelay();
|
||||
if(!te.linked){
|
||||
te.firstRelayX = xCoord;
|
||||
@@ -112,10 +112,10 @@ public class TileEntityRelay extends TileEntity implements IMovableTile {
|
||||
if(!hasPartner){
|
||||
for(int i=-32;i<32;i++){
|
||||
if(i!=0){
|
||||
TileEntity te = worldObj.getBlockTileEntity(xCoord, yCoord, zCoord+i);
|
||||
TileEntity te = worldObj.getTileEntity(xCoord, yCoord, zCoord+i);
|
||||
setPartners(te);
|
||||
|
||||
te = worldObj.getBlockTileEntity(xCoord+i, yCoord, zCoord);
|
||||
te = worldObj.getTileEntity(xCoord+i, yCoord, zCoord);
|
||||
setPartners(te);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class TileFunnel extends TileEntity implements ISidedInventory, IAspectCo
|
||||
if(aspectList != null && aspectList.size() == 1) {
|
||||
Aspect aspect = aspectList.getAspects()[0];
|
||||
|
||||
TileEntity tile = worldObj.getBlockTileEntity(xCoord, yCoord - 1, zCoord);
|
||||
TileEntity tile = worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
|
||||
if(tile != null && tile instanceof TileEntityHopper) {
|
||||
TileEntity tile1 = getHopperFacing(tile.xCoord, tile.yCoord, tile.zCoord, tile.getBlockMetadata());
|
||||
if(tile1 instanceof TileJarFillable) {
|
||||
@@ -78,7 +78,7 @@ public class TileFunnel extends TileEntity implements ISidedInventory, IAspectCo
|
||||
|
||||
private TileEntity getHopperFacing(int x, int y, int z, int meta) {
|
||||
int i = BlockHopper.getDirectionFromMetadata(meta);
|
||||
return worldObj.getBlockTileEntity(x + Facing.offsetsXForSide[i], y + Facing.offsetsYForSide[i], z + Facing.offsetsZForSide[i]);
|
||||
return worldObj.getTileEntity(x + Facing.offsetsXForSide[i], y + Facing.offsetsYForSide[i], z + Facing.offsetsZForSide[i]);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -191,7 +191,7 @@ public class TileFunnel extends TileEntity implements ISidedInventory, IAspectCo
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
return worldObj.getTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -170,7 +170,7 @@ public class TileMobMagnet extends TileMagnet implements IInventory, IMovableTil
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
return worldObj.getTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -191,7 +191,7 @@ public class TileRepairer extends TileEntity implements ISidedInventory, IAspect
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
return worldObj.getTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,7 +22,7 @@ public class TileSummon extends TileEntity {
|
||||
ArrayList<TileEntity> pedestals = new ArrayList<TileEntity>();
|
||||
for(int x=xCoord-5;x<xCoord+5;x++){
|
||||
for(int z=zCoord-5;z<zCoord+5;z++){
|
||||
TileEntity tile = worldObj.getBlockTileEntity(x, yCoord, z);
|
||||
TileEntity tile = worldObj.getTileEntity(x, yCoord, z);
|
||||
if(tile instanceof TilePedestal && ((TilePedestal) tile).getStackInSlot(0) != null && ((TilePedestal) tile).getStackInSlot(0).getItem() instanceof ItemMobAspect){
|
||||
pedestals.add(tile);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public class TileWarpGate extends TileEntity implements IInventory {
|
||||
int y = coords.posY;
|
||||
int z = coords.posZ;
|
||||
|
||||
TileEntity tile = player.worldObj.getBlockTileEntity(x, y, z);
|
||||
TileEntity tile = player.worldObj.getTileEntity(x, y, z);
|
||||
if(tile != null && tile instanceof TileWarpGate) {
|
||||
TileWarpGate destGate = (TileWarpGate) tile;
|
||||
if(!destGate.locked) {
|
||||
@@ -203,7 +203,7 @@ public class TileWarpGate extends TileEntity implements IInventory {
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
return worldObj.getTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -493,7 +493,7 @@ public class TileAnimationTablet extends TileEntity implements IInventory, IPeri
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
return worldObj.getTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -58,7 +58,7 @@ public abstract class TileTransvector extends TileCamo {
|
||||
if(!worldObj.blockExists(x, y, z))
|
||||
return null;
|
||||
|
||||
TileEntity tile = worldObj.getBlockTileEntity(x, y, z);
|
||||
TileEntity tile = worldObj.getTileEntity(x, y, z);
|
||||
|
||||
if(tile == null && tileRequiredAtLink() || (Math.abs(x - xCoord) > getMaxDistance() || Math.abs(y - yCoord) > getMaxDistance() || Math.abs(z - zCoord) > getMaxDistance()) && !cheaty) {
|
||||
y = -1;
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ public class TileTransvectorDislocator extends TileTransvector {
|
||||
}
|
||||
|
||||
public BlockData(ChunkCoordinates coords) {
|
||||
this(worldObj.getBlockId(coords.posX, coords.posY, coords.posZ), worldObj.getBlockMetadata(coords.posX, coords.posY, coords.posZ), worldObj.getBlockTileEntity(coords.posX, coords.posY, coords.posZ), coords);
|
||||
this(worldObj.getBlockId(coords.posX, coords.posY, coords.posZ), worldObj.getBlockMetadata(coords.posX, coords.posY, coords.posZ), worldObj.getTileEntity(coords.posX, coords.posY, coords.posZ), coords);
|
||||
}
|
||||
|
||||
public void clearTileEntityAt() {
|
||||
|
||||
+3
-3
@@ -44,7 +44,7 @@ public class BlockTransvectorDislocator extends BlockCamo {
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
|
||||
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntity tile = par1World.getTileEntity(par2, par3, par4);
|
||||
|
||||
TileTransvectorDislocator dislocator = (TileTransvectorDislocator) tile;
|
||||
ItemStack currentStack = par5EntityPlayer.getCurrentEquippedItem();
|
||||
@@ -84,7 +84,7 @@ public class BlockTransvectorDislocator extends BlockCamo {
|
||||
|
||||
@Override
|
||||
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {
|
||||
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntity tile = par1World.getTileEntity(par2, par3, par4);
|
||||
if(tile != null && tile instanceof TileTransvectorDislocator) {
|
||||
TileTransvectorDislocator dislocator = (TileTransvectorDislocator) tile;
|
||||
dislocator.receiveRedstonePulse();
|
||||
@@ -109,7 +109,7 @@ public class BlockTransvectorDislocator extends BlockCamo {
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) {
|
||||
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
|
||||
TileEntity tile = par1World.getTileEntity(par2, par3, par4);
|
||||
int orientation = BlockPistonBase.determineOrientation(par1World, par2, par3, par4, par5EntityLivingBase);
|
||||
((TileTransvectorDislocator) tile).orientation = orientation;
|
||||
PacketDispatcher.sendPacketToAllInDimension(tile.getDescriptionPacket(), par1World.provider.dimensionId);
|
||||
|
||||
@@ -26,7 +26,7 @@ public class EnderStorageFunctions {
|
||||
focus.setTagCompound(new NBTTagCompound());
|
||||
if(pos!=null)
|
||||
{
|
||||
TileEntity tile = world.getBlockTileEntity(pos.blockX, pos.blockY, pos.blockZ);
|
||||
TileEntity tile = world.getTileEntity(pos.blockX, pos.blockY, pos.blockZ);
|
||||
|
||||
|
||||
if(tile instanceof TileEnderChest && p.isSneaking())
|
||||
|
||||
@@ -47,7 +47,7 @@ public class ItemConnector extends ItemMod {
|
||||
if (par3World.isRemote)
|
||||
return false;
|
||||
|
||||
TileEntity tile = par3World.getBlockTileEntity(par4, par5, par6);
|
||||
TileEntity tile = par3World.getTileEntity(par4, par5, par6);
|
||||
|
||||
if (getY(par1ItemStack) == -1) {
|
||||
if (tile != null && (tile instanceof TileTransvector || tile instanceof TileGolemConnector)) {
|
||||
@@ -70,7 +70,7 @@ public class ItemConnector extends ItemMod {
|
||||
int y = getY(par1ItemStack);
|
||||
int z = getZ(par1ItemStack);
|
||||
|
||||
TileEntity tile1 = par3World.getBlockTileEntity(x, y, z);
|
||||
TileEntity tile1 = par3World.getTileEntity(x, y, z);
|
||||
if (tile1 == null || !(tile1 instanceof TileTransvector)) {
|
||||
setY(par1ItemStack, -1);
|
||||
|
||||
@@ -125,7 +125,7 @@ public class ItemConnector extends ItemMod {
|
||||
int x = getX(par1ItemStack);
|
||||
int y = getY(par1ItemStack);
|
||||
int z = getZ(par1ItemStack);
|
||||
TileEntity tile1 = par2EntityPlayer.worldObj.getBlockTileEntity(x, y, z);
|
||||
TileEntity tile1 = par2EntityPlayer.worldObj.getTileEntity(x, y, z);
|
||||
if (tile1 == null || !(tile1 instanceof TileGolemConnector)) {
|
||||
setY(par1ItemStack, -1);
|
||||
if(par3EntityLivingBase.worldObj.isRemote)
|
||||
|
||||
@@ -66,7 +66,7 @@ public class ItemFocusDislocation extends ItemModFocus {
|
||||
|
||||
int id = world.getBlockId(mop.blockX, mop.blockY, mop.blockZ);
|
||||
int meta = world.getBlockMetadata(mop.blockX, mop.blockY, mop.blockZ);
|
||||
TileEntity tile = world.getBlockTileEntity(mop.blockX, mop.blockY, mop.blockZ);
|
||||
TileEntity tile = world.getTileEntity(mop.blockX, mop.blockY, mop.blockZ);
|
||||
ItemWandCasting wand = (ItemWandCasting)itemstack.getItem();
|
||||
|
||||
if(player.canPlayerEdit(mop.blockX, mop.blockY, mop.blockZ, mop.sideHit, itemstack)) {
|
||||
|
||||
@@ -72,7 +72,7 @@ public class ItemBlockTalisman extends ItemMod {
|
||||
int bid = getBlockID(par1ItemStack);
|
||||
int bmeta = getBlockMeta(par1ItemStack);
|
||||
|
||||
TileEntity tile = par3World.getBlockTileEntity(par4, par5, par6);
|
||||
TileEntity tile = par3World.getTileEntity(par4, par5, par6);
|
||||
if(tile != null && tile instanceof IInventory) {
|
||||
IInventory inv = (IInventory) tile;
|
||||
int[] slots = inv instanceof ISidedInventory ? ((ISidedInventory) inv).getAccessibleSlotsFromSide(par7) : TileTransvectorInterface.buildSlotsForLinearInventory(inv);
|
||||
|
||||
@@ -42,7 +42,7 @@ public class GuiHandler implements IGuiHandler {
|
||||
|
||||
@Override
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
TileEntity tile = world.getBlockTileEntity(x, y, z);
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
switch(ID) {
|
||||
case LibGuiIDs.GUI_ID_TABLET :
|
||||
return new ContainerAnimationTablet((TileAnimationTablet) tile, player.inventory);
|
||||
@@ -67,7 +67,7 @@ public class GuiHandler implements IGuiHandler {
|
||||
|
||||
@Override
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
TileEntity tile = world.getBlockTileEntity(x, y, z);
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
switch(ID) {
|
||||
case LibGuiIDs.GUI_ID_TABLET :
|
||||
return new GuiAnimationTablet((TileAnimationTablet) tile, player.inventory);
|
||||
|
||||
Reference in new issue
Block a user