Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Leclowndu93150 committed Jun 8, 2024
1 parent 3064ded commit 5b6f48a
Showing 9 changed files with 108 additions and 216 deletions.
28 changes: 11 additions & 17 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -19,25 +19,19 @@ minecraft_version_range=[1.20.6,1.21)
neo_version=20.6.112-beta
# The Neo version range can use any version of Neo as bounds
neo_version_range=[20.6,)
# The loader version range can only use the major version of FML as bounds

loader_version_range=[2,)

## Mod Properties
mod_id=flightutils

mod_name=Flight Utilities

# The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63}
# Must match the String constant located in the main mod class annotated with @Mod.
mod_id=examplemod
# The human-readable display name for the mod.
mod_name=Example Mod
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=All Rights Reserved
# The mod version. See https://semver.org/

mod_version=1.0.0
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
mod_group_id=com.example.examplemod
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
mod_authors=YourNameHere, OtherNameHere
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
mod_description=Example mod description.\nNewline characters can be used and will be replaced properly.

mod_group_id=com.leclowndu93150.flightutils

mod_authors=Leclowndu93150

mod_description=Adds 2 rings usefull when having creative flight
63 changes: 0 additions & 63 deletions src/main/java/com/example/examplemod/Config.java

This file was deleted.

136 changes: 0 additions & 136 deletions src/main/java/com/example/examplemod/ExampleMod.java

This file was deleted.

19 changes: 19 additions & 0 deletions src/main/java/com/leclowndu93150/flightutils/FlightUtilsMain.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.leclowndu93150.flightutils;

import com.leclowndu93150.flightutils.registry.CreativeTabRegistry;
import com.leclowndu93150.flightutils.registry.ItemRegistry;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.common.Mod;

// The value here should match an entry in the META-INF/neoforge.mods.toml file
@Mod(FlightUtilsMain.MODID)
public class FlightUtilsMain
{
public static final String MODID = "flightutils";

public FlightUtilsMain(IEventBus modEventBus)
{
CreativeTabRegistry.CREATIVE_MODE_TABS.register(modEventBus);
ItemRegistry.ITEMS.register(modEventBus);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.leclowndu93150.flightutils.items;

import net.minecraft.world.item.Item;

public class AngelRingItem extends Item {

public AngelRingItem() {
super(new Item.Properties());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.leclowndu93150.flightutils.items;

import net.minecraft.world.item.Item;

public class IntertiaRingItem extends Item {
public IntertiaRingItem() {
super(new Item.Properties());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.leclowndu93150.flightutils.items;

import net.minecraft.world.item.Item;

public class MiningRingItem extends Item {
public MiningRingItem() {
super(new Item.Properties());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.leclowndu93150.flightutils.registry;

import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.CreativeModeTabs;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister;

import static com.leclowndu93150.flightutils.FlightUtilsMain.MODID;
import static com.leclowndu93150.flightutils.registry.ItemRegistry.ANGEL_RING;

public class CreativeTabRegistry {
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, MODID);

public static final DeferredHolder<CreativeModeTab, CreativeModeTab> UTILS_TAB = CREATIVE_MODE_TABS.register("example_tab", () -> CreativeModeTab.builder()
.title(Component.translatable("Flight Utilities")) //The language key for the title of your CreativeModeTab
.withTabsBefore(CreativeModeTabs.COMBAT)
.icon(() -> ANGEL_RING.get().getDefaultInstance())
.displayItems((parameters, output) -> {
output.accept(ANGEL_RING.get());
}).build());

}


Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.leclowndu93150.flightutils.registry;

import com.leclowndu93150.flightutils.items.AngelRingItem;
import com.leclowndu93150.flightutils.items.IntertiaRingItem;
import com.leclowndu93150.flightutils.items.MiningRingItem;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.food.FoodProperties;
import net.minecraft.world.item.Item;
import net.neoforged.neoforge.registries.DeferredItem;
import net.neoforged.neoforge.registries.DeferredRegister;

import static com.leclowndu93150.flightutils.FlightUtilsMain.MODID;

public class ItemRegistry {

public static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(MODID);

public static final DeferredItem<Item> ANGEL_RING = ITEMS.register("angel_ring", (ResourceLocation pProperties) -> new AngelRingItem());

public static final DeferredItem<Item> INERTIA_RING = ITEMS.register("inertia_ring", (ResourceLocation pProperties) -> new IntertiaRingItem());

public static final DeferredItem<Item> MINING_RING = ITEMS.register("mining_ring", (ResourceLocation pProperties) -> new MiningRingItem());

}

0 comments on commit 5b6f48a

Please sign in to comment.