Add a potion of flight

This commit is contained in:
zontreck 2024-04-01 02:12:49 -07:00
parent a9608d867c
commit da93cf8ca8
5 changed files with 43 additions and 2 deletions

View file

@ -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

View file

@ -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);

View file

@ -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<Potion> REGISTRY = DeferredRegister.create(ForgeRegistries.POTIONS, OTEMod.MOD_ID);
public static final RegistryObject<Potion> AWKWARD_FLIGHT = REGISTRY.register("flight_awkward", ()->new Potion(new MobEffectInstance(ModEffects.FLIGHT.get(), 30*20, 1)));
public static final RegistryObject<Potion> MUNDANE_FLIGHT = REGISTRY.register("flight_basic", ()->new Potion(new MobEffectInstance(ModEffects.FLIGHT.get(), 60*20, 1)));
public static final RegistryObject<Potion> FLIGHT = REGISTRY.register("flight", ()->new Potion(new MobEffectInstance(ModEffects.FLIGHT.get(), 360*20, 1)));
public static void register(IEventBus bus)
{
REGISTRY.register(bus);
}
}

View file

@ -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;

View file

@ -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",