Fix miner and chargepad bugs.
Chargepad bug can cause server to crash. Miner bug is minor (heh).
This commit is contained in:
parent
05713b26ed
commit
8c8d8b2bc2
2 changed files with 5 additions and 4 deletions
|
@ -11,6 +11,7 @@ import mekanism.common.tile.TileEntityDigitalMiner;
|
|||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class ThreadMinerSearch extends Thread
|
||||
{
|
||||
|
@ -65,12 +66,12 @@ public class ThreadMinerSearch extends Thread
|
|||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(tileEntity.worldObj.getBlockTileEntity(x, y, z) instanceof IBoundingBlock)
|
||||
|
||||
TileEntity bte;
|
||||
if ((bte = tileEntity.worldObj.getBlockTileEntity(x, y, z)) != null && bte instanceof IBoundingBlock)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
info.id = tileEntity.worldObj.getBlockId(x, y, z);
|
||||
info.meta = tileEntity.worldObj.getBlockMetadata(x, y, z);
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ public class TileEntityChargepad extends TileEntityElectricBlock implements IAct
|
|||
{
|
||||
isActive = false;
|
||||
|
||||
List<EntityLiving> entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord+1, yCoord+0.2, zCoord+1));
|
||||
List<EntityLivingBase> entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord+1, yCoord+0.2, zCoord+1));
|
||||
|
||||
for(EntityLivingBase entity : entities)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue