Allow enchantment table mixins skip target
This commit is contained in:
parent
89c5cd215b
commit
ebba0dde6c
2 changed files with 6 additions and 2 deletions
|
@ -17,7 +17,9 @@ public abstract class EnchantingTableBlockMixin extends Block {
|
||||||
|
|
||||||
@Redirect(method = "animateTick", at = @At(
|
@Redirect(method = "animateTick", at = @At(
|
||||||
value = "INVOKE",
|
value = "INVOKE",
|
||||||
target = "Lnet/minecraft/world/level/block/state/BlockState;is(Lnet/minecraft/world/level/block/Block;)Z")//,
|
target = "Lnet/minecraft/world/level/block/state/BlockState;is(Lnet/minecraft/world/level/block/Block;)Z"),
|
||||||
|
require = -1,
|
||||||
|
expect = -1
|
||||||
)
|
)
|
||||||
private boolean bclib_isBookshelf(BlockState state, Block block) {
|
private boolean bclib_isBookshelf(BlockState state, Block block) {
|
||||||
return block == Blocks.BOOKSHELF ? state.is(CommonBlockTags.BOOKSHELVES) : state.is(block);
|
return block == Blocks.BOOKSHELF ? state.is(CommonBlockTags.BOOKSHELVES) : state.is(block);
|
||||||
|
|
|
@ -19,7 +19,9 @@ public abstract class EnchantmentMenuMixin extends AbstractContainerMenu {
|
||||||
|
|
||||||
@Redirect(method = "lambda$slotsChanged$0(Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)V", at = @At(
|
@Redirect(method = "lambda$slotsChanged$0(Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)V", at = @At(
|
||||||
value = "INVOKE",
|
value = "INVOKE",
|
||||||
target = "Lnet/minecraft/world/level/block/state/BlockState;is(Lnet/minecraft/world/level/block/Block;)Z")//,
|
target = "Lnet/minecraft/world/level/block/state/BlockState;is(Lnet/minecraft/world/level/block/Block;)Z"),
|
||||||
|
require = -1,
|
||||||
|
expect = -1
|
||||||
)
|
)
|
||||||
private boolean bclib_isBookshelf(BlockState state, Block block) {
|
private boolean bclib_isBookshelf(BlockState state, Block block) {
|
||||||
return block == Blocks.BOOKSHELF ? state.is(CommonBlockTags.BOOKSHELVES) : state.is(block);
|
return block == Blocks.BOOKSHELF ? state.is(CommonBlockTags.BOOKSHELVES) : state.is(block);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue