(BugFix): Fix powder chest being registered while in opening animation
This commit is contained in:
parent
9749a3199a
commit
ebfbd6fc74
@ -13,6 +13,7 @@ import net.minecraft.client.renderer.GlStateManager
|
||||
import net.minecraft.init.Blocks
|
||||
import net.minecraft.util.BlockPos
|
||||
import net.minecraft.entity.Entity
|
||||
import net.minecraft.tileentity.TileEntityChest
|
||||
import net.minecraft.util.AxisAlignedBB
|
||||
import net.minecraft.util.MovingObjectPosition
|
||||
import net.minecraftforge.client.event.ClientChatReceivedEvent
|
||||
@ -98,9 +99,14 @@ object ChestEsp {
|
||||
for (z in boundZMin.toInt()..boundZMax.toInt()) {
|
||||
val block = world.getBlockState(BlockPos(x, y, z)).block
|
||||
if (block == Blocks.chest || block == Blocks.trapped_chest || block == Blocks.ender_chest) {
|
||||
val point = ChestNode(x, y, z)
|
||||
if (!chestNodeExists(x, y, z)) {
|
||||
chestList.add(point)
|
||||
val tileEntity = world.getTileEntity(BlockPos(x, y, z))
|
||||
if (tileEntity is TileEntityChest) {
|
||||
if (tileEntity.numPlayersUsing != 0) {
|
||||
val point = ChestNode(x, y, z)
|
||||
if (!chestNodeExists(x, y, z)) {
|
||||
chestList.add(point)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user