2211
This commit is contained in:
parent
abb9b5102f
commit
92ca6548c6
49 changed files with 405 additions and 332 deletions
|
@ -53,7 +53,7 @@ public class TilePlayerDectector extends TilePowerAcceptor {
|
|||
while (tIterator.hasNext()) {
|
||||
EntityPlayer player = (EntityPlayer) tIterator.next();
|
||||
if (player.getDistanceSq((double) super.getPos().getX() + 0.5D, (double) super.getPos().getY() + 0.5D, (double) super.getPos().getZ() + 0.5D) <= 256.0D) {
|
||||
if(worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == 0){//ALL
|
||||
if(worldObj.getBlockMetadata(getPos().getX(), getPos().getY(), getPos().getZ()) == 0){//ALL
|
||||
redstone = true;
|
||||
} else if (blockMetadata == 1){//Others
|
||||
if(!owenerUdid.isEmpty() && !owenerUdid.equals(player.getUniqueID().toString())){
|
||||
|
@ -69,8 +69,8 @@ public class TilePlayerDectector extends TilePowerAcceptor {
|
|||
useEnergy(50);
|
||||
}
|
||||
if(lastRedstone != redstone){
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
|
||||
worldObj.markBlockForUpdate(getPos().getX(), getPos().getY(), getPos().getZ());
|
||||
worldObj.notifyBlocksOfNeighborChange(getPos().getX(), getPos().getY(), getPos().getZ(), worldObj.getBlock(getPos().getX(), getPos().getY(), getPos().getZ()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue