1.15 pre3

This commit is contained in:
gnembon committed 2019-11-28 19:54:15 -04:00
1 parent 6497200dac
commit 1d10f7f1b1
2 files changed
+6 -19

No files matched your search

@@ -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);
}