diff --git a/src/main/java/club/mcams/carpet/mixin/rule/playerNoNetherPortalCrossing/NetherPortalBlockMixin.java b/src/main/java/club/mcams/carpet/mixin/rule/playerNoNetherPortalCrossing/NetherPortalBlockMixin.java index 51bddb5d..2912f1a6 100644 --- a/src/main/java/club/mcams/carpet/mixin/rule/playerNoNetherPortalCrossing/NetherPortalBlockMixin.java +++ b/src/main/java/club/mcams/carpet/mixin/rule/playerNoNetherPortalCrossing/NetherPortalBlockMixin.java @@ -25,9 +25,9 @@ import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import net.minecraft.block.NetherPortalBlock; import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.block.NetherPortalBlock; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -38,10 +38,20 @@ public abstract class NetherPortalBlockMixin { method = "onEntityCollision", at = @At( value = "INVOKE", + //#if MC>=12100 + //$$ target = "Lnet/minecraft/entity/Entity;canUsePortals(Z)Z" + //#else target = "Lnet/minecraft/entity/Entity;canUsePortals()Z" + //#endif ) ) - private boolean onEntityCollision(Entity entity, Operation original) { + private boolean onEntityCollision( + Entity entity, + //#if MC>=12100 + //$$ boolean canUsePortals, + //#endif + Operation original + ) { if (AmsServerSettings.playerNoNetherPortalTeleport && entity instanceof PlayerEntity) { return false; } else {