Skip to content

Commit

Permalink
Renaming
Browse files Browse the repository at this point in the history
Leclowndu93150 committed Apr 28, 2024
1 parent cd78b9c commit a00caff
Showing 4 changed files with 61 additions and 205 deletions.
18 changes: 9 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -5,8 +5,8 @@ org.gradle.debug=false

#read more on this at https://github.com/neoforged/NeoGradle/blob/NG_7.0/README.md#apply-parchment-mappings
# you can also find the latest versions at: https://parchmentmc.org/docs/getting-started
neogradle.subsystems.parchment.minecraftVersion=1.20.3
neogradle.subsystems.parchment.mappingsVersion=2023.12.31
neogradle.subsystems.parchment.minecraftVersion=1.20.4
neogradle.subsystems.parchment.mappingsVersion=2024.04.14
# Environment Properties
# You can find the latest versions here: https://projects.neoforged.net/neoforged/neoforge
# The Minecraft version must agree with the Neo version to get a valid artifact
@@ -16,7 +16,7 @@ minecraft_version=1.20.4
# as they do not follow standard versioning conventions.
minecraft_version_range=[1.20.4,1.21)
# The Neo version must agree with the Minecraft version to get a valid artifact
neo_version=20.4.147-beta
neo_version=20.4.233
# The Neo version range can use any version of Neo as bounds
neo_version_range=[20.4,)
# The loader version range can only use the major version of FML as bounds
@@ -26,18 +26,18 @@ loader_version_range=[2,)

# 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
mod_id=invertedbed
# The human-readable display name for the mod.
mod_name=Example Mod
mod_name=Inverted Bed
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=All Rights Reserved
mod_license=MIT
# 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
mod_group_id=com.leclowndu93150.invertedbed
# 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
mod_authors=Leclowndu93150, Buzz135
# 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_description=Adds a bed that skips the day
63 changes: 0 additions & 63 deletions src/main/java/com/example/examplemod/Config.java

This file was deleted.

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

This file was deleted.

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

import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.CreativeModeTabs;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.material.MapColor;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.common.Mod;
import net.neoforged.neoforge.common.NeoForge;
import net.neoforged.neoforge.registries.DeferredBlock;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredItem;
import net.neoforged.neoforge.registries.DeferredRegister;

@Mod(InvertedBed.MODID)
public class InvertedBed {
public static final String MODID = "invertedbed";

public static final DeferredRegister.Blocks BLOCKS = DeferredRegister.createBlocks(MODID);
public static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(MODID);
// Create a Deferred Register to hold CreativeModeTabs which will all be registered under the "examplemod" namespace
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, MODID);

// Creates a new Block with the id "examplemod:example_block", combining the namespace and path
public static final DeferredBlock<Block> INVERTED_BED = BLOCKS.registerSimpleBlock("inverted_bed", BlockBehaviour.Properties.of().mapColor(MapColor.STONE));
// Creates a new BlockItem with the id "examplemod:example_block", combining the namespace and path
public static final DeferredItem<BlockItem> INVERTED_BED_ITEM = ITEMS.registerSimpleBlockItem("inverted_bed", INVERTED_BED);

public static final DeferredHolder<CreativeModeTab, CreativeModeTab> INVERTED_TAB = CREATIVE_MODE_TABS.register("inverted_tab", () -> CreativeModeTab.builder()
.title(Component.translatable("itemGroup.invertedbed"))
.withTabsBefore(CreativeModeTabs.COMBAT)
.icon(() -> INVERTED_BED_ITEM.get().getDefaultInstance())
.displayItems((parameters, output) -> output.accept(INVERTED_BED_ITEM.get())).build());

public InvertedBed(IEventBus modEventBus) {

BLOCKS.register(modEventBus);

ITEMS.register(modEventBus);

CREATIVE_MODE_TABS.register(modEventBus);

NeoForge.EVENT_BUS.register(this);

}

}

0 comments on commit a00caff

Please sign in to comment.