standardize all the abi-compat comments i can find

This commit is contained in:
quat1024 2023-09-03 18:53:31 -04:00
parent c8d64c460f
commit 1e4027ef23
6 changed files with 17 additions and 16 deletions

View File

@ -25,11 +25,6 @@ import java.util.concurrent.ConcurrentMap;
import java.util.function.Supplier; import java.util.function.Supplier;
public abstract class RetexturingBakedModel extends ForwardingBakedModel { public abstract class RetexturingBakedModel extends ForwardingBakedModel {
@Deprecated(forRemoval = true) //Kept for ABI compat. From before there was an AO boolean (<2.1.1)
public RetexturingBakedModel(BakedModel baseModel, TemplateAppearanceManager tam, ModelBakeSettings settings, BlockState itemModelState) {
this(baseModel, tam, settings, itemModelState, true);
}
public RetexturingBakedModel(BakedModel baseModel, TemplateAppearanceManager tam, ModelBakeSettings settings, BlockState itemModelState, boolean ao) { public RetexturingBakedModel(BakedModel baseModel, TemplateAppearanceManager tam, ModelBakeSettings settings, BlockState itemModelState, boolean ao) {
this.wrapped = baseModel; //field from the superclass; vanilla getQuads etc will delegate through to this this.wrapped = baseModel; //field from the superclass; vanilla getQuads etc will delegate through to this
@ -131,7 +126,7 @@ public abstract class RetexturingBakedModel extends ForwardingBakedModel {
this.ta = ta; this.ta = ta;
} }
@Deprecated(forRemoval = true) //Kept for ABI compat (<2.2). Use TintingTransformer for retinting, it works better anyway @Deprecated(forRemoval = true) //TODO ABI: Deprecated in 2.2. Use TintingTransformer for retinting, it works better anyway
protected RetexturingTransformer(TemplateAppearance ta, int ignoredTint) { protected RetexturingTransformer(TemplateAppearance ta, int ignoredTint) {
this(ta); this(ta);
} }
@ -173,4 +168,10 @@ public abstract class RetexturingBakedModel extends ForwardingBakedModel {
return true; return true;
} }
} }
//TODO ABI: From before there was an AO boolean, <2.1.1.
@Deprecated(forRemoval = true)
public RetexturingBakedModel(BakedModel baseModel, TemplateAppearanceManager tam, ModelBakeSettings settings, BlockState itemModelState) {
this(baseModel, tam, settings, itemModelState, true);
}
} }

View File

@ -5,20 +5,20 @@ import net.minecraft.client.texture.Sprite;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
//TODO: move to the api package //TODO ABI: move to the api package
public interface TemplateAppearance { public interface TemplateAppearance {
@NotNull RenderMaterial getRenderMaterial(boolean ao); @NotNull RenderMaterial getRenderMaterial(boolean ao);
@NotNull Sprite getSprite(Direction dir); @NotNull Sprite getSprite(Direction dir);
int getBakeFlags(Direction dir); int getBakeFlags(Direction dir);
boolean hasColor(Direction dir); boolean hasColor(Direction dir);
//binary-compat - from before conditional model AO was added //TODO ABI: Dates from before conditional model AO was added.
@Deprecated(forRemoval = true) @Deprecated(forRemoval = true)
default @NotNull RenderMaterial getRenderMaterial() { default @NotNull RenderMaterial getRenderMaterial() {
return getRenderMaterial(false); return getRenderMaterial(false);
} }
//binary-compat - I never ended up implementing this, it's much easier to modify particles via the BlockState //TODO ABI: Deprecated in 2.2. I never ended up implementing this, it's much easier to modify particles via the BlockState
@Deprecated(forRemoval = true) @Deprecated(forRemoval = true)
default @NotNull Sprite getParticleSprite() { default @NotNull Sprite getParticleSprite() {
return getSprite(Direction.NORTH); return getSprite(Direction.NORTH);

View File

@ -51,7 +51,7 @@ public class TemplateAppearanceManager {
this.barrierItemAppearance = new SingleSpriteAppearance(barrier, materialsWithoutAo.get(BlendMode.CUTOUT), serialNumber.getAndIncrement()); this.barrierItemAppearance = new SingleSpriteAppearance(barrier, materialsWithoutAo.get(BlendMode.CUTOUT), serialNumber.getAndIncrement());
} }
//TODO ABI: Shouldn't have been made public. Clean up at a later point. //TODO ABI: Shouldn't have been made public. Noticed this in 2.2.
@ApiStatus.Internal @ApiStatus.Internal
public static final SpriteIdentifier DEFAULT_SPRITE_ID = new SpriteIdentifier(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE, new Identifier("minecraft:block/scaffolding_top")); public static final SpriteIdentifier DEFAULT_SPRITE_ID = new SpriteIdentifier(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE, new Identifier("minecraft:block/scaffolding_top"));
private static final SpriteIdentifier BARRIER_SPRITE_ID = new SpriteIdentifier(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE, new Identifier("minecraft:item/barrier")); private static final SpriteIdentifier BARRIER_SPRITE_ID = new SpriteIdentifier(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE, new Identifier("minecraft:item/barrier"));

View File

@ -101,8 +101,8 @@ public class UnbakedAutoRetexturedModel implements UnbakedModel, TemplatesClient
}; };
} }
//ABI compat. //TODO ABI: (2.2) use TemplatesClientApi.getInstance.auto, and use the builder properties to set this field
@Deprecated(forRemoval = true) //2.2 - use TemplatesClientApi.getInstance().auto, and use the builder to set this field @Deprecated(forRemoval = true)
public UnbakedAutoRetexturedModel(Identifier parent, BlockState itemModelState) { public UnbakedAutoRetexturedModel(Identifier parent, BlockState itemModelState) {
this(parent); this(parent);
itemModelState(itemModelState); itemModelState(itemModelState);

View File

@ -119,8 +119,8 @@ public class UnbakedJsonRetexturedModel implements UnbakedModel, TemplatesClient
}; };
} }
//ABI compat //TODO ABI: (2.2) use TemplatesClientApi.getInstance.json, and use the builder properties to set this field
@Deprecated(forRemoval = true) //2.2 - use TemplatesClientApi.getInstance().json, and use the builder to set this field @Deprecated(forRemoval = true)
public UnbakedJsonRetexturedModel(Identifier parent, BlockState itemModelState) { public UnbakedJsonRetexturedModel(Identifier parent, BlockState itemModelState) {
this(parent); this(parent);
itemModelState(itemModelState); itemModelState(itemModelState);

View File

@ -70,8 +70,8 @@ public class UnbakedMeshRetexturedModel implements UnbakedModel, TemplatesClient
}; };
} }
//ABI compat //TODO ABI: (2.2) use TemplatesClientApi.getInstance.mesh
@Deprecated(forRemoval = true) //2.2 - use TemplatesClientApi.getInstance().mesh @Deprecated(forRemoval = true)
public UnbakedMeshRetexturedModel(Identifier parent, Supplier<Mesh> baseMeshFactory) { public UnbakedMeshRetexturedModel(Identifier parent, Supplier<Mesh> baseMeshFactory) {
this(parent, __ -> baseMeshFactory.get()); this(parent, __ -> baseMeshFactory.get());
} }