mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-09 00:22:08 -07:00
move decompile fixes to start of git history
This commit is contained in:
@@ -30,13 +30,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
// Paper start - Anti-Xray - Add preset values
|
||||
@Deprecated public static <T> Codec<PalettedContainer<T>> codec(IdMap<T> idList, Codec<T> entryCodec, PalettedContainer.Strategy provider, T object) { return PalettedContainer.codec(idList, entryCodec, provider, object, null); } // Notice for updates: Please make sure this function isn't used anywhere
|
||||
public static <T> Codec<PalettedContainer<T>> codec(IdMap<T> idList, Codec<T> entryCodec, PalettedContainer.Strategy provider, T object, T @org.jetbrains.annotations.Nullable [] presetValues) {
|
||||
- return RecordCodecBuilder.create((instance) -> {
|
||||
+ return RecordCodecBuilder.<DiscData<T>>create((instance) -> { // Paper - decompile fixes
|
||||
return instance.group(entryCodec.mapResult(ExtraCodecs.orElsePartial(object)).listOf().fieldOf("palette").forGetter(PalettedContainer.DiscData::paletteEntries), Codec.LONG_STREAM.optionalFieldOf("data").forGetter(PalettedContainer.DiscData::storage)).apply(instance, PalettedContainer.DiscData::new);
|
||||
}).comapFlatMap((serialized) -> {
|
||||
return read(idList, provider, serialized, object, presetValues);
|
||||
@@ -0,0 +0,0 @@ public class PalettedContainer<T> implements PaletteResize<T> {
|
||||
}
|
||||
// Paper end
|
||||
@@ -68,8 +61,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
// Paper start - Anti-Xray - Add chunk packet info
|
||||
@Deprecated public void write(FriendlyByteBuf buf) { this.write(buf, null, 0); } // Notice for updates: Please make sure this method isn't used anywhere
|
||||
- public void write(FriendlyByteBuf buf, com.destroystokyo.paper.antixray.ChunkPacketInfo<T> chunkPacketInfo, int bottomBlockY) {
|
||||
+ public synchronized void write(FriendlyByteBuf buf, com.destroystokyo.paper.antixray.ChunkPacketInfo<T> chunkPacketInfo, int bottomBlockY) { // Paper - synchronize
|
||||
- public void write(FriendlyByteBuf buf, @Nullable com.destroystokyo.paper.antixray.ChunkPacketInfo<T> chunkPacketInfo, int bottomBlockY) {
|
||||
+ public synchronized void write(FriendlyByteBuf buf, @Nullable com.destroystokyo.paper.antixray.ChunkPacketInfo<T> chunkPacketInfo, int bottomBlockY) { // Paper - synchronize
|
||||
this.acquire();
|
||||
|
||||
try {
|
||||
@@ -77,8 +70,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
}
|
||||
|
||||
- private static <T> DataResult<PalettedContainer<T>> read(IdMap<T> idList, PalettedContainer.Strategy provider, PalettedContainer.DiscData<T> serialized, T defaultValue, T[] presetValues) { // Paper - Anti-Xray - Add preset values
|
||||
+ private synchronized static <T> DataResult<PalettedContainer<T>> read(IdMap<T> idList, PalettedContainer.Strategy provider, PalettedContainer.DiscData<T> serialized, T defaultValue, T[] presetValues) { // Paper - Anti-Xray - Add preset values // Paper - synchronize
|
||||
- private static <T> DataResult<PalettedContainer<T>> read(IdMap<T> idList, PalettedContainer.Strategy provider, PalettedContainer.DiscData<T> serialized, T defaultValue, T @org.jetbrains.annotations.Nullable [] presetValues) { // Paper - Anti-Xray - Add preset values
|
||||
+ private synchronized static <T> DataResult<PalettedContainer<T>> read(IdMap<T> idList, PalettedContainer.Strategy provider, PalettedContainer.DiscData<T> serialized, T defaultValue, T @org.jetbrains.annotations.Nullable [] presetValues) { // Paper - Anti-Xray - Add preset values // Paper - synchronize
|
||||
List<T> list = serialized.paletteEntries();
|
||||
int i = provider.size();
|
||||
int j = provider.calculateBitsForSerialization(idList, list.size());
|
||||
|
Reference in New Issue
Block a user