diff --git a/README.md b/README.md index 3210d01e..aae1d215 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A Bukkit server implementation utilizing Mixin. | Release | Forge | Status | Build | |:--------------------:|:-------:|:------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| -| Trials (1.20-1.20.1) | 47.0.3 | ACTIVE | [![1.19.4 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=Trials&style=flat-square)](https://github.com/IzzelAliz/Arclight/actions?query=branch%3ATrials) | +| Trials (1.20-1.20.1) | 47.1.0 | ACTIVE | [![1.19.4 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=Trials&style=flat-square)](https://github.com/IzzelAliz/Arclight/actions?query=branch%3ATrials) | | Executions (1.19.4) | 45.1.0 | LTS | [![1.19.4 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=Executions&style=flat-square)](https://github.com/IzzelAliz/Arclight/actions?query=branch%3AExecutions) | | 1.18.x | 40.1.80 | LTS | [![1.18 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=1.18&style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-18) | | 1.16.x | 36.2.39 | LTS | [![1.16 Status](https://img.shields.io/github/actions/workflow/status/IzzelAliz/Arclight/gradle.yml?branch=1.16&style=flat-square)](https://ci.appveyor.com/project/IzzelAliz/arclight-16) | diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/bukkit/CraftEventFactoryMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/bukkit/CraftEventFactoryMixin.java index b497aced..b0170cd0 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/bukkit/CraftEventFactoryMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/bukkit/CraftEventFactoryMixin.java @@ -198,7 +198,7 @@ public class CraftEventFactoryMixin { * @reason */ @Overwrite - public static EntityChangeBlockEvent callEntityChangeBlockEvent(Entity entity, BlockPos position, net.minecraft.world.level.block.state.BlockState newBlock, boolean cancelled) { + public static boolean callEntityChangeBlockEvent(Entity entity, BlockPos position, net.minecraft.world.level.block.state.BlockState newBlock, boolean cancelled) { Block block = CraftBlock.at(entity.level(), position); EntityChangeBlockEvent event = new EntityChangeBlockEvent(((EntityBridge) entity).bridge$getBukkitEntity(), block, CraftBlockData.fromData(newBlock)); event.setCancelled(cancelled); @@ -206,7 +206,7 @@ public class CraftEventFactoryMixin { if (DistValidate.isValid(entity.level())) { Bukkit.getPluginManager().callEvent(event); } - return event; + return !event.isCancelled(); } /** diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/network/ServerPlayNetHandlerMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/network/ServerPlayNetHandlerMixin.java index ad951b66..d59f408b 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/network/ServerPlayNetHandlerMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/network/ServerPlayNetHandlerMixin.java @@ -1528,7 +1528,7 @@ public abstract class ServerPlayNetHandlerMixin implements ServerPlayNetHandlerB } } - if (packet.getSlotNum() == 2 && top instanceof SmithingInventory) { + if (packet.getSlotNum() == 3 && top instanceof SmithingInventory) { org.bukkit.inventory.ItemStack result = ((SmithingInventory) top).getResult(); if (result != null) { if (click == ClickType.NUMBER_KEY) { diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/ai/goal/EatBlockGoalMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/ai/goal/EatBlockGoalMixin.java index 31cfa5a6..5c6b2450 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/ai/goal/EatBlockGoalMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/ai/goal/EatBlockGoalMixin.java @@ -7,7 +7,6 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Blocks; import net.minecraftforge.event.ForgeEventFactory; import org.bukkit.craftbukkit.v.event.CraftEventFactory; -import org.bukkit.event.entity.EntityChangeBlockEvent; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -33,8 +32,8 @@ public class EatBlockGoalMixin { @Redirect(method = "tick", at = @At(value = "INVOKE", remap = false, target = "Lnet/minecraftforge/event/ForgeEventFactory;getMobGriefingEvent(Lnet/minecraft/world/level/Level;Lnet/minecraft/world/entity/Entity;)Z")) public boolean arclight$entityChangeBlock(Level world, Entity entity) { boolean b = ForgeEventFactory.getMobGriefingEvent(world, entity); - EntityChangeBlockEvent event = CraftEventFactory.callEntityChangeBlockEvent(entity, arclight$pos, Blocks.AIR.defaultBlockState(), !b); + var result = CraftEventFactory.callEntityChangeBlockEvent(entity, arclight$pos, Blocks.AIR.defaultBlockState(), !b); arclight$pos = null; - return !event.isCancelled(); + return result; } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Bee_GrowCropGoalMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Bee_GrowCropGoalMixin.java index 993a525d..f33cf6f5 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Bee_GrowCropGoalMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Bee_GrowCropGoalMixin.java @@ -4,7 +4,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.world.entity.animal.Bee; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.state.properties.IntegerProperty; import org.bukkit.craftbukkit.v.event.CraftEventFactory; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; @@ -21,7 +20,7 @@ public class Bee_GrowCropGoalMixin { @Inject(method = "tick", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;levelEvent(ILnet/minecraft/core/BlockPos;I)V")) private void arclight$entityChangeBlock(CallbackInfo ci, int i, BlockPos blockPos, BlockState blockState, Block block, BlockState state) { - if (CraftEventFactory.callEntityChangeBlockEvent(outerThis, blockPos, state).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(outerThis, blockPos, state)) { ci.cancel(); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Fox_EatBerriesGoalMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Fox_EatBerriesGoalMixin.java index 5e0c5250..ad6820b3 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Fox_EatBerriesGoalMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Fox_EatBerriesGoalMixin.java @@ -25,7 +25,7 @@ public abstract class Fox_EatBerriesGoalMixin extends MoveToBlockGoal { @Inject(method = "pickSweetBerries", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/util/RandomSource;nextInt(I)I")) private void arclight$eatBerry(BlockState state, CallbackInfo ci) { - if (CraftEventFactory.callEntityChangeBlockEvent(outerThis, this.blockPos, state.setValue(SweetBerryBushBlock.AGE, 1)).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(outerThis, this.blockPos, state.setValue(SweetBerryBushBlock.AGE, 1))) { ci.cancel(); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Rabbit_RaidGardenGoalMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Rabbit_RaidGardenGoalMixin.java index cb4522d8..e24a7659 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Rabbit_RaidGardenGoalMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Rabbit_RaidGardenGoalMixin.java @@ -25,15 +25,15 @@ public class Rabbit_RaidGardenGoalMixin { at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;setBlock(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;I)Z")) private void arclight$entityChangeBlock(CallbackInfo ci, Level world, BlockPos blockPos, BlockState blockState, Block block, int i) { if (i == 0) { - if (CraftEventFactory.callEntityChangeBlockEvent(this.rabbit, blockPos, Blocks.AIR.defaultBlockState()).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(this.rabbit, blockPos, Blocks.AIR.defaultBlockState())) { ci.cancel(); } } else { - if (CraftEventFactory.callEntityChangeBlockEvent( + if (!CraftEventFactory.callEntityChangeBlockEvent( this.rabbit, blockPos, blockState.setValue(CarrotBlock.AGE, i - 1) - ).isCancelled()) { + )) { ci.cancel(); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Turtle_LayEggGoalMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Turtle_LayEggGoalMixin.java index ce00e246..c0b48318 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Turtle_LayEggGoalMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/Turtle_LayEggGoalMixin.java @@ -38,7 +38,7 @@ public abstract class Turtle_LayEggGoalMixin extends MoveToBlockGoal { ((TurtleEntityBridge) this.turtle).bridge$setDigging(true); } else if (((TurtleEntityBridge) this.turtle).bridge$getDigging() > 200) { Level world = this.turtle.level(); - if (!CraftEventFactory.callEntityChangeBlockEvent(this.turtle, this.blockPos.above(), (Blocks.TURTLE_EGG.defaultBlockState()).setValue(TurtleEggBlock.EGGS, this.turtle.getRandom().nextInt(4) + 1)).isCancelled()) { + if (CraftEventFactory.callEntityChangeBlockEvent(this.turtle, this.blockPos.above(), (Blocks.TURTLE_EGG.defaultBlockState()).setValue(TurtleEggBlock.EGGS, this.turtle.getRandom().nextInt(4) + 1))) { BlockPos blockpos1 = this.blockPos.above(); BlockState blockstate = Blocks.TURTLE_EGG.defaultBlockState().setValue(TurtleEggBlock.EGGS, this.turtle.getRandom().nextInt(4) + 1); world.setBlock(blockpos1, blockstate, 3); diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/horse/AbstractHorseMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/horse/AbstractHorseMixin.java index 57c9a382..2ac10a10 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/horse/AbstractHorseMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/animal/horse/AbstractHorseMixin.java @@ -11,7 +11,6 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import org.bukkit.craftbukkit.v.event.CraftEventFactory; import org.bukkit.event.entity.EntityRegainHealthEvent; -import org.bukkit.event.entity.HorseJumpEvent; import org.bukkit.inventory.InventoryHolder; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; @@ -68,8 +67,7 @@ public abstract class AbstractHorseMixin extends AnimalMixin { } else { power = 0.4F + 0.4F * (float) i / 90.0F; } - HorseJumpEvent event = CraftEventFactory.callHorseJumpEvent((AbstractHorse) (Object) this, power); - if (event.isCancelled()) { + if (!CraftEventFactory.callHorseJumpEvent((AbstractHorse) (Object) this, power)) { ci.cancel(); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/boss/wither/WitherBossMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/boss/wither/WitherBossMixin.java index 96b89d67..8cc6b22c 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/boss/wither/WitherBossMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/boss/wither/WitherBossMixin.java @@ -133,7 +133,7 @@ public abstract class WitherBossMixin extends PathfinderMobMixin { BlockPos blockpos = new BlockPos(l2, l, i1); BlockState blockstate = this.level().getBlockState(blockpos); if (blockstate.canEntityDestroy(this.level(), blockpos, (WitherBoss) (Object) this) && ForgeEventFactory.onEntityDestroyBlock((WitherBoss) (Object) this, blockpos, blockstate)) { - if (CraftEventFactory.callEntityChangeBlockEvent((WitherBoss) (Object) this, blockpos, Blocks.AIR.defaultBlockState()).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent((WitherBoss) (Object) this, blockpos, Blocks.AIR.defaultBlockState())) { continue; } flag = this.level().destroyBlock(blockpos, true, (WitherBoss) (Object) this) || flag; diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/item/FallingBlockEntityMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/item/FallingBlockEntityMixin.java index 4bd92cc2..77d2f916 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/item/FallingBlockEntityMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/item/FallingBlockEntityMixin.java @@ -28,7 +28,7 @@ public abstract class FallingBlockEntityMixin extends EntityMixin { @Inject(method = "tick", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;setBlock(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;I)Z")) private void arclight$entityChangeBlock(CallbackInfo ci, Block block, BlockPos pos) { - if (CraftEventFactory.callEntityChangeBlockEvent((FallingBlockEntity) (Object) this, pos, this.blockState).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent((FallingBlockEntity) (Object) this, pos, this.blockState)) { ci.cancel(); } } @@ -45,7 +45,7 @@ public abstract class FallingBlockEntityMixin extends EntityMixin { @Inject(method = "fall", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;setBlock(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;I)Z")) private static void arclight$entityFall(Level level, BlockPos pos, BlockState state, CallbackInfoReturnable cir, FallingBlockEntity entity) { - if (CraftEventFactory.callEntityChangeBlockEvent(entity, pos, state.getFluidState().createLegacyBlock()).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(entity, pos, state.getFluidState().createLegacyBlock())) { cir.setReturnValue(entity); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/item/ItemEntityMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/item/ItemEntityMixin.java index a9b26752..920a6c4d 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/item/ItemEntityMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/item/ItemEntityMixin.java @@ -44,7 +44,7 @@ public abstract class ItemEntityMixin extends EntityMixin { @Inject(method = "merge(Lnet/minecraft/world/entity/item/ItemEntity;Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/entity/item/ItemEntity;Lnet/minecraft/world/item/ItemStack;)V", cancellable = true, at = @At("HEAD")) private static void arclight$itemMerge(ItemEntity from, ItemStack stack1, ItemEntity to, ItemStack stack2, CallbackInfo ci) { - if (CraftEventFactory.callItemMergeEvent(to, from).isCancelled()) { + if (!CraftEventFactory.callItemMergeEvent(to, from)) { ci.cancel(); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/EnderMan_EndermanLeaveBlockGoalMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/EnderMan_EndermanLeaveBlockGoalMixin.java index f50d808f..1541d7b1 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/EnderMan_EndermanLeaveBlockGoalMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/EnderMan_EndermanLeaveBlockGoalMixin.java @@ -24,7 +24,7 @@ public class EnderMan_EndermanLeaveBlockGoalMixin { @Inject(method = "tick", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;setBlock(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;I)Z")) private void arclight$entityChangeBlock(CallbackInfo ci, RandomSource random, Level world, int i, int j, int k, BlockPos blockPos, BlockState blockState, BlockPos blockPos1, BlockState blockState1, BlockState blockState2) { - if (CraftEventFactory.callEntityChangeBlockEvent(this.enderman, blockPos, blockState2).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(this.enderman, blockPos, blockState2)) { ci.cancel(); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/EnderMan_EndermanTakeBlockGoalMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/EnderMan_EndermanTakeBlockGoalMixin.java index e62fdb43..f5291b64 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/EnderMan_EndermanTakeBlockGoalMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/EnderMan_EndermanTakeBlockGoalMixin.java @@ -24,7 +24,7 @@ public class EnderMan_EndermanTakeBlockGoalMixin { @Inject(method = "tick", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/monster/EnderMan;setCarriedBlock(Lnet/minecraft/world/level/block/state/BlockState;)V")) private void arclight$entityChangeBlock(CallbackInfo ci, RandomSource random, Level world, int i, int j, int k, BlockPos blockPos) { - if (CraftEventFactory.callEntityChangeBlockEvent(this.enderman, blockPos, Blocks.AIR.defaultBlockState()).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(this.enderman, blockPos, Blocks.AIR.defaultBlockState())) { ci.cancel(); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/RavagerMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/RavagerMixin.java index caf7863c..01e6311e 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/RavagerMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/RavagerMixin.java @@ -16,7 +16,7 @@ public abstract class RavagerMixin extends PathfinderMobMixin { @Redirect(method = "aiStep", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;destroyBlock(Lnet/minecraft/core/BlockPos;ZLnet/minecraft/world/entity/Entity;)Z")) private boolean arclight$entityChangeBlock(Level world, BlockPos pos, boolean dropBlock, Entity entityIn) { - return !CraftEventFactory.callEntityChangeBlockEvent((Ravager) (Object) this, pos, Blocks.AIR.defaultBlockState()).isCancelled() + return CraftEventFactory.callEntityChangeBlockEvent((Ravager) (Object) this, pos, Blocks.AIR.defaultBlockState()) && world.destroyBlock(pos, dropBlock, entityIn); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/Silverfish_MergeWithStoneGoalMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/Silverfish_MergeWithStoneGoalMixin.java index 1a0cd9ff..87b1d49b 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/Silverfish_MergeWithStoneGoalMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/Silverfish_MergeWithStoneGoalMixin.java @@ -22,7 +22,7 @@ public abstract class Silverfish_MergeWithStoneGoalMixin extends RandomStrollGoa @Inject(method = "start", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/LevelAccessor;setBlock(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;I)Z")) private void arclight$entityChangeBlock(CallbackInfo ci, LevelAccessor world, BlockPos blockPos, BlockState blockState) { - if (CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockPos, InfestedBlock.infestedStateByHost(blockState)).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockPos, InfestedBlock.infestedStateByHost(blockState))) { ci.cancel(); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/Silverfish_WakeUpFriendsGoalMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/Silverfish_WakeUpFriendsGoalMixin.java index 9f22fc91..bc0f47e3 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/Silverfish_WakeUpFriendsGoalMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/monster/Silverfish_WakeUpFriendsGoalMixin.java @@ -42,7 +42,7 @@ public abstract class Silverfish_WakeUpFriendsGoalMixin extends Goal { BlockState blockstate = world.getBlockState(blockpos1); Block block = blockstate.getBlock(); if (block instanceof InfestedBlock) { - if (CraftEventFactory.callEntityChangeBlockEvent(this.silverfish, blockpos1, Blocks.AIR.defaultBlockState()).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(this.silverfish, blockpos1, Blocks.AIR.defaultBlockState())) { continue; } if (ForgeEventFactory.getMobGriefingEvent(world, this.silverfish)) { diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/projectile/ThrownPotionMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/projectile/ThrownPotionMixin.java index 4e3e27d1..5c14eef3 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/projectile/ThrownPotionMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/projectile/ThrownPotionMixin.java @@ -112,21 +112,21 @@ public abstract class ThrownPotionMixin extends ThrowableItemProjectileMixin { @Inject(method = "dowseFire", cancellable = true, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;removeBlock(Lnet/minecraft/core/BlockPos;Z)Z")) private void arclight$entityChangeBlock(BlockPos pos, CallbackInfo ci) { - if (CraftEventFactory.callEntityChangeBlockEvent((ThrownPotion) (Object) this, pos, Blocks.AIR.defaultBlockState()).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent((ThrownPotion) (Object) this, pos, Blocks.AIR.defaultBlockState())) { ci.cancel(); } } @Inject(method = "dowseFire", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;levelEvent(Lnet/minecraft/world/entity/player/Player;ILnet/minecraft/core/BlockPos;I)V")) private void arclight$entityChangeBlock2(BlockPos pos, CallbackInfo ci, BlockState state) { - if (CraftEventFactory.callEntityChangeBlockEvent((ThrownPotion) (Object) this, pos, state.setValue(CampfireBlock.LIT, false)).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent((ThrownPotion) (Object) this, pos, state.setValue(CampfireBlock.LIT, false))) { ci.cancel(); } } @Inject(method = "dowseFire", cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/AbstractCandleBlock;extinguish(Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/LevelAccessor;Lnet/minecraft/core/BlockPos;)V")) private void arclight$entityChangeBlock3(BlockPos pos, CallbackInfo ci, BlockState state) { - if (CraftEventFactory.callEntityChangeBlockEvent((ThrownPotion) (Object) this, pos, state.setValue(AbstractCandleBlock.LIT, false)).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent((ThrownPotion) (Object) this, pos, state.setValue(AbstractCandleBlock.LIT, false))) { ci.cancel(); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/inventory/SmithingTableContainerMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/inventory/SmithingTableContainerMixin.java index 7e8f194e..4f253acf 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/inventory/SmithingTableContainerMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/inventory/SmithingTableContainerMixin.java @@ -7,7 +7,7 @@ import net.minecraft.world.inventory.SmithingMenu; import net.minecraft.world.item.ItemStack; import org.bukkit.craftbukkit.v.event.CraftEventFactory; import org.bukkit.craftbukkit.v.inventory.CraftInventory; -import org.bukkit.craftbukkit.v.inventory.CraftInventorySmithingNew; +import org.bukkit.craftbukkit.v.inventory.CraftInventorySmithing; import org.bukkit.craftbukkit.v.inventory.CraftInventoryView; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -28,7 +28,7 @@ public abstract class SmithingTableContainerMixin extends ItemCombinerMixin { if (this.bukkitEntity != null) { return this.bukkitEntity; } - CraftInventory inventory = new CraftInventorySmithingNew(((IWorldPosCallableBridge) this.access).bridge$getLocation(), this.inputSlots, this.resultSlots); + CraftInventory inventory = new CraftInventorySmithing(((IWorldPosCallableBridge) this.access).bridge$getLocation(), this.inputSlots, this.resultSlots); return this.bukkitEntity = new CraftInventoryView(((PlayerEntityBridge) this.player).bridge$getBukkitEntity(), inventory, (SmithingMenu) (Object) this); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/LevelMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/LevelMixin.java index 0d489b50..51ea49e7 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/LevelMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/LevelMixin.java @@ -145,7 +145,7 @@ public abstract class LevelMixin implements WorldBridge, LevelWriter { private boolean processCaptures(BlockPos pos, BlockState newState, int flags) { Entity entityChangeBlock = ArclightCaptures.getEntityChangeBlock(); if (entityChangeBlock != null) { - if (CraftEventFactory.callEntityChangeBlockEvent(entityChangeBlock, pos, newState).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(entityChangeBlock, pos, newState)) { return false; } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/BigDripleafBlockMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/BigDripleafBlockMixin.java index d8df6dcf..ffcf4286 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/BigDripleafBlockMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/BigDripleafBlockMixin.java @@ -30,7 +30,7 @@ public class BigDripleafBlockMixin { @Inject(method = "onProjectileHit", cancellable = true, at = @At("HEAD")) private void arclight$projectileHit(Level level, BlockState state, BlockHitResult hitResult, Projectile projectile, CallbackInfo ci) { - if (DistValidate.isValid(level) && CraftEventFactory.callEntityChangeBlockEvent(projectile, hitResult.getBlockPos(), state.setValue(TILT, Tilt.FULL)).isCancelled()) { + if (!DistValidate.isValid(level) && CraftEventFactory.callEntityChangeBlockEvent(projectile, hitResult.getBlockPos(), state.setValue(TILT, Tilt.FULL))) { ci.cancel(); } } @@ -50,7 +50,7 @@ public class BigDripleafBlockMixin { ci.cancel(); return; } - if (CraftEventFactory.callEntityChangeBlockEvent(entity, pos, state.setValue(TILT, Tilt.FULL)).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(entity, pos, state.setValue(TILT, Tilt.FULL))) { ci.cancel(); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/CaveVinesMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/CaveVinesMixin.java index 0948f9a7..66000f15 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/CaveVinesMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/CaveVinesMixin.java @@ -35,7 +35,7 @@ public interface CaveVinesMixin { static InteractionResult use(@Nullable Entity entity, BlockState state, Level level, BlockPos pos) { if (state.getValue(CaveVines.BERRIES)) { if (entity != null) { - if (CraftEventFactory.callEntityChangeBlockEvent(entity, pos, state.setValue(CaveVines.BERRIES, false)).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(entity, pos, state.setValue(CaveVines.BERRIES, false))) { return InteractionResult.SUCCESS; } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/ChorusFlowerBlockMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/ChorusFlowerBlockMixin.java index 1408f7ef..1b03f23b 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/ChorusFlowerBlockMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/ChorusFlowerBlockMixin.java @@ -117,7 +117,7 @@ public abstract class ChorusFlowerBlockMixin extends BlockMixin { @Inject(method = "onProjectileHit", cancellable = true, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;destroyBlock(Lnet/minecraft/core/BlockPos;ZLnet/minecraft/world/entity/Entity;)Z")) private void arclight$hitByProjectile(Level p_51654_, BlockState p_51655_, BlockHitResult result, Projectile projectile, CallbackInfo ci) { - if (CraftEventFactory.callEntityChangeBlockEvent(projectile, result.getBlockPos(), Blocks.AIR.defaultBlockState()).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(projectile, result.getBlockPos(), Blocks.AIR.defaultBlockState())) { ci.cancel(); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/ComposterBlockMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/ComposterBlockMixin.java index 6bc098f5..12da8c5b 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/ComposterBlockMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/ComposterBlockMixin.java @@ -56,7 +56,7 @@ public abstract class ComposterBlockMixin { double rand = world.random.nextDouble(); BlockState state1 = addItem(entity, state, DummyGeneratorAccess.INSTANCE, pos, stack, rand); - if (state == state1 || CraftEventFactory.callEntityChangeBlockEvent(ArclightCaptures.getEntityChangeBlock(), pos, state1).isCancelled()) { + if (state == state1 || !CraftEventFactory.callEntityChangeBlockEvent(ArclightCaptures.getEntityChangeBlock(), pos, state1)) { return state; } @@ -72,7 +72,7 @@ public abstract class ComposterBlockMixin { private static void arclight$emptyComposter(Entity entity, BlockState state, Level world, BlockPos pos, CallbackInfoReturnable cir) { if (entity != null && !(entity instanceof Player)) { BlockState blockState = empty(entity, state, DummyGeneratorAccess.INSTANCE, pos); - if (CraftEventFactory.callEntityChangeBlockEvent(entity, pos, blockState).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(entity, pos, blockState)) { cir.setReturnValue(state); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/CropBlockMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/CropBlockMixin.java index cc166887..90b06a24 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/CropBlockMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/CropBlockMixin.java @@ -12,7 +12,6 @@ import net.minecraft.world.level.block.CropBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.event.ForgeEventFactory; import org.bukkit.craftbukkit.v.event.CraftEventFactory; -import org.bukkit.event.entity.EntityChangeBlockEvent; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -31,8 +30,7 @@ public class CropBlockMixin { @Redirect(method = "entityInside", at = @At(value = "INVOKE", remap = false, target = "Lnet/minecraftforge/event/ForgeEventFactory;getMobGriefingEvent(Lnet/minecraft/world/level/Level;Lnet/minecraft/world/entity/Entity;)Z")) public boolean arclight$entityChangeBlock(Level world, Entity entity, BlockState state, Level worldIn, BlockPos pos) { boolean result = ForgeEventFactory.getMobGriefingEvent(world, entity); - EntityChangeBlockEvent event = CraftEventFactory.callEntityChangeBlockEvent(entity, pos, state, result); - return event.isCancelled(); + return !CraftEventFactory.callEntityChangeBlockEvent(entity, pos, state, result); } @Redirect(method = "randomTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/level/ServerLevel;setBlock(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;I)Z")) diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/LilyPadBlockMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/LilyPadBlockMixin.java index 2dfbb795..d039c2bf 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/LilyPadBlockMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/LilyPadBlockMixin.java @@ -17,7 +17,7 @@ public class LilyPadBlockMixin { @Inject(method = "entityInside", cancellable = true, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;destroyBlock(Lnet/minecraft/core/BlockPos;ZLnet/minecraft/world/entity/Entity;)Z")) public void arclight$entityChangeBlock(BlockState state, Level worldIn, BlockPos pos, Entity entityIn, CallbackInfo ci) { - if (CraftEventFactory.callEntityChangeBlockEvent(entityIn, pos, Blocks.AIR.defaultBlockState()).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(entityIn, pos, Blocks.AIR.defaultBlockState())) { ci.cancel(); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/PointedDripstoneBlockMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/PointedDripstoneBlockMixin.java index d391a5e8..16745baf 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/PointedDripstoneBlockMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/PointedDripstoneBlockMixin.java @@ -30,7 +30,7 @@ public class PointedDripstoneBlockMixin { @Inject(method = "onProjectileHit", cancellable = true, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;destroyBlock(Lnet/minecraft/core/BlockPos;Z)Z")) private void arclight$projectile(Level p_154042_, BlockState p_154043_, BlockHitResult hitResult, Projectile projectile, CallbackInfo ci) { - if (CraftEventFactory.callEntityChangeBlockEvent(projectile, hitResult.getBlockPos(), Blocks.AIR.defaultBlockState()).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(projectile, hitResult.getBlockPos(), Blocks.AIR.defaultBlockState())) { ci.cancel(); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/PowderSnowBlockMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/PowderSnowBlockMixin.java index 99ef49f9..c7b3bbc7 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/PowderSnowBlockMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/PowderSnowBlockMixin.java @@ -17,7 +17,7 @@ public class PowderSnowBlockMixin { @Inject(method = "entityInside", cancellable = true, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;destroyBlock(Lnet/minecraft/core/BlockPos;Z)Z")) private void arclight$entityChangeBlock(BlockState p_154263_, Level p_154264_, BlockPos pos, Entity entity, CallbackInfo ci) { - if (CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState()).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState())) { ci.cancel(); } } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/RedstoneOreBlockMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/RedstoneOreBlockMixin.java index 7e23e69c..a71281e3 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/RedstoneOreBlockMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/RedstoneOreBlockMixin.java @@ -76,7 +76,7 @@ public abstract class RedstoneOreBlockMixin { @Inject(method = "interact", cancellable = true, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;setBlock(Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;I)Z")) private static void arclight$entityChangeBlock(BlockState blockState, Level world, BlockPos blockPos, CallbackInfo ci) { - if (CraftEventFactory.callEntityChangeBlockEvent(arclight$entity, blockPos, blockState.setValue(RedStoneOreBlock.LIT, true)).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(arclight$entity, blockPos, blockState.setValue(RedStoneOreBlock.LIT, true))) { ci.cancel(); } arclight$entity = null; diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/TntBlockMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/TntBlockMixin.java index 8d9eba5d..289fa082 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/TntBlockMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/level/block/TntBlockMixin.java @@ -52,7 +52,7 @@ public abstract class TntBlockMixin { @Inject(method = "onProjectileHit", cancellable = true, at = @At(value = "INVOKE", remap = false, target = "Lnet/minecraft/world/level/block/TntBlock;onCaughtFire(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/core/Direction;Lnet/minecraft/world/entity/LivingEntity;)V")) public void arclight$entityChangeBlock(Level worldIn, BlockState state, BlockHitResult hit, Projectile projectile, CallbackInfo ci) { - if (CraftEventFactory.callEntityChangeBlockEvent(projectile, hit.getBlockPos(), Blocks.AIR.defaultBlockState()).isCancelled() + if (!CraftEventFactory.callEntityChangeBlockEvent(projectile, hit.getBlockPos(), Blocks.AIR.defaultBlockState()) || !CraftEventFactory.callTNTPrimeEvent(worldIn, hit.getBlockPos(), TNTPrimeEvent.PrimeCause.PROJECTILE, projectile, null)) { ci.cancel(); } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/spawner/BaseSpawnerMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/spawner/BaseSpawnerMixin.java index 58076079..682e5a50 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/spawner/BaseSpawnerMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/spawner/BaseSpawnerMixin.java @@ -115,7 +115,7 @@ public abstract class BaseSpawnerMixin { entity.moveTo(entity.getX(), entity.getY(), entity.getZ(), level.random.nextFloat() * 360.0F, 0.0F); if (entity instanceof Mob mob) { - if (spawnData.getCustomSpawnRules().isEmpty() && !mob.checkSpawnRules(level, MobSpawnType.SPAWNER) || !mob.checkSpawnObstruction(level)) { + if (!net.minecraftforge.event.ForgeEventFactory.checkSpawnPositionSpawner(mob, level, MobSpawnType.SPAWNER, spawnData, (BaseSpawner) (Object) this)) { continue; } diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mod/server/event/BlockBreakEventDispatcher.java b/arclight-common/src/main/java/io/izzel/arclight/common/mod/server/event/BlockBreakEventDispatcher.java index dba37a53..565ed1ca 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mod/server/event/BlockBreakEventDispatcher.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mod/server/event/BlockBreakEventDispatcher.java @@ -50,7 +50,7 @@ public class BlockBreakEventDispatcher { return; } - if (CraftEventFactory.callEntityChangeBlockEvent(entity, event.getPos(), Blocks.DIRT.defaultBlockState()).isCancelled()) { + if (!CraftEventFactory.callEntityChangeBlockEvent(entity, event.getPos(), Blocks.DIRT.defaultBlockState())) { event.setCanceled(true); } } diff --git a/arclight-common/src/main/resources/META-INF/accesstransformer.cfg b/arclight-common/src/main/resources/META-INF/accesstransformer.cfg index e4854898..94899b8e 100644 --- a/arclight-common/src/main/resources/META-INF/accesstransformer.cfg +++ b/arclight-common/src/main/resources/META-INF/accesstransformer.cfg @@ -1,3 +1,5 @@ +# Arclight 1.20 +public net.minecraft.world.entity.item.FallingBlockEntity f_31947_ # cancelDrop # Arclight 1.19.4 public net.minecraft.world.item.DebugStickItem m_150802_(Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/LevelAccessor;Lnet/minecraft/core/BlockPos;ZLnet/minecraft/world/item/ItemStack;)Z # handleInteraction public net.minecraft.world.level.block.ComposterBlock m_269590_(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/LevelAccessor;Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/level/block/state/BlockState; # empty diff --git a/build.gradle b/build.gradle index fbc89eb0..fcc49e58 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,7 @@ allprojects { ext { agpVersion = '1.23' minecraftVersion = '1.20.1' - forgeVersion = '47.0.3' + forgeVersion = '47.1.0' apiVersion = '1.5.4' toolsVersion = '1.3.0' mixinVersion = '0.8.5'