Skip to content

Commit

Permalink
Merge pull request #507 from P3pp3rF1y/1.18.x-dev
Browse files Browse the repository at this point in the history
fix: 🐛 Fixed compression upgrade to properly pickup decompression ite…
  • Loading branch information
P3pp3rF1y authored Oct 13, 2024
2 parents da54561 + d46ff46 commit 891b0d9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
minecraft_version=1.18.2
forge_version=40.1.30
mod_version=0.9.7
mod_version=0.9.8
jei_mc_version=1.18.2
jei_version=9.7.2.281
balm_cf_file_id=3914491
quark_cf_file_id=3800462
autoreglib_cf_file_id=3642382
sc_version=1.18.2-0.6.0.+
sc_version=1.18.2-0.6.4.+
crafting_tweaks_cf_file_id=3545611
chipped_cf_file_id=4293291
ctm_cf_file_id=3933537
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ public void onConfigLoad(ModConfigEvent.Loading event) {
private void clearCache() {
stackUpgrade.clearNonStackableItems();
maxUpgradesPerStorage.clearCache();
compressionUpgrade.clearCache();
}

public Server(ForgeConfigSpec.Builder builder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,10 @@ public void toggleUpgradesVisiblity() {
}

public void onNeighborChange(BlockPos neighborPos) {
if (level != null && level.isClientSide()) {
return;
}

Direction direction = Direction.fromNormal(Integer.signum(neighborPos.getX() - worldPosition.getX()), Integer.signum(neighborPos.getY() - worldPosition.getY()), Integer.signum(neighborPos.getZ() - worldPosition.getZ()));
if (direction == null) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,8 @@ public Optional<RecipeHelper.UncompactingResult> getDecompressionResult(Item ite
}
return Optional.ofNullable(additionalDecompressibleItemsMap.get(item));
}

public void clearCache() {
additionalDecompressibleItemsMap = null;
}
}

0 comments on commit 891b0d9

Please sign in to comment.