package net.darkhax.darkutils.features.antislime;

import net.minecraft.entity.EntityLivingBase;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.chunk.Chunk;

public class TileEntityAntiSlime extends TileEntity {

    public boolean shareChunks (EntityLivingBase entity) {

        final Vec3d entPos = entity.getPositionVector();
        final BlockPos blockpos = new BlockPos(MathHelper.floor(entPos.x), 0, MathHelper.floor(entPos.z));
        final Chunk chunk = entity.world.getChunkFromBlockCoords(blockpos);
        final Chunk tileChunk = this.world.getChunkFromBlockCoords(this.pos);
        return chunk.x == tileChunk.x && chunk.z == tileChunk.z;
    }
}
@@ -59,41 +59,41 @@
 net.
-minecraft.entity.EntityLivingBase
+darkhax.bookshelf.util.WorldUtils
 ;%0Aim
@@ -115,70 +115,31 @@
 aft.
-tile
 entity.
-Tile
 Entity
-;%0Aimport net.minecraft.util.math.BlockPos
+LivingBase
 ;%0Aim
@@ -161,106 +161,29 @@
 aft.
-u
 til
-.math.MathHelper;%0Aimport net.minecraft.util.math.Vec3d;%0Aimport net.minecraft.world.chunk.Chunk
+eentity.TileEntity
 ;%0A%0Ap
@@ -308,381 +308,75 @@
     
-final Vec3d entPos = entity.getPositionVector();%0A        final BlockPos blockpos = new BlockPos(MathHelper.floor(entPos.x), 0, MathHelper.floor(entPos.z));%0A        final Chunk chunk = entity.world.getChunkFromBlockCoords(blockpos);%0A        final Chunk tileChunk = this.world.getChunkFromBlockCoords(this.pos);%0A        return chunk.x == tileChunk.x && chunk.z == tileChunk.z
+return WorldUtils.areSameChunk(entity.getPosition(), this.getPos())
 ;%0A  

Fix a potential CME in the anti slime block.