Merge pull request #43 from Pyrofab/patch-1

Fix incompatibility with portable crafting table mods
This commit is contained in:
paulevsGitch 2021-01-05 03:00:38 +03:00 committed by GitHub
commit 05b0753cdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,9 +21,10 @@ public abstract class CraftingScreenHandlerMixin
@Inject(method = "canUse", at = @At("HEAD"), cancellable = true)
private void canUse(PlayerEntity player, CallbackInfoReturnable<Boolean> info) {
info.setReturnValue(context.run((world, pos) -> {
if (context.run((world, pos) -> {
return world.getBlockState(pos).getBlock() instanceof CraftingTableBlock;
}, true));
info.cancel();
}, true)) {
info.setReturnValue(true);
}
}
}