diff --git a/src/main/java/net/minecraftforge/client/StencilManager.java b/src/main/java/net/minecraftforge/client/StencilManager.java index 6807f6bdb4..2e496f8afe 100644 --- a/src/main/java/net/minecraftforge/client/StencilManager.java +++ b/src/main/java/net/minecraftforge/client/StencilManager.java @@ -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); diff --git a/src/main/java/net/minecraftforge/client/model/pipeline/TransformingVertexPipeline.java b/src/main/java/net/minecraftforge/client/model/pipeline/TransformingVertexPipeline.java index ac12f4a906..481a2050f3 100644 --- a/src/main/java/net/minecraftforge/client/model/pipeline/TransformingVertexPipeline.java +++ b/src/main/java/net/minecraftforge/client/model/pipeline/TransformingVertexPipeline.java @@ -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; diff --git a/src/main/java/net/minecraftforge/client/model/pipeline/VertexConsumerWrapper.java b/src/main/java/net/minecraftforge/client/model/pipeline/VertexConsumerWrapper.java index e83e6ac067..c1a45d03df 100644 --- a/src/main/java/net/minecraftforge/client/model/pipeline/VertexConsumerWrapper.java +++ b/src/main/java/net/minecraftforge/client/model/pipeline/VertexConsumerWrapper.java @@ -11,7 +11,12 @@ import com.mojang.blaze3d.vertex.VertexConsumer; * Wrapper for {@link VertexConsumer} which delegates all operations to its parent. *

* 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; diff --git a/src/main/java/net/minecraftforge/common/UsernameCache.java b/src/main/java/net/minecraftforge/common/UsernameCache.java index d328ed15ad..cee2f7ef7f 100644 --- a/src/main/java/net/minecraftforge/common/UsernameCache.java +++ b/src/main/java/net/minecraftforge/common/UsernameCache.java @@ -36,9 +36,14 @@ import org.jetbrains.annotations.Nullable; * last known username.
* 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 map = new HashMap<>(); + private static HashMap map = new HashMap<>(); private static final Path saveFile = FMLLoader.getGamePath().resolve("usernamecache.json"); private static final Gson gson = new GsonBuilder().setPrettyPrinting().create(); diff --git a/src/main/java/net/minecraftforge/common/property/Properties.java b/src/main/java/net/minecraftforge/common/property/Properties.java index dfa87da024..8f6ca2d439 100644 --- a/src/main/java/net/minecraftforge/common/property/Properties.java +++ b/src/main/java/net/minecraftforge/common/property/Properties.java @@ -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. diff --git a/src/main/java/net/minecraftforge/common/util/CenterChunkPosComparator.java b/src/main/java/net/minecraftforge/common/util/CenterChunkPosComparator.java index d8891d6dc3..4fb7532e4d 100644 --- a/src/main/java/net/minecraftforge/common/util/CenterChunkPosComparator.java +++ b/src/main/java/net/minecraftforge/common/util/CenterChunkPosComparator.java @@ -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 { + +/// @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 { private final int x; private final int z; diff --git a/src/main/java/net/minecraftforge/common/util/HexDumper.java b/src/main/java/net/minecraftforge/common/util/HexDumper.java index 97cde42156..530751597c 100644 --- a/src/main/java/net/minecraftforge/common/util/HexDumper.java +++ b/src/main/java/net/minecraftforge/common/util/HexDumper.java @@ -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) { diff --git a/src/main/java/net/minecraftforge/common/util/ItemStackMap.java b/src/main/java/net/minecraftforge/common/util/ItemStackMap.java index 99e3beddf1..806afa21e9 100644 --- a/src/main/java/net/minecraftforge/common/util/ItemStackMap.java +++ b/src/main/java/net/minecraftforge/common/util/ItemStackMap.java @@ -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 Map createTypeAndTagLinkedMap() { diff --git a/src/main/java/net/minecraftforge/common/util/JsonUtils.java b/src/main/java/net/minecraftforge/common/util/JsonUtils.java index 302e86d8e1..c519c4e659 100644 --- a/src/main/java/net/minecraftforge/common/util/JsonUtils.java +++ b/src/main/java/net/minecraftforge/common/util/JsonUtils.java @@ -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>, JsonSerializer> { diff --git a/src/main/java/net/minecraftforge/common/util/TextTable.java b/src/main/java/net/minecraftforge/common/util/TextTable.java index 503104290c..65e84148f0 100644 --- a/src/main/java/net/minecraftforge/common/util/TextTable.java +++ b/src/main/java/net/minecraftforge/common/util/TextTable.java @@ -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) diff --git a/src/main/java/net/minecraftforge/event/entity/EntityTeleportEvent.java b/src/main/java/net/minecraftforge/event/entity/EntityTeleportEvent.java index e76f3ca58a..cab6e197a7 100644 --- a/src/main/java/net/minecraftforge/event/entity/EntityTeleportEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/EntityTeleportEvent.java @@ -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. *
* 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 BUS = CancellableEventBus.create(EntityRandom.class); diff --git a/src/main/java/net/minecraftforge/event/entity/living/MonsterDisguiseEvent.java b/src/main/java/net/minecraftforge/event/entity/living/MonsterDisguiseEvent.java index 7ef0c748bb..2891493259 100644 --- a/src/main/java/net/minecraftforge/event/entity/living/MonsterDisguiseEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/living/MonsterDisguiseEvent.java @@ -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 BUS = CancellableEventBus.create(MonsterDisguiseEvent.class); } diff --git a/src/main/java/net/minecraftforge/event/entity/living/ZombieEvent.java b/src/main/java/net/minecraftforge/event/entity/living/ZombieEvent.java index 008767457d..ce21db44c8 100644 --- a/src/main/java/net/minecraftforge/event/entity/living/ZombieEvent.java +++ b/src/main/java/net/minecraftforge/event/entity/living/ZombieEvent.java @@ -54,7 +54,12 @@ public sealed abstract class ZombieEvent implements EntityEvent, InheritableEven *

  • {@link Result#ALLOW} Zombie is summoned.
  • *
  • {@link Result#DENY} Zombie is not summoned.
  • * + * + * @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 BUS = EventBus.create(SummonAidEvent.class); diff --git a/src/main/java/net/minecraftforge/event/level/ChunkEvent.java b/src/main/java/net/minecraftforge/event/level/ChunkEvent.java index e0d5861268..6d6be9e9c8 100644 --- a/src/main/java/net/minecraftforge/event/level/ChunkEvent.java +++ b/src/main/java/net/minecraftforge/event/level/ChunkEvent.java @@ -68,7 +68,12 @@ public sealed interface ChunkEvent extends LevelEvent * the ChunkAccess isLightCorrect to true.
    *
    * The game test for this event is lighting_event_test in net.minecraftforge.debug.chunk
    + * + * @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 BUS = EventBus.create(ChunkEvent.LightingCalculated.class); } diff --git a/src/main/java/net/minecraftforge/event/level/ChunkTicketLevelUpdatedEvent.java b/src/main/java/net/minecraftforge/event/level/ChunkTicketLevelUpdatedEvent.java index 72aca59e27..4e160d2db1 100644 --- a/src/main/java/net/minecraftforge/event/level/ChunkTicketLevelUpdatedEvent.java +++ b/src/main/java/net/minecraftforge/event/level/ChunkTicketLevelUpdatedEvent.java @@ -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, diff --git a/src/main/java/net/minecraftforge/server/command/TextComponentHelper.java b/src/main/java/net/minecraftforge/server/command/TextComponentHelper.java index 333dedb433..c92ab87817 100644 --- a/src/main/java/net/minecraftforge/server/command/TextComponentHelper.java +++ b/src/main/java/net/minecraftforge/server/command/TextComponentHelper.java @@ -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() {}