Merge pull request #6673 from IThundxr/mc1.20.1/fixSchematicNotDisappearing

Fix schematic visual not disappearing
This commit is contained in:
simibubi 2024-07-15 13:44:42 +02:00 committed by GitHub
commit a5c3fe63f0
Failed to generate hash of commit

View file

@ -161,7 +161,7 @@ public class SchematicHandler implements IGuiOverlay {
BlockPos pos;
pos = BlockPos.ZERO;
try {
schematic.placeInWorld(w, pos, pos, placementSettings, w.getRandom(), Block.UPDATE_CLIENTS);
} catch (Exception e) {
@ -314,8 +314,12 @@ public class SchematicHandler implements IGuiOverlay {
private boolean itemLost(Player player) {
for (int i = 0; i < Inventory.getSelectionSize(); i++) {
if (player.getInventory()
.getItem(i)
.is(activeSchematicItem.getItem()))
continue;
if (!ItemStack.matches(player.getInventory()
.getItem(i), activeSchematicItem))
.getItem(i), activeSchematicItem))
continue;
return false;
}