Move a lot of tags to datagen

This commit is contained in:
modmuss50 2022-09-15 22:42:09 +01:00
parent 75c9fc9ba3
commit 01cddda4dd
45 changed files with 239 additions and 457 deletions

View file

@ -49,7 +49,7 @@ class IndustrialSawmillRecipesProvider extends TechRebornRecipesProvider {
(ItemTags.CRIMSON_STEMS): Items.CRIMSON_PLANKS, (ItemTags.CRIMSON_STEMS): Items.CRIMSON_PLANKS,
(ItemTags.WARPED_STEMS): Items.WARPED_PLANKS, (ItemTags.WARPED_STEMS): Items.WARPED_PLANKS,
(ItemTags.MANGROVE_LOGS): Items.MANGROVE_PLANKS, (ItemTags.MANGROVE_LOGS): Items.MANGROVE_PLANKS,
(TRContent.RUBBER_LOGS): TRContent.RUBBER_PLANKS (TRContent.ItemTags.RUBBER_LOGS): TRContent.RUBBER_PLANKS
].each {logs, planks -> ].each {logs, planks ->
offerIndustrialSawmillRecipe { offerIndustrialSawmillRecipe {
ingredients logs ingredients logs

View file

@ -28,8 +28,7 @@ import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider
import net.fabricmc.fabric.api.mininglevel.v1.FabricMineableTags import net.fabricmc.fabric.api.mininglevel.v1.FabricMineableTags
import net.minecraft.tag.BlockTags import net.minecraft.tag.BlockTags
import techreborn.items.tool.DrillItem import techreborn.init.TRContent
import techreborn.items.tool.industrial.OmniToolItem
class TRBlockTagProvider extends FabricTagProvider.BlockTagProvider { class TRBlockTagProvider extends FabricTagProvider.BlockTagProvider {
@ -39,14 +38,99 @@ class TRBlockTagProvider extends FabricTagProvider.BlockTagProvider {
@Override @Override
protected void generateTags() { protected void generateTags() {
getOrCreateTagBuilder(DrillItem.DRILL_MINEABLE) getOrCreateTagBuilder(TRContent.BlockTags.DRILL_MINEABLE)
.addOptionalTag(BlockTags.PICKAXE_MINEABLE.id()) .addOptionalTag(BlockTags.PICKAXE_MINEABLE.id())
.addOptionalTag(BlockTags.SHOVEL_MINEABLE.id()) .addOptionalTag(BlockTags.SHOVEL_MINEABLE.id())
getOrCreateTagBuilder(OmniToolItem.OMNI_TOOL_MINEABLE) getOrCreateTagBuilder(TRContent.BlockTags.OMNI_TOOL_MINEABLE)
.addOptionalTag(DrillItem.DRILL_MINEABLE.id()) .addTag(TRContent.BlockTags.DRILL_MINEABLE)
.addOptionalTag(BlockTags.AXE_MINEABLE.id()) .addOptionalTag(BlockTags.AXE_MINEABLE.id())
.addOptionalTag(FabricMineableTags.SHEARS_MINEABLE.id()) .addOptionalTag(FabricMineableTags.SHEARS_MINEABLE.id())
.addOptionalTag(FabricMineableTags.SWORD_MINEABLE.id()) .addOptionalTag(FabricMineableTags.SWORD_MINEABLE.id())
getOrCreateTagBuilder(BlockTags.HOE_MINEABLE)
.add(TRContent.RUBBER_LEAVES)
TRContent.Ores.values().each {
getOrCreateTagBuilder(BlockTags.PICKAXE_MINEABLE)
.add(it.block)
}
TRContent.StorageBlocks.values().each {
getOrCreateTagBuilder(BlockTags.PICKAXE_MINEABLE)
.add(it.block)
}
TRContent.MachineBlocks.values().each {
getOrCreateTagBuilder(BlockTags.PICKAXE_MINEABLE)
.add(it.casing)
}
getOrCreateTagBuilder(BlockTags.FENCES)
.add(TRContent.RUBBER_FENCE)
.add(TRContent.REFINED_IRON_FENCE)
getOrCreateTagBuilder(BlockTags.GUARDED_BY_PIGLINS)
.add(TRContent.StorageBlocks.ELECTRUM.block)
getOrCreateTagBuilder(BlockTags.LEAVES)
.add(TRContent.RUBBER_LEAVES)
getOrCreateTagBuilder(TRContent.BlockTags.RUBBER_LOGS)
.add(TRContent.RUBBER_LOG)
.add(TRContent.RUBBER_LOG_STRIPPED)
.add(TRContent.RUBBER_WOOD)
.add(TRContent.STRIPPED_RUBBER_WOOD)
getOrCreateTagBuilder(BlockTags.LOGS_THAT_BURN)
.addTag(TRContent.BlockTags.RUBBER_LOGS)
getOrCreateTagBuilder(BlockTags.PLANKS)
.add(TRContent.RUBBER_PLANKS)
getOrCreateTagBuilder(BlockTags.SAPLINGS)
.add(TRContent.RUBBER_SAPLING)
getOrCreateTagBuilder(BlockTags.SLABS)
.add(TRContent.RUBBER_SLAB)
TRContent.StorageBlocks.values().each {
getOrCreateTagBuilder(BlockTags.SLABS)
.add(it.slabBlock)
}
getOrCreateTagBuilder(BlockTags.STAIRS)
.add(TRContent.RUBBER_STAIR)
TRContent.StorageBlocks.values().each {
getOrCreateTagBuilder(BlockTags.STAIRS)
.add(it.stairsBlock)
}
TRContent.StorageBlocks.values().each {
getOrCreateTagBuilder(BlockTags.WALLS)
.add(it.wallBlock)
}
getOrCreateTagBuilder(BlockTags.WOODEN_BUTTONS)
.add(TRContent.RUBBER_BUTTON)
getOrCreateTagBuilder(BlockTags.WOODEN_DOORS)
.add(TRContent.RUBBER_DOOR)
getOrCreateTagBuilder(BlockTags.WOODEN_FENCES)
.add(TRContent.RUBBER_FENCE)
getOrCreateTagBuilder(BlockTags.WOODEN_PRESSURE_PLATES)
.add(TRContent.RUBBER_PRESSURE_PLATE)
getOrCreateTagBuilder(BlockTags.WOODEN_SLABS)
.add(TRContent.RUBBER_SLAB)
getOrCreateTagBuilder(BlockTags.WOODEN_STAIRS)
.add(TRContent.RUBBER_STAIR)
getOrCreateTagBuilder(BlockTags.WOODEN_TRAPDOORS)
.add(TRContent.RUBBER_TRAPDOOR)
} }
} }

View file

@ -26,6 +26,8 @@ package techreborn.datagen.tags
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider.ItemTagProvider import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider.ItemTagProvider
import net.minecraft.tag.BlockTags
import net.minecraft.tag.ItemTags
import techreborn.init.TRContent import techreborn.init.TRContent
class TRItemTagProvider extends ItemTagProvider { class TRItemTagProvider extends ItemTagProvider {
@ -37,39 +39,136 @@ class TRItemTagProvider extends ItemTagProvider {
protected void generateTags() { protected void generateTags() {
TRContent.Ores.values().each { ore -> TRContent.Ores.values().each { ore ->
getOrCreateTagBuilder(ore.asTag()).add(ore.asItem()) getOrCreateTagBuilder(ore.asTag()).add(ore.asItem())
getOrCreateTagBuilder(TRContent.ORES_TAG).add(ore.asItem()) getOrCreateTagBuilder(TRContent.ItemTags.ORES).add(ore.asItem())
} }
TRContent.StorageBlocks.values().each { block -> TRContent.StorageBlocks.values().each { block ->
getOrCreateTagBuilder(block.asTag()).add(block.asItem()) getOrCreateTagBuilder(block.asTag()).add(block.asItem())
getOrCreateTagBuilder(TRContent.STORAGE_BLOCK_TAG).add(block.asItem()) getOrCreateTagBuilder(TRContent.ItemTags.STORAGE_BLOCK).add(block.asItem())
} }
TRContent.Dusts.values().each { dust -> TRContent.Dusts.values().each { dust ->
getOrCreateTagBuilder(dust.asTag()).add(dust.asItem()) getOrCreateTagBuilder(dust.asTag()).add(dust.asItem())
getOrCreateTagBuilder(TRContent.DUSTS_TAG).add(dust.asItem()) getOrCreateTagBuilder(TRContent.ItemTags.DUSTS).add(dust.asItem())
} }
TRContent.RawMetals.values().each { raw -> TRContent.RawMetals.values().each { raw ->
getOrCreateTagBuilder(raw.asTag()).add(raw.asItem()) getOrCreateTagBuilder(raw.asTag()).add(raw.asItem())
getOrCreateTagBuilder(TRContent.RAW_METALS_TAG).add(raw.asItem()) getOrCreateTagBuilder(TRContent.ItemTags.RAW_METALS).add(raw.asItem())
} }
TRContent.SmallDusts.values().each { smallDust -> TRContent.SmallDusts.values().each { smallDust ->
getOrCreateTagBuilder(smallDust.asTag()).add(smallDust.asItem()) getOrCreateTagBuilder(smallDust.asTag()).add(smallDust.asItem())
getOrCreateTagBuilder(TRContent.SMALL_DUSTS_TAG).add(smallDust.asItem()) getOrCreateTagBuilder(TRContent.ItemTags.SMALL_DUSTS).add(smallDust.asItem())
} }
TRContent.Gems.values().each { gem -> TRContent.Gems.values().each { gem ->
getOrCreateTagBuilder(gem.asTag()).add(gem.asItem()) getOrCreateTagBuilder(gem.asTag()).add(gem.asItem())
getOrCreateTagBuilder(TRContent.GEMS_TAG).add(gem.asItem()) getOrCreateTagBuilder(TRContent.ItemTags.GEMS).add(gem.asItem())
} }
TRContent.Ingots.values().each { ingot -> TRContent.Ingots.values().each { ingot ->
getOrCreateTagBuilder(ingot.asTag()).add(ingot.asItem()) getOrCreateTagBuilder(ingot.asTag()).add(ingot.asItem())
getOrCreateTagBuilder(TRContent.INGOTS_TAG).add(ingot.asItem()) getOrCreateTagBuilder(TRContent.ItemTags.INGOTS).add(ingot.asItem())
} }
TRContent.Nuggets.values().each { nugget -> TRContent.Nuggets.values().each { nugget ->
getOrCreateTagBuilder(nugget.asTag()).add(nugget.asItem()) getOrCreateTagBuilder(nugget.asTag()).add(nugget.asItem())
getOrCreateTagBuilder(TRContent.NUGGETS_TAG).add(nugget.asItem()) getOrCreateTagBuilder(TRContent.ItemTags.NUGGETS).add(nugget.asItem())
} }
TRContent.Plates.values().each { plate -> TRContent.Plates.values().each { plate ->
getOrCreateTagBuilder(plate.asTag()).add(plate.asItem()) getOrCreateTagBuilder(plate.asTag()).add(plate.asItem())
getOrCreateTagBuilder(TRContent.PLATES_TAG).add(plate.asItem()) getOrCreateTagBuilder(TRContent.ItemTags.PLATES).add(plate.asItem())
} }
getOrCreateTagBuilder(TRContent.ItemTags.RUBBER_LOGS)
.add(TRContent.RUBBER_LOG.asItem())
.add(TRContent.RUBBER_LOG_STRIPPED.asItem())
.add(TRContent.RUBBER_WOOD.asItem())
.add(TRContent.STRIPPED_RUBBER_WOOD.asItem())
getOrCreateTagBuilder(TRContent.ItemTags.RUBBER_LOGS)
.add(TRContent.RUBBER_LOG.asItem())
getOrCreateTagBuilder(ItemTags.BEACON_PAYMENT_ITEMS)
.addTag(TRContent.ItemTags.INGOTS)
getOrCreateTagBuilder(ItemTags.CLUSTER_MAX_HARVESTABLES)
.add(TRContent.BASIC_DRILL)
.add(TRContent.ADVANCED_DRILL)
.add(TRContent.INDUSTRIAL_DRILL)
.add(TRContent.OMNI_TOOL)
getOrCreateTagBuilder(ItemTags.FENCES)
.add(TRContent.RUBBER_FENCE.asItem())
.add(TRContent.REFINED_IRON_FENCE.asItem())
getOrCreateTagBuilder(ItemTags.FREEZE_IMMUNE_WEARABLES)
.add(TRContent.QUANTUM_BOOTS)
.add(TRContent.QUANTUM_CHESTPLATE)
.add(TRContent.QUANTUM_LEGGINGS)
.add(TRContent.QUANTUM_BOOTS)
getOrCreateTagBuilder(ItemTags.IGNORED_BY_PIGLIN_BABIES)
.add(TRContent.Nuggets.ELECTRUM.asItem())
.add(TRContent.Ingots.ELECTRUM.asItem())
getOrCreateTagBuilder(ItemTags.LEAVES)
.add(TRContent.RUBBER_LEAVES.asItem())
getOrCreateTagBuilder(ItemTags.LOGS_THAT_BURN)
.forceAddTag(TRContent.ItemTags.RUBBER_LOGS)
getOrCreateTagBuilder(ItemTags.PIGLIN_LOVED)
.add(TRContent.Plates.GOLD.asItem())
.add(TRContent.Cables.GOLD.asItem())
.add(TRContent.Cables.INSULATED_GOLD.asItem())
.add(TRContent.Ingots.ELECTRUM.asItem())
.add(TRContent.Plates.ELECTRUM.asItem())
.add(TRContent.StorageBlocks.ELECTRUM.asItem())
getOrCreateTagBuilder(ItemTags.PLANKS)
.add(TRContent.RUBBER_PLANKS.asItem())
getOrCreateTagBuilder(ItemTags.SAPLINGS)
.add(TRContent.RUBBER_SAPLING.asItem())
getOrCreateTagBuilder(ItemTags.SLABS)
.add(TRContent.RUBBER_SLAB.asItem())
getOrCreateTagBuilder(ItemTags.SLABS)
.add(TRContent.RUBBER_SLAB.asItem())
TRContent.StorageBlocks.values().each {
getOrCreateTagBuilder(ItemTags.SLABS)
.add(it.slabBlock.asItem())
}
getOrCreateTagBuilder(ItemTags.STAIRS)
.add(TRContent.RUBBER_STAIR.asItem())
TRContent.StorageBlocks.values().each {
getOrCreateTagBuilder(ItemTags.STAIRS)
.add(it.stairsBlock.asItem())
}
TRContent.StorageBlocks.values().each {
getOrCreateTagBuilder(ItemTags.WALLS)
.add(it.wallBlock.asItem())
}
getOrCreateTagBuilder(ItemTags.WOODEN_BUTTONS)
.add(TRContent.RUBBER_BUTTON.asItem())
getOrCreateTagBuilder(ItemTags.WOODEN_DOORS)
.add(TRContent.RUBBER_DOOR.asItem())
getOrCreateTagBuilder(ItemTags.WOODEN_FENCES)
.add(TRContent.RUBBER_FENCE.asItem())
getOrCreateTagBuilder(ItemTags.WOODEN_PRESSURE_PLATES)
.add(TRContent.RUBBER_PRESSURE_PLATE.asItem())
getOrCreateTagBuilder(ItemTags.WOODEN_SLABS)
.add(TRContent.RUBBER_SLAB.asItem())
getOrCreateTagBuilder(ItemTags.WOODEN_STAIRS)
.add(TRContent.RUBBER_STAIR.asItem())
getOrCreateTagBuilder(ItemTags.WOODEN_TRAPDOORS)
.add(TRContent.RUBBER_TRAPDOOR.asItem())
} }
} }

View file

@ -110,7 +110,6 @@ public class TRContent {
public static Block REINFORCED_GLASS; public static Block REINFORCED_GLASS;
public static Block RUBBER_LEAVES; public static Block RUBBER_LEAVES;
public static Block RUBBER_LOG; public static Block RUBBER_LOG;
public static TagKey<Item> RUBBER_LOGS = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "rubber_logs"));
public static Block RUBBER_SLAB; public static Block RUBBER_SLAB;
public static Block RUBBER_STAIR; public static Block RUBBER_STAIR;
public static Block RUBBER_PLANKS; public static Block RUBBER_PLANKS;
@ -264,6 +263,31 @@ public class TRContent {
@Nullable @Nullable
public static Item STEEL_BOOTS; public static Item STEEL_BOOTS;
public final static class BlockTags {
public static final TagKey<Block> RUBBER_LOGS = TagKey.of(Registry.BLOCK_KEY, new Identifier(TechReborn.MOD_ID, "rubber_logs"));
public static final TagKey<Block> OMNI_TOOL_MINEABLE = TagKey.of(Registry.BLOCK_KEY, new Identifier(TechReborn.MOD_ID, "mineable/omni_tool"));
public static final TagKey<Block> DRILL_MINEABLE = TagKey.of(Registry.BLOCK_KEY, new Identifier(TechReborn.MOD_ID, "mineable/drill"));
private BlockTags() {
}
}
public final static class ItemTags {
public static final TagKey<Item> RUBBER_LOGS = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "rubber_logs"));
public static final TagKey<Item> INGOTS = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "ingots"));
public static final TagKey<Item> ORES = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "ores"));
public static final TagKey<Item> STORAGE_BLOCK = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "storage_blocks"));
public static final TagKey<Item> DUSTS = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "dusts"));
public static final TagKey<Item> RAW_METALS = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "raw_metals"));
public static final TagKey<Item> SMALL_DUSTS = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "small_dusts"));
public static final TagKey<Item> GEMS = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "gems"));
public static final TagKey<Item> NUGGETS = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "nuggets"));
public static final TagKey<Item> PLATES = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "plates"));
private ItemTags() {
}
}
public enum SolarPanels implements ItemConvertible { public enum SolarPanels implements ItemConvertible {
BASIC(RcEnergyTier.MICRO, TechRebornConfig.basicGenerationRateD, TechRebornConfig.basicGenerationRateN), BASIC(RcEnergyTier.MICRO, TechRebornConfig.basicGenerationRateD, TechRebornConfig.basicGenerationRateN),
ADVANCED(RcEnergyTier.LOW, TechRebornConfig.advancedGenerationRateD, TechRebornConfig.advancedGenerationRateN), ADVANCED(RcEnergyTier.LOW, TechRebornConfig.advancedGenerationRateD, TechRebornConfig.advancedGenerationRateN),
@ -457,7 +481,7 @@ public class TRContent {
} }
} }
public static final TagKey<Item> ORES_TAG = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "ores"));
private final static Map<Ores, Ores> deepslateMap = new HashMap<>(); private final static Map<Ores, Ores> deepslateMap = new HashMap<>();
@ -569,8 +593,6 @@ public class TRContent {
*/ */
public static final String CHROME_TAG_NAME_BASE = "chromium"; public static final String CHROME_TAG_NAME_BASE = "chromium";
public static final TagKey<Item> STORAGE_BLOCK_TAG = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "storage_blocks"));
public enum StorageBlocks implements ItemConvertible, TagConvertible<Item> { public enum StorageBlocks implements ItemConvertible, TagConvertible<Item> {
ADVANCED_ALLOY(5f, 6f), ADVANCED_ALLOY(5f, 6f),
ALUMINUM(), ALUMINUM(),
@ -794,8 +816,6 @@ public class TRContent {
} }
} }
public static final TagKey<Item> DUSTS_TAG = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "dusts"));
public enum Dusts implements ItemConvertible, TagConvertible<Item> { public enum Dusts implements ItemConvertible, TagConvertible<Item> {
ALMANDINE, ALUMINUM, AMETHYST, ANDESITE, ANDRADITE, ASHES, BASALT, BAUXITE, BRASS, BRONZE, CALCITE, CHARCOAL, CHROME(CHROME_TAG_NAME_BASE), ALMANDINE, ALUMINUM, AMETHYST, ANDESITE, ANDRADITE, ASHES, BASALT, BAUXITE, BRASS, BRONZE, CALCITE, CHARCOAL, CHROME(CHROME_TAG_NAME_BASE),
CINNABAR, CLAY, COAL, DARK_ASHES, DIAMOND, DIORITE, ELECTRUM, EMERALD, ENDER_EYE, ENDER_PEARL, ENDSTONE, CINNABAR, CLAY, COAL, DARK_ASHES, DIAMOND, DIORITE, ELECTRUM, EMERALD, ENDER_EYE, ENDER_PEARL, ENDSTONE,
@ -837,8 +857,6 @@ public class TRContent {
} }
} }
public static final TagKey<Item> RAW_METALS_TAG = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "raw_metals"));
public enum RawMetals implements ItemConvertible, TagConvertible<Item> { public enum RawMetals implements ItemConvertible, TagConvertible<Item> {
IRIDIUM, LEAD, SILVER, TIN, TUNGSTEN; IRIDIUM, LEAD, SILVER, TIN, TUNGSTEN;
@ -916,8 +934,6 @@ public class TRContent {
} }
} }
public static final TagKey<Item> SMALL_DUSTS_TAG = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "small_dusts"));
public enum SmallDusts implements ItemConvertible, TagConvertible<Item> { public enum SmallDusts implements ItemConvertible, TagConvertible<Item> {
ALMANDINE, ANDESITE, ANDRADITE, ASHES, BASALT, BAUXITE, CALCITE, CHARCOAL, CHROME(CHROME_TAG_NAME_BASE), ALMANDINE, ANDESITE, ANDRADITE, ASHES, BASALT, BAUXITE, CALCITE, CHARCOAL, CHROME(CHROME_TAG_NAME_BASE),
CINNABAR, CLAY, COAL, DARK_ASHES, DIAMOND, DIORITE, ELECTRUM, EMERALD, ENDER_EYE, ENDER_PEARL, ENDSTONE, CINNABAR, CLAY, COAL, DARK_ASHES, DIAMOND, DIORITE, ELECTRUM, EMERALD, ENDER_EYE, ENDER_PEARL, ENDSTONE,
@ -997,8 +1013,6 @@ public class TRContent {
} }
} }
public static final TagKey<Item> GEMS_TAG = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "gems"));
public enum Gems implements ItemConvertible, TagConvertible<Item> { public enum Gems implements ItemConvertible, TagConvertible<Item> {
PERIDOT, RED_GARNET, RUBY("rubies"), SAPPHIRE("sapphires"), YELLOW_GARNET; PERIDOT, RED_GARNET, RUBY("rubies"), SAPPHIRE("sapphires"), YELLOW_GARNET;
@ -1101,7 +1115,6 @@ public class TRContent {
} }
} }
public static final TagKey<Item> INGOTS_TAG = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "ingots"));
public enum Ingots implements ItemConvertible, TagConvertible<Item> { public enum Ingots implements ItemConvertible, TagConvertible<Item> {
ADVANCED_ALLOY, ALUMINUM, BRASS, BRONZE, CHROME(CHROME_TAG_NAME_BASE), ELECTRUM, HOT_TUNGSTENSTEEL, INVAR, IRIDIUM_ALLOY, IRIDIUM, ADVANCED_ALLOY, ALUMINUM, BRASS, BRONZE, CHROME(CHROME_TAG_NAME_BASE), ELECTRUM, HOT_TUNGSTENSTEEL, INVAR, IRIDIUM_ALLOY, IRIDIUM,
@ -1200,8 +1213,6 @@ public class TRContent {
} }
} }
public static final TagKey<Item> NUGGETS_TAG = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "nuggets"));
public enum Nuggets implements ItemConvertible, TagConvertible<Item> { public enum Nuggets implements ItemConvertible, TagConvertible<Item> {
ALUMINUM, BRASS, BRONZE, CHROME(CHROME_TAG_NAME_BASE), COPPER(Items.COPPER_INGOT, false), DIAMOND(Items.DIAMOND, true), ALUMINUM, BRASS, BRONZE, CHROME(CHROME_TAG_NAME_BASE), COPPER(Items.COPPER_INGOT, false), DIAMOND(Items.DIAMOND, true),
ELECTRUM, EMERALD(Items.EMERALD, true), HOT_TUNGSTENSTEEL, INVAR, IRIDIUM, LEAD, ELECTRUM, EMERALD(Items.EMERALD, true), HOT_TUNGSTENSTEEL, INVAR, IRIDIUM, LEAD,
@ -1359,8 +1370,6 @@ public class TRContent {
} }
} }
public static final TagKey<Item> PLATES_TAG = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "plates"));
public enum Plates implements ItemConvertible, TagConvertible<Item> { public enum Plates implements ItemConvertible, TagConvertible<Item> {
ADVANCED_ALLOY, ADVANCED_ALLOY,
ALUMINUM, ALUMINUM,

View file

@ -24,27 +24,27 @@
package techreborn.items.tool; package techreborn.items.tool;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.enchantment.Enchantments; import net.minecraft.enchantment.Enchantments;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.item.*; import net.minecraft.item.Item;
import net.minecraft.tag.TagKey; import net.minecraft.item.ItemGroup;
import net.minecraft.util.Identifier; import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.item.MiningToolItem;
import net.minecraft.item.ToolMaterial;
import net.minecraft.util.collection.DefaultedList; import net.minecraft.util.collection.DefaultedList;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.World; import net.minecraft.world.World;
import reborncore.common.powerSystem.RcEnergyItem; import reborncore.common.powerSystem.RcEnergyItem;
import reborncore.common.powerSystem.RcEnergyTier; import reborncore.common.powerSystem.RcEnergyTier;
import reborncore.common.util.ItemUtils; import reborncore.common.util.ItemUtils;
import techreborn.TechReborn; import techreborn.TechReborn;
import techreborn.init.TRContent;
import techreborn.utils.InitUtils; import techreborn.utils.InitUtils;
public class DrillItem extends MiningToolItem implements RcEnergyItem { public class DrillItem extends MiningToolItem implements RcEnergyItem {
public static final TagKey<Block> DRILL_MINEABLE = TagKey.of(Registry.BLOCK_KEY, new Identifier(TechReborn.MOD_ID, "mineable/drill"));
public final int maxCharge; public final int maxCharge;
public final int cost; public final int cost;
public final float poweredSpeed; public final float poweredSpeed;
@ -54,7 +54,7 @@ public class DrillItem extends MiningToolItem implements RcEnergyItem {
public DrillItem(ToolMaterial material, int energyCapacity, RcEnergyTier tier, int cost, float poweredSpeed, float unpoweredSpeed, MiningLevel miningLevel) { public DrillItem(ToolMaterial material, int energyCapacity, RcEnergyTier tier, int cost, float poweredSpeed, float unpoweredSpeed, MiningLevel miningLevel) {
// combat stats same as for diamond pickaxe. Fix for #2468 // combat stats same as for diamond pickaxe. Fix for #2468
super(1, -2.8F, material, DRILL_MINEABLE, new Item.Settings().group(TechReborn.ITEMGROUP).maxCount(1).maxDamage(-1)); super(1, -2.8F, material, TRContent.BlockTags.DRILL_MINEABLE, new Item.Settings().group(TechReborn.ITEMGROUP).maxCount(1).maxDamage(-1));
this.maxCharge = energyCapacity; this.maxCharge = energyCapacity;
this.cost = cost; this.cost = cost;
this.poweredSpeed = poweredSpeed; this.poweredSpeed = poweredSpeed;

View file

@ -24,18 +24,19 @@
package techreborn.items.tool.industrial; package techreborn.items.tool.industrial;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.*; import net.minecraft.item.Item;
import net.minecraft.tag.TagKey; import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUsageContext;
import net.minecraft.item.Items;
import net.minecraft.item.MiningToolItem;
import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResult;
import net.minecraft.util.Identifier;
import net.minecraft.util.collection.DefaultedList; import net.minecraft.util.collection.DefaultedList;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.World; import net.minecraft.world.World;
import reborncore.common.powerSystem.RcEnergyItem; import reborncore.common.powerSystem.RcEnergyItem;
import reborncore.common.powerSystem.RcEnergyTier; import reborncore.common.powerSystem.RcEnergyTier;
@ -49,8 +50,6 @@ import techreborn.items.tool.MiningLevel;
import techreborn.utils.InitUtils; import techreborn.utils.InitUtils;
public class OmniToolItem extends MiningToolItem implements RcEnergyItem { public class OmniToolItem extends MiningToolItem implements RcEnergyItem {
public static final TagKey<Block> OMNI_TOOL_MINEABLE = TagKey.of(Registry.BLOCK_KEY, new Identifier(TechReborn.MOD_ID, "mineable/omni_tool"));
public final int maxCharge = TechRebornConfig.omniToolCharge; public final int maxCharge = TechRebornConfig.omniToolCharge;
public int cost = TechRebornConfig.omniToolCost; public int cost = TechRebornConfig.omniToolCost;
public int hitCost = TechRebornConfig.omniToolHitCost; public int hitCost = TechRebornConfig.omniToolHitCost;
@ -58,7 +57,7 @@ public class OmniToolItem extends MiningToolItem implements RcEnergyItem {
// 4M FE max charge with 1k charge rate // 4M FE max charge with 1k charge rate
public OmniToolItem() { public OmniToolItem() {
super(3, 1, TRToolMaterials.OMNI_TOOL, OMNI_TOOL_MINEABLE, new Item.Settings().group(TechReborn.ITEMGROUP).maxCount(1).maxDamage(-1)); super(3, 1, TRToolMaterials.OMNI_TOOL, TRContent.BlockTags.OMNI_TOOL_MINEABLE, new Item.Settings().group(TechReborn.ITEMGROUP).maxCount(1).maxDamage(-1));
this.miningLevel = MiningLevel.DIAMOND.intLevel; this.miningLevel = MiningLevel.DIAMOND.intLevel;
} }

View file

@ -1,7 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_fence",
"techreborn:refined_iron_fence"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:electrum_storage_block"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_leaves"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"#techreborn:rubber_logs"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_leaves"
]
}

View file

@ -1,67 +0,0 @@
{
"replace": false,
"values": [
"techreborn:bauxite_ore",
"techreborn:deepslate_bauxite_ore",
"techreborn:cinnabar_ore",
"techreborn:galena_ore",
"techreborn:deepslate_galena_ore",
"techreborn:iridium_ore",
"techreborn:deepslate_iridium_ore",
"techreborn:lead_ore",
"techreborn:deepslate_lead_ore",
"techreborn:peridot_ore",
"techreborn:deepslate_peridot_ore",
"techreborn:pyrite_ore",
"techreborn:ruby_ore",
"techreborn:deepslate_ruby_ore",
"techreborn:sapphire_ore",
"techreborn:deepslate_sapphire_ore",
"techreborn:sheldonite_ore",
"techreborn:deepslate_sheldonite_ore",
"techreborn:silver_ore",
"techreborn:deepslate_silver_ore",
"techreborn:sodalite_ore",
"techreborn:deepslate_sodalite_ore",
"techreborn:sphalerite_ore",
"techreborn:tin_ore",
"techreborn:deepslate_tin_ore",
"techreborn:tungsten_ore",
"techreborn:deepslate_tungsten_ore",
"techreborn:hot_tungstensteel_storage_block",
"techreborn:iridium_storage_block",
"techreborn:iridium_reinforced_stone_storage_block",
"techreborn:iridium_reinforced_tungstensteel_storage_block",
"techreborn:raw_iridium_storage_block",
"techreborn:raw_tungsten_storage_block",
"techreborn:titanium_storage_block",
"techreborn:tungsten_storage_block",
"techreborn:tungstensteel_storage_block",
"techreborn:advanced_alloy_storage_block",
"techreborn:aluminum_storage_block",
"techreborn:brass_storage_block",
"techreborn:bronze_storage_block",
"techreborn:chrome_storage_block",
"techreborn:electrum_storage_block",
"techreborn:invar_storage_block",
"techreborn:lead_storage_block",
"techreborn:nickel_storage_block",
"techreborn:peridot_storage_block",
"techreborn:platinum_storage_block",
"techreborn:raw_lead_storage_block",
"techreborn:raw_silver_storage_block",
"techreborn:raw_tin_storage_block",
"techreborn:red_garnet_storage_block",
"techreborn:refined_iron_storage_block",
"techreborn:ruby_storage_block",
"techreborn:sapphire_storage_block",
"techreborn:silver_storage_block",
"techreborn:steel_storage_block",
"techreborn:tin_storage_block",
"techreborn:yellow_garnet_storage_block",
"techreborn:zinc_storage_block",
"techreborn:basic_machine_casing",
"techreborn:advanced_machine_casing",
"techreborn:industrial_machine_casing"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_planks"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_sapling"
]
}

View file

@ -1,38 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_slab",
"techreborn:advanced_alloy_storage_block_slab",
"techreborn:aluminum_storage_block_slab",
"techreborn:brass_storage_block_slab",
"techreborn:bronze_storage_block_slab",
"techreborn:chrome_storage_block_slab",
"techreborn:electrum_storage_block_slab",
"techreborn:hot_tungstensteel_storage_block_slab",
"techreborn:invar_storage_block_slab",
"techreborn:raw_iridium_storage_block_slab",
"techreborn:iridium_storage_block_slab",
"techreborn:iridium_reinforced_stone_storage_block_slab",
"techreborn:iridium_reinforced_tungstensteel_storage_block_slab",
"techreborn:raw_lead_storage_block_slab",
"techreborn:lead_storage_block_slab",
"techreborn:nickel_storage_block_slab",
"techreborn:peridot_storage_block_slab",
"techreborn:platinum_storage_block_slab",
"techreborn:red_garnet_storage_block_slab",
"techreborn:refined_iron_storage_block_slab",
"techreborn:ruby_storage_block_slab",
"techreborn:sapphire_storage_block_slab",
"techreborn:raw_silver_storage_block_slab",
"techreborn:silver_storage_block_slab",
"techreborn:steel_storage_block_slab",
"techreborn:raw_tin_storage_block_slab",
"techreborn:tin_storage_block_slab",
"techreborn:titanium_storage_block_slab",
"techreborn:raw_tungsten_storage_block_slab",
"techreborn:tungsten_storage_block_slab",
"techreborn:tungstensteel_storage_block_slab",
"techreborn:yellow_garnet_storage_block_slab",
"techreborn:zinc_storage_block_slab"
]
}

View file

@ -1,38 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_stair",
"techreborn:advanced_alloy_storage_block_stairs",
"techreborn:aluminum_storage_block_stairs",
"techreborn:brass_storage_block_stairs",
"techreborn:bronze_storage_block_stairs",
"techreborn:chrome_storage_block_stairs",
"techreborn:electrum_storage_block_stairs",
"techreborn:hot_tungstensteel_storage_block_stairs",
"techreborn:invar_storage_block_stairs",
"techreborn:raw_iridium_storage_block_stairs",
"techreborn:iridium_storage_block_stairs",
"techreborn:iridium_reinforced_stone_storage_block_stairs",
"techreborn:iridium_reinforced_tungstensteel_storage_block_stairs",
"techreborn:raw_lead_storage_block_stairs",
"techreborn:lead_storage_block_stairs",
"techreborn:nickel_storage_block_stairs",
"techreborn:peridot_storage_block_stairs",
"techreborn:platinum_storage_block_stairs",
"techreborn:red_garnet_storage_block_stairs",
"techreborn:refined_iron_storage_block_stairs",
"techreborn:ruby_storage_block_stairs",
"techreborn:sapphire_storage_block_stairs",
"techreborn:raw_silver_storage_block_stairs",
"techreborn:silver_storage_block_stairs",
"techreborn:steel_storage_block_stairs",
"techreborn:raw_tin_storage_block_stairs",
"techreborn:tin_storage_block_stairs",
"techreborn:titanium_storage_block_stairs",
"techreborn:raw_tungsten_storage_block_stairs",
"techreborn:tungsten_storage_block_stairs",
"techreborn:tungstensteel_storage_block_stairs",
"techreborn:yellow_garnet_storage_block_stairs",
"techreborn:zinc_storage_block_stairs"
]
}

View file

@ -1,38 +0,0 @@
{
"replace": false,
"values": [
"techreborn:advanced_alloy_storage_block_wall",
"techreborn:aluminum_storage_block_wall",
"techreborn:brass_storage_block_wall",
"techreborn:bronze_storage_block_wall",
"techreborn:chrome_storage_block_wall",
"techreborn:copper_wall",
"techreborn:electrum_storage_block_wall",
"techreborn:hot_tungstensteel_storage_block_wall",
"techreborn:invar_storage_block_wall",
"techreborn:raw_iridium_storage_block_wall",
"techreborn:iridium_storage_block_wall",
"techreborn:iridium_reinforced_stone_storage_block_wall",
"techreborn:iridium_reinforced_tungstensteel_storage_block_wall",
"techreborn:raw_lead_storage_block_wall",
"techreborn:lead_storage_block_wall",
"techreborn:nickel_storage_block_wall",
"techreborn:peridot_storage_block_wall",
"techreborn:platinum_storage_block_wall",
"techreborn:red_garnet_storage_block_wall",
"techreborn:refined_iron_storage_block_wall",
"techreborn:ruby_storage_block_wall",
"techreborn:sapphire_storage_block_wall",
"techreborn:raw_silver_storage_block_wall",
"techreborn:silver_storage_block_wall",
"techreborn:steel_storage_block_wall",
"techreborn:tin_storage_block_wall",
"techreborn:raw_tin_storage_block_wall",
"techreborn:titanium_storage_block_wall",
"techreborn:raw_tungsten_storage_block_wall",
"techreborn:tungsten_storage_block_wall",
"techreborn:tungstensteel_storage_block_wall",
"techreborn:yellow_garnet_storage_block_wall",
"techreborn:zinc_storage_block_wall"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_button"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_door"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_fence"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_pressure_plate"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_slab"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_stair"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_trapdoor"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"#techreborn:ingots"
]
}

View file

@ -1,9 +0,0 @@
{
"replace": false,
"values": [
"techreborn:basic_drill",
"techreborn:advanced_drill",
"techreborn:industrial_drill",
"techreborn:omni_tool"
]
}

View file

@ -1,7 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_fence",
"techreborn:refined_iron_fence"
]
}

View file

@ -1,9 +0,0 @@
{
"replace": false,
"values": [
"techreborn:quantum_helmet",
"techreborn:quantum_chestplate",
"techreborn:quantum_leggings",
"techreborn:quantum_boots"
]
}

View file

@ -1,7 +0,0 @@
{
"replace": false,
"values": [
"techreborn:electrum_nugget",
"techreborn:electrum_ingot"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_leaves"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"#techreborn:rubber_logs"
]
}

View file

@ -1,11 +0,0 @@
{
"replace": false,
"values": [
"techreborn:gold_plate",
"techreborn:gold_cable",
"techreborn:insulated_gold_cable",
"techreborn:electrum_ingot",
"techreborn:electrum_plate",
"techreborn:electrum_storage_block"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_planks"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_sapling"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_slab"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_stair"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_button"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_door"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_fence"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_pressure_plate"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_slab"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_stair"
]
}

View file

@ -1,6 +0,0 @@
{
"replace": false,
"values": [
"techreborn:rubber_trapdoor"
]
}

View file

@ -1,8 +0,0 @@
{
"values": [
"techreborn:rubber_log",
"techreborn:rubber_log_stripped",
"techreborn:rubber_wood",
"techreborn:stripped_rubber_wood"
]
}

View file

@ -1,8 +0,0 @@
{
"values": [
"techreborn:rubber_log",
"techreborn:rubber_log_stripped",
"techreborn:rubber_wood",
"techreborn:stripped_rubber_wood"
]
}