diff --git a/src/api/java/mekanism/api/chemical/ChemicalStack.java b/src/api/java/mekanism/api/chemical/ChemicalStack.java index 6f1d3fa9dba..2dad8922d16 100644 --- a/src/api/java/mekanism/api/chemical/ChemicalStack.java +++ b/src/api/java/mekanism/api/chemical/ChemicalStack.java @@ -51,13 +51,13 @@ public final class ChemicalStack implements IHasTextComponent, IHasTranslationKe * * @since 10.6.0 */ - public static final Codec CHEMICAL_NON_EMPTY_CODEC = chemicalNonEmptyCodec(MekanismAPI.CHEMICAL_REGISTRY); + public static final Codec CHEMICAL_NON_EMPTY_CODEC = MekanismAPI.CHEMICAL_REGISTRY.byNameCodec().validate(chemical -> chemical.isEmptyType() ? DataResult.error(() -> "Chemical must not be mekanism:empty") : DataResult.success(chemical)); /** * A standard codec for non-empty Chemical holders. * * @since 10.6.0 */ - public static final Codec> CHEMICAL_NON_EMPTY_HOLDER_CODEC = chemicalNonEmptyHolderCodec(MekanismAPI.CHEMICAL_REGISTRY); + public static final Codec> CHEMICAL_NON_EMPTY_HOLDER_CODEC = MekanismAPI.CHEMICAL_REGISTRY.holderByNameCodec().validate(chemical -> chemical.value().isEmptyType() ? DataResult.error(() -> "Chemical must not be mekanism:empty") : DataResult.success(chemical)); /** * A standard map codec for Chemical stacks that does not accept empty stacks. * @@ -101,27 +101,6 @@ public static Codec fixedAmountCodec(int amount) { } - /** - * A standard codec for chemicals. - * - * @implNote Unlike for fluids we do this on the objects instead of on the holders, as we don't have builtin holders. - * @since 10.6.0 - */ - protected static Codec chemicalNonEmptyCodec(Registry registry) { - return registry.byNameCodec().validate(chemical -> chemical.isEmptyType() ? DataResult.error(() -> "Chemical must not be mekanism:empty") - : DataResult.success(chemical)); - } - - /** - * A standard codec for chemicals. - * - * @since 10.6.0 - */ - protected static Codec> chemicalNonEmptyHolderCodec(Registry registry) { - return registry.holderByNameCodec().validate(chemical -> chemical.value().isEmptyType() ? DataResult.error(() -> "Chemical must not be mekanism:empty") - : DataResult.success(chemical)); - } - /** * A standard codec for chemical stacks that does not accept empty stacks. * diff --git a/src/api/java/mekanism/api/providers/IGasProvider.java b/src/api/java/mekanism/api/providers/IGasProvider.java deleted file mode 100644 index 603242b6f59..00000000000 --- a/src/api/java/mekanism/api/providers/IGasProvider.java +++ /dev/null @@ -1,6 +0,0 @@ -package mekanism.api.providers; - -public interface IGasProvider extends IChemicalProvider { - - -} \ No newline at end of file diff --git a/src/api/java/mekanism/api/providers/IInfuseTypeProvider.java b/src/api/java/mekanism/api/providers/IInfuseTypeProvider.java deleted file mode 100644 index 12b4a9ac679..00000000000 --- a/src/api/java/mekanism/api/providers/IInfuseTypeProvider.java +++ /dev/null @@ -1,6 +0,0 @@ -package mekanism.api.providers; - -//todo remove -public interface IInfuseTypeProvider extends IChemicalProvider { - -} \ No newline at end of file diff --git a/src/api/java/mekanism/api/providers/IPigmentProvider.java b/src/api/java/mekanism/api/providers/IPigmentProvider.java deleted file mode 100644 index 1093531f385..00000000000 --- a/src/api/java/mekanism/api/providers/IPigmentProvider.java +++ /dev/null @@ -1,5 +0,0 @@ -package mekanism.api.providers; - -public interface IPigmentProvider extends IChemicalProvider { - -} \ No newline at end of file diff --git a/src/api/java/mekanism/api/providers/ISlurryProvider.java b/src/api/java/mekanism/api/providers/ISlurryProvider.java deleted file mode 100644 index 21d297b0ff6..00000000000 --- a/src/api/java/mekanism/api/providers/ISlurryProvider.java +++ /dev/null @@ -1,4 +0,0 @@ -package mekanism.api.providers; - -public interface ISlurryProvider extends IChemicalProvider { -} \ No newline at end of file diff --git a/src/main/java/mekanism/common/integration/projecte/NSSChemical.java b/src/main/java/mekanism/common/integration/projecte/NSSChemical.java index 812483e2f2b..2336e715059 100644 --- a/src/main/java/mekanism/common/integration/projecte/NSSChemical.java +++ b/src/main/java/mekanism/common/integration/projecte/NSSChemical.java @@ -6,7 +6,6 @@ import mekanism.api.chemical.Chemical; import mekanism.api.chemical.ChemicalStack; import mekanism.api.providers.IChemicalProvider; -import mekanism.api.providers.IGasProvider; import moze_intel.projecte.api.codec.NSSCodecHolder; import moze_intel.projecte.api.nss.AbstractNSSTag; import moze_intel.projecte.api.nss.NormalizedSimpleStack; diff --git a/src/main/java/mekanism/common/registration/impl/DeferredChemical.java b/src/main/java/mekanism/common/registration/impl/DeferredChemical.java index 8854d8ab751..3fdbc85eb44 100644 --- a/src/main/java/mekanism/common/registration/impl/DeferredChemical.java +++ b/src/main/java/mekanism/common/registration/impl/DeferredChemical.java @@ -2,7 +2,6 @@ import mekanism.api.chemical.Chemical; import mekanism.api.providers.IChemicalProvider; -import mekanism.api.providers.ISlurryProvider; import mekanism.common.registration.MekanismDeferredHolder; import net.minecraft.resources.ResourceKey; @@ -18,10 +17,4 @@ public Chemical getChemical() { return value(); } - public static class DeferredSlurry extends DeferredChemical implements ISlurryProvider { - - public DeferredSlurry(ResourceKey key) { - super(key); - } - } } \ No newline at end of file