public void renderTileEntityAt(TileEntityWisp tileEntity, double x, double y, double z, float partialTicks, int destroyProgress) {
WorldRenderHandler.WISP_TILE_LIST.add(Pair.of(Pair.of(this, tileEntity), new Vec3d(x, y, z)));
List<Object> particleList = tileEntity.particleList;
double renderViewX = Minecraft.getMinecraft().getRenderManager().viewerPosX;
double renderViewY = Minecraft.getMinecraft().getRenderManager().viewerPosY;
<BUG>double renderViewZ = Minecraft.getMinecraft().getRenderManager().viewerPosZ;
if(!BlockWisp.canSee(tileEntity.getWorld(), tileEntity.getPos())) {
double dist = Minecraft.getMinecraft().getRenderViewEntity().getDistance(x + renderViewX, y + renderViewY, z + renderViewZ);
</BUG>
if(dist > 50 || dist < 10) {

public void renderTileEntityAt(TileEntityWisp tileEntity, double x, double y, double z, float partialTicks, int destroyProgress) {
WorldRenderHandler.WISP_TILE_LIST.add(Pair.of(Pair.of(this, tileEntity), new Vec3d(x, y, z)));
List<Object> particleList = tileEntity.particleList;
double renderViewX = Minecraft.getMinecraft().getRenderManager().viewerPosX;
double renderViewY = Minecraft.getMinecraft().getRenderManager().viewerPosY;
double renderViewZ = Minecraft.getMinecraft().getRenderManager().viewerPosZ;
Entity renderView = Minecraft.getMinecraft().getRenderViewEntity();
if(!BlockWisp.canSee(tileEntity.getWorld(), tileEntity.getPos())) {
double dist = renderView != null ? renderView.getDistance(x + renderViewX, y + renderViewY, z + renderViewZ) : 0.0D;
if(dist > 50 || dist < 10) {
