From 0f90328e53f2c4b3a445ec198d9f60509d595c40 Mon Sep 17 00:00:00 2001 From: Mitchell Skaggs Date: Tue, 12 Jan 2021 03:27:08 -0600 Subject: [PATCH] Modify mixin signature to match 1.16 signature --- src/main/java/carpet/mixins/VillagerEntity_aiMixin.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/carpet/mixins/VillagerEntity_aiMixin.java b/src/main/java/carpet/mixins/VillagerEntity_aiMixin.java index b0e76355..37a403a7 100644 --- a/src/main/java/carpet/mixins/VillagerEntity_aiMixin.java +++ b/src/main/java/carpet/mixins/VillagerEntity_aiMixin.java @@ -19,6 +19,7 @@ import net.minecraft.item.Items; import net.minecraft.particle.ParticleTypes; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.ActionResult; import net.minecraft.util.dynamic.GlobalPos; import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; @@ -113,7 +114,7 @@ public abstract class VillagerEntity_aiMixin extends MerchantEntity } @Inject(method = "interactMob", at = @At("HEAD"), cancellable = true) - private void onInteract(PlayerEntity playerEntity_1, Hand hand_1, CallbackInfoReturnable cir) + private void onInteract(PlayerEntity playerEntity_1, Hand hand_1, CallbackInfoReturnable cir) { if (MobAI.isTracking(this, MobAI.TrackingType.VILLAGER_BREEDING)) { @@ -121,7 +122,7 @@ public abstract class VillagerEntity_aiMixin extends MerchantEntity if (itemStack_1.getItem() == Items.EMERALD) { GlobalPos bedPos = this.brain.getOptionalMemory(MemoryModuleType.HOME).orElse(null); - if (bedPos == null || bedPos.getDimension() != world.getRegistryKey()) // get DImension + if (bedPos == null || bedPos.getDimension() != world.getRegistryKey()) // get Dimension { sayNo(); ((ServerWorld) getEntityWorld()).spawnParticles(ParticleTypes.BARRIER, getX(), getY() + getStandingEyeHeight() + 1, getZ(), 1, 0.1, 0.1, 0.1, 0.0); @@ -162,7 +163,7 @@ public abstract class VillagerEntity_aiMixin extends MerchantEntity 1, 0.1, 0.1, 0.1, 0.0); } } - cir.setReturnValue(false); + cir.setReturnValue(ActionResult.FAIL); cir.cancel(); } }