--- a/net/minecraft/core/Vec3i.java
+++ b/net/minecraft/core/Vec3i.java
@@ -16,9 +16,9 @@
             vec -> IntStream.of(vec.getX(), vec.getY(), vec.getZ())
         );
     public static final Vec3i ZERO = new Vec3i(0, 0, 0);
-    private int x;
-    private int y;
-    private int z;
+    protected int x; // Paper - Perf: Manually inline methods in BlockPosition; protected
+    protected int y; // Paper - Perf: Manually inline methods in BlockPosition; protected
+    protected int z; // Paper - Perf: Manually inline methods in BlockPosition; protected
 
     public static Codec<Vec3i> offsetCodec(int maxAbsValue) {
         return CODEC.validate(
@@ -28,6 +28,12 @@
         );
     }
 
+    // Paper start
+    public final boolean isInsideBuildHeightAndWorldBoundsHorizontal(net.minecraft.world.level.LevelHeightAccessor levelHeightAccessor) {
+        return getX() >= -30000000 && getZ() >= -30000000 && getX() < 30000000 && getZ() < 30000000 && !levelHeightAccessor.isOutsideBuildHeight(getY());
+    }
+    // Paper end
+
     public Vec3i(int x, int y, int z) {
         this.x = x;
         this.y = y;
@@ -35,12 +41,12 @@
     }
 
     @Override
-    public boolean equals(Object object) {
+    public final boolean equals(Object object) { // Paper - Perf: Final for inline
         return this == object || object instanceof Vec3i vec3i && this.getX() == vec3i.getX() && this.getY() == vec3i.getY() && this.getZ() == vec3i.getZ();
     }
 
     @Override
-    public int hashCode() {
+    public final int hashCode() { // Paper - Perf: Final for inline
         return (this.getY() + this.getZ() * 31) * 31 + this.getX();
     }
 
@@ -53,15 +59,15 @@
         }
     }
 
-    public int getX() {
+    public final int getX() { // Paper - Perf: Final for inline
         return this.x;
     }
 
-    public int getY() {
+    public final int getY() { // Paper - Perf: Final for inline
         return this.y;
     }
 
-    public int getZ() {
+    public final int getZ() { // Paper - Perf: Final for inline
         return this.z;
     }
 
