diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/ai/behavior/InteractWithDoorMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/ai/behavior/InteractWithDoorMixin.java index bc084025..48aa627e 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/ai/behavior/InteractWithDoorMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/ai/behavior/InteractWithDoorMixin.java @@ -18,7 +18,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(InteractWithDoor.class) public abstract class InteractWithDoorMixin { - @Eject(method = "desc=/B$/", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/DoorBlock;setOpen(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/level/Level;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/core/BlockPos;Z)V")) + @Eject(method = "desc=/Z$/", require = 2, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/DoorBlock;setOpen(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/level/Level;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/core/BlockPos;Z)V")) private static void arclight$openDoor1(DoorBlock instance, Entity entity, Level p_153167_, BlockState p_153168_, BlockPos pos, boolean p_153170_, CallbackInfoReturnable cir) { var event = new EntityInteractEvent(((EntityBridge) entity).bridge$getBukkitEntity(), CraftBlock.at(entity.getLevel(), pos)); Bukkit.getPluginManager().callEvent(event); diff --git a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/ai/behavior/ResetProfessionMixin.java b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/ai/behavior/ResetProfessionMixin.java index f745d96b..eea37986 100644 --- a/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/ai/behavior/ResetProfessionMixin.java +++ b/arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/world/entity/ai/behavior/ResetProfessionMixin.java @@ -15,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.Redirect; public class ResetProfessionMixin { @Redirect(method = "*", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/npc/Villager;setVillagerData(Lnet/minecraft/world/entity/npc/VillagerData;)V")) - private void arclight$careerChangeHook(Villager villagerEntity, VillagerData villagerData) { + private static void arclight$careerChangeHook(Villager villagerEntity, VillagerData villagerData) { VillagerCareerChangeEvent event = CraftEventFactory.callVillagerCareerChangeEvent(villagerEntity, CraftVillager.nmsToBukkitProfession(VillagerProfession.NONE), VillagerCareerChangeEvent.ChangeReason.LOSING_JOB); // 这里本来是 EMPLOYED 但是我怀疑他打错了