Reduce allocation of Vec3D by entity tracker

This commit is contained in:
Spottedleaf
2020-04-27 00:04:16 -07:00
parent 0449ede4a6
commit 46c2fbfb74
3 changed files with 39 additions and 14 deletions

View File

@@ -1,6 +1,11 @@
--- a/net/minecraft/network/protocol/game/VecDeltaCodec.java
+++ b/net/minecraft/network/protocol/game/VecDeltaCodec.java
@@ -9,12 +9,12 @@
@@ -5,16 +5,16 @@
public class VecDeltaCodec {
private static final double TRUNCATION_STEPS = 4096.0;
- private Vec3 base = Vec3.ZERO;
+ public Vec3 base = Vec3.ZERO; // Paper
@VisibleForTesting
static long encode(double value) {