From dc8a5933bfe71cfe761853caf6893cef5054cd2d Mon Sep 17 00:00:00 2001 From: dfsek Date: Tue, 21 Dec 2021 01:14:26 -0700 Subject: [PATCH] remove unneeded hashCode and equals override in ChunkRegionMixin --- .../world/ChunkRegionMixin.java | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/platforms/fabric/src/main/java/com/dfsek/terra/fabric/mixin/implementations/world/ChunkRegionMixin.java b/platforms/fabric/src/main/java/com/dfsek/terra/fabric/mixin/implementations/world/ChunkRegionMixin.java index fdb5d246a..551b8eb64 100644 --- a/platforms/fabric/src/main/java/com/dfsek/terra/fabric/mixin/implementations/world/ChunkRegionMixin.java +++ b/platforms/fabric/src/main/java/com/dfsek/terra/fabric/mixin/implementations/world/ChunkRegionMixin.java @@ -157,37 +157,4 @@ public abstract class ChunkRegionMixin { public Object terraWorld$getHandle() { return this; } - - - // TODO remove this; we shouldnt need it anymore - - /** - * We need regions delegating to the same world - * to have the same hashcode. This - * minimizes cache misses. - *

- * This is sort of jank, but shouldn't(tm) - * break any other mods, unless they're doing - * something they really shouldn't, since - * ChunkRegions are not supposed to persist. - */ - @Override - public int hashCode() { - return world.hashCode(); - } - - /** - * Overridden in the same manner as {@link #hashCode()} - * - * @param other Another object - * - * @return Whether this world is the same as other. - * - * @see #hashCode() - */ - @Override - public boolean equals(Object other) { - if(!(other instanceof ServerWorldAccess)) return false; - return world.equals(((ServerWorldAccess) other).toServerWorld()); - } }