Skip to content

Commit

Permalink
Adjust some TODOs for when they are targeted
Browse files Browse the repository at this point in the history
  • Loading branch information
pupnewfster committed Dec 20, 2021
1 parent 311dc12 commit 6347a88
Show file tree
Hide file tree
Showing 101 changed files with 130 additions and 130 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public Set<String> getSupportedAnnotationTypes() {

@Override
public SourceVersion getSupportedSourceVersion() {
//TODO - 1.17: Java 16
//TODO - 1.18: Java 17
return SourceVersion.RELEASE_8;
}
}
8 changes: 4 additions & 4 deletions src/api/java/mekanism/api/Coord4D.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public Coord4D(double x, double y, double z, RegistryKey<World> dimension) {
* @param pos Position (x, y, z)
* @param world World
*/
public Coord4D(BlockPos pos, World world) {//TODO - 1.17: Switch this to taking Vector3i as position
public Coord4D(BlockPos pos, World world) {//TODO - 1.18: Switch this to taking Vector3i as position
this(pos, world.dimension());
}

Expand All @@ -68,12 +68,12 @@ public Coord4D(BlockPos pos, World world) {//TODO - 1.17: Switch this to taking
* @param pos Position (x, y, z)
* @param dimension Dimension ID
*/
public Coord4D(BlockPos pos, RegistryKey<World> dimension) {//TODO - 1.17: Switch this to taking Vector3i as position
public Coord4D(BlockPos pos, RegistryKey<World> dimension) {//TODO - 1.18: Switch this to taking Vector3i as position
this(pos.getX(), pos.getY(), pos.getZ(), dimension);
}

@Deprecated
public Coord4D(BlockRayTraceResult mop, World world) {//TODO - 1.17: Remove this
public Coord4D(BlockRayTraceResult mop, World world) {//TODO - 1.18: Remove this
this(mop.getBlockPos(), world);
}

Expand All @@ -84,7 +84,7 @@ public Coord4D(BlockRayTraceResult mop, World world) {//TODO - 1.17: Remove this
*
* @return the Coord4D object from the TileEntity
*/
public static Coord4D get(TileEntity tile) {//TODO - 1.17: Move this to a constructor or move the other helper constructors to a get method
public static Coord4D get(TileEntity tile) {//TODO - 1.18: Move this to a constructor or move the other helper constructors to a get method
return new Coord4D(tile.getBlockPos(), tile.getLevel());
}

Expand Down
2 changes: 1 addition & 1 deletion src/api/java/mekanism/api/IAlloyInteraction.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ public interface IAlloyInteraction {
* @param stack - the stack of alloy being right-clicked
* @param tier - the tier of the alloy
*/
//TODO - 1.17: Remove the hand parameter as it is not needed
//TODO - 1.18: Remove the hand parameter as it is not needed
void onAlloyInteraction(PlayerEntity player, Hand hand, ItemStack stack, @Nonnull AlloyTier tier);
}
2 changes: 1 addition & 1 deletion src/api/java/mekanism/api/IConfigurable.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @author aidancbrady
*/
public interface IConfigurable {//TODO - 1.17: Make the capability instance handle what side we interact with these from and remove the side from the methods
public interface IConfigurable {//TODO - 1.18: Make the capability instance handle what side we interact with these from and remove the side from the methods

/**
* Called when a player shift-right clicks this block with a Configurator.
Expand Down
2 changes: 1 addition & 1 deletion src/api/java/mekanism/api/MekanismAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private MekanismAPI() {
private static ITooltipHelper TOOLTIP_HELPER;

//Note: None of the empty variants support registry replacement
//TODO - 1.17: Rename registry names for the empty types to just being mekanism:empty instead of mekanism:empty_type,
//TODO - 1.18: Rename registry names for the empty types to just being mekanism:empty instead of mekanism:empty_type,
// and also potentially define these with ObjectHolder for purposes of fully defining them outside of the API
/**
* Empty Gas instance.
Expand Down
2 changes: 1 addition & 1 deletion src/api/java/mekanism/api/NBTConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ private NBTConstants() {
public static final String STOCK_CONTROL = "stockControl";
public static final String STORED = "stored";
public static final String STRICT_INPUT = "strictInput";
@Deprecated//TODO - 1.17: Remove
@Deprecated//TODO - 1.18: Remove
public static final String SUCKED_LAST_OPERATION = "suckedLastOperation";
public static final String TAG_NAME = "tagName";
public static final String TANK = "Tank";
Expand Down
2 changes: 1 addition & 1 deletion src/api/java/mekanism/api/Range3D.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import net.minecraft.util.RegistryKey;
import net.minecraft.world.World;

//TODO - 1.17: Move this out of the API
//TODO - 1.18: Move this out of the API
public class Range3D {

public final RegistryKey<World> dimension;
Expand Down
4 changes: 2 additions & 2 deletions src/api/java/mekanism/api/Upgrade.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static void saveMap(Map<Upgrade, Integer> upgrades, CompoundNBT nbtTags)
*
* @deprecated use {@link #getTag(int)} instead.
*/
@Deprecated//TODO - 1.17: Remove this
@Deprecated//TODO - 1.18: Remove this
public static CompoundNBT getTagFor(Upgrade upgrade, int amount) {
CompoundNBT compound = new CompoundNBT();
compound.putInt(NBTConstants.TYPE, upgrade.ordinal());
Expand Down Expand Up @@ -143,7 +143,7 @@ public EnumColor getColor() {
*
* @return {@code true} if the upgrade has multiple levels.
*/
@Deprecated//TODO - 1.17: Remove this
@Deprecated//TODO - 1.18: Remove this
public boolean canMultiply() {
return getMax() > 1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/api/java/mekanism/api/chemical/ChemicalStack.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import net.minecraft.util.text.ITextComponent;
import net.minecraftforge.registries.IRegistryDelegate;

//TODO - 1.17: Make the subclasses of this final
//TODO - 1.18: Make the subclasses of this final
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
public abstract class ChemicalStack<CHEMICAL extends Chemical<CHEMICAL>> implements IHasTextComponent, IHasTranslationKey {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public TANK output(long capacity, @Nullable IContentsListener listener) {
return tankCreator.create(capacity, alwaysTrueBi, internalOnly, alwaysTrue, ChemicalAttributeValidator.ALWAYS_ALLOW, listener);
}

@Deprecated//TODO - 1.17: Remove
@Deprecated//TODO - 1.18: Remove
public TANK ejectOutput(long capacity, @Nullable IContentsListener listener) {
if (capacity < 0) {
throw new IllegalArgumentException("Capacity must be at least zero");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import mekanism.api.recipes.inputs.chemical.GasStackIngredient;
import net.minecraft.util.ResourceLocation;

//TODO - 1.17: Get rid of this class and move the helpers to ChemicalChemicalToChemicalRecipeBuilder
//TODO - 1.18: Get rid of this class and move the helpers to ChemicalChemicalToChemicalRecipeBuilder
@Deprecated
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class ItemStackChemicalToItemStackRecipeBuilder<CHEMICAL extends Chemical
private final ItemStackIngredient itemInput;
private final INGREDIENT chemicalInput;
private final ItemStack output;
//TODO - 1.17: Just inline this as JsonConstants.CHEMICAL_INPUT
//TODO - 1.18: Just inline this as JsonConstants.CHEMICAL_INPUT
private final String chemicalInputKey;

protected ItemStackChemicalToItemStackRecipeBuilder(ResourceLocation serializerName, ItemStackIngredient itemInput, INGREDIENT chemicalInput, ItemStack output,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;

@Deprecated//TODO - 1.17: Remove
@Deprecated//TODO - 1.18: Remove
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
public class ItemStackGasToItemStackRecipeBuilder extends ItemStackChemicalToItemStackRecipeBuilder<Gas, GasStack, GasStackIngredient> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;

@Deprecated//TODO - 1.17: Remove
@Deprecated//TODO - 1.18: Remove
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
public class MetallurgicInfuserRecipeBuilder extends ItemStackChemicalToItemStackRecipeBuilder<InfuseType, InfusionStack, InfusionStackIngredient> {
Expand Down
2 changes: 1 addition & 1 deletion src/api/java/mekanism/api/fluid/IExtendedFluidTank.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public interface IExtendedFluidTank extends IFluidTank, INBTSerializable<Compoun
* @implNote If the internal stack does get updated make sure to call {@link #onContentsChanged()}
*/
default void setStackUnchecked(FluidStack stack) {
//TODO - 1.17: Remove default implementation. This is mainly here to not be a breaking change on the off-chance anyone actually
//TODO - 1.18: Remove default implementation. This is mainly here to not be a breaking change on the off-chance anyone actually
// has a custom implementation of our extended fluid tank
setStack(stack);
}
Expand Down
2 changes: 1 addition & 1 deletion src/api/java/mekanism/api/gear/ICustomModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ default ModuleDispenseResult onDispense(IModule<MODULE> module, IBlockSource sou
return ModuleDispenseResult.DEFAULT;
}

//TODO - 1.17: Switch this to a record
//TODO - 1.18: Switch this to a record
class ModuleDamageAbsorbInfo {

private final FloatSupplier absorptionRatio;
Expand Down
8 changes: 4 additions & 4 deletions src/api/java/mekanism/api/gear/ModuleData.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ public final ModuleData<MODULE> getModuleData() {
* Gets the legacy name for this module. This is mainly used to be able to load legacy modules from before the module system was exposed to the API and modules had a
* slightly different naming scheme.
*
* @deprecated Will be removed in 1.17
* @deprecated Will be removed in 1.18
*/
@Nullable
@Deprecated//TODO - 1.17: Remove
@Deprecated//TODO - 1.18: Remove
public final String getLegacyName() {
return legacyName;
}
Expand Down Expand Up @@ -235,9 +235,9 @@ private ModuleDataBuilder(@Nonnull NonNullSupplier<MODULE> supplier, @Nonnull II
*
* @param legacyName Legacy name of the module.
*
* @deprecated Will be removed in 1.17
* @deprecated Will be removed in 1.18
*/
@Deprecated//TODO - 1.17: Remove
@Deprecated//TODO - 1.18: Remove
public ModuleDataBuilder<MODULE> legacyName(@Nonnull String legacyName) {
this.legacyName = Objects.requireNonNull(legacyName, "Legacy name should not be null if specified.");
return this;
Expand Down
2 changes: 1 addition & 1 deletion src/api/java/mekanism/api/inventory/AutomationType.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package mekanism.api.inventory;

//TODO - 1.17: Move this out of the inventory submodule in the API
//TODO - 1.18: Move this out of the inventory submodule in the API
public enum AutomationType {
EXTERNAL,
INTERNAL,
Expand Down
2 changes: 1 addition & 1 deletion src/api/java/mekanism/api/lasers/ILaserReceptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface ILaserReceptor {
* @param energy Energy received.
* @param side Side the receptor is hit from (will be removed in 1.17 as what capability instance is returned can be used to have different handling of this)
*/
void receiveLaserEnergy(@Nonnull FloatingLong energy, Direction side);//TODO - 1.17: Remove the side from this as the side is used when getting the capability.
void receiveLaserEnergy(@Nonnull FloatingLong energy, Direction side);//TODO - 1.18: Remove the side from this as the side is used when getting the capability.

/**
* Checks if a laser can break this receptor.
Expand Down
4 changes: 2 additions & 2 deletions src/api/java/mekanism/api/providers/IBlockProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ public interface IBlockProvider extends IItemProvider {
@Nonnull
Block getBlock();

@Deprecated//TODO - 1.17: Remove this as we don't actually use this
@Deprecated//TODO - 1.18: Remove this as we don't actually use this
default boolean blockMatches(ItemStack otherStack) {
Item item = otherStack.getItem();
return item instanceof BlockItem && blockMatches(((BlockItem) item).getBlock());
}

@Deprecated//TODO - 1.17: Remove this as we don't actually use this
@Deprecated//TODO - 1.18: Remove this as we don't actually use this
default boolean blockMatches(Block other) {
return getBlock() == other;
}
Expand Down
2 changes: 1 addition & 1 deletion src/api/java/mekanism/api/providers/IFluidProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface IFluidProvider extends IBaseProvider {
Fluid getFluid();

//Note: Uses FluidStack in case we want to check NBT or something
@Deprecated//TODO - 1.17: Remove this as we don't actually use this
@Deprecated//TODO - 1.18: Remove this as we don't actually use this
default boolean fluidMatches(FluidStack other) {
return getFluid() == other.getFluid();
}
Expand Down
6 changes: 3 additions & 3 deletions src/api/java/mekanism/api/providers/IItemProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public interface IItemProvider extends IBaseProvider, net.minecraft.util.IItemPr
* Gets the item this provider represents.
*/
@Nonnull
Item getItem();//TODO - 1.17: Replace this with just using vanilla's asItem?
Item getItem();//TODO - 1.18: Replace this with just using vanilla's asItem?

@Nonnull
@Override
Expand All @@ -37,12 +37,12 @@ default ItemStack getItemStack(int size) {
return new ItemStack(getItem(), size);
}

@Deprecated//TODO - 1.17: Remove this as we don't actually use this
@Deprecated//TODO - 1.18: Remove this as we don't actually use this
default boolean itemMatches(ItemStack otherStack) {
return itemMatches(otherStack.getItem());
}

@Deprecated//TODO - 1.17: Remove this as we don't actually use this
@Deprecated//TODO - 1.18: Remove this as we don't actually use this
default boolean itemMatches(Item other) {
return getItem() == other;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public boolean test(ItemStack itemStack, GasStack gasStack) {
* @return Representation of the output, <strong>MUST NOT</strong> be modified.
*/
public BoxedChemicalStack getOutputDefinition() {
//TODO - 1.17: Re-evaluate this method not being a list
//TODO - 1.18: Re-evaluate this method not being a list
return output;
}

Expand Down
2 changes: 1 addition & 1 deletion src/api/java/mekanism/api/recipes/ElectrolysisRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public FluidStackIngredient getInput() {
* @return Representation of the left output, <strong>MUST NOT</strong> be modified.
*/
public GasStack getLeftGasOutputRepresentation() {
//TODO - 1.17: Re-evaluate this method and the other output representation method not being lists.
//TODO - 1.18: Re-evaluate this method and the other output representation method not being lists.
// Strictly speaking it should be a list of pairs of gas stacks
return leftGasOutput;
}
Expand Down
2 changes: 1 addition & 1 deletion src/api/java/mekanism/api/recipes/FluidToFluidRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public FluidStackIngredient getInput() {
/**
* @deprecated Use {@link #getOutputDefinition()}.
*/
@Deprecated//TODO - 1.17: Remove this
@Deprecated//TODO - 1.18: Remove this
public FluidStack getOutputRepresentation() {
return output;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public FloatingLong getOutput(ItemStack input) {
* @return Representation of the output, <strong>MUST NOT</strong> be modified.
*/
public FloatingLong getOutputDefinition() {
//TODO - 1.17: Re-evaluate this method not being a list
//TODO - 1.18: Re-evaluate this method not being a list
return output;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ public MetallurgicInfuserRecipe(ResourceLocation id, ItemStackIngredient itemInp
/**
* @deprecated Switch to using {@link ItemStackChemicalToItemStackRecipe#test(ItemStack, ChemicalStack)}
*/
@Deprecated//TODO - 1.17: Remove this method
@Deprecated//TODO - 1.18: Remove this method
public boolean test(InfusionStack infusionContainer, ItemStack itemStack) {
return test(itemStack, infusionContainer);
}

/**
* @deprecated Switch to using {@link ItemStackChemicalToItemStackRecipe#getOutput(ItemStack, ChemicalStack)}
*/
@Deprecated//TODO - 1.17: Remove this method
@Deprecated//TODO - 1.18: Remove this method
@Contract(value = "_, _ -> new", pure = true)
public ItemStack getOutput(InfusionStack inputInfuse, ItemStack inputItem) {
return getOutput(inputItem, inputInfuse);
Expand All @@ -57,7 +57,7 @@ public ItemStack getOutput(InfusionStack inputInfuse, ItemStack inputItem) {
/**
* @deprecated Switch to using {@link ItemStackChemicalToItemStackRecipe#getChemicalInput()}
*/
@Deprecated//TODO - 1.17: Remove this method
@Deprecated//TODO - 1.18: Remove this method
public InfusionStackIngredient getInfusionInput() {
return getChemicalInput();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public boolean test(ItemStack solid, FluidStack liquid, GasStack gas) {
* @return Representation of the output, <strong>MUST NOT</strong> be modified.
*/
public Pair<List<@NonNull ItemStack>, @NonNull GasStack> getOutputDefinition() {
//TODO - 1.17: Re-evaluate the fact that this isn't a list of pairs
//TODO - 1.18: Re-evaluate the fact that this isn't a list of pairs
if (outputItem.isEmpty()) {
return Pair.of(Collections.emptyList(), this.outputGas);
}
Expand Down
6 changes: 3 additions & 3 deletions src/api/java/mekanism/api/recipes/RotaryRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
@MethodsReturnNonnullByDefault
public abstract class RotaryRecipe extends MekanismRecipe {

//TODO - 1.17: Evaluate making ingredients not able to even be built from empty stacks and just switch these to being null here
//TODO - 1.18: Evaluate making ingredients not able to even be built from empty stacks and just switch these to being null here
private static final GasStackIngredient EMPTY_GAS_INPUT = GasStackIngredient.from(GasStack.EMPTY);
private static final FluidStackIngredient EMPTY_FLUID_INPUT = FluidStackIngredient.from(FluidStack.EMPTY);
private final GasStackIngredient gasInput;
Expand Down Expand Up @@ -173,7 +173,7 @@ public GasStackIngredient getGasInput() {
/**
* @deprecated Use {@link #getGasOutputDefinition()}.
*/
@Deprecated//TODO - 1.17: Remove this
@Deprecated//TODO - 1.18: Remove this
public GasStack getGasOutputRepresentation() {
return gasOutput;
}
Expand All @@ -190,7 +190,7 @@ public List<GasStack> getGasOutputDefinition() {
/**
* @deprecated Use {@link #getFluidOutputDefinition()}.
*/
@Deprecated//TODO - 1.17: Remove this
@Deprecated//TODO - 1.18: Remove this
public FluidStack getFluidOutputRepresentation() {
return fluidOutput;
}
Expand Down
2 changes: 1 addition & 1 deletion src/api/java/mekanism/api/recipes/SawmillRecipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public SawmillRecipe(ResourceLocation id, ItemStackIngredient input, ItemStack m
if (secondaryChance == 0) {
throw new IllegalArgumentException("Secondary output must have a chance greater than zero.");
} else if (secondaryChance == 1) {
//TODO - 1.17: Replace this handling that moves the secondary output to the main output with an exception
//TODO - 1.18: Replace this handling that moves the secondary output to the main output with an exception
// This will also need to be double checked in the recipe serializer and in the CrT integration
this.mainOutput = secondaryOutput.copy();
this.secondaryOutput = ItemStack.EMPTY;
Expand Down
Loading

0 comments on commit 6347a88

Please sign in to comment.