mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-01 00:10:32 +01:00
89d51d5f29
Because this exploit has been widely known for years and has not been fixed by Mojang, we decided that it was worth allowing people to toggle it on/off due to how easy it is to make it configurable. It should be noted that this decision does not promise all future exploits will be configurable.
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Irmo van den Berge <irmo.vandenberge@ziggo.nl>
|
|
Date: Wed, 10 Mar 2021 21:26:31 +0100
|
|
Subject: [PATCH] Add fast alternative constructor for Rotations
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/core/Rotations.java b/src/main/java/net/minecraft/core/Rotations.java
|
|
index e4b4e78de933b93be87805501d9cbfec429cf68c..95ef904bebeaff3275f25c401ef13c68504f3514 100644
|
|
--- a/src/main/java/net/minecraft/core/Rotations.java
|
|
+++ b/src/main/java/net/minecraft/core/Rotations.java
|
|
@@ -19,6 +19,18 @@ public class Rotations {
|
|
this(serialized.getFloat(0), serialized.getFloat(1), serialized.getFloat(2));
|
|
}
|
|
|
|
+ // Paper start - faster alternative constructor
|
|
+ private Rotations(float x, float y, float z, Void dummy_var) {
|
|
+ this.x = x;
|
|
+ this.y = y;
|
|
+ this.z = z;
|
|
+ }
|
|
+
|
|
+ public static Rotations createWithoutValidityChecks(float x, float y, float z) {
|
|
+ return new Rotations(x, y, z, null);
|
|
+ }
|
|
+ // Paper end - faster alternative constructor
|
|
+
|
|
public ListTag save() {
|
|
ListTag listTag = new ListTag();
|
|
listTag.add(FloatTag.valueOf(this.x));
|