This commit is contained in:
Alexdoru authored and Jason Mitchell committed 2023-01-28 18:02:41 -08:00
1 parent d12e70dd52
commit 59f3b5b72a
6 files changed
+33 -20

No files matched your search

@@ -145,8 +145,7 @@ public class BlockLandmine extends BlockContainer {
if (tileentity.hasCustomInventoryName()) {
is.setStackDisplayName(tileentity.getInventoryName());
}
dropBlockAsItem(
par1World, par2, par3, par4, new ItemStack(this, 1, damageDropped(tileentity.triggerType)));
dropBlockAsItem(par1World, par2, par3, par4, new ItemStack(this, 1, damageDropped(tileentity.triggerType)));
for (int j1 = 0; j1 < tileentity.getSizeInventory(); ++j1) {
ItemStack itemstack = tileentity.getStackInSlot(j1);
@@ -242,8 +242,10 @@ public class ContainerLandmine extends Container {
if (itemstack4.stackSize == 0) {
inventoryplayer.setItemStack(null);
}
} else if (shouldDoStuff && itemstack4 != null && slot2.isItemValid(
new ItemStack(itemstack4.getItem(), 1, itemstack4.getItemDamage()))) {
} else if (shouldDoStuff
&& itemstack4 != null
&& slot2.isItemValid(
new ItemStack(itemstack4.getItem(), 1, itemstack4.getItemDamage()))) {
k1 = par2 == 0 ? 1 : 1;
if (k1 > slot2.getSlotStackLimit()) {
@@ -165,9 +165,10 @@ public class TileEntityLandmine extends TileEntity implements IInventory {
@Override
public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer) {
return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) == this && par1EntityPlayer.getDistanceSq(
(double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D)
<= 64.0D;
return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) == this
&& par1EntityPlayer.getDistanceSq(
(double) this.xCoord + 0.5D, (double) this.yCoord + 0.5D, (double) this.zCoord + 0.5D)
<= 64.0D;
}
@Override
@@ -46,12 +46,12 @@ public class CastingChannelLogic extends TileEntity implements IFluidHandler {
public void updateEntity() {
ticks++;
//boolean flagActiveFaucet = false;
// boolean flagActiveFaucet = false;
TileEntity possibleFaucet = worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
//if (possibleFaucet instanceof FaucetLogic) {
// if (possibleFaucet instanceof FaucetLogic) {
// flagActiveFaucet = ((FaucetLogic) possibleFaucet).active;
//}
// }
if (ticks == 6) // && !flagActiveFaucet)
this.distributeFluids();
@@ -29,15 +29,21 @@ public class BattlesignBlock extends EquipBlock {
@Override
public boolean shouldSideBeRendered(
IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
return p_149646_5_ == 0 && this.minY > 0.0D || (p_149646_5_ == 1 && this.maxY < 1.0D || (p_149646_5_ == 2 && this.minZ > 0.0D || (p_149646_5_ == 3 && this.maxZ < 1.0D || (p_149646_5_ == 4 && this.minX > 0.0D || (p_149646_5_ == 5 && this.maxX < 1.0D || !(p_149646_1_
.getBlock(p_149646_2_, p_149646_3_, p_149646_4_)
.isOpaqueCube()
&& p_149646_1_
.getBlock(
p_149646_2_,
p_149646_3_ + 1,
p_149646_4_)
.isOpaqueCube()))))));
return p_149646_5_ == 0 && this.minY > 0.0D
|| (p_149646_5_ == 1 && this.maxY < 1.0D
|| (p_149646_5_ == 2 && this.minZ > 0.0D
|| (p_149646_5_ == 3 && this.maxZ < 1.0D
|| (p_149646_5_ == 4 && this.minX > 0.0D
|| (p_149646_5_ == 5 && this.maxX < 1.0D
|| !(p_149646_1_
.getBlock(p_149646_2_, p_149646_3_, p_149646_4_)
.isOpaqueCube()
&& p_149646_1_
.getBlock(
p_149646_2_,
p_149646_3_ + 1,
p_149646_4_)
.isOpaqueCube()))))));
}
@Override
@@ -646,7 +646,12 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
public void applyEntityCollision(Entity par1Entity) {
if (!this.worldObj.isRemote) {
if (par1Entity != this.riddenByEntity) {
if (par1Entity instanceof EntityLiving && !(par1Entity instanceof EntityIronGolem) && canBeRidden() && this.motionX * this.motionX + this.motionZ * this.motionZ > 0.01D && this.riddenByEntity == null && par1Entity.ridingEntity == null) {
if (par1Entity instanceof EntityLiving
&& !(par1Entity instanceof EntityIronGolem)
&& canBeRidden()
&& this.motionX * this.motionX + this.motionZ * this.motionZ > 0.01D
&& this.riddenByEntity == null
&& par1Entity.ridingEntity == null) {
par1Entity.mountEntity(this);
}