削弱丘比特之箭的效果
This commit is contained in:
parent
dc0fad50ff
commit
7b767f228d
2 changed files with 0 additions and 27 deletions
|
@ -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<Optional<BlockPos>> cir) {
|
||||
CupidLove entity = CupidLove.getInstance(pVillager);
|
||||
if (entity.superbwarfare$getCupidLove()) {
|
||||
cir.setReturnValue(Optional.of(pVillager.getOnPos()));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9,7 +9,6 @@
|
|||
"FishingHookMixin",
|
||||
"LivingEntityMixin",
|
||||
"PlayerMixin",
|
||||
"VillagerMakeLoveMixin",
|
||||
"VillagerMixin"
|
||||
],
|
||||
"client": [
|
||||
|
|
Loading…
Add table
Reference in a new issue