diff --git a/build.gradle b/build.gradle index 45a4a74..ee59b95 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,6 @@ loom { // this will be added to the jar manifest as well! mixinConfigs = [ "cosmiccore.mixins.json" - ] // missing access transformers? @@ -47,12 +46,7 @@ loom { runConfigs.named("data").configure { programArg("--existing=" + file("src/main/resources").absolutePath) programArgs("--client", "--server") - - - } - - } repositories { @@ -165,10 +159,11 @@ dependencies { // Mixin Extras implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${project.mixinextras_version}")) implementation(include("io.github.llamalad7:mixinextras-forge:${project.mixinextras_version}")) + annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' // lombok - compileOnly 'org.projectlombok:lombok:1.18.24' - annotationProcessor 'org.projectlombok:lombok:1.18.24' + compileOnly 'org.projectlombok:lombok:1.18.32' + annotationProcessor 'org.projectlombok:lombok:1.18.32' } processResources { diff --git a/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/AdvancedNanoMuscleSpaceSuite.java b/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/AdvancedNanoMuscleSpaceSuite.java new file mode 100644 index 0000000..cd5f985 --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/AdvancedNanoMuscleSpaceSuite.java @@ -0,0 +1,28 @@ +package com.ghostipedia.cosmiccore.api.item.armor; + +import com.gregtechceu.gtceu.common.item.armor.AdvancedNanoMuscleSuite; +import net.minecraft.network.chat.Component; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; + +import java.util.List; + +public class AdvancedNanoMuscleSpaceSuite extends AdvancedNanoMuscleSuite implements ISpaceSuite { + + public AdvancedNanoMuscleSpaceSuite(int energyPerUse, long capacity, int tier) { + super(energyPerUse, capacity, tier); + } + + @Override + public void onArmorTick(Level world, Player player, ItemStack itemStack) { + super.onArmorTick(world, player, itemStack); + onArmorTick(world, player, itemStack, type); + } + + @Override + public void addInfo(ItemStack itemStack, List lines) { + super.addInfo(itemStack, lines); + addInfo(itemStack, lines, type); + } +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/AdvancedQuarkTechSpaceSuite.java b/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/AdvancedQuarkTechSpaceSuite.java new file mode 100644 index 0000000..021649d --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/AdvancedQuarkTechSpaceSuite.java @@ -0,0 +1,28 @@ +package com.ghostipedia.cosmiccore.api.item.armor; + +import com.gregtechceu.gtceu.common.item.armor.AdvancedQuarkTechSuite; +import net.minecraft.network.chat.Component; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; + +import java.util.List; + +public class AdvancedQuarkTechSpaceSuite extends AdvancedQuarkTechSuite implements ISpaceSuite { + + public AdvancedQuarkTechSpaceSuite(int energyPerUse, long capacity, int tier) { + super(energyPerUse, capacity, tier); + } + + @Override + public void onArmorTick(Level world, Player player, ItemStack itemStack) { + super.onArmorTick(world, player, itemStack); + onArmorTick(world, player, itemStack, type); + } + + @Override + public void addInfo(ItemStack itemStack, List lines) { + super.addInfo(itemStack, lines); + addInfo(itemStack, lines, type); + } +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/ISpaceSuite.java b/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/ISpaceSuite.java new file mode 100644 index 0000000..a51c263 --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/ISpaceSuite.java @@ -0,0 +1,68 @@ +package com.ghostipedia.cosmiccore.api.item.armor; + +import com.ghostipedia.cosmiccore.common.data.tag.item.CosmicItemTags; +import earth.terrarium.adastra.api.systems.OxygenApi; +import earth.terrarium.adastra.common.constants.ConstantComponents; +import earth.terrarium.adastra.common.registry.ModFluids; +import earth.terrarium.adastra.common.utils.FluidUtils; +import earth.terrarium.adastra.common.utils.TooltipUtils; +import earth.terrarium.botarium.common.fluid.FluidConstants; +import net.minecraft.network.chat.Component; +import net.minecraft.tags.FluidTags; +import net.minecraft.tags.TagKey; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ArmorItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; + +import java.util.List; +import java.util.stream.StreamSupport; + +public interface ISpaceSuite { + + default void tickOxygen(Level Level, Player player, ItemStack itemStack) { + if (Level.isClientSide) return; + if (player.isCreative() || player.isSpectator()) return; + if (!(itemStack.getItem() instanceof SpaceArmorComponentItem suit)) return; + if (!hasFullNanoSet(player) && !hasFullQuantumSet(player)) return; + player.setTicksFrozen(0); + if (player.tickCount % 12 == 0 && suit.hasOxygen(player)) { + if (!OxygenApi.API.hasOxygen(player)) suit.consumeOxygen(itemStack, 1); + if (player.isEyeInFluid(FluidTags.WATER)) { + suit.consumeOxygen(itemStack, 1); + player.setAirSupply(Math.min(player.getMaxAirSupply(), player.getAirSupply() + 4 * 10)); + } + } + } + + static boolean hasFullNanoSet(LivingEntity entity) { + return hasFullSet(entity, CosmicItemTags.NANOMUSCLE_SPACE_SUITE); + } + + static boolean hasFullQuantumSet(LivingEntity entity) { + return hasFullSet(entity, CosmicItemTags.QUARKTECH_SPACE_SUITE); + } + + static boolean hasFullSet(LivingEntity entity, TagKey tagKey) { + return StreamSupport.stream(entity.getArmorSlots().spliterator(), false) + .allMatch(itemStack -> itemStack.is(tagKey)); + } + + + default void onArmorTick(Level Level, Player player, ItemStack itemStack, ArmorItem.Type type) { + if (type == ArmorItem.Type.CHESTPLATE) this.tickOxygen(Level, player, itemStack); + } + + default void addInfo(ItemStack itemStack, List lines, ArmorItem.Type type) { + if (type == ArmorItem.Type.CHESTPLATE && itemStack.getItem() instanceof SpaceArmorComponentItem suit) { + lines.add(TooltipUtils.getFluidComponent( + FluidUtils.getTank(itemStack), + FluidConstants.fromMillibuckets(suit.getFluidContainer(itemStack).getTankCapacity(0)), + ModFluids.OXYGEN.get())); + TooltipUtils.addDescriptionComponent(lines, ConstantComponents.SPACE_SUIT_INFO); + } + } + +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/NanoMuscleSpaceSuite.java b/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/NanoMuscleSpaceSuite.java new file mode 100644 index 0000000..88b4002 --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/NanoMuscleSpaceSuite.java @@ -0,0 +1,34 @@ +package com.ghostipedia.cosmiccore.api.item.armor; + +import com.gregtechceu.gtceu.common.item.armor.NanoMuscleSuite; +import earth.terrarium.adastra.common.constants.ConstantComponents; +import earth.terrarium.adastra.common.registry.ModFluids; +import earth.terrarium.adastra.common.utils.FluidUtils; +import earth.terrarium.adastra.common.utils.TooltipUtils; +import earth.terrarium.botarium.common.fluid.FluidConstants; +import net.minecraft.network.chat.Component; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ArmorItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; + +import java.util.List; + +public class NanoMuscleSpaceSuite extends NanoMuscleSuite implements ISpaceSuite { + + public NanoMuscleSpaceSuite(ArmorItem.Type slot, int energyPerUse, long maxCapacity, int tier) { + super(slot, energyPerUse, maxCapacity, tier); + } + + @Override + public void onArmorTick(Level world, Player player, ItemStack itemStack) { + super.onArmorTick(world, player, itemStack); + onArmorTick(world, player, itemStack, type); + } + + @Override + public void addInfo(ItemStack itemStack, List lines) { + super.addInfo(itemStack, lines); + addInfo(itemStack, lines, type); + } +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/QuarkTechSpaceSuite.java b/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/QuarkTechSpaceSuite.java new file mode 100644 index 0000000..6a0c546 --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/QuarkTechSpaceSuite.java @@ -0,0 +1,29 @@ +package com.ghostipedia.cosmiccore.api.item.armor; + +import com.gregtechceu.gtceu.common.item.armor.QuarkTechSuite; +import net.minecraft.network.chat.Component; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ArmorItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; + +import java.util.List; + +public class QuarkTechSpaceSuite extends QuarkTechSuite implements ISpaceSuite{ + + public QuarkTechSpaceSuite(ArmorItem.Type slot, int energyPerUse, long capacity, int tier) { + super(slot, energyPerUse, capacity, tier); + } + + @Override + public void onArmorTick(Level world, Player player, ItemStack itemStack) { + super.onArmorTick(world, player, itemStack); + onArmorTick(world, player, itemStack, type); + } + + @Override + public void addInfo(ItemStack itemStack, List lines) { + super.addInfo(itemStack, lines); + addInfo(itemStack, lines, type); + } +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/SpaceArmorComponentItem.java b/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/SpaceArmorComponentItem.java new file mode 100644 index 0000000..150aabd --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/api/item/armor/SpaceArmorComponentItem.java @@ -0,0 +1,93 @@ +package com.ghostipedia.cosmiccore.api.item.armor; + +import com.gregtechceu.gtceu.api.item.armor.ArmorComponentItem; +import com.gregtechceu.gtceu.api.item.armor.IArmorLogic; +import com.gregtechceu.gtceu.api.item.component.IDurabilityBar; +import com.gregtechceu.gtceu.api.item.component.IItemComponent; +import earth.terrarium.adastra.common.tags.ModFluidTags; +import earth.terrarium.adastra.common.utils.FluidUtils; +import earth.terrarium.botarium.common.fluid.FluidConstants; +import earth.terrarium.botarium.common.fluid.base.BotariumFluidItem; +import earth.terrarium.botarium.common.fluid.base.FluidContainer; +import earth.terrarium.botarium.common.fluid.base.FluidHolder; +import earth.terrarium.botarium.common.fluid.impl.SimpleFluidContainer; +import earth.terrarium.botarium.common.fluid.impl.WrappedItemFluidContainer; +import earth.terrarium.botarium.common.fluid.utils.ClientFluidHooks; +import earth.terrarium.botarium.common.item.ItemStackHolder; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ArmorMaterial; +import net.minecraft.world.item.ItemStack; + +import java.util.List; + +public class SpaceArmorComponentItem extends ArmorComponentItem implements BotariumFluidItem { + + protected final long tankSize; + + public SpaceArmorComponentItem(ArmorMaterial material, Type type, long size, Properties properties) { + super(material, type, properties); + this.tankSize = size; + } + + @Override + public void attachComponents(IItemComponent... components) { + super.attachComponents(components); + + IDurabilityBar durabilityBar = new IDurabilityBar() { + @Override + public int getBarColor(ItemStack stack) { + return ClientFluidHooks.getFluidColor(FluidUtils.getTank(stack)); + } + + @Override + public int getBarWidth(ItemStack stack) { + var fluidContainer = getFluidContainer(stack); + return (int) (((double) fluidContainer.getFirstFluid().getFluidAmount() / fluidContainer.getTankCapacity(0)) * 13); + } + + @Override + public boolean isBarVisible(ItemStack stack) { + return FluidUtils.hasFluid(stack); + } + + @Override + public boolean showEmptyBar(ItemStack itemStack) { + return false; + } + }; + + this.components.add(durabilityBar); + durabilityBar.onAttached(this); + } + + public SpaceArmorComponentItem setArmorLogic(IArmorLogic armorLogic) { + return (SpaceArmorComponentItem) super.setArmorLogic(armorLogic); + } + + @Override + public WrappedItemFluidContainer getFluidContainer(ItemStack holder) { + return new WrappedItemFluidContainer(holder, + new SimpleFluidContainer(FluidConstants.fromMillibuckets(tankSize), 1, (t, f) -> f.is(ModFluidTags.OXYGEN))); + } + + public long getOxygenAmount(Entity entity) { + if (!(entity instanceof LivingEntity livingEntity)) return 0; + var stack = livingEntity.getItemBySlot(EquipmentSlot.CHEST); + if (!(stack.getItem() instanceof SpaceArmorComponentItem suit)) return 0; + return suit.getFluidContainer(stack).getFirstFluid().getFluidAmount(); + } + + public boolean hasOxygen(Entity entity) { + return getOxygenAmount(entity) > FluidConstants.fromMillibuckets(1); + } + + public void consumeOxygen(ItemStack stack, long amount) { + ItemStackHolder holder = new ItemStackHolder(stack); + var container = FluidContainer.of(holder); + if (container == null) return; + FluidHolder extracted = container.extractFluid(container.getFirstFluid().copyWithAmount(FluidConstants.fromMillibuckets(amount)), false); + if (holder.isDirty() || extracted.getFluidAmount() > 0) stack.setTag(holder.getStack().getTag()); + } +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/api/item/component/FluidStats.java b/src/main/java/com/ghostipedia/cosmiccore/api/item/component/FluidStats.java new file mode 100644 index 0000000..7251a09 --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/api/item/component/FluidStats.java @@ -0,0 +1,9 @@ +package com.ghostipedia.cosmiccore.api.item.component; + +import com.gregtechceu.gtceu.api.capability.GTCapabilityHelper; + +public class FluidStats { + public FluidStats() { + + } +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicCoreDatagen.java b/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicCoreDatagen.java index a5192ca..807bc7d 100644 --- a/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicCoreDatagen.java +++ b/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicCoreDatagen.java @@ -2,16 +2,19 @@ import com.ghostipedia.cosmiccore.api.registries.CosmicRegistration; import com.ghostipedia.cosmiccore.common.data.lang.CosmicLangHandler; +import com.ghostipedia.cosmiccore.common.data.tag.CosmicTagsHandler; import com.gregtechceu.gtceu.common.registry.GTRegistration; +import com.gregtechceu.gtceu.data.tags.TagsHandler; import com.tterrag.registrate.providers.ProviderType; public class CosmicCoreDatagen { + public static void init() { - //TODO: IDK IF I NEED THESE YET, MIGHT BE NEEDED IDK -// CosmicRegistration.REGISTRATE.addDataGenerator(ProviderType.ITEM_TAGS, TagsHandler::initItem); -// CosmicRegistration.REGISTRATE.addDataGenerator(ProviderType.BLOCK_TAGS, TagsHandler::initBlock); -// CosmicRegistration.REGISTRATE.addDataGenerator(ProviderType.FLUID_TAGS, TagsHandler::initFluid); -// CosmicRegistration.REGISTRATE.addDataGenerator(ProviderType.ENTITY_TAGS, TagsHandler::initEntity); + CosmicRegistration.REGISTRATE.addDataGenerator(ProviderType.ITEM_TAGS, CosmicTagsHandler::initItem); + CosmicRegistration.REGISTRATE.addDataGenerator(ProviderType.BLOCK_TAGS, CosmicTagsHandler::initBlock); + CosmicRegistration.REGISTRATE.addDataGenerator(ProviderType.FLUID_TAGS, CosmicTagsHandler::initFluid); + CosmicRegistration.REGISTRATE.addDataGenerator(ProviderType.ENTITY_TAGS, CosmicTagsHandler::initEntity); CosmicRegistration.REGISTRATE.addDataGenerator(ProviderType.LANG, CosmicLangHandler::init); } + } diff --git a/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicItems.java b/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicItems.java index c2c74ce..499bfc4 100644 --- a/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicItems.java +++ b/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicItems.java @@ -1,10 +1,16 @@ package com.ghostipedia.cosmiccore.common.data; +import com.ghostipedia.cosmiccore.api.item.armor.*; import com.ghostipedia.cosmiccore.api.registries.CosmicRegistration; +import com.ghostipedia.cosmiccore.common.data.tag.item.CosmicItemTags; import com.gregtechceu.gtceu.api.item.ComponentItem; import com.gregtechceu.gtceu.api.item.component.IItemComponent; +import com.gregtechceu.gtceu.common.item.armor.GTArmorMaterials; +import com.gregtechceu.gtceu.config.ConfigHolder; import com.tterrag.registrate.util.entry.ItemEntry; import com.tterrag.registrate.util.nullness.NonNullConsumer; +import net.minecraft.world.item.ArmorItem; +import net.minecraft.world.item.Rarity; import static com.ghostipedia.cosmiccore.api.registries.CosmicRegistration.REGISTRATE; @@ -146,6 +152,40 @@ public class CosmicItems { .defaultModel() .register(); + // Space Suite + public static ItemEntry SPACE_NANO_CHESTPLATE = REGISTRATE.item("space_nanomuscle_chestplate", (p) -> new SpaceArmorComponentItem(GTArmorMaterials.ARMOR, ArmorItem.Type.CHESTPLATE, 5000, p) + .setArmorLogic(new NanoMuscleSpaceSuite(ArmorItem.Type.CHESTPLATE, 512, + 6_400_000L * (long) Math.max(1, Math.pow(4, ConfigHolder.INSTANCE.tools.voltageTierNanoSuit - 3)), + ConfigHolder.INSTANCE.tools.voltageTierNanoSuit))) + .tag(CosmicItemTags.NANOMUSCLE_SPACE_SUITE) + .lang("NanoMuscle™ Space Suite Chestplate") + .properties(p -> p.rarity(Rarity.RARE)) + .register(); + public static ItemEntry ADVANCED_SPACE_NANO_CHESTPLATE = REGISTRATE.item("space_advanced_nanomuscle_chestplate", (p) -> new SpaceArmorComponentItem(GTArmorMaterials.ARMOR, ArmorItem.Type.CHESTPLATE, 10000, p) + .setArmorLogic(new AdvancedNanoMuscleSpaceSuite(512, + 12_800_000L * (long) Math.max(1, Math.pow(4, ConfigHolder.INSTANCE.tools.voltageTierAdvNanoSuit - 3)), + ConfigHolder.INSTANCE.tools.voltageTierAdvNanoSuit))) + .tag(CosmicItemTags.NANOMUSCLE_SPACE_SUITE) + .lang("Advanced NanoMuscle™ Space Suite Chestplate") + .properties(p -> p.rarity(Rarity.EPIC)) + .register(); + public static ItemEntry SPACE_QUARK_CHESTPLATE = REGISTRATE.item("space_quarktech_chestplate", (p) -> new SpaceArmorComponentItem(GTArmorMaterials.ARMOR, ArmorItem.Type.CHESTPLATE, 20000, p) + .setArmorLogic(new QuarkTechSpaceSuite(ArmorItem.Type.CHESTPLATE, 8192, + 100_000_000L * (long) Math.max(1, Math.pow(4, ConfigHolder.INSTANCE.tools.voltageTierQuarkTech - 5)), + ConfigHolder.INSTANCE.tools.voltageTierNanoSuit))) + .tag(CosmicItemTags.QUARKTECH_SPACE_SUITE) + .lang("NanoMuscle™ Space Suite Chestplate") + .properties(p -> p.rarity(Rarity.RARE)) + .register(); + public static ItemEntry ADVANCED_SPACE_QUARK_CHESTPLATE = REGISTRATE.item("space_advanced_quarktech_chestplate", (p) -> new SpaceArmorComponentItem(GTArmorMaterials.ARMOR, ArmorItem.Type.CHESTPLATE, 50000, p) + .setArmorLogic(new AdvancedQuarkTechSpaceSuite(8192, + 1_000_000_000L * (long) Math.max(1, Math.pow(4, ConfigHolder.INSTANCE.tools.voltageTierAdvQuarkTech - 6)), + ConfigHolder.INSTANCE.tools.voltageTierAdvNanoSuit))) + .tag(CosmicItemTags.QUARKTECH_SPACE_SUITE) + .lang("Advanced NanoMuscle™ Space Suite Chestplate") + .properties(p -> p.rarity(Rarity.EPIC)) + .register(); + public static NonNullConsumer attach(IItemComponent... components) { return item -> item.attachComponents(components); } diff --git a/src/main/java/com/ghostipedia/cosmiccore/common/data/tag/CosmicTagsHandler.java b/src/main/java/com/ghostipedia/cosmiccore/common/data/tag/CosmicTagsHandler.java new file mode 100644 index 0000000..15d79ee --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/common/data/tag/CosmicTagsHandler.java @@ -0,0 +1,23 @@ +package com.ghostipedia.cosmiccore.common.data.tag; + +import com.ghostipedia.cosmiccore.common.data.tag.item.CosmicItemTagsLoader; +import com.tterrag.registrate.providers.RegistrateTagsProvider; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.material.Fluid; + +public class CosmicTagsHandler { + + public static void initItem(RegistrateTagsProvider provider) { + CosmicItemTagsLoader.init(provider); + } + + public static void initBlock(RegistrateTagsProvider provider) {} + + public static void initFluid(RegistrateTagsProvider provider) {} + + public static void initEntity(RegistrateTagsProvider> provider) {} + +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/common/data/tag/item/CosmicItemTags.java b/src/main/java/com/ghostipedia/cosmiccore/common/data/tag/item/CosmicItemTags.java new file mode 100644 index 0000000..8e20727 --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/common/data/tag/item/CosmicItemTags.java @@ -0,0 +1,12 @@ +package com.ghostipedia.cosmiccore.common.data.tag.item; + +import com.ghostipedia.cosmiccore.common.data.tag.TagUtil; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; + +public class CosmicItemTags { + + public static final TagKey NANOMUSCLE_SPACE_SUITE = TagUtil.createModItemTag("nano_space_suite"); + public static final TagKey QUARKTECH_SPACE_SUITE = TagUtil.createModItemTag("quantum_space_suite"); + +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/common/data/tag/item/CosmicItemTagsLoader.java b/src/main/java/com/ghostipedia/cosmiccore/common/data/tag/item/CosmicItemTagsLoader.java new file mode 100644 index 0000000..1bae1f0 --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/common/data/tag/item/CosmicItemTagsLoader.java @@ -0,0 +1,22 @@ +package com.ghostipedia.cosmiccore.common.data.tag.item; + +import com.gregtechceu.gtceu.common.data.GTItems; +import com.tterrag.registrate.providers.RegistrateTagsProvider; +import com.tterrag.registrate.util.entry.ItemEntry; +import net.minecraft.tags.TagEntry; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; + +public class CosmicItemTagsLoader { + + public static void init(RegistrateTagsProvider provider) { + create(provider, CosmicItemTags.NANOMUSCLE_SPACE_SUITE, GTItems.NANO_HELMET, GTItems.NANO_LEGGINGS, GTItems.NANO_BOOTS); + create(provider, CosmicItemTags.QUARKTECH_SPACE_SUITE, GTItems.QUANTUM_HELMET, GTItems.QUANTUM_LEGGINGS, GTItems.QUANTUM_BOOTS); + } + + private static void create(RegistrateTagsProvider provider, TagKey tagKey, ItemEntry... items) { + var builder = provider.addTag(tagKey); + for (ItemEntry itemEntry : items) builder.add(TagEntry.element(itemEntry.getId())); + } + +} diff --git a/src/main/resources/assets/cosmiccore/textures/item/space_advanced_nanomuscle_chestplate.png b/src/main/resources/assets/cosmiccore/textures/item/space_advanced_nanomuscle_chestplate.png new file mode 100644 index 0000000..102e810 Binary files /dev/null and b/src/main/resources/assets/cosmiccore/textures/item/space_advanced_nanomuscle_chestplate.png differ diff --git a/src/main/resources/assets/cosmiccore/textures/item/space_advanced_quarktech_chestplate.png b/src/main/resources/assets/cosmiccore/textures/item/space_advanced_quarktech_chestplate.png new file mode 100644 index 0000000..87b2241 Binary files /dev/null and b/src/main/resources/assets/cosmiccore/textures/item/space_advanced_quarktech_chestplate.png differ diff --git a/src/main/resources/assets/cosmiccore/textures/item/space_nanomuscle_chestplate.png b/src/main/resources/assets/cosmiccore/textures/item/space_nanomuscle_chestplate.png new file mode 100644 index 0000000..b3dba3d Binary files /dev/null and b/src/main/resources/assets/cosmiccore/textures/item/space_nanomuscle_chestplate.png differ diff --git a/src/main/resources/assets/cosmiccore/textures/item/space_quarktech_chestplate.png b/src/main/resources/assets/cosmiccore/textures/item/space_quarktech_chestplate.png new file mode 100644 index 0000000..fb17a86 Binary files /dev/null and b/src/main/resources/assets/cosmiccore/textures/item/space_quarktech_chestplate.png differ