diff --git a/build.bat b/build.bat new file mode 100644 index 00000000..d79ad4f1 --- /dev/null +++ b/build.bat @@ -0,0 +1,39 @@ +@echo Scan Minecraft classes +call gradlew test -x common:test --continue -Pgenerate=dryRun +@echo Generate holders +call gradlew test -x common:test --continue -Pgenerate=normal +@echo Search for mapped methods +call gradlew test -x common:test +@echo Analyze test results +call gradlew common:test +@echo Build common +call gradlew common:build -x test +@echo Build Fabric 1.16.5 +call gradlew fabric:1.16.5-mapping:build -x test +@echo Build Fabric 1.17.1 +call gradlew fabric:1.17.1-mapping:build -x test +@echo Build Fabric 1.18.2 +call gradlew fabric:1.18.2-mapping:build -x test +@echo Build Fabric 1.19.2 +call gradlew fabric:1.19.2-mapping:build -x test +@echo Build Fabric 1.19.4 +call gradlew fabric:1.19.4-mapping:build -x test +@echo Build Fabric 1.20.1 +call gradlew fabric:1.20.1-mapping:build -x test +@echo Build Fabric 1.20.4 +call gradlew fabric:1.20.4-mapping:build -x test +@echo Build Forge 1.16.5 +call gradlew forge:1.16.5-mapping:build -x test +@echo Build Forge 1.17.1 +call gradlew forge:1.17.1-mapping:build -x test +@echo Build Forge 1.18.2 +call gradlew forge:1.18.2-mapping:build -x test +@echo Build Forge 1.19.2 +call gradlew forge:1.19.2-mapping:build -x test +@echo Build Forge 1.19.4 +call gradlew forge:1.19.4-mapping:build -x test +@echo Build Forge 1.20.1 +call gradlew forge:1.20.1-mapping:build -x test +@echo Build Forge 1.20.4 +call gradlew forge:1.20.4-mapping:build -x test +pause \ No newline at end of file diff --git a/fabric/1.16.5-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java b/fabric/1.16.5-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java index a52ccc02..30a5fcb1 100644 --- a/fabric/1.16.5-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java +++ b/fabric/1.16.5-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java @@ -1,14 +1,25 @@ package org.mtr.mapping.mapper; +import net.minecraft.item.ItemStack; +import net.minecraft.util.TypedActionResult; import org.mtr.mapping.annotation.MappedMethod; -import org.mtr.mapping.holder.Block; -import org.mtr.mapping.holder.BlockItemAbstractMapping; -import org.mtr.mapping.holder.ItemSettings; +import org.mtr.mapping.holder.*; public class BlockItemExtension extends BlockItemAbstractMapping { - @MappedMethod - public BlockItemExtension(Block block, ItemSettings itemSettings) { - super(block, itemSettings); - } + @MappedMethod + public BlockItemExtension(Block block, ItemSettings itemSettings) { + super(block, itemSettings); + } + + @Deprecated + @Override + public final TypedActionResult use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { + useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); + return super.use(world, user, hand); + } + + @MappedMethod + public void useWithoutResult(World world, PlayerEntity user, Hand hand) { + } } diff --git a/fabric/1.17.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java b/fabric/1.17.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java index a52ccc02..30a5fcb1 100644 --- a/fabric/1.17.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java +++ b/fabric/1.17.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java @@ -1,14 +1,25 @@ package org.mtr.mapping.mapper; +import net.minecraft.item.ItemStack; +import net.minecraft.util.TypedActionResult; import org.mtr.mapping.annotation.MappedMethod; -import org.mtr.mapping.holder.Block; -import org.mtr.mapping.holder.BlockItemAbstractMapping; -import org.mtr.mapping.holder.ItemSettings; +import org.mtr.mapping.holder.*; public class BlockItemExtension extends BlockItemAbstractMapping { - @MappedMethod - public BlockItemExtension(Block block, ItemSettings itemSettings) { - super(block, itemSettings); - } + @MappedMethod + public BlockItemExtension(Block block, ItemSettings itemSettings) { + super(block, itemSettings); + } + + @Deprecated + @Override + public final TypedActionResult use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { + useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); + return super.use(world, user, hand); + } + + @MappedMethod + public void useWithoutResult(World world, PlayerEntity user, Hand hand) { + } } diff --git a/fabric/1.18.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java b/fabric/1.18.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java index a52ccc02..30a5fcb1 100644 --- a/fabric/1.18.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java +++ b/fabric/1.18.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java @@ -1,14 +1,25 @@ package org.mtr.mapping.mapper; +import net.minecraft.item.ItemStack; +import net.minecraft.util.TypedActionResult; import org.mtr.mapping.annotation.MappedMethod; -import org.mtr.mapping.holder.Block; -import org.mtr.mapping.holder.BlockItemAbstractMapping; -import org.mtr.mapping.holder.ItemSettings; +import org.mtr.mapping.holder.*; public class BlockItemExtension extends BlockItemAbstractMapping { - @MappedMethod - public BlockItemExtension(Block block, ItemSettings itemSettings) { - super(block, itemSettings); - } + @MappedMethod + public BlockItemExtension(Block block, ItemSettings itemSettings) { + super(block, itemSettings); + } + + @Deprecated + @Override + public final TypedActionResult use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { + useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); + return super.use(world, user, hand); + } + + @MappedMethod + public void useWithoutResult(World world, PlayerEntity user, Hand hand) { + } } diff --git a/fabric/1.19.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java b/fabric/1.19.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java index a52ccc02..30a5fcb1 100644 --- a/fabric/1.19.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java +++ b/fabric/1.19.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java @@ -1,14 +1,25 @@ package org.mtr.mapping.mapper; +import net.minecraft.item.ItemStack; +import net.minecraft.util.TypedActionResult; import org.mtr.mapping.annotation.MappedMethod; -import org.mtr.mapping.holder.Block; -import org.mtr.mapping.holder.BlockItemAbstractMapping; -import org.mtr.mapping.holder.ItemSettings; +import org.mtr.mapping.holder.*; public class BlockItemExtension extends BlockItemAbstractMapping { - @MappedMethod - public BlockItemExtension(Block block, ItemSettings itemSettings) { - super(block, itemSettings); - } + @MappedMethod + public BlockItemExtension(Block block, ItemSettings itemSettings) { + super(block, itemSettings); + } + + @Deprecated + @Override + public final TypedActionResult use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { + useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); + return super.use(world, user, hand); + } + + @MappedMethod + public void useWithoutResult(World world, PlayerEntity user, Hand hand) { + } } diff --git a/fabric/1.19.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java b/fabric/1.19.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java index a52ccc02..30a5fcb1 100644 --- a/fabric/1.19.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java +++ b/fabric/1.19.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java @@ -1,14 +1,25 @@ package org.mtr.mapping.mapper; +import net.minecraft.item.ItemStack; +import net.minecraft.util.TypedActionResult; import org.mtr.mapping.annotation.MappedMethod; -import org.mtr.mapping.holder.Block; -import org.mtr.mapping.holder.BlockItemAbstractMapping; -import org.mtr.mapping.holder.ItemSettings; +import org.mtr.mapping.holder.*; public class BlockItemExtension extends BlockItemAbstractMapping { - @MappedMethod - public BlockItemExtension(Block block, ItemSettings itemSettings) { - super(block, itemSettings); - } + @MappedMethod + public BlockItemExtension(Block block, ItemSettings itemSettings) { + super(block, itemSettings); + } + + @Deprecated + @Override + public final TypedActionResult use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { + useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); + return super.use(world, user, hand); + } + + @MappedMethod + public void useWithoutResult(World world, PlayerEntity user, Hand hand) { + } } diff --git a/fabric/1.20.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java b/fabric/1.20.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java index a52ccc02..30a5fcb1 100644 --- a/fabric/1.20.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java +++ b/fabric/1.20.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java @@ -1,14 +1,25 @@ package org.mtr.mapping.mapper; +import net.minecraft.item.ItemStack; +import net.minecraft.util.TypedActionResult; import org.mtr.mapping.annotation.MappedMethod; -import org.mtr.mapping.holder.Block; -import org.mtr.mapping.holder.BlockItemAbstractMapping; -import org.mtr.mapping.holder.ItemSettings; +import org.mtr.mapping.holder.*; public class BlockItemExtension extends BlockItemAbstractMapping { - @MappedMethod - public BlockItemExtension(Block block, ItemSettings itemSettings) { - super(block, itemSettings); - } + @MappedMethod + public BlockItemExtension(Block block, ItemSettings itemSettings) { + super(block, itemSettings); + } + + @Deprecated + @Override + public final TypedActionResult use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { + useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); + return super.use(world, user, hand); + } + + @MappedMethod + public void useWithoutResult(World world, PlayerEntity user, Hand hand) { + } } diff --git a/fabric/1.20.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java b/fabric/1.20.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java index a52ccc02..30a5fcb1 100644 --- a/fabric/1.20.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java +++ b/fabric/1.20.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java @@ -1,14 +1,25 @@ package org.mtr.mapping.mapper; +import net.minecraft.item.ItemStack; +import net.minecraft.util.TypedActionResult; import org.mtr.mapping.annotation.MappedMethod; -import org.mtr.mapping.holder.Block; -import org.mtr.mapping.holder.BlockItemAbstractMapping; -import org.mtr.mapping.holder.ItemSettings; +import org.mtr.mapping.holder.*; public class BlockItemExtension extends BlockItemAbstractMapping { - @MappedMethod - public BlockItemExtension(Block block, ItemSettings itemSettings) { - super(block, itemSettings); - } + @MappedMethod + public BlockItemExtension(Block block, ItemSettings itemSettings) { + super(block, itemSettings); + } + + @Deprecated + @Override + public final TypedActionResult use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { + useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); + return super.use(world, user, hand); + } + + @MappedMethod + public void useWithoutResult(World world, PlayerEntity user, Hand hand) { + } } diff --git a/forge/1.16.5-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java b/forge/1.16.5-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java index a52ccc02..26c75833 100644 --- a/forge/1.16.5-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java +++ b/forge/1.16.5-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java @@ -1,14 +1,25 @@ package org.mtr.mapping.mapper; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; import org.mtr.mapping.annotation.MappedMethod; -import org.mtr.mapping.holder.Block; -import org.mtr.mapping.holder.BlockItemAbstractMapping; -import org.mtr.mapping.holder.ItemSettings; +import org.mtr.mapping.holder.*; public class BlockItemExtension extends BlockItemAbstractMapping { - @MappedMethod - public BlockItemExtension(Block block, ItemSettings itemSettings) { - super(block, itemSettings); - } + @MappedMethod + public BlockItemExtension(Block block, ItemSettings itemSettings) { + super(block, itemSettings); + } + + @Deprecated + @Override + public final ActionResult use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { + useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); + return super.use(world, user, hand); + } + + @MappedMethod + public void useWithoutResult(World world, PlayerEntity user, Hand hand) { + } } diff --git a/forge/1.17.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java b/forge/1.17.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java index a52ccc02..cc7fc9e4 100644 --- a/forge/1.17.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java +++ b/forge/1.17.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java @@ -1,14 +1,28 @@ package org.mtr.mapping.mapper; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; import org.mtr.mapping.annotation.MappedMethod; -import org.mtr.mapping.holder.Block; -import org.mtr.mapping.holder.BlockItemAbstractMapping; -import org.mtr.mapping.holder.ItemSettings; +import org.mtr.mapping.holder.*; public class BlockItemExtension extends BlockItemAbstractMapping { - @MappedMethod - public BlockItemExtension(Block block, ItemSettings itemSettings) { - super(block, itemSettings); - } + @MappedMethod + public BlockItemExtension(Block block, ItemSettings itemSettings) { + super(block, itemSettings); + } + + @Deprecated + @Override + public final InteractionResultHolder use(Level world, Player user, InteractionHand hand) { + useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); + return super.use(world, user, hand); + } + + @MappedMethod + public void useWithoutResult(World world, PlayerEntity user, Hand hand) { + } } diff --git a/forge/1.18.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java b/forge/1.18.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java index a52ccc02..cc7fc9e4 100644 --- a/forge/1.18.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java +++ b/forge/1.18.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java @@ -1,14 +1,28 @@ package org.mtr.mapping.mapper; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; import org.mtr.mapping.annotation.MappedMethod; -import org.mtr.mapping.holder.Block; -import org.mtr.mapping.holder.BlockItemAbstractMapping; -import org.mtr.mapping.holder.ItemSettings; +import org.mtr.mapping.holder.*; public class BlockItemExtension extends BlockItemAbstractMapping { - @MappedMethod - public BlockItemExtension(Block block, ItemSettings itemSettings) { - super(block, itemSettings); - } + @MappedMethod + public BlockItemExtension(Block block, ItemSettings itemSettings) { + super(block, itemSettings); + } + + @Deprecated + @Override + public final InteractionResultHolder use(Level world, Player user, InteractionHand hand) { + useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); + return super.use(world, user, hand); + } + + @MappedMethod + public void useWithoutResult(World world, PlayerEntity user, Hand hand) { + } } diff --git a/forge/1.19.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java b/forge/1.19.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java index a52ccc02..cc7fc9e4 100644 --- a/forge/1.19.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java +++ b/forge/1.19.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java @@ -1,14 +1,28 @@ package org.mtr.mapping.mapper; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; import org.mtr.mapping.annotation.MappedMethod; -import org.mtr.mapping.holder.Block; -import org.mtr.mapping.holder.BlockItemAbstractMapping; -import org.mtr.mapping.holder.ItemSettings; +import org.mtr.mapping.holder.*; public class BlockItemExtension extends BlockItemAbstractMapping { - @MappedMethod - public BlockItemExtension(Block block, ItemSettings itemSettings) { - super(block, itemSettings); - } + @MappedMethod + public BlockItemExtension(Block block, ItemSettings itemSettings) { + super(block, itemSettings); + } + + @Deprecated + @Override + public final InteractionResultHolder use(Level world, Player user, InteractionHand hand) { + useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); + return super.use(world, user, hand); + } + + @MappedMethod + public void useWithoutResult(World world, PlayerEntity user, Hand hand) { + } } diff --git a/forge/1.19.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java b/forge/1.19.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java index a52ccc02..cc7fc9e4 100644 --- a/forge/1.19.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java +++ b/forge/1.19.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java @@ -1,14 +1,28 @@ package org.mtr.mapping.mapper; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; import org.mtr.mapping.annotation.MappedMethod; -import org.mtr.mapping.holder.Block; -import org.mtr.mapping.holder.BlockItemAbstractMapping; -import org.mtr.mapping.holder.ItemSettings; +import org.mtr.mapping.holder.*; public class BlockItemExtension extends BlockItemAbstractMapping { - @MappedMethod - public BlockItemExtension(Block block, ItemSettings itemSettings) { - super(block, itemSettings); - } + @MappedMethod + public BlockItemExtension(Block block, ItemSettings itemSettings) { + super(block, itemSettings); + } + + @Deprecated + @Override + public final InteractionResultHolder use(Level world, Player user, InteractionHand hand) { + useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); + return super.use(world, user, hand); + } + + @MappedMethod + public void useWithoutResult(World world, PlayerEntity user, Hand hand) { + } } diff --git a/forge/1.20.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java b/forge/1.20.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java index a52ccc02..cc7fc9e4 100644 --- a/forge/1.20.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java +++ b/forge/1.20.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java @@ -1,14 +1,28 @@ package org.mtr.mapping.mapper; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; import org.mtr.mapping.annotation.MappedMethod; -import org.mtr.mapping.holder.Block; -import org.mtr.mapping.holder.BlockItemAbstractMapping; -import org.mtr.mapping.holder.ItemSettings; +import org.mtr.mapping.holder.*; public class BlockItemExtension extends BlockItemAbstractMapping { - @MappedMethod - public BlockItemExtension(Block block, ItemSettings itemSettings) { - super(block, itemSettings); - } + @MappedMethod + public BlockItemExtension(Block block, ItemSettings itemSettings) { + super(block, itemSettings); + } + + @Deprecated + @Override + public final InteractionResultHolder use(Level world, Player user, InteractionHand hand) { + useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); + return super.use(world, user, hand); + } + + @MappedMethod + public void useWithoutResult(World world, PlayerEntity user, Hand hand) { + } } diff --git a/forge/1.20.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java b/forge/1.20.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java index a52ccc02..cc7fc9e4 100644 --- a/forge/1.20.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java +++ b/forge/1.20.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java @@ -1,14 +1,28 @@ package org.mtr.mapping.mapper; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; import org.mtr.mapping.annotation.MappedMethod; -import org.mtr.mapping.holder.Block; -import org.mtr.mapping.holder.BlockItemAbstractMapping; -import org.mtr.mapping.holder.ItemSettings; +import org.mtr.mapping.holder.*; public class BlockItemExtension extends BlockItemAbstractMapping { - @MappedMethod - public BlockItemExtension(Block block, ItemSettings itemSettings) { - super(block, itemSettings); - } + @MappedMethod + public BlockItemExtension(Block block, ItemSettings itemSettings) { + super(block, itemSettings); + } + + @Deprecated + @Override + public final InteractionResultHolder use(Level world, Player user, InteractionHand hand) { + useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); + return super.use(world, user, hand); + } + + @MappedMethod + public void useWithoutResult(World world, PlayerEntity user, Hand hand) { + } }