@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/network/PacketDataSerializer.java
|
||||
+++ b/net/minecraft/network/PacketDataSerializer.java
|
||||
@@ -68,6 +68,8 @@
|
||||
@@ -74,6 +74,8 @@
|
||||
import net.minecraft.world.phys.MovingObjectPositionBlock;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public class PacketDataSerializer extends ByteBuf {
|
||||
|
||||
private static final int MAX_VARINT_SIZE = 5;
|
||||
@@ -158,7 +160,7 @@
|
||||
@@ -195,7 +197,7 @@
|
||||
|
||||
public <T, C extends Collection<T>> C readCollection(IntFunction<C> intfunction, PacketDataSerializer.a<T> packetdataserializer_a) {
|
||||
int i = this.readVarInt();
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
for (int j = 0; j < i; ++j) {
|
||||
c0.add(packetdataserializer_a.apply(this));
|
||||
@@ -169,7 +171,7 @@
|
||||
@@ -206,7 +208,7 @@
|
||||
|
||||
public <T> void writeCollection(Collection<T> collection, PacketDataSerializer.b<T> packetdataserializer_b) {
|
||||
this.writeVarInt(collection.size());
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
T t0 = iterator.next();
|
||||
@@ -196,12 +198,12 @@
|
||||
@@ -233,12 +235,12 @@
|
||||
|
||||
public void writeIntIdList(IntList intlist) {
|
||||
this.writeVarInt(intlist.size());
|
||||
@@ -42,7 +42,25 @@
|
||||
|
||||
for (int j = 0; j < i; ++j) {
|
||||
K k0 = packetdataserializer_a.apply(this);
|
||||
@@ -437,7 +439,7 @@
|
||||
@@ -272,7 +274,7 @@
|
||||
}
|
||||
|
||||
public <E extends Enum<E>> void writeEnumSet(EnumSet<E> enumset, Class<E> oclass) {
|
||||
- E[] ae = (Enum[]) oclass.getEnumConstants();
|
||||
+ E[] ae = oclass.getEnumConstants(); // CraftBukkit - decompile error
|
||||
BitSet bitset = new BitSet(ae.length);
|
||||
|
||||
for (int i = 0; i < ae.length; ++i) {
|
||||
@@ -283,7 +285,7 @@
|
||||
}
|
||||
|
||||
public <E extends Enum<E>> EnumSet<E> readEnumSet(Class<E> oclass) {
|
||||
- E[] ae = (Enum[]) oclass.getEnumConstants();
|
||||
+ E[] ae = oclass.getEnumConstants(); // CraftBukkit - decompile error
|
||||
BitSet bitset = this.readFixedBitSet(ae.length);
|
||||
EnumSet<E> enumset = EnumSet.noneOf(oclass);
|
||||
|
||||
@@ -499,7 +501,7 @@
|
||||
}
|
||||
|
||||
public <T extends Enum<T>> T readEnum(Class<T> oclass) {
|
||||
@@ -51,7 +69,7 @@
|
||||
}
|
||||
|
||||
public PacketDataSerializer writeEnum(Enum<?> oenum) {
|
||||
@@ -514,7 +516,7 @@
|
||||
@@ -576,7 +578,7 @@
|
||||
} else {
|
||||
try {
|
||||
NBTCompressedStreamTools.write(nbttagcompound, (DataOutput) (new ByteBufOutputStream(this)));
|
||||
@@ -60,7 +78,7 @@
|
||||
throw new EncoderException(ioexception);
|
||||
}
|
||||
}
|
||||
@@ -551,7 +553,7 @@
|
||||
@@ -613,7 +615,7 @@
|
||||
}
|
||||
|
||||
public PacketDataSerializer writeItem(ItemStack itemstack) {
|
||||
@@ -69,7 +87,7 @@
|
||||
this.writeBoolean(false);
|
||||
} else {
|
||||
this.writeBoolean(true);
|
||||
@@ -580,6 +582,11 @@
|
||||
@@ -642,6 +644,11 @@
|
||||
ItemStack itemstack = new ItemStack(item, b0);
|
||||
|
||||
itemstack.setTag(this.readNbt());
|
||||
|
||||
Reference in New Issue
Block a user