mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 20:22:05 -07:00
Initial work on 1.14 pre-5
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] MC Utils
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/AttributeInstance.java b/src/main/java/net/minecraft/server/AttributeInstance.java
|
||||
index be179ba213..c53bc8230a 100644
|
||||
index 2f2b103641..b1900ba364 100644
|
||||
--- a/src/main/java/net/minecraft/server/AttributeInstance.java
|
||||
+++ b/src/main/java/net/minecraft/server/AttributeInstance.java
|
||||
@@ -0,0 +0,0 @@ public interface AttributeInstance {
|
||||
@@ -20,54 +20,55 @@ index be179ba213..c53bc8230a 100644
|
||||
|
||||
void b(UUID uuid);
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index 13dc7abc50..9bb7c9c652 100644
|
||||
index 3745f66de5..01061f219f 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
return d0 == 0.0D && d1 == 0.0D && d2 == 0.0D ? this : new BlockPosition((double) this.getX() + d0, (double) this.getY() + d1, (double) this.getZ() + d2);
|
||||
}
|
||||
|
||||
+ public BlockPosition add(int i, int j, int k) {return a(i, j, k);} // Paper - OBFHELPER
|
||||
public BlockPosition a(int i, int j, int k) {
|
||||
+ public BlockPosition add(int i, int j, int k) {return b(i, j, k);} // Paper - OBFHELPER
|
||||
public BlockPosition b(int i, int j, int k) {
|
||||
return i == 0 && j == 0 && k == 0 ? this : new BlockPosition(this.getX() + i, this.getY() + j, this.getZ() + k);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
};
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
return new BlockPosition(this.getY() * baseblockposition.getZ() - this.getZ() * baseblockposition.getY(), this.getZ() * baseblockposition.getX() - this.getX() * baseblockposition.getZ(), this.getX() * baseblockposition.getY() - this.getY() * baseblockposition.getX());
|
||||
}
|
||||
|
||||
+ public BlockPosition asImmutable() { return h(); } // Paper - OBFHELPER
|
||||
public BlockPosition h() {
|
||||
+ @Deprecated // We'll replace this...
|
||||
+ public BlockPosition asImmutable() { return immutableCopy(); } // Paper - OBFHELPER
|
||||
public BlockPosition immutableCopy() {
|
||||
return this;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
return this.d;
|
||||
}
|
||||
|
||||
+ public BlockPosition.MutableBlockPosition setValues(int i, int j, int k) { return c(i, j, k);} // Paper - OBFHELPER
|
||||
public BlockPosition.MutableBlockPosition c(int i, int j, int k) {
|
||||
+ public BlockPosition.MutableBlockPosition setValues(int i, int j, int k) { return d(i, j, k);} // Paper - OBFHELPER
|
||||
public BlockPosition.MutableBlockPosition d(int i, int j, int k) {
|
||||
this.b = i;
|
||||
this.c = j;
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
return this;
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
return this.c(entity.locX, entity.locY, entity.locZ);
|
||||
}
|
||||
|
||||
+ public BlockPosition.MutableBlockPosition setValues(double d0, double d1, double d2) { return c(d0, d1, d2);} // Paper - OBFHELPER
|
||||
public BlockPosition.MutableBlockPosition c(double d0, double d1, double d2) {
|
||||
return this.c(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2));
|
||||
return this.d(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 1ff78eed40..417c015e56 100644
|
||||
index 2d40f03b1a..0f031e862b 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
public class Chunk implements IChunkAccess {
|
||||
|
||||
private static final Logger d = LogManager.getLogger();
|
||||
private static final Logger b = LogManager.getLogger();
|
||||
- public static final ChunkSection a = null;
|
||||
+ public static final ChunkSection a = null; public static final ChunkSection EMPTY_CHUNK_SECTION = Chunk.a; // Paper - OBFHELPER
|
||||
private final ChunkSection[] sections;
|
||||
private final BiomeBase[] f;
|
||||
private final boolean[] g;
|
||||
private final BiomeBase[] d;
|
||||
private final Map<BlockPosition, NBTTagCompound> e;
|
||||
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
|
||||
return this.a(blockposition, Chunk.EnumTileEntityState.CHECK);
|
||||
}
|
||||
@@ -77,33 +78,22 @@ index 1ff78eed40..417c015e56 100644
|
||||
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||
index 34586bca65..b0c004b1f2 100644
|
||||
index 857b2f8868..bbf136614c 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkCoordIntPair {
|
||||
return a(this.x, this.z);
|
||||
return pair(this.x, this.z);
|
||||
}
|
||||
|
||||
+ public static long asLong(final BlockPosition pos) { return a(pos.getX() >> 4, pos.getZ() >> 4); } // Paper - OBFHELPER
|
||||
+ public static long asLong(int x, int z) { return a(x, z); } // Paper - OBFHELPER
|
||||
public static long a(int i, int j) {
|
||||
- public static long pair(int i, int j) {
|
||||
+ public static long asLong(final BlockPosition pos) { return pair(pos.getX() >> 4, pos.getZ() >> 4); } // Paper - OBFHELPER
|
||||
+ public static long asLong(int x, int z) { return pair(x, z); } // Paper - OBFHELPER
|
||||
+ public static long pair(int i, int j) {
|
||||
return (long) i & 4294967295L | ((long) j & 4294967295L) << 32;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||
index cc9604749b..70a95c2636 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger;
|
||||
public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus, ProtoChunk> {
|
||||
|
||||
private static final Logger b = LogManager.getLogger();
|
||||
- private final World c;
|
||||
+ private final World c; private final World getWorld() { return this.c; } // Paper - OBFHELPER
|
||||
private final ChunkGenerator<?> d;
|
||||
private final IChunkLoader e;
|
||||
private final IAsyncTaskHandler f;
|
||||
diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java
|
||||
index d24ec3d53c..9e83610f1a 100644
|
||||
index 8bda055159..409dc837c6 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataBits.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataBits.java
|
||||
@@ -0,0 +0,0 @@ public class DataBits {
|
||||
@@ -115,7 +105,7 @@ index d24ec3d53c..9e83610f1a 100644
|
||||
return this.a;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/DataPalette.java b/src/main/java/net/minecraft/server/DataPalette.java
|
||||
index dae40b9cde..2ee8791963 100644
|
||||
index 75ba698868..45403fbe30 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataPalette.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataPalette.java
|
||||
@@ -0,0 +0,0 @@ import javax.annotation.Nullable;
|
||||
@@ -125,12 +115,14 @@ index dae40b9cde..2ee8791963 100644
|
||||
+ default int getOrCreateIdFor(T object) { return this.a(object); } // Paper - OBFHELPER
|
||||
int a(T t0);
|
||||
|
||||
boolean b(T t0);
|
||||
|
||||
+ @Nullable default T getObject(int dataBits) { return this.a(dataBits); } // Paper - OBFHELPER
|
||||
@Nullable
|
||||
T a(int i);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
index 59cbbdcb3d..6fcfc5ef72 100644
|
||||
index 4411d5640a..28a6be7ab0 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
@@ -0,0 +0,0 @@ import java.util.stream.Collectors;
|
||||
@@ -154,7 +146,7 @@ index 59cbbdcb3d..6fcfc5ef72 100644
|
||||
+ private int i; private int getBitsPerObject() { return this.i; } // Paper - OBFHELPER
|
||||
private final ReentrantLock j = new ReentrantLock();
|
||||
|
||||
private void b() {
|
||||
public void a() {
|
||||
@@ -0,0 +0,0 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||
return j << 8 | k << 4 | i;
|
||||
}
|
||||
@@ -169,10 +161,10 @@ index 59cbbdcb3d..6fcfc5ef72 100644
|
||||
|
||||
+ public void writeDataPaletteBlock(PacketDataSerializer packetDataSerializer) { this.b(packetDataSerializer); } // Paper - OBFHELPER
|
||||
public void b(PacketDataSerializer packetdataserializer) {
|
||||
this.b();
|
||||
this.a();
|
||||
packetdataserializer.writeByte(this.i);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||
index 372afbe94e..20b7c2c6dc 100644
|
||||
index 7636358a70..8520680814 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.event.entity.EntityUnleashEvent;
|
||||
@@ -180,11 +172,12 @@ index 372afbe94e..20b7c2c6dc 100644
|
||||
public abstract class EntityCreature extends EntityInsentient {
|
||||
|
||||
+ public org.bukkit.craftbukkit.entity.CraftCreature getBukkitCreature() { return (org.bukkit.craftbukkit.entity.CraftCreature) super.getBukkitEntity(); } // Paper
|
||||
private BlockPosition a;
|
||||
private float b;
|
||||
|
||||
+
|
||||
protected EntityCreature(EntityTypes<? extends EntityCreature> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 8b2000f683..1a3517aeed 100644
|
||||
index 4720632641..afa03ce6f2 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -196,7 +189,7 @@ index 8b2000f683..1a3517aeed 100644
|
||||
// CraftBukkit start - fire event
|
||||
setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index d4fe0ab6bf..011c7af218 100644
|
||||
index 3e16632e24..d31c1c989c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -208,76 +201,31 @@ index d4fe0ab6bf..011c7af218 100644
|
||||
@Override
|
||||
public float getBukkitYaw() {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||
index 5f9255df14..5ea5170436 100644
|
||||
index 6ab4c78b35..76142d5dc2 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMonster.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||
@@ -0,0 +0,0 @@ package net.minecraft.server;
|
||||
@@ -0,0 +0,0 @@ import java.util.function.Predicate;
|
||||
|
||||
public abstract class EntityMonster extends EntityCreature implements IMonster {
|
||||
|
||||
+ public org.bukkit.craftbukkit.entity.CraftMonster getBukkitMonster() { return (org.bukkit.craftbukkit.entity.CraftMonster) super.getBukkitEntity(); } // Paper
|
||||
protected EntityMonster(EntityTypes<?> entitytypes, World world) {
|
||||
protected EntityMonster(EntityTypes<? extends EntityMonster> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
this.b_ = 5;
|
||||
}
|
||||
|
||||
+ public SoundCategory getSoundCategory() { return bV(); } // Paper - OBFHELPER
|
||||
public SoundCategory bV() {
|
||||
return SoundCategory.HOSTILE;
|
||||
}
|
||||
this.f = 5;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index b8abd6363f..a07ee150c2 100644
|
||||
index 2ee4069173..0f2604a3d5 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -0,0 +0,0 @@ package net.minecraft.server;
|
||||
import com.mojang.datafixers.DataFixUtils;
|
||||
import com.mojang.datafixers.types.Type;
|
||||
|
||||
+import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -0,0 +0,0 @@ import com.mojang.datafixers.types.Type;
|
||||
import java.util.Collections;
|
||||
import java.util.Optional;
|
||||
import java.util.Set; // Paper
|
||||
+import java.util.Map; // Paper
|
||||
import java.util.UUID;
|
||||
import java.util.function.Function;
|
||||
@@ -0,0 +0,0 @@ public class EntityTypes<T extends Entity> {
|
||||
public static <T extends Entity> EntityTypes<T> a(String s, EntityTypes.a<T> entitytypes_a) {
|
||||
EntityTypes<T> entitytypes = entitytypes_a.a(s);
|
||||
|
||||
+ // Paper start
|
||||
+ if (clsToKeyMap == null ) clsToKeyMap = new java.util.HashMap<>();
|
||||
+ if (clsToTypeMap == null ) clsToTypeMap = new java.util.HashMap<>();
|
||||
+
|
||||
+ MinecraftKey key = new MinecraftKey(s);
|
||||
+ Class<? extends T> entityClass = entitytypes_a.getEntityClass();
|
||||
IRegistry.ENTITY_TYPE.a(new MinecraftKey(s), entitytypes); // CraftBukkit - decompile error
|
||||
+ clsToKeyMap.put(entityClass, key);
|
||||
+ clsToTypeMap.put(entityClass, org.bukkit.entity.EntityType.fromName(s));
|
||||
return entitytypes;
|
||||
}
|
||||
+ public static Map<Class<? extends Entity>, MinecraftKey> clsToKeyMap;
|
||||
+ public static Map<Class<? extends Entity>, org.bukkit.entity.EntityType> clsToTypeMap;
|
||||
+ // Paper end
|
||||
|
||||
@Nullable
|
||||
public static MinecraftKey getName(EntityTypes<?> entitytypes) {
|
||||
@@ -0,0 +0,0 @@ public class EntityTypes<T extends Entity> {
|
||||
|
||||
public static class a<T extends Entity> {
|
||||
|
||||
- private final Class<? extends T> a;
|
||||
+ private final Class<? extends T> a; public Class<? extends T> getEntityClass() { return a; } // Paper - OBFHELPER
|
||||
private final Function<? super World, ? extends T> b;
|
||||
private boolean c = true;
|
||||
private boolean d = true;
|
||||
@@ -0,0 +0,0 @@ public class EntityTypes<T extends Entity> {
|
||||
|
||||
// Paper start
|
||||
public static Set<MinecraftKey> getEntityNameList() {
|
||||
- return REGISTRY.keySet();
|
||||
+ return IRegistry.ENTITY_TYPE.keySet();
|
||||
}
|
||||
// Paper end
|
||||
}
|
||||
import java.util.stream.Stream;
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index 9e763b6e39..a7fc148591 100644
|
||||
index cc9851edbc..80a2da51da 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.event.world.StructureGrowEvent;
|
||||
@@ -286,7 +234,7 @@ index 9e763b6e39..a7fc148591 100644
|
||||
private static final Logger c = LogManager.getLogger();
|
||||
- public static final ItemStack a = new ItemStack((Item) null);
|
||||
+ public static final ItemStack a = new ItemStack((Item) null);public static final ItemStack NULL_ITEM = a; // Paper - OBFHELPER
|
||||
public static final DecimalFormat b = D();
|
||||
public static final DecimalFormat b = F();
|
||||
private int count;
|
||||
private int e;
|
||||
+ // Paper start
|
||||
@@ -658,7 +606,7 @@ index 0000000000..c97e116aaf
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
index 434471215d..8c5d6c1d38 100644
|
||||
index dfa33f0336..cc25ea7401 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
@@ -0,0 +0,0 @@ public class NBTTagCompound implements NBTBase {
|
||||
@@ -680,12 +628,14 @@ index 434471215d..8c5d6c1d38 100644
|
||||
this.setLong(s + "Least", uuid.getLeastSignificantBits());
|
||||
}
|
||||
|
||||
+ public UUID getUUID(String prefix) { return a(prefix); } // Paper - OBFHELPER
|
||||
@Nullable
|
||||
+
|
||||
+ @Nullable public UUID getUUID(String prefix) { return a(prefix); } // Paper - OBFHELPER
|
||||
+ @Nullable
|
||||
public UUID a(String s) {
|
||||
return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least"));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
index d85bc522c3..e2fc41d6d1 100644
|
||||
index 94e6a3db4c..fca496a00a 100644
|
||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
@@ -0,0 +0,0 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -726,7 +676,7 @@ index d85bc522c3..e2fc41d6d1 100644
|
||||
public QueuedPacket(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> genericfuturelistener) {
|
||||
this.a = packet;
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||
index 7582151ae4..d05f1e02cf 100644
|
||||
index db2fe836c2..0d67676f7d 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||
@@ -0,0 +0,0 @@ public class PacketDataSerializer extends ByteBuf {
|
||||
@@ -750,31 +700,40 @@ index d54177bdcc..2aa805eef1 100644
|
||||
throw new SkipEncodeException(throwable);
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
index 395215bbdd..f2159bc2dd 100644
|
||||
index 0dda7aaf69..363ab5da12 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
@@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
private int a;
|
||||
private int b;
|
||||
private int c;
|
||||
- private byte[] d;
|
||||
+ private byte[] d; private byte[] getData() { return this.d; } // Paper - OBFHELPER
|
||||
private List<NBTTagCompound> e;
|
||||
private boolean f;
|
||||
private NBTTagCompound d;
|
||||
- private byte[] e;
|
||||
+ private byte[] e; private byte[] getData() { return this.e; } // Paper - OBFHELPER
|
||||
private List<NBTTagCompound> f;
|
||||
private boolean g;
|
||||
|
||||
@@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
return bytebuf;
|
||||
}
|
||||
|
||||
+ public int writeChunk(PacketDataSerializer packetDataSerializer, Chunk chunk, boolean writeSkyLightArray, int chunkSectionSelector) { return this.a(packetDataSerializer, chunk, writeSkyLightArray, chunkSectionSelector); } // Paper - OBFHELPER
|
||||
public int a(PacketDataSerializer packetdataserializer, Chunk chunk, boolean flag, int i) {
|
||||
+ public int writeChunk(PacketDataSerializer packetDataSerializer, Chunk chunk, int chunkSectionSelector) { return this.a(packetDataSerializer, chunk, chunkSectionSelector); } // Paper - OBFHELPER
|
||||
public int a(PacketDataSerializer packetdataserializer, Chunk chunk, int i) {
|
||||
int j = 0;
|
||||
ChunkSection[] achunksection = chunk.getSections();
|
||||
@@ -0,0 +0,0 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
BiomeBase[] abiomebase = chunk.getBiomeIndex();
|
||||
|
||||
for (l = 0; l < abiomebase.length; ++l) {
|
||||
- packetdataserializer.writeInt(IRegistry.BIOME.a((Object) abiomebase[l]));
|
||||
+ packetdataserializer.writeInt(IRegistry.BIOME.a(abiomebase[l])); // Paper - decompile fix
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index aac5f9bfa9..06f90ceca5 100644
|
||||
index 10ebb23c66..23e37b5008 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
private final MinecraftServer minecraftServer;
|
||||
public EntityPlayer player;
|
||||
private int e;
|
||||
@@ -788,20 +747,20 @@ index aac5f9bfa9..06f90ceca5 100644
|
||||
private volatile int chatThrottle;
|
||||
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerInventory.java b/src/main/java/net/minecraft/server/PlayerInventory.java
|
||||
index 997fdc4997..988a361195 100644
|
||||
index a5dba62caf..a088658ae0 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerInventory.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerInventory.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerInventory implements IInventory {
|
||||
@@ -0,0 +0,0 @@ public class PlayerInventory implements IInventory, INamableTileEntity {
|
||||
public final NonNullList<ItemStack> items;
|
||||
public final NonNullList<ItemStack> armor;
|
||||
public final NonNullList<ItemStack> extraSlots;
|
||||
- private final List<NonNullList<ItemStack>> f;
|
||||
+ private final List<NonNullList<ItemStack>> f;List<NonNullList<ItemStack>> getComponents() { return f; } // Paper - OBFHELPER
|
||||
public int itemInHandIndex;
|
||||
public EntityHuman player;
|
||||
public final EntityHuman player;
|
||||
private ItemStack carried;
|
||||
diff --git a/src/main/java/net/minecraft/server/PotionUtil.java b/src/main/java/net/minecraft/server/PotionUtil.java
|
||||
index 6740b396a1..ea08c5a1c8 100644
|
||||
index b3824898da..bf4172be52 100644
|
||||
--- a/src/main/java/net/minecraft/server/PotionUtil.java
|
||||
+++ b/src/main/java/net/minecraft/server/PotionUtil.java
|
||||
@@ -0,0 +0,0 @@ public class PotionUtil {
|
||||
@@ -813,7 +772,7 @@ index 6740b396a1..ea08c5a1c8 100644
|
||||
MinecraftKey minecraftkey = IRegistry.POTION.getKey(potionregistry);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
index a894f7886d..93935e7c77 100644
|
||||
index 4efcb8b595..60948afa4e 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
@@ -0,0 +0,0 @@ public class RegistryBlockID<T> implements Registry<T> {
|
||||
@@ -825,7 +784,7 @@ index a894f7886d..93935e7c77 100644
|
||||
return this.b.size();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
index 8cb97b894a..5e71d2ac27 100644
|
||||
index ea90a01830..59e7d907ef 100644
|
||||
--- a/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
@@ -0,0 +0,0 @@ public class SystemUtils {
|
||||
@@ -848,15 +807,6 @@ index 8cb97b894a..5e71d2ac27 100644
|
||||
}
|
||||
|
||||
public static long getTimeMillis() {
|
||||
@@ -0,0 +0,0 @@ public class SystemUtils {
|
||||
futuretask.run();
|
||||
return futuretask.get();
|
||||
} catch (ExecutionException executionexception) {
|
||||
- logger.fatal("Error executing task", executionexception);
|
||||
+ logger.fatal("Error executing task", executionexception.getCause() != null ? executionexception.getCause() : executionexception); // Paper
|
||||
} catch (InterruptedException interruptedexception) {
|
||||
logger.fatal("Error executing task", interruptedexception);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class SystemUtils {
|
||||
public static <T> T b(Iterable<T> iterable, @Nullable T t0) {
|
||||
Iterator<T> iterator = iterable.iterator();
|
||||
@@ -871,14 +821,23 @@ index 8cb97b894a..5e71d2ac27 100644
|
||||
@@ -0,0 +0,0 @@ public class SystemUtils {
|
||||
}
|
||||
|
||||
public static <K> Strategy<K> g() {
|
||||
public static <K> Strategy<K> i() {
|
||||
- return SystemUtils.IdentityHashingStrategy.INSTANCE;
|
||||
+ return (Strategy<K>) IdentityHashingStrategy.INSTANCE; // Paper - decompile fix
|
||||
}
|
||||
|
||||
static enum IdentityHashingStrategy implements Strategy<Object> {
|
||||
public static <V> CompletableFuture<List<V>> b(List<? extends CompletableFuture<? extends V>> list) {
|
||||
@@ -0,0 +0,0 @@ public class SystemUtils {
|
||||
list.forEach((completablefuture1) -> {
|
||||
int i = list1.size();
|
||||
|
||||
- list1.add((Object) null);
|
||||
+ list1.add(null); // Paper - decompile fix
|
||||
acompletablefuture[i] = completablefuture1.whenComplete((object, throwable) -> {
|
||||
if (throwable != null) {
|
||||
completablefuture.completeExceptionally(throwable);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index 2ef4ac64b2..f907d4f3b7 100644
|
||||
index c4aa0152c8..6e44e58c58 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftItemStack extends ItemStack {
|
||||
|
Reference in New Issue
Block a user