--- a/net/minecraft/core/Direction.java
+++ b/net/minecraft/core/Direction.java
@@ -52,6 +52,26 @@
     })).toArray((i) -> {
         return new Direction[i];
     });
+    // Paper start
+    private final int adjX;
+    private final int adjY;
+    private final int adjZ;
+    // Paper end
+    // Paper start - optimise collisions
+    private static final int RANDOM_OFFSET = 2017601568;
+    private Direction opposite;
+    static {
+        for (final Direction direction : VALUES) {
+            direction.opposite = from3DDataValue(direction.oppositeIndex);;
+        }
+    }
+
+    private final int id = it.unimi.dsi.fastutil.HashCommon.murmurHash3(it.unimi.dsi.fastutil.HashCommon.murmurHash3(this.ordinal() + RANDOM_OFFSET) + RANDOM_OFFSET);
+
+    public final int uniqueId() {
+        return this.id;
+    }
+    // Paper end - optimise collisions
 
     private Direction(int id, int idOpposite, int idHorizontal, String name, Direction.AxisDirection direction, Direction.Axis axis, Vec3i vector) {
         this.data3d = id;
@@ -61,6 +81,11 @@
         this.axis = axis;
         this.axisDirection = direction;
         this.normal = vector;
+        // Paper start
+        this.adjX = vector.getX();
+        this.adjY = vector.getY();
+        this.adjZ = vector.getZ();
+        // Paper end
     }
 
     public static Direction[] orderedByNearest(Entity entity) {
@@ -348,15 +373,15 @@
     }
 
     public int getStepX() {
-        return this.normal.getX();
+        return this.adjX; // Paper
     }
 
     public int getStepY() {
-        return this.normal.getY();
+        return this.adjY; // Paper
     }
 
     public int getStepZ() {
-        return this.normal.getZ();
+        return this.adjZ; // Paper
     }
 
     public Vector3f step() {
