Skip to content

Commit 70ee523

Browse files
committed
Rename chemical IngredientCreatorAccess methods to explicitly specify stack so that the basic version can have just the chemical name
1 parent 58a6ea2 commit 70ee523

File tree

53 files changed

+271
-257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+271
-257
lines changed

src/api/java/mekanism/api/IMekanismAccess.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,59 +68,59 @@ public interface IMekanismAccess {
6868
/**
6969
* Gets the gas stack ingredient creator.
7070
*
71-
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#gas()} instead.
71+
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#gasStack()} instead.
7272
*/
7373
IChemicalStackIngredientCreator<Gas, GasStack, IGasIngredient, GasStackIngredient> gasStackIngredientCreator();
7474

7575
/**
7676
* Gets the gas ingredient creator.
7777
*
78-
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#basicGas()} instead.
78+
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#gas()} instead.
7979
* @since 10.6.0
8080
*/
8181
IChemicalIngredientCreator<Gas, IGasIngredient> gasIngredientCreator();
8282

8383
/**
8484
* Gets the infusion stack ingredient creator.
8585
*
86-
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#infusion()} instead.
86+
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#infusionStack()} instead.
8787
*/
8888
IChemicalStackIngredientCreator<InfuseType, InfusionStack, IInfusionIngredient, InfusionStackIngredient> infusionStackIngredientCreator();
8989

9090
/**
9191
* Gets the infusion ingredient creator.
9292
*
93-
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#basicInfusion()} instead.
93+
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#infusion()} instead.
9494
* @since 10.6.0
9595
*/
9696
IChemicalIngredientCreator<InfuseType, IInfusionIngredient> infusionIngredientCreator();
9797

9898
/**
9999
* Gets the pigment stack ingredient creator.
100100
*
101-
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#pigment()} instead.
101+
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#pigmentStack()} instead.
102102
*/
103103
IChemicalStackIngredientCreator<Pigment, PigmentStack, IPigmentIngredient, PigmentStackIngredient> pigmentStackIngredientCreator();
104104

105105
/**
106106
* Gets the pigment ingredient creator.
107107
*
108-
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#basicPigment()} instead.
108+
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#pigment()} instead.
109109
* @since 10.6.0
110110
*/
111111
IChemicalIngredientCreator<Pigment, IPigmentIngredient> pigmentIngredientCreator();
112112

113113
/**
114114
* Gets the slurry stack ingredient creator.
115115
*
116-
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#slurry()} instead.
116+
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#slurryStack()} instead.
117117
*/
118118
IChemicalStackIngredientCreator<Slurry, SlurryStack, ISlurryIngredient, SlurryStackIngredient> slurryStackIngredientCreator();
119119

120120
/**
121121
* Gets the slurry ingredient creator.
122122
*
123-
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#basicSlurry()} instead.
123+
* @apiNote Use {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#slurry()} instead.
124124
* @since 10.6.0
125125
*/
126126
IChemicalIngredientCreator<Slurry, ISlurryIngredient> slurryIngredientCreator();

src/api/java/mekanism/api/recipes/ingredients/GasStackIngredient.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* <p>{@link IGasIngredient}, like its item counterpart, explicitly does not perform count checks,
2222
* so this class is used to (a) wrap a standard GasIngredient with an amount and (b) provide a standard serialization format for mods to use.
2323
* <p>
24-
* * Create instances of this using {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#gas()}.
24+
* * Create instances of this using {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#gasStack()}.
2525
*
2626
* @see net.neoforged.neoforge.common.crafting.SizedIngredient
2727
*/
@@ -57,7 +57,7 @@ public final class GasStackIngredient extends ChemicalStackIngredient<Gas, GasSt
5757
* @since 10.6.0
5858
*/
5959
public static final Codec<GasStackIngredient> CODEC = RecordCodecBuilder.create(instance -> instance.group(
60-
IngredientCreatorAccess.basicGas().mapCodecNonEmpty().forGetter(GasStackIngredient::ingredient),
60+
IngredientCreatorAccess.gas().mapCodecNonEmpty().forGetter(GasStackIngredient::ingredient),
6161
SerializerHelper.POSITIVE_LONG_CODEC.fieldOf(NBTConstants.AMOUNT).forGetter(GasStackIngredient::amount)
6262
).apply(instance, GasStackIngredient::new));//TODO - 1.20.5: Re-evaluate how compound ingredients get serialized?? can we just make it a list
6363

@@ -78,7 +78,7 @@ public final class GasStackIngredient extends ChemicalStackIngredient<Gas, GasSt
7878
* @since 10.6.0
7979
*/
8080
public static final Codec<GasStackIngredient> NESTED_CODEC = RecordCodecBuilder.create(instance -> instance.group(
81-
IngredientCreatorAccess.basicGas().codecNonEmpty().fieldOf("ingredient").forGetter(GasStackIngredient::ingredient),
81+
IngredientCreatorAccess.gas().codecNonEmpty().fieldOf("ingredient").forGetter(GasStackIngredient::ingredient),
8282
SerializerHelper.POSITIVE_LONG_CODEC.fieldOf(NBTConstants.AMOUNT).forGetter(GasStackIngredient::amount)
8383
).apply(instance, GasStackIngredient::new));
8484

@@ -88,14 +88,14 @@ public final class GasStackIngredient extends ChemicalStackIngredient<Gas, GasSt
8888
* @since 10.6.0
8989
*/
9090
public static final StreamCodec<RegistryFriendlyByteBuf, GasStackIngredient> STREAM_CODEC = StreamCodec.composite(
91-
IngredientCreatorAccess.basicGas().streamCodec(), GasStackIngredient::ingredient,
91+
IngredientCreatorAccess.gas().streamCodec(), GasStackIngredient::ingredient,
9292
ByteBufCodecs.VAR_LONG, GasStackIngredient::amount,
9393
GasStackIngredient::new
9494
);
9595

9696
/**
9797
* Creates a Gas Stack Ingredient that matches a given ingredient and amount. Prefer calling via
98-
* {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#gas()} and
98+
* {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#gasStack()} and
9999
* {@link mekanism.api.recipes.ingredients.creator.IChemicalStackIngredientCreator#from(IChemicalIngredient, long)}.
100100
*
101101
* @param ingredient Ingredient to match.

src/api/java/mekanism/api/recipes/ingredients/InfusionStackIngredient.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* <p>{@link IInfusionIngredient}, like its item counterpart, explicitly does not perform count checks,
2222
* so this class is used to (a) wrap a standard InfusionIngredient with an amount and (b) provide a standard serialization format for mods to use.
2323
* <p>
24-
* * Create instances of this using {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#infusion()}.
24+
* * Create instances of this using {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#infusionStack()}.
2525
*
2626
* @see net.neoforged.neoforge.common.crafting.SizedIngredient
2727
*/
@@ -57,7 +57,7 @@ public final class InfusionStackIngredient extends ChemicalStackIngredient<Infus
5757
* @since 10.6.0
5858
*/
5959
public static final Codec<InfusionStackIngredient> CODEC = RecordCodecBuilder.create(instance -> instance.group(
60-
IngredientCreatorAccess.basicInfusion().mapCodecNonEmpty().forGetter(InfusionStackIngredient::ingredient),
60+
IngredientCreatorAccess.infusion().mapCodecNonEmpty().forGetter(InfusionStackIngredient::ingredient),
6161
SerializerHelper.POSITIVE_LONG_CODEC.fieldOf(NBTConstants.AMOUNT).forGetter(InfusionStackIngredient::amount)
6262
).apply(instance, InfusionStackIngredient::new));
6363

@@ -78,7 +78,7 @@ public final class InfusionStackIngredient extends ChemicalStackIngredient<Infus
7878
* @since 10.6.0
7979
*/
8080
public static final Codec<InfusionStackIngredient> NESTED_CODEC = RecordCodecBuilder.create(instance -> instance.group(
81-
IngredientCreatorAccess.basicInfusion().codecNonEmpty().fieldOf("ingredient").forGetter(InfusionStackIngredient::ingredient),
81+
IngredientCreatorAccess.infusion().codecNonEmpty().fieldOf("ingredient").forGetter(InfusionStackIngredient::ingredient),
8282
SerializerHelper.POSITIVE_LONG_CODEC.fieldOf(NBTConstants.AMOUNT).forGetter(InfusionStackIngredient::amount)
8383
).apply(instance, InfusionStackIngredient::new));
8484

@@ -88,14 +88,14 @@ public final class InfusionStackIngredient extends ChemicalStackIngredient<Infus
8888
* @since 10.6.0
8989
*/
9090
public static final StreamCodec<RegistryFriendlyByteBuf, InfusionStackIngredient> STREAM_CODEC = StreamCodec.composite(
91-
IngredientCreatorAccess.basicInfusion().streamCodec(), InfusionStackIngredient::ingredient,
91+
IngredientCreatorAccess.infusion().streamCodec(), InfusionStackIngredient::ingredient,
9292
ByteBufCodecs.VAR_LONG, InfusionStackIngredient::amount,
9393
InfusionStackIngredient::new
9494
);
9595

9696
/**
9797
* Creates an Infusion Stack Ingredient that matches a given ingredient and amount. Prefer calling via
98-
* {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#infusion()} and
98+
* {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#infusionStack()} and
9999
* {@link mekanism.api.recipes.ingredients.creator.IChemicalStackIngredientCreator#from(IChemicalIngredient, long)}.
100100
*
101101
* @param ingredient Ingredient to match.

src/api/java/mekanism/api/recipes/ingredients/PigmentStackIngredient.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* <p>{@link IPigmentIngredient}, like its item counterpart, explicitly does not perform count checks,
2222
* so this class is used to (a) wrap a standard PigmentIngredient with an amount and (b) provide a standard serialization format for mods to use.
2323
* <p>
24-
* * Create instances of this using {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#pigment()}.
24+
* * Create instances of this using {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#pigmentStack()}.
2525
*
2626
* @see net.neoforged.neoforge.common.crafting.SizedIngredient
2727
*/
@@ -57,7 +57,7 @@ public final class PigmentStackIngredient extends ChemicalStackIngredient<Pigmen
5757
* @since 10.6.0
5858
*/
5959
public static final Codec<PigmentStackIngredient> CODEC = RecordCodecBuilder.create(instance -> instance.group(
60-
IngredientCreatorAccess.basicPigment().mapCodecNonEmpty().forGetter(PigmentStackIngredient::ingredient),
60+
IngredientCreatorAccess.pigment().mapCodecNonEmpty().forGetter(PigmentStackIngredient::ingredient),
6161
SerializerHelper.POSITIVE_LONG_CODEC.fieldOf(NBTConstants.AMOUNT).forGetter(PigmentStackIngredient::amount)
6262
).apply(instance, PigmentStackIngredient::new));
6363

@@ -78,7 +78,7 @@ public final class PigmentStackIngredient extends ChemicalStackIngredient<Pigmen
7878
* @since 10.6.0
7979
*/
8080
public static final Codec<PigmentStackIngredient> NESTED_CODEC = RecordCodecBuilder.create(instance -> instance.group(
81-
IngredientCreatorAccess.basicPigment().codecNonEmpty().fieldOf("ingredient").forGetter(PigmentStackIngredient::ingredient),
81+
IngredientCreatorAccess.pigment().codecNonEmpty().fieldOf("ingredient").forGetter(PigmentStackIngredient::ingredient),
8282
SerializerHelper.POSITIVE_LONG_CODEC.fieldOf(NBTConstants.AMOUNT).forGetter(PigmentStackIngredient::amount)
8383
).apply(instance, PigmentStackIngredient::new));
8484

@@ -88,14 +88,14 @@ public final class PigmentStackIngredient extends ChemicalStackIngredient<Pigmen
8888
* @since 10.6.0
8989
*/
9090
public static final StreamCodec<RegistryFriendlyByteBuf, PigmentStackIngredient> STREAM_CODEC = StreamCodec.composite(
91-
IngredientCreatorAccess.basicPigment().streamCodec(), PigmentStackIngredient::ingredient,
91+
IngredientCreatorAccess.pigment().streamCodec(), PigmentStackIngredient::ingredient,
9292
ByteBufCodecs.VAR_LONG, PigmentStackIngredient::amount,
9393
PigmentStackIngredient::new
9494
);
9595

9696
/**
9797
* Creates a Pigment Stack Ingredient that matches a given ingredient and amount. Prefer calling via
98-
* {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#pigment()} and
98+
* {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#pigmentStack()} and
9999
* {@link mekanism.api.recipes.ingredients.creator.IChemicalStackIngredientCreator#from(IChemicalIngredient, long)}.
100100
*
101101
* @param ingredient Ingredient to match.

src/api/java/mekanism/api/recipes/ingredients/SlurryStackIngredient.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* <p>{@link ISlurryIngredient}, like its item counterpart, explicitly does not perform count checks,
2222
* so this class is used to (a) wrap a standard SlurryIngredient with an amount and (b) provide a standard serialization format for mods to use.
2323
* <p>
24-
* * Create instances of this using {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#slurry()}.
24+
* * Create instances of this using {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#slurryStack()}.
2525
*
2626
* @see net.neoforged.neoforge.common.crafting.SizedIngredient
2727
*/
@@ -57,7 +57,7 @@ public final class SlurryStackIngredient extends ChemicalStackIngredient<Slurry,
5757
* @since 10.6.0
5858
*/
5959
public static final Codec<SlurryStackIngredient> CODEC = RecordCodecBuilder.create(instance -> instance.group(
60-
IngredientCreatorAccess.basicSlurry().mapCodecNonEmpty().forGetter(SlurryStackIngredient::ingredient),
60+
IngredientCreatorAccess.slurry().mapCodecNonEmpty().forGetter(SlurryStackIngredient::ingredient),
6161
SerializerHelper.POSITIVE_LONG_CODEC.fieldOf(NBTConstants.AMOUNT).forGetter(SlurryStackIngredient::amount)
6262
).apply(instance, SlurryStackIngredient::new));
6363

@@ -78,7 +78,7 @@ public final class SlurryStackIngredient extends ChemicalStackIngredient<Slurry,
7878
* @since 10.6.0
7979
*/
8080
public static final Codec<SlurryStackIngredient> NESTED_CODEC = RecordCodecBuilder.create(instance -> instance.group(
81-
IngredientCreatorAccess.basicSlurry().codecNonEmpty().fieldOf("ingredient").forGetter(SlurryStackIngredient::ingredient),
81+
IngredientCreatorAccess.slurry().codecNonEmpty().fieldOf("ingredient").forGetter(SlurryStackIngredient::ingredient),
8282
SerializerHelper.POSITIVE_LONG_CODEC.fieldOf(NBTConstants.AMOUNT).forGetter(SlurryStackIngredient::amount)
8383
).apply(instance, SlurryStackIngredient::new));
8484

@@ -88,14 +88,14 @@ public final class SlurryStackIngredient extends ChemicalStackIngredient<Slurry,
8888
* @since 10.6.0
8989
*/
9090
public static final StreamCodec<RegistryFriendlyByteBuf, SlurryStackIngredient> STREAM_CODEC = StreamCodec.composite(
91-
IngredientCreatorAccess.basicSlurry().streamCodec(), SlurryStackIngredient::ingredient,
91+
IngredientCreatorAccess.slurry().streamCodec(), SlurryStackIngredient::ingredient,
9292
ByteBufCodecs.VAR_LONG, SlurryStackIngredient::amount,
9393
SlurryStackIngredient::new
9494
);
9595

9696
/**
9797
* Creates a Slurry Stack Ingredient that matches a given ingredient and amount. Prefer calling via
98-
* {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#slurry()} and
98+
* {@link mekanism.api.recipes.ingredients.creator.IngredientCreatorAccess#slurryStack()} and
9999
* {@link mekanism.api.recipes.ingredients.creator.IChemicalStackIngredientCreator#from(IChemicalIngredient, long)}.
100100
*
101101
* @param ingredient Ingredient to match.

src/api/java/mekanism/api/recipes/ingredients/chemical/IGasIngredient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ public non-sealed interface IGasIngredient extends IChemicalIngredient<Gas, IGas
1616
@NotNull
1717
@Override
1818
default IChemicalIngredientCreator<Gas, IGasIngredient> ingredientCreator() {
19-
return IngredientCreatorAccess.basicGas();
19+
return IngredientCreatorAccess.gas();
2020
}
2121
}

src/api/java/mekanism/api/recipes/ingredients/chemical/IInfusionIngredient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ public non-sealed interface IInfusionIngredient extends IChemicalIngredient<Infu
1616
@NotNull
1717
@Override
1818
default IChemicalIngredientCreator<InfuseType, IInfusionIngredient> ingredientCreator() {
19-
return IngredientCreatorAccess.basicInfusion();
19+
return IngredientCreatorAccess.infusion();
2020
}
2121
}

src/api/java/mekanism/api/recipes/ingredients/chemical/IPigmentIngredient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ public non-sealed interface IPigmentIngredient extends IChemicalIngredient<Pigme
1616
@NotNull
1717
@Override
1818
default IChemicalIngredientCreator<Pigment, IPigmentIngredient> ingredientCreator() {
19-
return IngredientCreatorAccess.basicPigment();
19+
return IngredientCreatorAccess.pigment();
2020
}
2121
}

src/api/java/mekanism/api/recipes/ingredients/chemical/ISlurryIngredient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ public non-sealed interface ISlurryIngredient extends IChemicalIngredient<Slurry
1717
@NotNull
1818
@Override
1919
default IChemicalIngredientCreator<Slurry, ISlurryIngredient> ingredientCreator() {
20-
return IngredientCreatorAccess.basicSlurry();
20+
return IngredientCreatorAccess.slurry();
2121
}
2222
}

0 commit comments

Comments
 (0)