deprecate all obfhelpers

This commit is contained in:
MiniDigger | Martin
2021-06-17 21:52:26 +02:00
parent a486d2eccf
commit 62fabeca0c
36 changed files with 82 additions and 84 deletions

View File

@@ -2323,7 +2323,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.tags.put(key, LongTag.valueOf(value));
}
+ public void setUUID(String prefix, UUID uuid) { putUUID(prefix, uuid); } // Paper - OBFHELPER
+ @Deprecated public void setUUID(String prefix, UUID uuid) { putUUID(prefix, uuid); } // Paper - OBFHELPER
public void putUUID(String key, UUID value) {
this.tags.put(key, NbtUtils.createUUID(value));
}
@@ -3441,9 +3441,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- private long keepAliveTime;
- private boolean keepAlivePending;
- private long keepAliveChallenge;
+ private long keepAliveTime; private void setLastPing(long lastPing) { this.keepAliveTime = lastPing;}; private long getLastPing() { return this.keepAliveTime;}; // Paper - OBFHELPER
+ private boolean keepAlivePending; private void setPendingPing(boolean isPending) { this.keepAlivePending = isPending;}; private boolean isPendingPing() { return this.keepAlivePending;}; // Paper - OBFHELPER
+ private long keepAliveChallenge; private void setKeepAliveID(long keepAliveID) { this.keepAliveChallenge = keepAliveID;}; private long getKeepAliveID() {return this.keepAliveChallenge; }; // Paper - OBFHELPER
+ private long keepAliveTime; @Deprecated private void setLastPing(long lastPing) { this.keepAliveTime = lastPing;}; @Deprecated private long getLastPing() { return this.keepAliveTime;}; // Paper - OBFHELPER
+ private boolean keepAlivePending; @Deprecated private void setPendingPing(boolean isPending) { this.keepAlivePending = isPending;}; @Deprecated private boolean isPendingPing() { return this.keepAlivePending;}; // Paper - OBFHELPER
+ private long keepAliveChallenge; @Deprecated private void setKeepAliveID(long keepAliveID) { this.keepAliveChallenge = keepAliveID;}; @Deprecated private long getKeepAliveID() {return this.keepAliveChallenge; }; // Paper - OBFHELPER
// CraftBukkit start - multithreaded fields
private AtomicInteger chatSpamTickCount = new AtomicInteger();
// CraftBukkit end
@@ -3523,7 +3523,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public final NonNullList<ItemStack> armor;
public final NonNullList<ItemStack> offhand;
- private final List<NonNullList<ItemStack>> compartments;
+ private final List<NonNullList<ItemStack>> compartments; public final List<NonNullList<ItemStack>> getComponents() { return compartments; } // Paper - OBFHELPER
+ private final List<NonNullList<ItemStack>> compartments; @Deprecated public final List<NonNullList<ItemStack>> getComponents() { return compartments; } // Paper - OBFHELPER
public int selected;
public final Player player;
private int timesChanged;
@@ -3580,7 +3580,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return compound == null ? Potions.EMPTY : Potion.byName(compound.getString("Potion"));
}
+ public static ItemStack addPotionToItemStack(ItemStack itemstack, Potion potionregistry) { return setPotion(itemstack, potionregistry); } // Paper - OBFHELPER
+ @Deprecated public static ItemStack addPotionToItemStack(ItemStack itemstack, Potion potionregistry) { return setPotion(itemstack, potionregistry); } // Paper - OBFHELPER
public static ItemStack setPotion(ItemStack stack, Potion potion) {
ResourceLocation resourceLocation = Registry.POTION.getKey(potion);
if (potion == Potions.EMPTY) {
@@ -3781,8 +3781,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- @Override
- public boolean removeBlock(BlockPos pos, boolean move) {
+ public boolean setAir(BlockPos blockposition) { return this.removeBlock(blockposition, false); } // Paper - OBFHELPER
+ public boolean setAir(BlockPos blockposition, boolean moved) { return this.removeBlock(blockposition, moved); } // Paper - OBFHELPER
+ @Deprecated public boolean setAir(BlockPos blockposition) { return this.removeBlock(blockposition, false); } // Paper - OBFHELPER
+ @Deprecated public boolean setAir(BlockPos blockposition, boolean moved) { return this.removeBlock(blockposition, moved); } // Paper - OBFHELPER
+ @Override public boolean removeBlock(BlockPos pos, boolean move) { // Paper - OBFHELPER
FluidState fluid = this.getFluidState(pos);
@@ -3867,7 +3867,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
};
@Nullable
- public static final LevelChunkSection EMPTY_SECTION = null;
+ public static final LevelChunkSection EMPTY_SECTION = null; public static final LevelChunkSection EMPTY_CHUNK_SECTION = EMPTY_SECTION; // Paper - OBFHELPER
+ public static final LevelChunkSection EMPTY_SECTION = null; @Deprecated public static final LevelChunkSection EMPTY_CHUNK_SECTION = EMPTY_SECTION; // Paper - OBFHELPER
private final LevelChunkSection[] sections;
private ChunkBiomeContainer biomes;
private final Map<BlockPos, CompoundTag> pendingBlockEntities;
@@ -4024,7 +4024,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return this.getBlockEntity(pos, LevelChunk.EntityCreationType.CHECK);
}
+ @Nullable public final BlockEntity getTileEntityImmediately(BlockPos pos) { return this.getBlockEntity(pos, EntityCreationType.IMMEDIATE); } // Paper - OBFHELPER
+ @Deprecated @Nullable public final BlockEntity getTileEntityImmediately(BlockPos pos) { return this.getBlockEntity(pos, EntityCreationType.IMMEDIATE); } // Paper - OBFHELPER
@Nullable
public BlockEntity getBlockEntity(BlockPos pos, LevelChunk.EntityCreationType creationType) {
// CraftBukkit start
@@ -4107,12 +4107,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
import net.minecraft.network.FriendlyByteBuf;
public interface Palette<T> {
+ default int getOrCreateIdFor(T object) { return this.idFor(object); } // Paper - OBFHELPER
+ @Deprecated default int getOrCreateIdFor(T object) { return this.idFor(object); } // Paper - OBFHELPER
int idFor(T object);
boolean maybeHas(Predicate<T> predicate);
+ @Nullable default T getObject(int dataBits) { return this.valueFor(dataBits); } // Paper - OBFHELPER
+ @Deprecated @Nullable default T getObject(int dataBits) { return this.valueFor(dataBits); } // Paper - OBFHELPER
@Nullable
T valueFor(int index);
@@ -4125,7 +4125,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public static final int GLOBAL_PALETTE_BITS = 9;
public static final int MIN_PALETTE_SIZE = 4;
- private final Palette<T> globalPalette;
+ private final Palette<T> globalPalette; private final Palette<T> getDataPaletteGlobal() { return this.globalPalette; } // Paper - OBFHELPER
+ private final Palette<T> globalPalette; @Deprecated private final Palette<T> getDataPaletteGlobal() { return this.globalPalette; } // Paper - OBFHELPER
private final PaletteResize<T> dummyPaletteResize = (newSize, added) -> {
return 0;
};
@@ -4136,9 +4136,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- protected BitStorage storage;
- private Palette<T> palette;
- private int bits;
+ protected BitStorage storage; public final BitStorage getDataBits() { return this.storage; } // Paper - OBFHELPER
+ private Palette<T> palette; private Palette<T> getDataPalette() { return this.palette; } // Paper - OBFHELPER
+ private int bits; private int getBitsPerObject() { return this.bits; } // Paper - OBFHELPER
+ protected BitStorage storage; @Deprecated public final BitStorage getDataBits() { return this.storage; } // Paper - OBFHELPER
+ private Palette<T> palette; @Deprecated private Palette<T> getDataPalette() { return this.palette; } // Paper - OBFHELPER
+ private int bits; @Deprecated private int getBitsPerObject() { return this.bits; } // Paper - OBFHELPER
private final Semaphore lock = new Semaphore(1);
@Nullable
private final DebugBuffer<Pair<Thread, StackTraceElement[]>> traces = null;
@@ -4146,7 +4146,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return y << 8 | z << 4 | x;
}
+ private void initialize(int bitsPerObject) { this.setBits(bitsPerObject); } // Paper - OBFHELPER
+ @Deprecated private void initialize(int bitsPerObject) { this.setBits(bitsPerObject); } // Paper - OBFHELPER
private void setBits(int size) {
if (size != this.bits) {
this.bits = size;
@@ -4154,7 +4154,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+ public void writeDataPaletteBlock(FriendlyByteBuf packetDataSerializer) { this.write(packetDataSerializer); } // Paper - OBFHELPER
+ @Deprecated public void writeDataPaletteBlock(FriendlyByteBuf packetDataSerializer) { this.write(packetDataSerializer); } // Paper - OBFHELPER
public void write(FriendlyByteBuf buf) {
try {
this.acquire();
@@ -4190,7 +4190,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
private final AtomicBoolean shutdownRequested = new AtomicBoolean();
private final ProcessorMailbox<StrictQueue.IntRunnable> mailbox;
- private final RegionFileStorage storage;
+ private final RegionFileStorage storage;public RegionFileStorage getRegionFileCache() { return storage; } // Paper - OBFHELPER
+ private final RegionFileStorage storage;@Deprecated public RegionFileStorage getRegionFileCache() { return storage; } // Paper - OBFHELPER
private final Map<ChunkPos, IOWorker.PendingStore> pendingWrites = Maps.newLinkedHashMap();
protected IOWorker(File directory, boolean dsync, String name) {
@@ -4202,7 +4202,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return this.externalFileDir.resolve(s);
}
+ @Nullable public synchronized DataInputStream getReadStream(ChunkPos chunkCoordIntPair) throws IOException { return getChunkDataInputStream(chunkCoordIntPair);} // Paper - OBFHELPER
+ @Deprecated @Nullable public synchronized DataInputStream getReadStream(ChunkPos chunkCoordIntPair) throws IOException { return getChunkDataInputStream(chunkCoordIntPair);} // Paper - OBFHELPER
@Nullable
public synchronized DataInputStream getChunkDataInputStream(ChunkPos pos) throws IOException {
int i = this.getOffset(pos);
@@ -4214,7 +4214,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
return EMPTY;
}
+ public static final VoxelShape fullCube() {return block();} // Paper - OBFHELPER
+ @Deprecated public static final VoxelShape fullCube() {return block();} // Paper - OBFHELPER
public static VoxelShape block() {
return BLOCK;
}