Skip to content

Commit

Permalink
Remove duplicate method in language provider
Browse files Browse the repository at this point in the history
  • Loading branch information
pupnewfster committed Feb 3, 2025
1 parent 0a3d801 commit 2cdae2e
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 174 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,26 @@ private void addConfigs() {
}

private void addTags() {
addTag(AdditionsTags.Items.BALLOONS, "Balloons");

addTag(AdditionsTags.Items.FENCES_PLASTIC, "Plastic Fences");
addTag(AdditionsTags.Items.FENCE_GATES_PLASTIC, "Plastic Fence Gates");
addTag(AdditionsTags.Items.STAIRS_PLASTIC, "Plastic Stairs");
addTag(AdditionsTags.Items.SLABS_PLASTIC, "Plastic Slabs");
addTag(AdditionsTags.Items.STAIRS_PLASTIC_GLOW, "Glow Plastic Stairs");
addTag(AdditionsTags.Items.SLABS_PLASTIC_GLOW, "Glow Plastic Slabs");
addTag(AdditionsTags.Items.STAIRS_PLASTIC_TRANSPARENT, "Transparent Plastic Stairs");
addTag(AdditionsTags.Items.SLABS_PLASTIC_TRANSPARENT, "Transparent Plastic Slabs");

addTag(AdditionsTags.Items.GLOW_PANELS, "Glow Panels");

addTag(AdditionsTags.Items.PLASTIC_BLOCKS, "All Types of Plastic Blocks");
addTag(AdditionsTags.Items.PLASTIC_BLOCKS_GLOW, "Glow Plastic Blocks");
addTag(AdditionsTags.Items.PLASTIC_BLOCKS_PLASTIC, "Plastic Blocks");
addTag(AdditionsTags.Items.PLASTIC_BLOCKS_REINFORCED, "Reinforced Plastic Blocks");
addTag(AdditionsTags.Items.PLASTIC_BLOCKS_ROAD, "Plastic Roads");
addTag(AdditionsTags.Items.PLASTIC_BLOCKS_SLICK, "Slick Plastic Blocks");
addTag(AdditionsTags.Items.PLASTIC_BLOCKS_TRANSPARENT, "Transparent Plastic Blocks");
add(AdditionsTags.Items.BALLOONS, "Balloons");

add(AdditionsTags.Items.FENCES_PLASTIC, "Plastic Fences");
add(AdditionsTags.Items.FENCE_GATES_PLASTIC, "Plastic Fence Gates");
add(AdditionsTags.Items.STAIRS_PLASTIC, "Plastic Stairs");
add(AdditionsTags.Items.SLABS_PLASTIC, "Plastic Slabs");
add(AdditionsTags.Items.STAIRS_PLASTIC_GLOW, "Glow Plastic Stairs");
add(AdditionsTags.Items.SLABS_PLASTIC_GLOW, "Glow Plastic Slabs");
add(AdditionsTags.Items.STAIRS_PLASTIC_TRANSPARENT, "Transparent Plastic Stairs");
add(AdditionsTags.Items.SLABS_PLASTIC_TRANSPARENT, "Transparent Plastic Slabs");

add(AdditionsTags.Items.GLOW_PANELS, "Glow Panels");

add(AdditionsTags.Items.PLASTIC_BLOCKS, "All Types of Plastic Blocks");
add(AdditionsTags.Items.PLASTIC_BLOCKS_GLOW, "Glow Plastic Blocks");
add(AdditionsTags.Items.PLASTIC_BLOCKS_PLASTIC, "Plastic Blocks");
add(AdditionsTags.Items.PLASTIC_BLOCKS_REINFORCED, "Reinforced Plastic Blocks");
add(AdditionsTags.Items.PLASTIC_BLOCKS_ROAD, "Plastic Roads");
add(AdditionsTags.Items.PLASTIC_BLOCKS_SLICK, "Slick Plastic Blocks");
add(AdditionsTags.Items.PLASTIC_BLOCKS_TRANSPARENT, "Transparent Plastic Blocks");

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ private void addConfigs() {
}

private void addTags() {
addTag(GeneratorTags.Fluids.BIOETHANOL, "Bioethanol");
addTag(GeneratorTags.Fluids.DEUTERIUM, "Deuterium");
addTag(GeneratorTags.Fluids.TRITIUM, "Tritium");
addTag(GeneratorTags.Fluids.FUSION_FUEL, "D-T Fuels");
add(GeneratorTags.Fluids.BIOETHANOL, "Bioethanol");
add(GeneratorTags.Fluids.DEUTERIUM, "Deuterium");
add(GeneratorTags.Fluids.TRITIUM, "Tritium");
add(GeneratorTags.Fluids.FUSION_FUEL, "D-T Fuels");

addTag(GeneratorTags.Chemicals.DEUTERIUM, "Deuterium");
addTag(GeneratorTags.Chemicals.TRITIUM, "Tritium");
addTag(GeneratorTags.Chemicals.FUSION_FUEL, "D-T Fuels");
add(GeneratorTags.Chemicals.DEUTERIUM, "Deuterium");
add(GeneratorTags.Chemicals.TRITIUM, "Tritium");
add(GeneratorTags.Chemicals.FUSION_FUEL, "D-T Fuels");
}

private void addItems() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import mekanism.api.providers.IBlockProvider;
import mekanism.api.providers.IModuleDataProvider;
import mekanism.api.text.IHasTranslationKey;
import mekanism.client.recipe_viewer.alias.IAliasedTranslation;
import mekanism.client.lang.FormatSplitter.Component;
import mekanism.client.recipe_viewer.alias.IAliasedTranslation;
import mekanism.common.Mekanism;
import mekanism.common.advancements.MekanismAdvancement;
import mekanism.common.base.IModModule;
Expand All @@ -25,7 +25,6 @@
import net.minecraft.data.PackOutput;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.level.block.Block;
import net.neoforged.neoforge.common.Tags;
Expand Down Expand Up @@ -80,10 +79,6 @@ protected void addModuleConfig(String configKey, String value) {
add("module." + modid + "." + configKey, value);
}

protected void addTag(TagKey<?> tagKey, String value) {
add(Tags.getTagTranslationKey(tagKey), value);
}

protected void add(IHasTranslationKey key, String value) {
if (key instanceof IBlockProvider blockProvider) {
Block block = blockProvider.getBlock();
Expand Down Expand Up @@ -113,7 +108,7 @@ protected void add(IModuleDataProvider<?> moduleDataProvider, String name, Strin
protected void addFluid(FluidRegistryObject<?, ?, ?, ?, ?> fluidRO, String name) {
add(fluidRO.getBlock(), name);
add(fluidRO.getBucket(), name + " Bucket");
addTag(ItemTags.create(Tags.Items.BUCKETS.location().withSuffix("/" + fluidRO.getName())), name + " Buckets");
add(ItemTags.create(Tags.Items.BUCKETS.location().withSuffix("/" + fluidRO.getName())), name + " Buckets");
}

protected void add(MekanismAdvancement advancement, String title, String description) {
Expand Down
Loading

0 comments on commit 2cdae2e

Please sign in to comment.