diff --git a/build.gradle b/build.gradle index 18fd474..c3a2865 100644 --- a/build.gradle +++ b/build.gradle @@ -105,11 +105,8 @@ repositories { url = "https://maven.theillusivec4.top/" } maven { - url "https://cursemaven.com/" - content { - includeGroup "curse.maven" - } - } // Curse Forge File + url = "https://maven.shadowsoffire.dev/releases" + } maven { name = 'GeckoLib' url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' @@ -119,6 +116,12 @@ repositories { url "https://maven.tterrag.com/" } maven { url = "https://api.modrinth.com/maven" } + maven { + url "https://cursemaven.com/" + content { + includeGroup "curse.maven" + } + } // Curse Forge File } dependencies { @@ -134,7 +137,7 @@ dependencies { modCompileOnly("mezz.jei:jei-${project.minecraft_version}-forge-api:${project.jei_version}") { transitive = false } modCompileOnly("mezz.jei:jei-${project.minecraft_version}-common-api:${project.jei_version}") { transitive = false } - modImplementation("com.gregtechceu.gtceu:gtceu-${project.minecraft_version}:${project.gtceu_version}") { transitive = false } + modImplementation("com.gregtechceu.gtceu:gtceu-${project.minecraft_version}:${project.gtceu_version}:slim") { transitive = false } modImplementation("com.lowdragmc.ldlib:ldlib-forge-${project.minecraft_version}:${project.ldlib_version}") { transitive = false } modImplementation("com.tterrag.registrate:Registrate:${project.registrate_version}") modImplementation("dev.latvian.mods:kubejs-forge:${project.kubejs_version}") @@ -160,9 +163,14 @@ dependencies { modCompileOnly("curse.maven:new-thin-air-878379:4848005") modImplementation("curse.maven:puzzles-lib-495476:4924184") + modImplementation("dev.shadowsoffire:Apotheosis:${project.minecraft_version}-7.4.2") + modImplementation("dev.shadowsoffire:Placebo:${project.minecraft_version}-8.6.2") + modImplementation("dev.shadowsoffire:ApothicAttributes:${project.minecraft_version}-1.3.5") + + modRuntimeOnly("curse.maven:jade-324717:4973483") modRuntimeOnly("vazkii.patchouli:Patchouli:${project.minecraft_version}-${project.patchouli_version}-FORGE") - modRuntimeOnly("top.theillusivec4.curios:curios-forge:${project.curios_version}+${project.minecraft_version}") + modImplementation("top.theillusivec4.curios:curios-forge:${project.curios_version}+${project.minecraft_version}") modRuntimeOnly("dev.toma.configuration:configuration-forge-${project.minecraft_version}:${project.configuration_version}") modRuntimeOnly("mezz.jei:jei-${project.minecraft_version}-forge:${project.jei_version}") { transitive = false } diff --git a/src/generated/resources/assets/cosmiccore/lang/en_ud.json b/src/generated/resources/assets/cosmiccore/lang/en_ud.json index 273017e..dc4445c 100644 --- a/src/generated/resources/assets/cosmiccore/lang/en_ud.json +++ b/src/generated/resources/assets/cosmiccore/lang/en_ud.json @@ -210,6 +210,9 @@ "item.cosmiccore.space_advanced_quarktech_chestplate": "ǝʇɐןdʇsǝɥƆ ǝʇınS ǝɔɐdS ™ɥɔǝ⟘ʞɹɐnὉ pǝɔuɐʌpⱯ", "item.cosmiccore.space_nanomuscle_chestplate": "ǝʇɐןdʇsǝɥƆ ǝʇınS ǝɔɐdS ™ǝןɔsnWouɐN", "item.cosmiccore.space_quarktech_chestplate": "ǝʇɐןdʇsǝɥƆ ǝʇınS ǝɔɐdS ™ɥɔǝ⟘ʞɹɐnὉ", + "item.cosmiccore.the_one_ring": "buıᴚ ǝuO ǝɥ⟘", + "item.cosmiccore.the_one_ring.tooltip.0": "ɹ§˙ɯǝɥʇ puıq ssǝuʞɹɐp ǝɥʇ uı puɐ ןןɐ ɯǝɥʇ buıɹq oʇ buıᴚ ǝuO 'ɯǝɥʇ puıɟ oʇ buıᴚ ǝuO 'ןןɐ ɯǝɥʇ ǝןnɹ oʇ buıᴚ ǝuOo§9§", + "item.cosmiccore.the_one_ring.tooltip.1": "˙ɟɟo ǝʞɐʇ oʇ pɹɐɥ ʇı puıɟ ʇɥbıɯ noʎ", "item.cosmiccore.thermal_chain_agent": "ʇuǝbⱯ uıɐɥƆ ןɐɯɹǝɥ⟘", "item.cosmiccore.unsealed_crystal_cpu": "∩ԀƆ ןɐʇsʎɹƆ pǝןɐǝsu∩", "item.cosmiccore.void_blood_orb": "qɹO pooןᗺ ʇuɐpuǝɔsⱯ", @@ -252,4 +255,4 @@ "tooltip.cosmiccore.soul_hatch.input": "%s 9§:ɟ§ʇnduI ǝdıɔǝᴚ xɐWɔ§", "tooltip.cosmiccore.soul_hatch.output": "%s 9§:ɟ§ʎʇıɔɐdɐƆ ʞɹoʍʇǝN ןnoS xɐWɔ§", "tooltip.cosmiccore.thermia_hatch_limit": "ʞ%s :ʇıɯıꞀ ˙dɯǝ⟘ɔ§" -} \ No newline at end of file +} diff --git a/src/generated/resources/assets/cosmiccore/lang/en_us.json b/src/generated/resources/assets/cosmiccore/lang/en_us.json index 4f5b2df..7f71dec 100644 --- a/src/generated/resources/assets/cosmiccore/lang/en_us.json +++ b/src/generated/resources/assets/cosmiccore/lang/en_us.json @@ -210,6 +210,9 @@ "item.cosmiccore.space_advanced_quarktech_chestplate": "Advanced QuarkTech™ Space Suite Chestplate", "item.cosmiccore.space_nanomuscle_chestplate": "NanoMuscle™ Space Suite Chestplate", "item.cosmiccore.space_quarktech_chestplate": "QuarkTech™ Space Suite Chestplate", + "item.cosmiccore.the_one_ring": "The One Ring", + "item.cosmiccore.the_one_ring.tooltip.0": "§6§oOne Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them.§r", + "item.cosmiccore.the_one_ring.tooltip.1": "You might find it hard to take off.", "item.cosmiccore.thermal_chain_agent": "Thermal Chain Agent", "item.cosmiccore.unsealed_crystal_cpu": "Unsealed Crystal CPU", "item.cosmiccore.void_blood_orb": "Ascendant Blood Orb", @@ -252,4 +255,4 @@ "tooltip.cosmiccore.soul_hatch.input": "§cMax Recipe Input§f:§6 %s", "tooltip.cosmiccore.soul_hatch.output": "§cMax Soul Network Capacity§f:§6 %s", "tooltip.cosmiccore.thermia_hatch_limit": "§cTemp. Limit: %sK" -} \ No newline at end of file +} diff --git a/src/generated/resources/assets/cosmiccore/models/item/the_one_ring.json b/src/generated/resources/assets/cosmiccore/models/item/the_one_ring.json new file mode 100644 index 0000000..236238e --- /dev/null +++ b/src/generated/resources/assets/cosmiccore/models/item/the_one_ring.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "cosmiccore:item/the_one_ring" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/blocks/mineable/wrench.json b/src/generated/resources/data/forge/tags/blocks/mineable/wrench.json index f2cb241..78f91c8 100644 --- a/src/generated/resources/data/forge/tags/blocks/mineable/wrench.json +++ b/src/generated/resources/data/forge/tags/blocks/mineable/wrench.json @@ -9,7 +9,18 @@ "cosmiccore:programable_matter_coil_block", "cosmiccore:shimmering_neutronium_coil_block", "cosmiccore:causal_fabric_coil_block", + "cosmiccore:dyson_solar_cell", + "cosmiccore:naquadah_pressure_resistant_casing", + "cosmiccore:resonantly_tuned_virtue_meld_casing", + "cosmiccore:alternator_flux_coiling", + "cosmiccore:plated_aerocloud", "cosmiccore:high_powered_magnet", - "cosmiccore:fusion_grade_magnet" + "cosmiccore:fusion_grade_magnet", + "cosmiccore:high_temperature_fission_casing", + "cosmiccore:vomahine_certified_chemically_resistant_casing", + "cosmiccore:vomahine_certified_chemically_resistant_pipe", + "cosmiccore:vomahine_certified_interstellar_grade_casing", + "cosmiccore:vomahine_ultra_powered_casing", + "cosmiccore:highly_conductive_fission_casing" ] } \ No newline at end of file diff --git a/src/main/java/com/ghostipedia/cosmiccore/CosmicCore.java b/src/main/java/com/ghostipedia/cosmiccore/CosmicCore.java index 91ea780..03b6f28 100644 --- a/src/main/java/com/ghostipedia/cosmiccore/CosmicCore.java +++ b/src/main/java/com/ghostipedia/cosmiccore/CosmicCore.java @@ -17,6 +17,7 @@ import com.gregtechceu.gtceu.api.data.chemical.material.registry.MaterialRegistry; import com.gregtechceu.gtceu.api.machine.MachineDefinition; import com.gregtechceu.gtceu.api.recipe.GTRecipeType; +import com.gregtechceu.gtceu.api.sound.SoundEntry; import com.gregtechceu.gtceu.common.block.CoilBlock; import com.gregtechceu.gtceu.config.ConfigHolder; import com.lowdragmc.lowdraglib.Platform; @@ -45,6 +46,9 @@ public CosmicCore() { // bus.addGenericListener(Class.class, this::registerRecipeConditions); // bus.addGenericListener(MachineDefinition.class, this::registerMachines); bus.addGenericListener(MachineDefinition.class, this::registerMachines); + bus.addGenericListener(SoundEntry.class, this::registerSounds); + + CosmicLootModifiers.register(bus); if (Platform.isClient()) { bus.register(CosmicCoreClient.class); @@ -97,6 +101,10 @@ public void registerMachines(GTCEuAPI.RegisterEvent event) { + CosmicSounds.init(); + } + @SubscribeEvent public void registerCapabilities(RegisterCapabilitiesEvent event) { CosmicCapabilities.register(event); diff --git a/src/main/java/com/ghostipedia/cosmiccore/CosmicUtils.java b/src/main/java/com/ghostipedia/cosmiccore/CosmicUtils.java new file mode 100644 index 0000000..f6ed75c --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/CosmicUtils.java @@ -0,0 +1,41 @@ +package com.ghostipedia.cosmiccore; + +import com.ghostipedia.cosmiccore.common.data.CosmicItems; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraftforge.common.util.LazyOptional; +import org.jetbrains.annotations.Nullable; +import top.theillusivec4.curios.api.CuriosApi; +import top.theillusivec4.curios.api.type.capability.ICuriosItemHandler; +import top.theillusivec4.curios.api.type.inventory.ICurioStacksHandler; +import top.theillusivec4.curios.api.type.inventory.IDynamicStackHandler; + +import java.util.Optional; + +public class CosmicUtils { + + public static boolean hasRing(@Nullable Entity entity) { + if (!(entity instanceof LivingEntity living)) { + return false; + } + + LazyOptional cap = CuriosApi.getCuriosInventory(living); + if (cap.isPresent()) { + ICuriosItemHandler curioHandler = cap.resolve().get(); + Optional handler = curioHandler.getStacksHandler("ring"); + if (handler.isPresent()) { + IDynamicStackHandler stackHandler = handler.get().getStacks(); + for (int i = 0; i < stackHandler.getSlots(); i++) { + ItemStack stack = stackHandler.getStackInSlot(i); + if (stack.is(CosmicItems.THE_ONE_RING.get())) { + return true; + } + } + } + } + return false; + + } + +} 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 deleted file mode 100644 index 7251a09..0000000 --- a/src/main/java/com/ghostipedia/cosmiccore/api/item/component/FluidStats.java +++ /dev/null @@ -1,9 +0,0 @@ -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/client/ForgeClientEventHandler.java b/src/main/java/com/ghostipedia/cosmiccore/client/ForgeClientEventHandler.java index f4d3582..f13f3e5 100644 --- a/src/main/java/com/ghostipedia/cosmiccore/client/ForgeClientEventHandler.java +++ b/src/main/java/com/ghostipedia/cosmiccore/client/ForgeClientEventHandler.java @@ -1,18 +1,18 @@ package com.ghostipedia.cosmiccore.client; import com.ghostipedia.cosmiccore.CosmicCore; +import com.ghostipedia.cosmiccore.CosmicUtils; import com.ghostipedia.cosmiccore.client.renderer.StructureBoundingBox; +import com.mojang.blaze3d.shaders.FogShape; +import net.minecraft.client.renderer.FogRenderer; import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.client.event.RenderLevelStageEvent; +import net.minecraftforge.client.event.ViewportEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; -@Mod.EventBusSubscriber( - modid = CosmicCore.MOD_ID, - bus = Mod.EventBusSubscriber.Bus.FORGE, - value = Dist.CLIENT) -@OnlyIn(Dist.CLIENT) +@SuppressWarnings("unused") +@Mod.EventBusSubscriber(modid = CosmicCore.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class ForgeClientEventHandler { @SubscribeEvent @@ -20,7 +20,34 @@ public static void onRenderWorldLast(RenderLevelStageEvent event) { var stage = event.getStage(); if (stage == RenderLevelStageEvent.Stage.AFTER_TRIPWIRE_BLOCKS) { StructureBoundingBox.renderStructureSelect(event.getPoseStack(), event.getCamera()); + } + } + + @SubscribeEvent + public static void onRenderFog(ViewportEvent.RenderFog event) { + if (CosmicUtils.hasRing(event.getCamera().getEntity())) { + event.setFogShape(FogShape.SPHERE); + // Shrink the fog to be very close + if (event.getMode() == FogRenderer.FogMode.FOG_SKY) { + event.setFarPlaneDistance(16.0F); + event.setNearPlaneDistance(0.0F); + } else { + event.setFarPlaneDistance(10.0F); + event.setNearPlaneDistance(3.0F); + } + event.setCanceled(true); + } + } + + @SubscribeEvent + public static void onComputeFogColor(ViewportEvent.ComputeFogColor event) { + if (CosmicUtils.hasRing(event.getCamera().getEntity())) { + // and make the fog a blue mist. + // #7CBADA + event.setRed(0.671F); + event.setGreen(0.792F); + event.setBlue(0.855F); } } -} \ No newline at end of file +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/client/renderer/StructureBoundingBox.java b/src/main/java/com/ghostipedia/cosmiccore/client/renderer/StructureBoundingBox.java index 6df7878..cd31cf5 100644 --- a/src/main/java/com/ghostipedia/cosmiccore/client/renderer/StructureBoundingBox.java +++ b/src/main/java/com/ghostipedia/cosmiccore/client/renderer/StructureBoundingBox.java @@ -1,7 +1,7 @@ package com.ghostipedia.cosmiccore.client.renderer; import com.ghostipedia.cosmiccore.api.data.DebugBlockPattern; -import com.ghostipedia.cosmiccore.common.data.StructureWriteBehavior; +import com.ghostipedia.cosmiccore.common.item.behavior.StructureWriteBehavior; import com.lowdragmc.lowdraglib.client.utils.RenderBufferUtils; import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.systems.RenderSystem; @@ -16,7 +16,7 @@ import org.joml.Matrix3f; import org.joml.Matrix4f; -import static com.ghostipedia.cosmiccore.common.data.StructureWriteBehavior.getDir; +import static com.ghostipedia.cosmiccore.common.item.behavior.StructureWriteBehavior.getDir; public class StructureBoundingBox { public static void renderStructureSelect(PoseStack poseStack, Camera camera) { 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 f5eaebc..53da03f 100644 --- a/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicItems.java +++ b/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicItems.java @@ -3,34 +3,40 @@ 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.ghostipedia.cosmiccore.common.item.behavior.EffectApplicationBehavior; +import com.ghostipedia.cosmiccore.common.item.behavior.StructureWriteBehavior; import com.gregtechceu.gtceu.api.item.ComponentItem; import com.gregtechceu.gtceu.api.item.armor.ArmorComponentItem; import com.gregtechceu.gtceu.api.item.component.IItemComponent; -import com.gregtechceu.gtceu.common.data.GTCompassSections; import com.gregtechceu.gtceu.common.item.TooltipBehavior; import com.gregtechceu.gtceu.common.item.armor.GTArmorMaterials; import com.gregtechceu.gtceu.common.item.armor.QuarkTechSuite; -import com.gregtechceu.gtceu.common.registry.GTRegistration; import com.gregtechceu.gtceu.config.ConfigHolder; import com.gregtechceu.gtceu.data.recipe.CustomTags; -import com.gregtechceu.gtceu.integration.jade.GTJadePlugin; import com.tterrag.registrate.util.entry.ItemEntry; import com.tterrag.registrate.util.nullness.NonNullConsumer; import earth.terrarium.adastra.common.tags.ModItemTags; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.DamageTypeTags; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.damagesource.DamageTypes; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.effect.MobEffects; +import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ArmorItem; +import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Rarity; +import net.minecraft.world.level.Level; import wayoftime.bloodmagic.common.item.BloodOrb; import wayoftime.bloodmagic.common.item.ItemBloodOrb; -import wayoftime.bloodmagic.common.registration.impl.BloodOrbDeferredRegister; import wayoftime.bloodmagic.common.registration.impl.BloodOrbRegistryObject; import static com.ghostipedia.cosmiccore.api.registries.CosmicRegistration.REGISTRATE; import static wayoftime.bloodmagic.common.item.BloodMagicItems.BLOOD_ORBS; -@SuppressWarnings("Convert2MethodRef") +@SuppressWarnings({ "unused" }) public class CosmicItems { public static final BloodOrbRegistryObject ORB_ASCENDANT; public static final BloodOrbRegistryObject ORB_VOIDSENT; @@ -134,14 +140,6 @@ public class CosmicItems { .defaultModel() .register(); - // 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, ModItemTags.SPACE_SUITS, ModItemTags.FREEZE_RESISTANT_ARMOR, ModItemTags.HEAT_RESISTANT_ARMOR) -// .lang("NanoMuscle™ Space Suite Chestplate") -// .properties(p -> p.rarity(Rarity.RARE)) -// .register(); public static final ItemEntry THERMAL_CHAIN_AGENT = REGISTRATE.item("thermal_chain_agent", ComponentItem::create) .lang("Thermal Chain Agent") .properties(p -> p.stacksTo(64)) @@ -181,6 +179,40 @@ public class CosmicItems { }))) .defaultModel() .register(); + + public static ItemEntry THE_ONE_RING = REGISTRATE + .item("the_one_ring", p -> (ComponentItem) new ComponentItem(p) { + @Override + public boolean canBeHurtBy(DamageSource damageSource) { + return damageSource.is(DamageTypes.LAVA); + } + + @Override + public int getEntityLifespan(ItemStack itemStack, Level level) { + return Short.MIN_VALUE; + } + + @Override + public boolean onDroppedByPlayer(ItemStack item, Player player) { + return false; + } + + @Override + public boolean isFoil(ItemStack stack) { + return true; + } + }) + .lang("The One Ring") + .properties(p -> p.stacksTo(1).fireResistant()) + .onRegister(attach(new EffectApplicationBehavior() + .addEffect(() -> new MobEffectInstance(MobEffects.INVISIBILITY, 10), 1.0F) + .addEffect(() -> new MobEffectInstance(MobEffects.UNLUCK, 10, 5), 1.0F) + .addEffect(() -> new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 10, 1), 1.0F), + new TooltipBehavior(list -> { + list.add(Component.translatable("item.cosmiccore.the_one_ring.tooltip.0")); + list.add(Component.translatable("item.cosmiccore.the_one_ring.tooltip.1")); + }))) + .register(); // public static final ItemEntry PARADOX_ECHOS = REGISTRATE.item("paradox_echos", ComponentItem::create) // .lang("Paradox Echos") // .properties(p -> p.stacksTo(64)) @@ -355,7 +387,7 @@ public class CosmicItems { .item("debug_structure_writer", ComponentItem::create) .lang("Debug Structure Writer") .properties(p -> p.stacksTo(1)) - .onRegister( attach(StructureWriteBehavior.INSTANCE)) + .onRegister(attach(StructureWriteBehavior.INSTANCE)) .register(); // Space Suite @@ -572,4 +604,4 @@ public static NonNullConsumer attach(IItemComponent public static void init() { } -} \ No newline at end of file +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicLootModifiers.java b/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicLootModifiers.java new file mode 100644 index 0000000..4d2cba3 --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicLootModifiers.java @@ -0,0 +1,23 @@ +package com.ghostipedia.cosmiccore.common.data; + +import com.ghostipedia.cosmiccore.CosmicCore; +import com.ghostipedia.cosmiccore.common.glm.GenericLootModifier; +import com.mojang.serialization.Codec; +import net.minecraftforge.common.loot.IGlobalLootModifier; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class CosmicLootModifiers { + + public static final DeferredRegister> GLOBAL_LOOT_MODIFIERS = DeferredRegister + .create(ForgeRegistries.Keys.GLOBAL_LOOT_MODIFIER_SERIALIZERS, CosmicCore.MOD_ID); + + public static final RegistryObject> GENERIC_LOOT_MODIFIER = GLOBAL_LOOT_MODIFIERS + .register("generic", () -> GenericLootModifier.CODEC); + + public static void register(IEventBus bus) { + GLOBAL_LOOT_MODIFIERS.register(bus); + } +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicSounds.java b/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicSounds.java index 6023d8d..df53600 100644 --- a/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicSounds.java +++ b/src/main/java/com/ghostipedia/cosmiccore/common/data/CosmicSounds.java @@ -1,14 +1,13 @@ -//package com.ghostipedia.cosmiccore.common.data; -//import com.gregtechceu.gtceu.api.registry.GTRegistries; -//import com.gregtechceu.gtceu.api.sound.SoundEntry; -// -//import static com.ghostipedia.cosmiccore.api.registries.CosmicRegistration.REGISTRATE; -// -// -//public class CosmicSounds { -// static { -// GTRegistries.SOUNDS.unfreeze(); -// } -// public static final SoundEntry BLACK_HOLE_CRY = REGISTRATE.sound("black_hole_cry").build(); -// public static void init() {} -//} +package com.ghostipedia.cosmiccore.common.data; + +import com.ghostipedia.cosmiccore.CosmicCore; +import com.gregtechceu.gtceu.api.registry.registrate.SoundEntryBuilder; +import com.gregtechceu.gtceu.api.sound.SoundEntry; + +public class CosmicSounds { + + public static final SoundEntry BLACK_HOLE_CRY = new SoundEntryBuilder(CosmicCore.id("black_hole_cry")).build(); + + public static void init() { + } +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/common/data/lang/CosmicLangHandler.java b/src/main/java/com/ghostipedia/cosmiccore/common/data/lang/CosmicLangHandler.java index 9cc993a..345c9f7 100644 --- a/src/main/java/com/ghostipedia/cosmiccore/common/data/lang/CosmicLangHandler.java +++ b/src/main/java/com/ghostipedia/cosmiccore/common/data/lang/CosmicLangHandler.java @@ -93,5 +93,7 @@ public static void init(RegistrateLangProvider provider) { replace(provider,"block.gtceu.hp_steam_wiremill", "HP Steam Wiremill"); replace(provider,"block.gtceu.lp_steam_wiremill", "I Don't Actually Exist"); + replace(provider,"item.cosmiccore.the_one_ring.tooltip.0", "§6§oOne Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them.§r"); + replace(provider,"item.cosmiccore.the_one_ring.tooltip.1", "You might find it hard to take off."); } } diff --git a/src/main/java/com/ghostipedia/cosmiccore/common/data/materials/CosmicElements.java b/src/main/java/com/ghostipedia/cosmiccore/common/data/materials/CosmicElements.java index 6ee590b..bd8f3b8 100644 --- a/src/main/java/com/ghostipedia/cosmiccore/common/data/materials/CosmicElements.java +++ b/src/main/java/com/ghostipedia/cosmiccore/common/data/materials/CosmicElements.java @@ -2,16 +2,18 @@ import com.gregtechceu.gtceu.api.data.chemical.Element; import com.gregtechceu.gtceu.api.registry.GTRegistries; -import com.gregtechceu.gtceu.common.data.GTElements; public class CosmicElements { + public static final Element Pi = createAndRegister(1, 0, -1, null, "Prisma", "Pi", false); public static final Element ViR = createAndRegister(35, 450, -1, null, "Virtue", "ERROR", false); + public static Element createAndRegister(long protons, long neutrons, long halfLifeSeconds, String decayTo, String name, String symbol, boolean isIsotope) { Element element = new Element(protons, neutrons, halfLifeSeconds, decayTo, name, symbol, isIsotope); GTRegistries.ELEMENTS.register(name, element); return element; } + public static void init() { } diff --git a/src/main/java/com/ghostipedia/cosmiccore/common/data/recipe/CosmicRecipeModifiers.java b/src/main/java/com/ghostipedia/cosmiccore/common/data/recipe/CosmicRecipeModifiers.java index 698afc6..422c494 100644 --- a/src/main/java/com/ghostipedia/cosmiccore/common/data/recipe/CosmicRecipeModifiers.java +++ b/src/main/java/com/ghostipedia/cosmiccore/common/data/recipe/CosmicRecipeModifiers.java @@ -14,13 +14,14 @@ import java.util.Optional; public class CosmicRecipeModifiers { + public static GTRecipe reactorRecipe(MetaMachine machine, @NotNull GTRecipe recipe, OCParams ocParams, OCResult ocResult) { if (machine instanceof MagneticFieldMachine magnetMachine) { final var magnetStrength = magnetMachine.getFieldStrength(); if (!recipe.data.contains("min_field") || recipe.data.getInt("min_field") > magnetStrength) { return null; } - if(!magnetMachine.isGenerator()){ + if (!magnetMachine.isGenerator()) { if (RecipeHelper.getRecipeEUtTier(recipe) > magnetMachine.getTier()) { return null; } @@ -31,26 +32,28 @@ public static GTRecipe reactorRecipe(MetaMachine machine, @NotNull GTRecipe reci return null; } - public static GTRecipe vomahineChemicalPlantParallel(MetaMachine machine, @NotNull GTRecipe recipe, OCParams ocParams, OCResult ocResult){ - if (machine instanceof WorkableElectricMultiblockMachine vomahineMachine){ + public static GTRecipe vomahineChemicalPlantParallel(MetaMachine machine, @NotNull GTRecipe recipe, OCParams ocParams, OCResult ocResult) { + if (machine instanceof WorkableElectricMultiblockMachine vomahineMachine) { Optional optional = vomahineMachine.getParts().stream().filter(IParallelHatch.class::isInstance) .map(IParallelHatch.class::cast).findAny(); if (optional.isPresent()) { IParallelHatch hatch = optional.get(); - if (hatch.getCurrentParallel() != 0){ + if (hatch.getCurrentParallel() != 0) { var result = GTRecipeModifiers.accurateParallel(machine, recipe, hatch.getCurrentParallel(), false); recipe = result.getFirst() == recipe ? result.getFirst().copy() : result.getFirst(); - var smartDuration = (recipe.duration * hatch.getCurrentParallel())/2; + var smartDuration = (recipe.duration * hatch.getCurrentParallel()) / 2; int parallelValue = result.getSecond(); recipe.duration = smartDuration; + ocResult.init(RecipeHelper.getInputEUt(recipe), smartDuration, parallelValue, ocResult.getOcLevel()); return recipe; } } var result = GTRecipeModifiers.accurateParallel(machine, recipe, 0, false); recipe = result.getFirst() == recipe ? result.getFirst().copy() : result.getFirst(); - var smartDuration = recipe.duration/2; + var smartDuration = recipe.duration / 2; int parallelValue = result.getSecond(); recipe.duration = smartDuration; + ocResult.init(RecipeHelper.getInputEUt(recipe), smartDuration, parallelValue, ocResult.getOcLevel()); return recipe; } return null; diff --git a/src/main/java/com/ghostipedia/cosmiccore/common/glm/GenericLootModifier.java b/src/main/java/com/ghostipedia/cosmiccore/common/glm/GenericLootModifier.java new file mode 100644 index 0000000..a289636 --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/common/glm/GenericLootModifier.java @@ -0,0 +1,81 @@ +package com.ghostipedia.cosmiccore.common.glm; + +import com.ghostipedia.cosmiccore.mixin.accessor.LootTableAccessor; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.mojang.serialization.Codec; +import com.mojang.serialization.Dynamic; +import com.mojang.serialization.JsonOps; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import it.unimi.dsi.fastutil.objects.ObjectArrayList; +import lombok.Getter; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.storage.loot.*; +import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; +import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.common.loot.IGlobalLootModifier; +import net.minecraftforge.common.loot.LootModifier; +import net.minecraftforge.common.loot.LootTableIdCondition; +import org.jetbrains.annotations.NotNull; + +import java.util.List; + +public class GenericLootModifier extends LootModifier { + + public static final Gson LOOT_GSON = Deserializers.createLootTableSerializer().create(); + + // hack to parse the loot pools SINCE FORGE PATCHES THEM AND THEY DON'T HAVE CODECS + // FUCK + public static final Codec> LOOT_POOL_LIST_CODEC = Codec.PASSTHROUGH.xmap( + dynamic -> { + JsonElement json = dynamic.convert(JsonOps.INSTANCE).getValue(); + JsonObject fullJson = new JsonObject(); + fullJson.add("pools", json); + + LootTable table = ForgeHooks.loadLootTable(LOOT_GSON, LootTableIdCondition.UNKNOWN_LOOT_TABLE, fullJson, true); + return ((LootTableAccessor) table).getPools(); + }, + lootPool -> new Dynamic<>(JsonOps.INSTANCE, LOOT_GSON.toJsonTree(lootPool)) + ); + + public static final Codec CODEC = RecordCodecBuilder.create(inst -> codecStart(inst) + .and(inst.group( + ResourceLocation.CODEC.fieldOf("loot_table_id").forGetter(GenericLootModifier::getLootTableId), + LOOT_POOL_LIST_CODEC.fieldOf("injected_loot").forGetter(GenericLootModifier::getInjectedLoot) + )) + .apply(inst, GenericLootModifier::new)); + + @Getter + private final ResourceLocation lootTableId; + @Getter + private final List injectedLoot; + + /** + * Constructs a LootModifier. + * + * @param conditionsIn the ILootConditions that need to be matched before the loot is modified. + */ + protected GenericLootModifier(LootItemCondition[] conditionsIn, ResourceLocation lootTableId, List injectedLoot) { + super(conditionsIn); + this.lootTableId = lootTableId; + this.injectedLoot = injectedLoot; + } + + @Override + protected @NotNull ObjectArrayList doApply(ObjectArrayList original, LootContext context) { + if (this.injectedLoot.isEmpty() || !context.getQueriedLootTableId().equals(this.lootTableId)) { + return original; + } + for (LootPool pool : this.injectedLoot) { + pool.addRandomItems(original::add, context); + } + return original; + } + + @Override + public Codec codec() { + return null; + } +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/common/item/behavior/EffectApplicationBehavior.java b/src/main/java/com/ghostipedia/cosmiccore/common/item/behavior/EffectApplicationBehavior.java new file mode 100644 index 0000000..f743e0c --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/common/item/behavior/EffectApplicationBehavior.java @@ -0,0 +1,46 @@ +package com.ghostipedia.cosmiccore.common.item.behavior; + +import com.gregtechceu.gtceu.api.item.component.IItemComponent; +import com.gregtechceu.gtceu.api.item.component.IItemLifeCycle; +import com.mojang.datafixers.util.Pair; +import lombok.NoArgsConstructor; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; + +import java.util.ArrayList; +import java.util.List; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +@NoArgsConstructor +public class EffectApplicationBehavior implements IItemComponent/*, IItemLifeCycle*/ { + + private final List, Float>> effects = new ArrayList<>(); + + public EffectApplicationBehavior addEffect(Supplier effect, float chance) { + effects.add(Pair.of(effect, chance)); + return this; + } + + public List> getEffects() { + return this.effects.stream() + .map((pair) -> Pair.of(pair.getFirst() != null ? pair.getFirst().get() : null, pair.getSecond())) + .collect(Collectors.toList()); + } + + /* + @Override + public void inventoryTick(ItemStack stack, Level level, Entity entity, int slotId, boolean isSelected) { + if (entity instanceof LivingEntity living) { + for (var effect : getEffects()) { + if (level.getRandom().nextFloat() < effect.getSecond()) { + living.addEffect(new MobEffectInstance(effect.getFirst())); + } + } + } + } + */ +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/common/data/StructureWriteBehavior.java b/src/main/java/com/ghostipedia/cosmiccore/common/item/behavior/StructureWriteBehavior.java similarity index 97% rename from src/main/java/com/ghostipedia/cosmiccore/common/data/StructureWriteBehavior.java rename to src/main/java/com/ghostipedia/cosmiccore/common/item/behavior/StructureWriteBehavior.java index 0166f6d..9c29bcd 100644 --- a/src/main/java/com/ghostipedia/cosmiccore/common/data/StructureWriteBehavior.java +++ b/src/main/java/com/ghostipedia/cosmiccore/common/item/behavior/StructureWriteBehavior.java @@ -1,4 +1,4 @@ -package com.ghostipedia.cosmiccore.common.data; +package com.ghostipedia.cosmiccore.common.item.behavior; import com.ghostipedia.cosmiccore.api.data.DebugBlockPattern; import com.google.common.base.Joiner; @@ -38,8 +38,7 @@ protected StructureWriteBehavior() { } @Override - public ModularUI createUI( - HeldItemUIFactory.HeldItemHolder playerInventoryHolder, Player entityPlayer) { + public ModularUI createUI(HeldItemUIFactory.HeldItemHolder playerInventoryHolder, Player entityPlayer) { var container = new WidgetGroup(8, 8, 160, 54); container .addWidget(new ImageWidget(4, 4, 152, 46, GuiTextures.DISPLAY)) @@ -57,8 +56,7 @@ public ModularUI createUI( } return LocalizationUtils.format( "item.cosmiccore.debug.structure_writer.structural_scale", x, y, z); - }) - .setTextColor(0xFAF9F6)) + }).setTextColor(0xFAF9F6)) .addWidget(new LabelWidget(7, 20, () -> { var direction = getDir(playerInventoryHolder.getHeld()); var dirs = DebugBlockPattern.getDir(direction); @@ -67,8 +65,7 @@ public ModularUI createUI( dirs[0].name(), dirs[1].name(), dirs[2].name()); - }) - .setTextColor(0xFAF9F6)); + }).setTextColor(0xFAF9F6)); container.setBackground(GuiTextures.BACKGROUND_INVERSE); return new ModularUI(176, 120, playerInventoryHolder, entityPlayer) .background(GuiTextures.BACKGROUND) diff --git a/src/main/java/com/ghostipedia/cosmiccore/forge/ABSModifications.java b/src/main/java/com/ghostipedia/cosmiccore/forge/ABSModifications.java index bd4059e..f354866 100644 --- a/src/main/java/com/ghostipedia/cosmiccore/forge/ABSModifications.java +++ b/src/main/java/com/ghostipedia/cosmiccore/forge/ABSModifications.java @@ -4,7 +4,6 @@ import com.ghostipedia.cosmiccore.common.data.materials.CosmicMaterials; import com.gregtechceu.gtceu.api.data.chemical.material.event.PostMaterialEvent; import com.gregtechceu.gtceu.api.data.chemical.material.properties.PropertyKey; -import com.gregtechceu.gtceu.common.data.GTMaterials; import com.gregtechceu.gtceu.data.recipe.misc.alloyblast.CustomAlloyBlastRecipeProducer; import net.minecraftforge.eventbus.api.EventPriority; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -12,6 +11,7 @@ @Mod.EventBusSubscriber(modid = CosmicCore.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) public class ABSModifications { + @SubscribeEvent(priority = EventPriority.LOW) public static void addAlloyBlastProperties(PostMaterialEvent event) { CosmicMaterials.ResonantVirtueMeld.getProperty(PropertyKey.ALLOY_BLAST) diff --git a/src/main/java/com/ghostipedia/cosmiccore/forge/ForgeCommonEventListener.java b/src/main/java/com/ghostipedia/cosmiccore/forge/ForgeCommonEventListener.java index 5e6f52d..ab97dc4 100644 --- a/src/main/java/com/ghostipedia/cosmiccore/forge/ForgeCommonEventListener.java +++ b/src/main/java/com/ghostipedia/cosmiccore/forge/ForgeCommonEventListener.java @@ -1,21 +1,48 @@ package com.ghostipedia.cosmiccore.forge; import com.ghostipedia.cosmiccore.CosmicCore; +import com.ghostipedia.cosmiccore.CosmicUtils; +import com.ghostipedia.cosmiccore.common.data.CosmicItems; +import com.ghostipedia.cosmiccore.common.item.behavior.EffectApplicationBehavior; import com.ghostipedia.cosmiccore.common.machine.multiblock.part.SoulHatchPartMachine; +import com.ghostipedia.cosmiccore.mixin.accessor.LivingEntityAccessor; import com.gregtechceu.gtceu.api.block.MetaMachineBlock; +import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.entity.player.Player; +import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.level.BlockEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; +@SuppressWarnings("unused") @Mod.EventBusSubscriber(modid = CosmicCore.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE) public class ForgeCommonEventListener { @SubscribeEvent public static void entityPlacementEventHandler(BlockEvent.EntityPlaceEvent event) { - if (event.getPlacedBlock().getBlock() instanceof MetaMachineBlock block && block.getMachine(event.getLevel(), event.getPos()) instanceof SoulHatchPartMachine soulHatch - && event.getEntity() instanceof Player player) { + if (event.getPlacedBlock().getBlock() instanceof MetaMachineBlock block && + block.getMachine(event.getLevel(), event.getPos()) instanceof SoulHatchPartMachine soulHatch && + event.getEntity() instanceof Player player) { soulHatch.attachSoulNetwork(player); } } + + @SubscribeEvent + public static void onPlayerTick(final TickEvent.PlayerTickEvent event) { + if (event.phase != TickEvent.Phase.END) { + return; + } + + if (CosmicUtils.hasRing(event.player)) { + // forcefully get the ring's effects. + var effects = ((EffectApplicationBehavior)CosmicItems.THE_ONE_RING.get().getComponents().get(0)) + .getEffects(); + for (var effect : effects) { + if (event.player.getRandom().nextFloat() < effect.getSecond()) { + event.player.addEffect(new MobEffectInstance(effect.getFirst())); + } + } + ((LivingEntityAccessor) event.player).callRemoveEffectParticles(); + } + } } diff --git a/src/main/java/com/ghostipedia/cosmiccore/mixin/accessor/LivingEntityAccessor.java b/src/main/java/com/ghostipedia/cosmiccore/mixin/accessor/LivingEntityAccessor.java new file mode 100644 index 0000000..f5522e9 --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/mixin/accessor/LivingEntityAccessor.java @@ -0,0 +1,12 @@ +package com.ghostipedia.cosmiccore.mixin.accessor; + +import net.minecraft.world.entity.LivingEntity; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Invoker; + +@Mixin(LivingEntity.class) +public interface LivingEntityAccessor { + + @Invoker + void callRemoveEffectParticles(); +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/mixin/accessor/LootTableAccessor.java b/src/main/java/com/ghostipedia/cosmiccore/mixin/accessor/LootTableAccessor.java new file mode 100644 index 0000000..1dce1b3 --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/mixin/accessor/LootTableAccessor.java @@ -0,0 +1,15 @@ +package com.ghostipedia.cosmiccore.mixin.accessor; + +import net.minecraft.world.level.storage.loot.LootPool; +import net.minecraft.world.level.storage.loot.LootTable; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Accessor; + +import java.util.List; + +@Mixin(LootTable.class) +public interface LootTableAccessor { + + @Accessor(value = "f_79109_", remap = false) + List getPools(); +} diff --git a/src/main/java/com/ghostipedia/cosmiccore/mixin/client/MinecraftMixin.java b/src/main/java/com/ghostipedia/cosmiccore/mixin/client/MinecraftMixin.java new file mode 100644 index 0000000..e55d875 --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/mixin/client/MinecraftMixin.java @@ -0,0 +1,23 @@ +package com.ghostipedia.cosmiccore.mixin.client; + +import com.ghostipedia.cosmiccore.CosmicUtils; +import com.llamalad7.mixinextras.injector.ModifyReturnValue; +import net.minecraft.client.Minecraft; +import net.minecraft.client.player.LocalPlayer; +import net.minecraft.world.entity.Entity; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; + +import javax.annotation.Nullable; + +@Mixin(Minecraft.class) +public class MinecraftMixin { + + @Shadow @Nullable public LocalPlayer player; + + @ModifyReturnValue(method = "shouldEntityAppearGlowing", at = @At("RETURN")) + private boolean cosmiccore$makeRingGlow(boolean original, Entity entity) { + return original || (CosmicUtils.hasRing(player) && CosmicUtils.hasRing(entity)); + } +} diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg index e69de29..91a18a7 100644 --- a/src/main/resources/META-INF/accesstransformer.cfg +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -0,0 +1,4 @@ + +public-f net.minecraft.network.chat.TextColor +public net.minecraft.network.chat.TextColor (ILjava/lang/String;)V +public-f net.minecraft.network.chat.TextColor f_131256_ # NAMED_COLORS diff --git a/src/main/resources/assets/cosmiccore/textures/item/the_one_ring.png b/src/main/resources/assets/cosmiccore/textures/item/the_one_ring.png new file mode 100644 index 0000000..8ff5512 Binary files /dev/null and b/src/main/resources/assets/cosmiccore/textures/item/the_one_ring.png differ diff --git a/src/main/resources/cosmiccore.mixins.json b/src/main/resources/cosmiccore.mixins.json index 2e73a3a..421fa70 100644 --- a/src/main/resources/cosmiccore.mixins.json +++ b/src/main/resources/cosmiccore.mixins.json @@ -1,18 +1,21 @@ { - "required": true, - "package": "com.ghostipedia.cosmiccore.mixin", - "compatibilityLevel": "JAVA_17", - "minVersion": "0.8", - "mixins": [ - "AdAstraOverlayScreenMixin", - "AdAstraSpaceSuitItemMixin", - "DivingHelmetItemMixin", - "PlayerBreathingMixin", - "client.CosmicCoreRemainingAirOverlayMixin" - ], - "client": [ - ], - "injectors": { - "defaultRequire": 1 + "required": true, + "package": "com.ghostipedia.cosmiccore.mixin", + "compatibilityLevel": "JAVA_17", + "minVersion": "0.8", + "mixins": [ + "AdAstraOverlayScreenMixin", + "AdAstraSpaceSuitItemMixin", + "DivingHelmetItemMixin", + "PlayerBreathingMixin", + "accessor.LivingEntityAccessor", + "accessor.LootTableAccessor", + "client.CosmicCoreRemainingAirOverlayMixin" + ], + "client": [ + "client.MinecraftMixin" + ], + "injectors": { + "defaultRequire": 1 } } diff --git a/src/main/resources/data/cosmiccore/curios/entities/ring.json b/src/main/resources/data/cosmiccore/curios/entities/ring.json new file mode 100644 index 0000000..fa9469b --- /dev/null +++ b/src/main/resources/data/cosmiccore/curios/entities/ring.json @@ -0,0 +1,4 @@ +{ + "entities": ["player"], + "slots": ["ring"] +} diff --git a/src/main/resources/data/cosmiccore/loot_modifiers/the_one_ring_fishing.json b/src/main/resources/data/cosmiccore/loot_modifiers/the_one_ring_fishing.json new file mode 100644 index 0000000..88f53ae --- /dev/null +++ b/src/main/resources/data/cosmiccore/loot_modifiers/the_one_ring_fishing.json @@ -0,0 +1,23 @@ +{ + "type": "cosmiccore:generic", + "conditions": [ + + ], + "loot_table_id": "minecraft:gameplay/fishing", + "injected_loot": [ + { + "rolls": { + "type": "uniform", + "min": 0.0, + "max": 0.6 + }, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "cosmiccore:the_one_ring" + } + ] + } + ] +} diff --git a/src/main/resources/data/cosmiccore/recipes/enchanting/the_one_ring.json b/src/main/resources/data/cosmiccore/recipes/enchanting/the_one_ring.json new file mode 100644 index 0000000..253948c --- /dev/null +++ b/src/main/resources/data/cosmiccore/recipes/enchanting/the_one_ring.json @@ -0,0 +1,16 @@ +{ + "type": "apotheosis:enchanting", + "input": { + "item": "gtceu:gold_ring" + }, + "requirements": { + "eterna": 50, + "quanta": 85, + "arcana": 100 + }, + "display_level": 5, + "result": { + "item": "cosmiccore:the_one_ring", + "count": 1 + } +} diff --git a/src/main/resources/data/curios/tags/items/ring.json b/src/main/resources/data/curios/tags/items/ring.json new file mode 100644 index 0000000..8c805b6 --- /dev/null +++ b/src/main/resources/data/curios/tags/items/ring.json @@ -0,0 +1,5 @@ +{ + "values": [ + "cosmiccore:the_one_ring" + ] +} diff --git a/src/main/resources/data/forge/loot_modifiers/global_loot_modifiers.json b/src/main/resources/data/forge/loot_modifiers/global_loot_modifiers.json new file mode 100644 index 0000000..af31c69 --- /dev/null +++ b/src/main/resources/data/forge/loot_modifiers/global_loot_modifiers.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "entries": [ + "cosmiccore:the_one_ring_fishing" + ] +}