mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
Deprecate more rarely used APIs for removal (#10907)
This commit is contained in:
1 parent
b76746e62f
commit
ad5ca0b67d
16 files changed
+80
-11
No files matched your search
@@ -7,6 +7,10 @@ package net.minecraftforge.client;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
/// @deprecated This class is scheduled for removal in 26.4 due to a lack of adoption by mods, in order to ease porting.
|
||||
/// Please reach out to the Forge team if you are relying on this and would like to see it remain in Forge.
|
||||
/// We may keep it or add it back in a future version if there is enough demand.
|
||||
@Deprecated(forRemoval = true, since = "26.4")
|
||||
public final class StencilManager
|
||||
{
|
||||
private static final BitSet BITS = new BitSet(8);
|
||||
|
||||
+6
-3
@@ -10,9 +10,12 @@ import com.mojang.math.Transformation;
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.Vector4f;
|
||||
|
||||
/**
|
||||
* Vertex pipeline element that applies a transformation to incoming geometry.
|
||||
*/
|
||||
/// Vertex pipeline element that applies a transformation to incoming geometry.
|
||||
///
|
||||
/// @deprecated This class is scheduled for removal in 26.4 due to a lack of adoption by mods, in order to ease porting.
|
||||
/// Please reach out to the Forge team if you are relying on this and would like to see it remain in Forge.
|
||||
/// We may keep it or add it back in a future version if there is enough demand.
|
||||
@Deprecated(forRemoval = true, since = "26.4")
|
||||
public class TransformingVertexPipeline extends VertexConsumerWrapper
|
||||
{
|
||||
private final Transformation transformation;
|
||||
|
||||
@@ -11,7 +11,12 @@ import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||
* Wrapper for {@link VertexConsumer} which delegates all operations to its parent.
|
||||
* <p>
|
||||
* Useful for defining custom pipeline elements that only process certain data.
|
||||
*
|
||||
* @deprecated This class is scheduled for removal in 26.4 due to a lack of adoption by mods, in order to ease porting.
|
||||
* Please reach out to the Forge team if you are relying on this and would like to see it remain in Forge.
|
||||
* We may keep it or add it back in a future version if there is enough demand.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "26.4")
|
||||
public class VertexConsumerWrapper implements VertexConsumer {
|
||||
protected final VertexConsumer parent;
|
||||
|
||||
|
||||
@@ -36,9 +36,14 @@ import org.jetbrains.annotations.Nullable;
|
||||
* last known username.<br>
|
||||
* For convenience, {@link #getMap()} is provided to get an immutable copy of
|
||||
* the caches underlying map.
|
||||
*
|
||||
* @deprecated This class is scheduled for removal in 26.4 due to a lack of adoption by mods, in order to ease porting.
|
||||
* Please reach out to the Forge team if you are relying on this and would like to see it remain in Forge.
|
||||
* We may keep it or add it back in a future version if there is enough demand.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "26.4")
|
||||
public final class UsernameCache {
|
||||
private static Map<UUID, String> map = new HashMap<>();
|
||||
private static HashMap<UUID, String> map = new HashMap<>();
|
||||
|
||||
private static final Path saveFile = FMLLoader.getGamePath().resolve("usernamecache.json");
|
||||
private static final Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
|
||||
@@ -9,6 +9,10 @@ import net.minecraft.client.renderer.block.dispatch.ModelState;
|
||||
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||
import net.minecraftforge.client.model.data.ModelProperty;
|
||||
|
||||
/// @deprecated This class is scheduled for removal in 26.4 due to a lack of adoption by mods, in order to ease porting.
|
||||
/// Please reach out to the Forge team if you are relying on this and would like to see it remain in Forge.
|
||||
/// We may keep it or add it back in a future version if there is enough demand.
|
||||
@Deprecated(forRemoval = true, since = "26.4")
|
||||
public class Properties {
|
||||
/**
|
||||
* Property indicating if the model should be rendered in the static renderer or in the TESR. AnimationTESR sets it to false.
|
||||
|
||||
@@ -8,8 +8,15 @@ package net.minecraftforge.common.util;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
// Sorter to load nearby chunks first
|
||||
public class CenterChunkPosComparator implements java.util.Comparator<ChunkPos> {
|
||||
|
||||
/// @deprecated This class is scheduled for removal in 26.4 due to a lack of adoption by mods, in order to ease porting.
|
||||
/// Please reach out to the Forge team if you are relying on this and would like to see it remain in Forge.
|
||||
/// We may keep it or add it back in a future version if there is enough demand.
|
||||
@Deprecated(forRemoval = true, since = "26.4")
|
||||
public class CenterChunkPosComparator implements Comparator<ChunkPos> {
|
||||
private final int x;
|
||||
private final int z;
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ package net.minecraftforge.common.util;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Utility class for creating a nice human readable dump of binary data.
|
||||
*
|
||||
@@ -42,7 +44,7 @@ public class HexDumper {
|
||||
return inst.finish();
|
||||
}
|
||||
|
||||
private static class Instance {
|
||||
private static final class Instance {
|
||||
private static final String HEX = "0123456789ABCDEF";
|
||||
private final int marked;
|
||||
private final StringBuilder buf;
|
||||
@@ -57,8 +59,7 @@ public class HexDumper {
|
||||
+ (lines * 2) // \t and \n per line
|
||||
+ (marked == -1 ? 0 : lines)); // ' ' or < at the start of each line
|
||||
|
||||
for (int x = 0; x < ascii.length; x++)
|
||||
ascii[x] = ' ';
|
||||
Arrays.fill(ascii, ' ');
|
||||
}
|
||||
|
||||
public void add(byte data) {
|
||||
|
||||
@@ -12,6 +12,10 @@ import net.minecraft.world.item.ItemStackLinkedSet;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/// @deprecated This class is scheduled for removal in 26.4 due to a lack of adoption by mods, in order to ease porting.
|
||||
/// Please reach out to the Forge team if you are relying on this and would like to see it remain in Forge.
|
||||
/// We may keep it or add it back in a future version if there is enough demand.
|
||||
@Deprecated(forRemoval = true, since = "26.4")
|
||||
public class ItemStackMap {
|
||||
|
||||
public static <V> Map<ItemStack, V> createTypeAndTagLinkedMap() {
|
||||
|
||||
@@ -29,6 +29,10 @@ import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.util.GsonHelper;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/// @deprecated This class is scheduled for removal in 26.4 due to a lack of adoption by mods, in order to ease porting.
|
||||
/// Please reach out to the Forge team if you are relying on this and would like to see it remain in Forge.
|
||||
/// We may keep it or add it back in a future version if there is enough demand.
|
||||
@Deprecated(forRemoval = true, since = "26.4")
|
||||
public class JsonUtils {
|
||||
// http://stackoverflow.com/questions/7706772/deserializing-immutablelist-using-gson/21677349#21677349
|
||||
public enum ImmutableListTypeAdapter implements JsonDeserializer<ImmutableList<?>>, JsonSerializer<ImmutableList<?>> {
|
||||
|
||||
@@ -15,9 +15,12 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Utility to format data into a textual (markdown-compliant) table.
|
||||
*/
|
||||
/// Utility to format data into a textual (markdown-compliant) table.
|
||||
///
|
||||
/// @deprecated This class is scheduled for removal in 26.4 due to a lack of adoption by mods, in order to ease porting.
|
||||
/// Please reach out to the Forge team if you are relying on this and would like to see it remain in Forge.
|
||||
/// We may keep it or add it back in a future version if there is enough demand.
|
||||
@Deprecated(forRemoval = true, since = "26.4")
|
||||
public class TextTable
|
||||
{
|
||||
public static Column column(String header)
|
||||
|
||||
@@ -93,7 +93,12 @@ public sealed abstract class EntityTeleportEvent implements Cancellable, EntityE
|
||||
* This event is {@linkplain Cancellable cancelable}. If the event is cancelled, the entity will not be teleported.
|
||||
* <br>
|
||||
* This event is only fired on the {@link LogicalSide#SERVER} side.
|
||||
*
|
||||
* @deprecated This event is scheduled for removal in 26.4 due to a lack of adoption by mods, in order to ease porting.
|
||||
* Please reach out to the Forge team if you are relying on this and would like to see it remain in Forge.
|
||||
* We may keep it or add it back in a future version if there is enough demand.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "26.4")
|
||||
public static final class EntityRandom extends EntityTeleportEvent {
|
||||
public static final CancellableEventBus<EntityRandom> BUS = CancellableEventBus.create(EntityRandom.class);
|
||||
|
||||
|
||||
@@ -20,7 +20,12 @@ import net.minecraftforge.eventbus.api.event.characteristic.Cancellable;
|
||||
* If this event is cancelled, the Monster will not target the player.
|
||||
*
|
||||
* @param getPlayer The player that is being checked.
|
||||
*
|
||||
* @deprecated This event is scheduled for removal in 26.4 due to a lack of adoption by mods, in order to ease porting.
|
||||
* Please reach out to the Forge team if you are relying on this and would like to see it remain in Forge.
|
||||
* We may keep it or add it back in a future version if there is enough demand.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "26.4")
|
||||
public record MonsterDisguiseEvent(Monster getEntity, Player getPlayer) implements Cancellable, LivingEvent, RecordEvent {
|
||||
public static final CancellableEventBus<MonsterDisguiseEvent> BUS = CancellableEventBus.create(MonsterDisguiseEvent.class);
|
||||
}
|
||||
@@ -54,7 +54,12 @@ public sealed abstract class ZombieEvent implements EntityEvent, InheritableEven
|
||||
* <li>{@link Result#ALLOW} Zombie is summoned.</li>
|
||||
* <li>{@link Result#DENY} Zombie is not summoned.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @deprecated This event is scheduled for removal in 26.4 due to a lack of adoption by mods, in order to ease porting.
|
||||
* Please reach out to the Forge team if you are relying on this and would like to see it remain in Forge.
|
||||
* We may keep it or add it back in a future version if there is enough demand.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "26.4")
|
||||
public static final class SummonAidEvent extends ZombieEvent implements HasResult {
|
||||
public static final EventBus<SummonAidEvent> BUS = EventBus.create(SummonAidEvent.class);
|
||||
|
||||
|
||||
@@ -68,7 +68,12 @@ public sealed interface ChunkEvent extends LevelEvent
|
||||
* the ChunkAccess isLightCorrect to true.<br>
|
||||
* <br>
|
||||
* The game test for this event is lighting_event_test in net.minecraftforge.debug.chunk<br>
|
||||
*
|
||||
* @deprecated This event is scheduled for removal in 26.4 due to a lack of adoption by mods, in order to ease porting.
|
||||
* Please reach out to the Forge team if you are relying on this and would like to see it remain in Forge.
|
||||
* We may keep it or add it back in a future version if there is enough demand.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "26.4")
|
||||
record LightingCalculated(ChunkAccess getChunk) implements ChunkEvent {
|
||||
public static final EventBus<ChunkEvent.LightingCalculated> BUS = EventBus.create(ChunkEvent.LightingCalculated.class);
|
||||
}
|
||||
|
||||
@@ -31,8 +31,13 @@ import org.jspecify.annotations.NullMarked;
|
||||
* @param getOldTicketLevel the previous ticket level the chunk had
|
||||
* @param getNewTicketLevel the new ticket level the chunk has
|
||||
* @param getChunkHolder the chunk that had its ticket level updated, may be null
|
||||
*
|
||||
* @deprecated This event is scheduled for removal in 26.4 due to a lack of adoption by mods, in order to ease porting.
|
||||
* Please reach out to the Forge team if you are relying on this and would like to see it remain in Forge.
|
||||
* We may keep it or add it back in a future version if there is enough demand.
|
||||
*/
|
||||
@NullMarked
|
||||
@Deprecated(forRemoval = true, since = "26.4")
|
||||
public record ChunkTicketLevelUpdatedEvent(
|
||||
ServerLevel getLevel,
|
||||
long getChunkPos,
|
||||
|
||||
@@ -14,6 +14,10 @@ import net.minecraftforge.network.ConnectionType;
|
||||
import net.minecraftforge.network.NetworkContext;
|
||||
import java.util.Locale;
|
||||
|
||||
/// @deprecated This class is scheduled for removal in 26.4 due to a lack of adoption by mods, in order to ease porting.
|
||||
/// Please reach out to the Forge team if you are relying on this and would like to see it remain in Forge.
|
||||
/// We may keep it or add it back in a future version if there is enough demand.
|
||||
@Deprecated(forRemoval = true, since = "26.4")
|
||||
public class TextComponentHelper {
|
||||
private TextComponentHelper() {}
|
||||
|
||||
|
||||
Reference in new issue
Block a user