This commit is contained in:
Jesse Boyd 2017-08-29 19:48:23 +10:00
parent 921ca83ed2
commit 356c5431ec
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
31 changed files with 114 additions and 104 deletions

View File

@ -8,6 +8,7 @@ import com.boydti.fawe.example.CharFaweChunk;
import com.boydti.fawe.object.FaweChunk;
import com.boydti.fawe.object.FaweQueue;
import com.boydti.fawe.util.MainUtil;
import com.boydti.fawe.util.MathMan;
import com.boydti.fawe.util.ReflectionUtils;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.jnbt.ListTag;
@ -189,9 +190,9 @@ public class BukkitChunk_1_10 extends CharFaweChunk<Chunk, BukkitQueue_1_10> {
if (ent instanceof EntityPlayer) {
return false;
}
int x = ((int) Math.round(ent.locX) & 15);
int z = ((int) Math.round(ent.locZ) & 15);
int y = ((int) Math.round(ent.locY) & 0xFF);
int x = (MathMan.roundInt(ent.locX) & 15);
int z = (MathMan.roundInt(ent.locZ) & 15);
int y = (MathMan.roundInt(ent.locY) & 0xFF);
int i = FaweCache.CACHE_I[y][z][x];
int j = FaweCache.CACHE_J[y][z][x];
String id = EntityTypes.b(ent);
@ -280,9 +281,9 @@ public class BukkitChunk_1_10 extends CharFaweChunk<Chunk, BukkitQueue_1_10> {
if (entity instanceof net.minecraft.server.v1_10_R1.EntityPlayer) {
continue;
}
int x = ((int) Math.round(entity.locX) & 15);
int z = ((int) Math.round(entity.locZ) & 15);
int y = (int) Math.round(entity.locY);
int x = (MathMan.roundInt(entity.locX) & 15);
int z = (MathMan.roundInt(entity.locZ) & 15);
int y = MathMan.roundInt(entity.locY);
if (y < 0 || y > 255) continue;
if (array[FaweCache.CACHE_J[y][z][x]] != 0) {
if (copy != null) {

View File

@ -789,9 +789,9 @@ public class BukkitQueue_1_10 extends BukkitQueue_0<net.minecraft.server.v1_10_R
if (ent instanceof EntityPlayer || (!createdEntities.isEmpty() && createdEntities.contains(ent.getUniqueID()))) {
continue;
}
int x = ((int) Math.round(ent.locX) & 15);
int z = ((int) Math.round(ent.locZ) & 15);
int y = ((int) Math.round(ent.locY) & 0xFF);
int x = (MathMan.roundInt(ent.locX) & 15);
int z = (MathMan.roundInt(ent.locZ) & 15);
int y = (MathMan.roundInt(ent.locY) & 0xFF);
int i = FaweCache.CACHE_I[y][z][x];
char[] array = fs.getIdArray(i);
if (array == null) {

View File

@ -7,6 +7,7 @@ import com.boydti.fawe.example.CharFaweChunk;
import com.boydti.fawe.object.FaweChunk;
import com.boydti.fawe.object.FaweQueue;
import com.boydti.fawe.util.MainUtil;
import com.boydti.fawe.util.MathMan;
import com.boydti.fawe.util.ReflectionUtils;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.jnbt.ListTag;
@ -81,9 +82,9 @@ public class BukkitChunk_1_11 extends CharFaweChunk<Chunk, com.boydti.fawe.bukki
if (ent instanceof EntityPlayer) {
return false;
}
int x = ((int) Math.round(ent.locX) & 15);
int z = ((int) Math.round(ent.locZ) & 15);
int y = ((int) Math.round(ent.locY) & 0xFF);
int x = (MathMan.roundInt(ent.locX) & 15);
int z = (MathMan.roundInt(ent.locZ) & 15);
int y = (MathMan.roundInt(ent.locY) & 0xFF);
int i = FaweCache.CACHE_I[y][z][x];
int j = FaweCache.CACHE_J[y][z][x];
String id = EntityTypes.b(ent);
@ -278,9 +279,9 @@ public class BukkitChunk_1_11 extends CharFaweChunk<Chunk, com.boydti.fawe.bukki
if (entity instanceof EntityPlayer) {
continue;
}
int x = ((int) Math.round(entity.locX) & 15);
int z = ((int) Math.round(entity.locZ) & 15);
int y = (int) Math.round(entity.locY);
int x = (MathMan.roundInt(entity.locX) & 15);
int z = (MathMan.roundInt(entity.locZ) & 15);
int y = MathMan.roundInt(entity.locY);
if (y < 0 || y > 255) continue;
if (array[FaweCache.CACHE_J[y][z][x]] != 0) {
if (copy != null) {

View File

@ -791,9 +791,9 @@ public class BukkitQueue_1_11 extends BukkitQueue_0<net.minecraft.server.v1_11_R
if (ent instanceof EntityPlayer || (!createdEntities.isEmpty() && createdEntities.contains(ent.getUniqueID()))) {
continue;
}
int x = ((int) Math.round(ent.locX) & 15);
int z = ((int) Math.round(ent.locZ) & 15);
int y = ((int) Math.round(ent.locY) & 0xFF);
int x = (MathMan.roundInt(ent.locX) & 15);
int z = (MathMan.roundInt(ent.locZ) & 15);
int y = (MathMan.roundInt(ent.locY) & 0xFF);
int i = FaweCache.CACHE_I[y][z][x];
char[] array = fs.getIdArray(i);
if (array == null) {

View File

@ -7,6 +7,7 @@ import com.boydti.fawe.example.CharFaweChunk;
import com.boydti.fawe.object.FaweChunk;
import com.boydti.fawe.object.FaweQueue;
import com.boydti.fawe.util.MainUtil;
import com.boydti.fawe.util.MathMan;
import com.boydti.fawe.util.ReflectionUtils;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.jnbt.ListTag;
@ -81,9 +82,9 @@ public class BukkitChunk_1_12 extends CharFaweChunk<Chunk, BukkitQueue_1_12> {
if (ent instanceof EntityPlayer || BukkitQueue_0.getAdapter() == null) {
return false;
}
int x = ((int) Math.round(ent.locX) & 15);
int z = ((int) Math.round(ent.locZ) & 15);
int y = ((int) Math.round(ent.locY) & 0xFF);
int x = (MathMan.roundInt(ent.locX) & 15);
int z = (MathMan.roundInt(ent.locZ) & 15);
int y = (MathMan.roundInt(ent.locY) & 0xFF);
int i = FaweCache.CACHE_I[y][z][x];
int j = FaweCache.CACHE_J[y][z][x];
String id = EntityTypes.b(ent);
@ -270,6 +271,8 @@ public class BukkitChunk_1_12 extends CharFaweChunk<Chunk, BukkitQueue_1_12> {
} else {
Collection<Entity> ents = entities[i];
if (!ents.isEmpty()) {
int layerYStart = i << 4;
int layerYEnd = layerYStart + 15;
char[] array = this.getIdArray(i);
if (array == null) continue;
Iterator<Entity> iter = ents.iterator();
@ -278,10 +281,10 @@ public class BukkitChunk_1_12 extends CharFaweChunk<Chunk, BukkitQueue_1_12> {
if (entity instanceof EntityPlayer) {
continue;
}
int x = ((int) Math.round(entity.locX) & 15);
int z = ((int) Math.round(entity.locZ) & 15);
int y = (int) Math.round(entity.locY);
if (y < 0 || y > 255) continue;
int y = MathMan.roundInt(entity.locY);
if (y > layerYEnd || y < layerYStart) continue;
int x = (MathMan.roundInt(entity.locX) & 15);
int z = (MathMan.roundInt(entity.locZ) & 15);
if (array[FaweCache.CACHE_J[y][z][x]] != 0) {
if (copy != null) {
copy.storeEntity(entity);

View File

@ -832,9 +832,9 @@ public class BukkitQueue_1_12 extends BukkitQueue_0<net.minecraft.server.v1_12_R
if (ent instanceof EntityPlayer || (!createdEntities.isEmpty() && createdEntities.contains(ent.getUniqueID()))) {
continue;
}
int x = ((int) Math.round(ent.locX) & 15);
int z = ((int) Math.round(ent.locZ) & 15);
int y = ((int) Math.round(ent.locY) & 0xFF);
int x = (MathMan.roundInt(ent.locX) & 15);
int z = (MathMan.roundInt(ent.locZ) & 15);
int y = (MathMan.roundInt(ent.locY) & 0xFF);
int i = FaweCache.CACHE_I[y][z][x];
char[] array = fs.getIdArray(i);
if (array == null) {

View File

@ -7,6 +7,7 @@ import com.boydti.fawe.example.CharFaweChunk;
import com.boydti.fawe.object.FaweChunk;
import com.boydti.fawe.object.FaweQueue;
import com.boydti.fawe.util.MainUtil;
import com.boydti.fawe.util.MathMan;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.jnbt.ListTag;
import com.sk89q.jnbt.StringTag;
@ -189,9 +190,9 @@ public class BukkitChunk_1_7 extends CharFaweChunk<Chunk, BukkitQueue17> {
if (entity instanceof EntityPlayer) {
continue;
}
int x = ((int) Math.round(entity.locX) & 15);
int z = ((int) Math.round(entity.locZ) & 15);
int y = (int) Math.round(entity.locY);
int x = (MathMan.roundInt(entity.locX) & 15);
int z = (MathMan.roundInt(entity.locZ) & 15);
int y = MathMan.roundInt(entity.locY);
if (y < 0 || y > 255) continue;
if (array[FaweCache.CACHE_J[y][z][x]] != 0) {
nmsWorld.removeEntity(entity);

View File

@ -406,9 +406,9 @@ public class BukkitQueue17 extends BukkitQueue_0<net.minecraft.server.v1_7_R4.Ch
if (ent instanceof EntityPlayer || (!createdEntities.isEmpty() && createdEntities.contains(ent.getUniqueID()))) {
continue;
}
int x = ((int) Math.round(ent.locX) & 15);
int z = ((int) Math.round(ent.locZ) & 15);
int y = ((int) Math.round(ent.locY) & 0xFF);
int x = (MathMan.roundInt(ent.locX) & 15);
int z = (MathMan.roundInt(ent.locZ) & 15);
int y = (MathMan.roundInt(ent.locY) & 0xFF);
int i = FaweCache.CACHE_I[y][z][x];
char[] array = fs.getIdArray(i);
if (array == null) {

View File

@ -7,6 +7,7 @@ import com.boydti.fawe.example.CharFaweChunk;
import com.boydti.fawe.object.FaweChunk;
import com.boydti.fawe.object.FaweQueue;
import com.boydti.fawe.util.MainUtil;
import com.boydti.fawe.util.MathMan;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.jnbt.ListTag;
import com.sk89q.jnbt.StringTag;
@ -116,9 +117,9 @@ public class BukkitChunk_1_8 extends CharFaweChunk<Chunk, BukkitQueue18R3> {
if (entity instanceof EntityPlayer) {
continue;
}
int x = ((int) Math.round(entity.locX) & 15);
int z = ((int) Math.round(entity.locZ) & 15);
int y = (int) Math.round(entity.locY);
int x = (MathMan.roundInt(entity.locX) & 15);
int z = (MathMan.roundInt(entity.locZ) & 15);
int y = MathMan.roundInt(entity.locY);
if (y < 0 || y > 255) continue;
if (array[FaweCache.CACHE_J[y][z][x]] != 0) {
nmsWorld.removeEntity(entity);

View File

@ -397,9 +397,9 @@ public class BukkitQueue18R3 extends BukkitQueue_0<net.minecraft.server.v1_8_R3.
if (ent instanceof EntityPlayer || (!createdEntities.isEmpty() && createdEntities.contains(ent.getUniqueID()))) {
continue;
}
int x = ((int) Math.round(ent.locX) & 15);
int z = ((int) Math.round(ent.locZ) & 15);
int y = ((int) Math.round(ent.locY) & 0xFF);
int x = (MathMan.roundInt(ent.locX) & 15);
int z = (MathMan.roundInt(ent.locZ) & 15);
int y = (MathMan.roundInt(ent.locY) & 0xFF);
int i = FaweCache.CACHE_I[y][z][x];
char[] array = fs.getIdArray(i);
if (array == null) {

View File

@ -7,6 +7,7 @@ import com.boydti.fawe.example.CharFaweChunk;
import com.boydti.fawe.object.FaweChunk;
import com.boydti.fawe.object.FaweQueue;
import com.boydti.fawe.util.MainUtil;
import com.boydti.fawe.util.MathMan;
import com.boydti.fawe.util.ReflectionUtils;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.jnbt.ListTag;
@ -216,9 +217,9 @@ public class BukkitChunk_1_9 extends CharFaweChunk<Chunk, BukkitQueue_1_9_R1> {
if (entity instanceof EntityPlayer) {
continue;
}
int x = ((int) Math.round(entity.locX) & 15);
int z = ((int) Math.round(entity.locZ) & 15);
int y = (int) Math.round(entity.locY);
int x = (MathMan.roundInt(entity.locX) & 15);
int z = (MathMan.roundInt(entity.locZ) & 15);
int y = MathMan.roundInt(entity.locY);
if (y < 0 || y > 255) continue;
if (array[FaweCache.CACHE_J[y][z][x]] != 0) {
nmsWorld.removeEntity(entity);

View File

@ -744,9 +744,9 @@ public class BukkitQueue_1_9_R1 extends BukkitQueue_0<net.minecraft.server.v1_9_
if (ent instanceof EntityPlayer || (!createdEntities.isEmpty() && createdEntities.contains(ent.getUniqueID()))) {
continue;
}
int x = ((int) Math.round(ent.locX) & 15);
int z = ((int) Math.round(ent.locZ) & 15);
int y = ((int) Math.round(ent.locY) & 0xFF);
int x = (MathMan.roundInt(ent.locX) & 15);
int z = (MathMan.roundInt(ent.locZ) & 15);
int y = (MathMan.roundInt(ent.locY) & 0xFF);
int i = FaweCache.CACHE_I[y][z][x];
char[] array = fs.getIdArray(i);
if (array == null) {

View File

@ -53,9 +53,9 @@ public class SurfaceSpline implements Brush {
final double splinelength = interpol.arcLength(0, 1);
for (double loop = 0; loop <= 1; loop += 1D / splinelength / quality) {
final Vector tipv = interpol.getPosition(loop);
final int tipx = (int) Math.round(tipv.getX());
final int tipx = MathMan.roundInt(tipv.getX());
final int tipz = (int) tipv.getZ();
int tipy = (int) Math.round(tipv.getY());
int tipy = MathMan.roundInt(tipv.getY());
tipy = editSession.getNearestSurfaceTerrainBlock(tipx, tipz, tipy, 0, maxY);
if (tipy == -1) continue;
if (radius == 0) {

View File

@ -5,6 +5,7 @@ import com.boydti.fawe.object.FaweQueue;
import com.boydti.fawe.object.HasFaweQueue;
import com.boydti.fawe.object.extent.FastWorldEditExtent;
import com.boydti.fawe.util.ExtentTraverser;
import com.boydti.fawe.util.MathMan;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.jnbt.DoubleTag;
import com.sk89q.jnbt.LongTag;
@ -64,9 +65,9 @@ public class MutableEntityChange implements Change {
return;
}
List<DoubleTag> pos = (List<DoubleTag>) map.get("Pos").getValue();
int x = (int) Math.round(pos.get(0).getValue());
int y = (int) Math.round(pos.get(1).getValue());
int z = (int) Math.round(pos.get(2).getValue());
int x = MathMan.roundInt(pos.get(0).getValue());
int y = MathMan.roundInt(pos.get(1).getValue());
int z = MathMan.roundInt(pos.get(2).getValue());
UUID uuid = new UUID(most, least);
fwee.getQueue().removeEntity(x, y, z, uuid);
} else {
@ -101,9 +102,9 @@ public class MutableEntityChange implements Change {
return;
}
List<DoubleTag> pos = (List<DoubleTag>) posTag.getValue();
int x = (int) Math.round(pos.get(0).getValue());
int y = (int) Math.round(pos.get(1).getValue());
int z = (int) Math.round(pos.get(2).getValue());
int x = MathMan.roundInt(pos.get(0).getValue());
int y = MathMan.roundInt(pos.get(1).getValue());
int z = MathMan.roundInt(pos.get(2).getValue());
queue.setEntity(x, y, z, tag);
}
}

View File

@ -19,6 +19,7 @@
package com.sk89q.worldedit;
import com.boydti.fawe.util.MathMan;
import com.sk89q.worldedit.math.transform.AffineTransform;
import java.io.IOException;
import java.io.Serializable;
@ -102,7 +103,7 @@ public class Vector2D implements Serializable {
* @return the x coordinate
*/
public int getBlockX() {
return (int) Math.round(getX());
return MathMan.roundInt(getX());
}
/**
@ -140,7 +141,7 @@ public class Vector2D implements Serializable {
* @return the z coordinate
*/
public int getBlockZ() {
return (int) Math.round(getZ());
return MathMan.roundInt(getZ());
}
/**

View File

@ -181,9 +181,9 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
if (entity instanceof EntityPlayer) {
continue;
}
int x = ((int) Math.round(entity.posX) & 15);
int z = ((int) Math.round(entity.posZ) & 15);
int y = (int) Math.round(entity.posY);
int x = (MathMan.roundInt(entity.posX) & 15);
int z = (MathMan.roundInt(entity.posZ) & 15);
int y = MathMan.roundInt(entity.posY);
if (y < 0 || y > 255) continue;
if (array[FaweCache.CACHE_J[y][z][x]] != 0) {
nmsWorld.removeEntity(entity);

View File

@ -356,9 +356,9 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
if (ent instanceof EntityPlayer || (!createdEntities.isEmpty() && createdEntities.contains(ent.getUniqueID()))) {
continue;
}
int x = ((int) Math.round(ent.posX) & 15);
int z = ((int) Math.round(ent.posZ) & 15);
int y = (int) Math.round(ent.posY);
int x = (MathMan.roundInt(ent.posX) & 15);
int z = (MathMan.roundInt(ent.posZ) & 15);
int y = MathMan.roundInt(ent.posY);
int i = FaweCache.CACHE_I[y][z][x];
char[] array = fs.getIdArray(i);
if (array == null) {

View File

@ -189,9 +189,9 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
if (entity instanceof EntityPlayer) {
continue;
}
int x = ((int) Math.round(entity.posX) & 15);
int z = ((int) Math.round(entity.posZ) & 15);
int y = (int) Math.round(entity.posY);
int x = (MathMan.roundInt(entity.posX) & 15);
int z = (MathMan.roundInt(entity.posZ) & 15);
int y = MathMan.roundInt(entity.posY);
if (y < 0 || y > 255) continue;
if (array[FaweCache.CACHE_J[y][z][x]] != 0) {
nmsWorld.removeEntity(entity);

View File

@ -432,9 +432,9 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
if (ent instanceof EntityPlayer || (!createdEntities.isEmpty() && createdEntities.contains(ent.getUniqueID()))) {
continue;
}
int x = ((int) Math.round(ent.posX) & 15);
int z = ((int) Math.round(ent.posZ) & 15);
int y = (int) Math.round(ent.posY);
int x = (MathMan.roundInt(ent.posX) & 15);
int z = (MathMan.roundInt(ent.posZ) & 15);
int y = MathMan.roundInt(ent.posY);
int i = FaweCache.CACHE_I[y][z][x];
char[] array = fs.getIdArray(i);
if (array == null) {

View File

@ -189,9 +189,9 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
if (entity instanceof EntityPlayer) {
continue;
}
int x = ((int) Math.round(entity.posX) & 15);
int z = ((int) Math.round(entity.posZ) & 15);
int y = (int) Math.round(entity.posY);
int x = (MathMan.roundInt(entity.posX) & 15);
int z = (MathMan.roundInt(entity.posZ) & 15);
int y = MathMan.roundInt(entity.posY);
if (y < 0 || y > 255) continue;
if (array[FaweCache.CACHE_J[y][z][x]] != 0) {
nmsWorld.removeEntity(entity);

View File

@ -558,9 +558,9 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
if (ent instanceof EntityPlayer || (!createdEntities.isEmpty() && createdEntities.contains(ent.getUniqueID()))) {
continue;
}
int x = ((int) Math.round(ent.posX) & 15);
int z = ((int) Math.round(ent.posZ) & 15);
int y = (int) Math.round(ent.posY);
int x = (MathMan.roundInt(ent.posX) & 15);
int z = (MathMan.roundInt(ent.posZ) & 15);
int y = MathMan.roundInt(ent.posY);
int i = FaweCache.CACHE_I[y][z][x];
char[] array = fs.getIdArray(i);
if (array == null) {

View File

@ -176,9 +176,9 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
if (entity instanceof EntityPlayer) {
continue;
}
int x = ((int) Math.round(entity.posX) & 15);
int z = ((int) Math.round(entity.posZ) & 15);
int y = (int) Math.round(entity.posY);
int x = (MathMan.roundInt(entity.posX) & 15);
int z = (MathMan.roundInt(entity.posZ) & 15);
int y = MathMan.roundInt(entity.posY);
if (y < 0 || y > 255) continue;
if (array[FaweCache.CACHE_J[y][z][x]] != 0) {
nmsWorld.removeEntity(entity);

View File

@ -438,9 +438,9 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
if (ent instanceof EntityPlayer || (!createdEntities.isEmpty() && createdEntities.contains(ent.getUniqueID()))) {
continue;
}
int x = ((int) Math.round(ent.posX) & 15);
int z = ((int) Math.round(ent.posZ) & 15);
int y = (int) Math.round(ent.posY);
int x = (MathMan.roundInt(ent.posX) & 15);
int z = (MathMan.roundInt(ent.posZ) & 15);
int y = MathMan.roundInt(ent.posY);
int i = FaweCache.CACHE_I[y][z][x];
char[] array = fs.getIdArray(i);
if (array == null) {

View File

@ -99,9 +99,9 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
if (entity instanceof EntityPlayer) {
continue;
}
int x = ((int) Math.round(entity.posX) & 15);
int z = ((int) Math.round(entity.posZ) & 15);
int y = (int) Math.round(entity.posY);
int x = (MathMan.roundInt(entity.posX) & 15);
int z = (MathMan.roundInt(entity.posZ) & 15);
int y = MathMan.roundInt(entity.posY);
if (y < 0 || y > 255) continue;
if (array[FaweCache.CACHE_J[y][z][x]] != 0) {
nmsWorld.removeEntity(entity);

View File

@ -300,9 +300,9 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
if (ent instanceof EntityPlayer || (!createdEntities.isEmpty() && createdEntities.contains(ent.getUniqueID()))) {
continue;
}
int x = ((int) Math.round(ent.posX) & 15);
int z = ((int) Math.round(ent.posZ) & 15);
int y = (int) Math.round(ent.posY);
int x = (MathMan.roundInt(ent.posX) & 15);
int z = (MathMan.roundInt(ent.posZ) & 15);
int y = MathMan.roundInt(ent.posY);
int i = FaweCache.CACHE_I[y][z][x];
char[] array = fs.getIdArray(i);
if (array == null) {

View File

@ -180,9 +180,9 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
if (entity instanceof EntityPlayer) {
continue;
}
int x = ((int) Math.round(entity.posX) & 15);
int z = ((int) Math.round(entity.posZ) & 15);
int y = (int) Math.round(entity.posY);
int x = (MathMan.roundInt(entity.posX) & 15);
int z = (MathMan.roundInt(entity.posZ) & 15);
int y = MathMan.roundInt(entity.posY);
if (y < 0 || y > 255) continue;
if (array[FaweCache.CACHE_J[y][z][x]] != 0) {
nmsWorld.removeEntity(entity);

View File

@ -354,9 +354,9 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
if (ent instanceof EntityPlayer || (!createdEntities.isEmpty() && createdEntities.contains(ent.getUniqueID()))) {
continue;
}
int x = ((int) Math.round(ent.posX) & 15);
int z = ((int) Math.round(ent.posZ) & 15);
int y = (int) Math.round(ent.posY);
int x = (MathMan.roundInt(ent.posX) & 15);
int z = (MathMan.roundInt(ent.posZ) & 15);
int y = MathMan.roundInt(ent.posY);
int i = FaweCache.CACHE_I[y][z][x];
char[] array = fs.getIdArray(i);
if (array == null) {

View File

@ -192,9 +192,9 @@ public class SpongeChunk_1_12 extends CharFaweChunk<Chunk, SpongeQueue_1_12> {
if (entity instanceof EntityPlayer) {
continue;
}
int x = ((int) Math.round(entity.posX) & 15);
int z = ((int) Math.round(entity.posZ) & 15);
int y = (int) Math.round(entity.posY);
int x = (MathMan.roundInt(entity.posX) & 15);
int z = (MathMan.roundInt(entity.posZ) & 15);
int y = MathMan.roundInt(entity.posY);
if (array == null) {
continue;
}

View File

@ -448,9 +448,9 @@ public class SpongeQueue_1_12 extends NMSMappedFaweQueue<World, net.minecraft.wo
if (ent instanceof EntityPlayer || (!createdEntities.isEmpty() && createdEntities.contains(ent.getUniqueID()))) {
continue;
}
int x = ((int) Math.round(ent.posX) & 15);
int z = ((int) Math.round(ent.posZ) & 15);
int y = (int) Math.round(ent.posY);
int x = (MathMan.roundInt(ent.posX) & 15);
int z = (MathMan.roundInt(ent.posZ) & 15);
int y = MathMan.roundInt(ent.posY);
int i = FaweCache.CACHE_I[y][z][x];
char[] array = fs.getIdArray(i);
if (array == null) {

View File

@ -192,9 +192,9 @@ public class SpongeChunk_1_11 extends CharFaweChunk<Chunk, SpongeQueue_1_11> {
if (entity instanceof EntityPlayer) {
continue;
}
int x = ((int) Math.round(entity.posX) & 15);
int z = ((int) Math.round(entity.posZ) & 15);
int y = (int) Math.round(entity.posY);
int x = (MathMan.roundInt(entity.posX) & 15);
int z = (MathMan.roundInt(entity.posZ) & 15);
int y = MathMan.roundInt(entity.posY);
if (array == null) {
continue;
}

View File

@ -445,9 +445,9 @@ public class SpongeQueue_1_11 extends NMSMappedFaweQueue<World, net.minecraft.wo
if (ent instanceof EntityPlayer || (!createdEntities.isEmpty() && createdEntities.contains(ent.getUniqueID()))) {
continue;
}
int x = ((int) Math.round(ent.posX) & 15);
int z = ((int) Math.round(ent.posZ) & 15);
int y = (int) Math.round(ent.posY);
int x = (MathMan.roundInt(ent.posX) & 15);
int z = (MathMan.roundInt(ent.posZ) & 15);
int y = MathMan.roundInt(ent.posY);
int i = FaweCache.CACHE_I[y][z][x];
char[] array = fs.getIdArray(i);
if (array == null) {