Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 90b17e2

Browse files
committed
improved shape cacheing to not have any duplicates
1 parent cabbad1 commit 90b17e2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

common/src/main/java/muramasa/antimatter/cover/ICover.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ default VoxelShape makeShapes(Direction side) {
245245
};
246246
}
247247

248+
default ResourceLocation getIdForCache(){
249+
return new ResourceLocation(Ref.ID, "cover");
250+
}
251+
248252
default boolean isEmpty() {
249253
return this == empty;
250254
}

common/src/main/java/muramasa/antimatter/pipe/BlockPipe.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ public VoxelShape getOrCreateShape(BlockEntityPipe<?> tile) throws ExecutionExce
416416
if (cover.isEmpty()) {
417417
coverIds[s.get3DDataValue()] = "";
418418
} else {
419-
coverIds[s.get3DDataValue()] = cover.getLoc().toString();
419+
coverIds[s.get3DDataValue()] = cover.getIdForCache().toString();
420420
allEmpty = false;
421421
}
422422
}

0 commit comments

Comments
 (0)