From 03ca751325d4fccc67ff61a68d05c5ed6bb52442 Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Fri, 3 Jan 2025 18:55:46 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fixed=20barrel=20material?= =?UTF-8?q?=20recipe=20deadlock=20with=20refined=20storage=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../sophisticatedstorage/crafting/BarrelMaterialRecipe.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3823be72..cc8ea13a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.daemon=false mod_id=sophisticatedstorage mod_group_id=sophisticatedstorage -mod_version=1.0.6 +mod_version=1.0.7 sonar_project_key=sophisticatedstorage:SophisticatedStorage github_package_url=https://maven.pkg.github.com/P3pp3rF1y/SophisticatedStorage diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedstorage/crafting/BarrelMaterialRecipe.java b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/crafting/BarrelMaterialRecipe.java index ee437e0c..e8ad2405 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedstorage/crafting/BarrelMaterialRecipe.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedstorage/crafting/BarrelMaterialRecipe.java @@ -9,6 +9,7 @@ import net.minecraft.world.item.crafting.CraftingBookCategory; import net.minecraft.world.item.crafting.CustomRecipe; import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.level.EmptyBlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraftforge.registries.ForgeRegistries; @@ -52,7 +53,7 @@ public boolean matches(CraftingContainer container, Level level) { } else { return false; } - } else if (item.getItem() instanceof BlockItem blockItem && Block.isShapeFullBlock(blockItem.getBlock().defaultBlockState().getShape(level, BlockPos.ZERO))) { + } else if (item.getItem() instanceof BlockItem blockItem && Block.isShapeFullBlock(blockItem.getBlock().defaultBlockState().getShape(EmptyBlockGetter.INSTANCE, BlockPos.ZERO))) { boolean isBottomMiddleAndBottomLeftHasBlock = barrelCol == col && barrelRow < row && rowCounts.getOrDefault(row, 0) > 0; if (isBottomMiddleAndBottomLeftHasBlock) { return false;