mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
fix: closer to compilable
Signed-off-by: Mariell Hoversholm <proximyst@proximyst.com>
This commit is contained in:
parent
725ba53b4b
commit
041a42e0e4
2 changed files with 8 additions and 46 deletions
|
@ -2373,7 +2373,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ /**
|
||||
+ * You must use {@link #hasUUID(String)} before or else it <b>will</b> throw an NPE.
|
||||
+ */
|
||||
+ public UUID getUUID(String prefix) { return getUUID(prefix); } // Paper - OBFHELPER
|
||||
public UUID getUUID(String key) {
|
||||
return NbtUtils.loadUUID(this.get(key));
|
||||
}
|
||||
|
@ -2394,10 +2393,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
+++ b/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
@@ -0,0 +0,0 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
|
||||
throw new IllegalArgumentException("Packet too big (is " + j + ", should be less than 2097152): " + packet);
|
||||
}
|
||||
} catch (Throwable var9) {
|
||||
LOGGER.error(var9);
|
||||
+ throwable.printStackTrace(); // Paper - WHAT WAS IT? WHO DID THIS TO YOU? WHAT DID YOU SEE?
|
||||
- LOGGER.error(var9);
|
||||
+ LOGGER.error("Packet encoding of packet ID {} threw (skippable? {})", integer, packet.isSkippable(), var9); // Paper - WHAT WAS IT? WHO DID THIS TO YOU? WHAT DID YOU SEE?
|
||||
if (packet.isSkippable()) {
|
||||
throw new SkipPacketException(var9);
|
||||
} else {
|
||||
|
@ -2409,7 +2409,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import com.destroystokyo.paper.block.TargetBlockInfo;
|
||||
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
+import it.unimi.dsi.fastutil.objects.ObjectRBTreeSet;
|
||||
+import net.minecraft.core.BlockPos;
|
||||
|
@ -2885,19 +2884,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ return getNMSWorld(entity.getWorld());
|
||||
+ }
|
||||
+
|
||||
+ public static ClipContext.Fluid getNMSFluidCollisionOption(TargetBlockInfo.FluidMode fluidMode) {
|
||||
+ if (fluidMode == TargetBlockInfo.FluidMode.NEVER) {
|
||||
+ return ClipContext.Fluid.NONE;
|
||||
+ }
|
||||
+ if (fluidMode == TargetBlockInfo.FluidMode.SOURCE_ONLY) {
|
||||
+ return ClipContext.Fluid.SOURCE_ONLY;
|
||||
+ }
|
||||
+ if (fluidMode == TargetBlockInfo.FluidMode.ALWAYS) {
|
||||
+ return ClipContext.Fluid.ANY;
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ public static BlockFace toBukkitBlockFace(Direction enumDirection) {
|
||||
+ switch (enumDirection) {
|
||||
+ case DOWN:
|
||||
|
@ -4325,19 +4311,6 @@ diff --git a/src/main/java/net/minecraft/world/phys/AABB.java b/src/main/java/ne
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/phys/AABB.java
|
||||
+++ b/src/main/java/net/minecraft/world/phys/AABB.java
|
||||
@@ -0,0 +0,0 @@ public class AABB {
|
||||
return this.move(vec.x, vec.y, vec.z);
|
||||
}
|
||||
|
||||
+ public final boolean intersects(AABB axisalignedbb) { return this.intersects(axisalignedbb); } // Paper - OBFHELPER
|
||||
public boolean intersects(AABB box) {
|
||||
return this.intersects(box.minX, box.minY, box.minZ, box.maxX, box.maxY, box.maxZ);
|
||||
}
|
||||
|
||||
+ public final boolean intersects(double d0, double d1, double d2, double d3, double d4, double d5) { return intersects(d0, d1, d2, d3, d4, d5); } // Paper - OBFHELPER
|
||||
public boolean intersects(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) {
|
||||
return this.minX < maxX && this.maxX > minX && this.minY < maxY && this.maxY > minY && this.minZ < maxZ && this.maxZ > minZ;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class AABB {
|
||||
return x >= this.minX && x < this.maxX && y >= this.minY && y < this.maxY && z >= this.minZ && z < this.maxZ;
|
||||
}
|
||||
|
@ -4351,11 +4324,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/world/phys/shapes/Shapes.java
|
||||
+++ b/src/main/java/net/minecraft/world/phys/shapes/Shapes.java
|
||||
@@ -0,0 +0,0 @@ public final class Shapes {
|
||||
public static final VoxelShape INFINITY = box(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);
|
||||
private static final VoxelShape EMPTY = new ArrayVoxelShape(new BitSetDiscreteVoxelShape(0, 0, 0), (DoubleList)(new DoubleArrayList(new double[]{0.0D})), (DoubleList)(new DoubleArrayList(new double[]{0.0D})), (DoubleList)(new DoubleArrayList(new double[]{0.0D})));
|
||||
|
||||
+ public static final VoxelShape empty() {return empty();} // Paper - OBFHELPER
|
||||
public static VoxelShape empty() {
|
||||
return EMPTY;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@
|
||||
+package co.aikar.timings;
|
||||
+
|
||||
+import Timing;
|
||||
+import com.google.common.collect.MapMaker;
|
||||
+import net.minecraft.commands.CommandFunction;
|
||||
+import net.minecraft.network.protocol.Packet;
|
||||
|
@ -230,9 +229,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+import static co.aikar.util.JSONUtil.toArrayMapper;
|
||||
+import static co.aikar.util.JSONUtil.toObjectMapper;
|
||||
+
|
||||
+import TimingHistory;
|
||||
+import TimingsReportListener;
|
||||
+
|
||||
+@SuppressWarnings({"rawtypes", "SuppressionAnnotation"})
|
||||
+public class TimingsExport extends Thread {
|
||||
+
|
||||
|
@ -282,9 +278,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ pair("end", System.currentTimeMillis() / 1000),
|
||||
+ pair("online-mode", Bukkit.getServer().getOnlineMode()),
|
||||
+ pair("sampletime", (System.currentTimeMillis() - TimingsManager.timingStart) / 1000),
|
||||
+ pair("datapacks", toArrayMapper(MinecraftServer.getServer().getPackRepository().getSelectedIds(), pack -> {
|
||||
+ // Don't feel like obf helper'ing these, non fatal if its temp missed.
|
||||
+ return ChatColor.stripColor(CraftChatMessage.fromComponent(pack.a(true)));
|
||||
+ pair("datapacks", toArrayMapper(MinecraftServer.getServer().getPackRepository().getSelectedPacks(), pack -> {
|
||||
+ return ChatColor.stripColor(CraftChatMessage.fromComponent(pack.getChatLink(true)));
|
||||
+ }))
|
||||
+ );
|
||||
+ if (!TimingsManager.privacy) {
|
||||
|
@ -321,12 +316,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ );
|
||||
+
|
||||
+ parent.put("worlds", toObjectMapper(MinecraftServer.getServer().getAllLevels(), world -> {
|
||||
+ if (world.getWorldData().getName().equals("worldeditregentempworld")) return null;
|
||||
+ return pair(world.getWorldData().getName(), createObject(
|
||||
+ if (world.serverLevelData.getLevelName().equals("worldeditregentempworld")) return null;
|
||||
+ return pair(world.serverLevelData.getLevelName(), createObject(
|
||||
+ pair("gamerules", toObjectMapper(world.getWorld().getGameRules(), rule -> {
|
||||
+ return pair(rule, world.getWorld().getGameRuleValue(rule));
|
||||
+ })),
|
||||
+ pair("ticking-distance", world.getChunkProvider().playerChunkMap.getEffectiveViewDistance())
|
||||
+ pair("ticking-distance", world.getChunkSource().chunkMap.getEffectiveViewDistance())
|
||||
+ ));
|
||||
+ }));
|
||||
+
|
||||
|
@ -556,7 +551,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@
|
||||
+package co.aikar.timings;
|
||||
+
|
||||
+import Timing;
|
||||
+import net.minecraft.server.level.ServerLevel;
|
||||
+import net.minecraft.world.level.Level;
|
||||
+import net.minecraft.world.level.storage.PrimaryLevelData;
|
||||
|
|
Loading…
Reference in a new issue