Made constant BlockPos calculateLogBaseTwo calculation explicit, enabled player events by default.

This commit is contained in:
luisc committed 2021-10-12 04:20:33 -05:00
1 parent 699182f4c0
commit 047552d9e5
7 files changed
+12 -30

No files matched your search

@@ -4,7 +4,6 @@ import com.google.common.collect.AbstractIterator;
import java.util.Iterator;
import net.minecraft.entity.Entity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.util.Vec3i;
@@ -13,7 +12,7 @@ import net.minecraft.util.Vec3i;
public class BlockPos extends Vec3i{
/** The BlockPos with all coordinates 0 */
public static final BlockPos ORIGIN = new BlockPos(0, 0, 0);
private static final int NUM_X_BITS = 1 + MathHelper.calculateLogBaseTwo(MathHelper.roundUpToPowerOfTwo(30000000));
private static final int NUM_X_BITS = 1 + 25;//MathHelper.calculateLogBaseTwo(MathHelper.roundUpToPowerOfTwo(30000000));
private static final int NUM_Z_BITS = NUM_X_BITS;
private static final int NUM_Y_BITS = 64 - NUM_X_BITS - NUM_Z_BITS;
private static final int Y_SHIFT = 0 + NUM_Z_BITS;