From 7b767f228d69320209fa32128cfb9001d20f336d Mon Sep 17 00:00:00 2001 From: 17146 <1714673995@qq.com> Date: Sat, 10 May 2025 01:50:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8A=E5=BC=B1=E4=B8=98=E6=AF=94=E7=89=B9?= =?UTF-8?q?=E4=B9=8B=E7=AE=AD=E7=9A=84=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mixins/VillagerMakeLoveMixin.java | 26 ------------------- src/main/resources/mixins.superbwarfare.json | 1 - 2 files changed, 27 deletions(-) delete mode 100644 src/main/java/com/atsuishio/superbwarfare/mixins/VillagerMakeLoveMixin.java diff --git a/src/main/java/com/atsuishio/superbwarfare/mixins/VillagerMakeLoveMixin.java b/src/main/java/com/atsuishio/superbwarfare/mixins/VillagerMakeLoveMixin.java deleted file mode 100644 index 730713461..000000000 --- a/src/main/java/com/atsuishio/superbwarfare/mixins/VillagerMakeLoveMixin.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.atsuishio.superbwarfare.mixins; - -import com.atsuishio.superbwarfare.entity.CupidLove; -import net.minecraft.core.BlockPos; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.world.entity.ai.behavior.VillagerMakeLove; -import net.minecraft.world.entity.npc.Villager; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -import java.util.Optional; - -@Mixin(VillagerMakeLove.class) -public class VillagerMakeLoveMixin { - - @Inject(method = "takeVacantBed(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/entity/npc/Villager;)Ljava/util/Optional;", - at = @At("HEAD"), cancellable = true) - private void takeVacantBed(ServerLevel pLevel, Villager pVillager, CallbackInfoReturnable> cir) { - CupidLove entity = CupidLove.getInstance(pVillager); - if (entity.superbwarfare$getCupidLove()) { - cir.setReturnValue(Optional.of(pVillager.getOnPos())); - } - } -} diff --git a/src/main/resources/mixins.superbwarfare.json b/src/main/resources/mixins.superbwarfare.json index 69b76fde4..bd711627d 100644 --- a/src/main/resources/mixins.superbwarfare.json +++ b/src/main/resources/mixins.superbwarfare.json @@ -9,7 +9,6 @@ "FishingHookMixin", "LivingEntityMixin", "PlayerMixin", - "VillagerMakeLoveMixin", "VillagerMixin" ], "client": [