From 1d10f7f1b1d0f383928f8889eae1d2769e1cd98c Mon Sep 17 00:00:00 2001 From: gnembon Date: Thu, 28 Nov 2019 19:54:15 -0400 Subject: [PATCH] 1.15 pre3 --- gradle.properties | 4 ++-- .../PortalForcer_portalSuffocationMixin.java | 21 ++++--------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/gradle.properties b/gradle.properties index edbff392..b552acee 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,8 +4,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use # or better: https://modmuss50.me/fabric.html - minecraft_version=1.15-pre2 - yarn_mappings=1.15-pre2+build.4 + minecraft_version=1.15-pre3 + yarn_mappings=1.15-pre3+build.1 loader_version=0.7.2+build.174 # Mod Properties diff --git a/src/main/java/carpet/mixins/PortalForcer_portalSuffocationMixin.java b/src/main/java/carpet/mixins/PortalForcer_portalSuffocationMixin.java index c7928d3c..c3327c04 100644 --- a/src/main/java/carpet/mixins/PortalForcer_portalSuffocationMixin.java +++ b/src/main/java/carpet/mixins/PortalForcer_portalSuffocationMixin.java @@ -33,27 +33,14 @@ public class PortalForcer_portalSuffocationMixin @Redirect(method = "usePortal", at = @At( value = "INVOKE", - target = "Lnet/minecraft/entity/Entity;setPositionAndAngles(DDDFF)V" + target = "Lnet/minecraft/entity/Entity;method_24203(DDD)V" )) - private void alternativeSetPositionAndAngles(Entity entity, double double_1, double double_2, double double_3, float float_1, float float_2) + private void alternativeSetPositionAndAngles(Entity entity, double d, double e, double f) { if (CarpetSettings.portalSuffocationFix && CarpetSettings.fixedPosition != null) - entity.setPositionAndAngles(CarpetSettings.fixedPosition.x, CarpetSettings.fixedPosition.y, CarpetSettings.fixedPosition.z, float_1, float_2); + entity.method_24203(CarpetSettings.fixedPosition.x, CarpetSettings.fixedPosition.y, CarpetSettings.fixedPosition.z); else - entity.setPositionAndAngles(double_1, double_2, double_3, float_1, float_2); - - } - - @Redirect(method = "usePortal", at = @At( - value = "INVOKE", - target = "Lnet/minecraft/server/network/ServerPlayNetworkHandler;requestTeleport(DDDFF)V" - )) - private void alternativeSetPositionAndAngles(ServerPlayNetworkHandler serverPlayNetworkHandler, double double_1, double double_2, double double_3, float float_1, float float_2) - { - if (CarpetSettings.portalSuffocationFix && CarpetSettings.fixedPosition != null) - serverPlayNetworkHandler.requestTeleport(CarpetSettings.fixedPosition.x, CarpetSettings.fixedPosition.y, CarpetSettings.fixedPosition.z, float_1, float_2); - else - serverPlayNetworkHandler.requestTeleport(double_1, double_2, double_3, float_1, float_2); + entity.method_24203(d, e, f); }