diff --git a/build.gradle b/build.gradle index 3b7f962..d061edc 100644 --- a/build.gradle +++ b/build.gradle @@ -161,13 +161,13 @@ dependencies { implementation fg.deobf("dev.zontreck:LibZontreckMod:${libzontreck}") //implementation fg.deobf('software.bernie.geckolib:geckolib-forge-1.20:3.0.57') - //238222 4712868 //compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}-forge-api:${jei}") //runtimeOnly fg.deobf("mezz.jei:jei-${minecraft_version}-forge:${jei}") - runtimeOnly fg.deobf("curse.maven:mekanism-268560:4866575") + runtimeOnly fg.deobf("curse.maven:mekanism-268560:5125665") runtimeOnly fg.deobf("curse.maven:worldedit-225608:4586218") + runtimeOnly fg.deobf("curse.maven:jei-238222:5101366") // Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings // The JEI API is declared for compile time use, while the full JEI artifact is used at runtime diff --git a/src/main/java/dev/zontreck/otemod/OTEMod.java b/src/main/java/dev/zontreck/otemod/OTEMod.java index 2bc5e65..4003eb5 100644 --- a/src/main/java/dev/zontreck/otemod/OTEMod.java +++ b/src/main/java/dev/zontreck/otemod/OTEMod.java @@ -12,6 +12,7 @@ import dev.zontreck.libzontreck.vectors.WorldPosition; import dev.zontreck.otemod.blocks.DeprecatedModBlocks; import dev.zontreck.otemod.configs.snbt.ServerConfig; import dev.zontreck.otemod.effects.ModEffects; +import dev.zontreck.otemod.effects.ModPotions; import dev.zontreck.otemod.enchantments.FlightEnchantment; import dev.zontreck.otemod.enchantments.NightVisionEnchantment; import dev.zontreck.otemod.events.EventHandler; @@ -136,6 +137,7 @@ public class OTEMod ModEntityTypes.register(bus); ModRecipes.register(bus); ModEffects.register(bus); + ModPotions.register(bus); //MenuInitializer.register(bus); diff --git a/src/main/java/dev/zontreck/otemod/effects/ModPotions.java b/src/main/java/dev/zontreck/otemod/effects/ModPotions.java new file mode 100644 index 0000000..b464697 --- /dev/null +++ b/src/main/java/dev/zontreck/otemod/effects/ModPotions.java @@ -0,0 +1,26 @@ +package dev.zontreck.otemod.effects; + +import dev.zontreck.otemod.OTEMod; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.item.alchemy.Potion; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class ModPotions { + public static final DeferredRegister REGISTRY = DeferredRegister.create(ForgeRegistries.POTIONS, OTEMod.MOD_ID); + + + public static final RegistryObject AWKWARD_FLIGHT = REGISTRY.register("flight_awkward", ()->new Potion(new MobEffectInstance(ModEffects.FLIGHT.get(), 30*20, 1))); + + public static final RegistryObject MUNDANE_FLIGHT = REGISTRY.register("flight_basic", ()->new Potion(new MobEffectInstance(ModEffects.FLIGHT.get(), 60*20, 1))); + + public static final RegistryObject FLIGHT = REGISTRY.register("flight", ()->new Potion(new MobEffectInstance(ModEffects.FLIGHT.get(), 360*20, 1))); + + + public static void register(IEventBus bus) + { + REGISTRY.register(bus); + } +} diff --git a/src/main/java/dev/zontreck/otemod/items/ModItems.java b/src/main/java/dev/zontreck/otemod/items/ModItems.java index 91bf0e4..5b9ebb6 100644 --- a/src/main/java/dev/zontreck/otemod/items/ModItems.java +++ b/src/main/java/dev/zontreck/otemod/items/ModItems.java @@ -3,6 +3,7 @@ package dev.zontreck.otemod.items; import dev.zontreck.otemod.OTEMod; import dev.zontreck.otemod.implementation.CreativeModeTabs; import net.minecraft.world.item.*; +import net.minecraft.world.item.alchemy.Potions; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; diff --git a/src/main/resources/assets/otemod/lang/en_us.json b/src/main/resources/assets/otemod/lang/en_us.json index a8be2e7..bcb62c4 100644 --- a/src/main/resources/assets/otemod/lang/en_us.json +++ b/src/main/resources/assets/otemod/lang/en_us.json @@ -4,6 +4,18 @@ "itemGroup.tabs.otemod": "OTEMod", + "item.minecraft.splash_potion.effect.flight": "Splash Potion of Flight", + "item.minecraft.lingering_potion.effect.flight": "Lingering Potion of Flight", + "item.minecraft.potion.effect.flight": "Potion of Flight", + + "item.minecraft.splash_potion.effect.flight_awkward": "Awkward Splash Potion of Flight", + "item.minecraft.lingering_potion.effect.flight_awkward": "Awkward Lingering Potion of Flight", + "item.minecraft.potion.effect.flight_awkward": "Awkward Potion of Flight", + + "item.minecraft.splash_potion.effect.flight_basic": "Thick Splash Potion of Flight", + "item.minecraft.lingering_potion.effect.flight_basic": "Thick Lingering Potion of Flight", + "item.minecraft.potion.effect.flight_basic": "Thick Potion of Flight", + "item.otemod.eternium_ore": "Raw Eternium Ore", "item.otemod.ihan_crystal": "Ihan Crystal",