generated from NeoForgeMDKs/MDK-1.21.1-ModDevGradle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i really hope he commited the right shit
- Loading branch information
1 parent
3d5611d
commit 60486e6
Showing
6 changed files
with
75 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.portingdeadmods.doomstation; | ||
|
||
import com.portingdeadmods.doomstation.registry.RegisterStuff; | ||
import org.slf4j.Logger; | ||
|
||
import com.mojang.logging.LogUtils; | ||
|
||
import net.neoforged.bus.api.IEventBus; | ||
import net.neoforged.fml.ModContainer; | ||
import net.neoforged.fml.common.Mod; | ||
|
||
@Mod(DSMain.MODID) | ||
public class DSMain | ||
{ | ||
public static final String MODID = "doomstation"; | ||
private static final Logger LOGGER = LogUtils.getLogger(); | ||
|
||
public DSMain(IEventBus modEventBus, ModContainer modContainer) { | ||
RegisterStuff.CREATIVE_MODE_TABS.register(modEventBus); | ||
RegisterStuff.ITEMS.register(modEventBus); | ||
//modContainer.registerConfig(ModConfig.Type.COMMON, Config.SPEC); | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/portingdeadmods/doomstation/content/item/DoomStationItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.portingdeadmods.doomstation.content.item; | ||
|
||
import net.minecraft.world.item.Item; | ||
import net.minecraft.world.item.ItemStack; | ||
|
||
public class DoomStationItem extends Item { | ||
public DoomStationItem(Properties properties) { | ||
super(properties); | ||
} | ||
|
||
@Override | ||
public int getMaxStackSize(ItemStack stack) { | ||
return 1; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/com/portingdeadmods/doomstation/registry/RegisterStuff.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.portingdeadmods.doomstation.registry; | ||
import com.portingdeadmods.doomstation.content.item.DoomStationItem; | ||
import net.minecraft.core.registries.Registries; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.world.item.CreativeModeTab; | ||
import net.minecraft.world.item.Item; | ||
import net.neoforged.neoforge.registries.DeferredHolder; | ||
import net.neoforged.neoforge.registries.DeferredItem; | ||
import net.neoforged.neoforge.registries.DeferredRegister; | ||
|
||
import static com.portingdeadmods.doomstation.DSMain.MODID; | ||
|
||
public class RegisterStuff { | ||
|
||
public static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(MODID); | ||
|
||
public static final DeferredItem<DoomStationItem> DOOM_STATION = ITEMS.register("doom_station", () -> new DoomStationItem(new Item.Properties())); | ||
|
||
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, MODID); | ||
|
||
public static final DeferredHolder<CreativeModeTab, CreativeModeTab> DOOM_TAB = CREATIVE_MODE_TABS.register("doomstation", () -> CreativeModeTab.builder() | ||
.title(Component.literal("DoomStation")) | ||
.icon(() -> DOOM_STATION.get().getDefaultInstance()) | ||
.displayItems((parameters, output) -> { | ||
output.accept(DOOM_STATION.get()); | ||
}).build()); | ||
|
||
} |
60486e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can hope xd
60486e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l bozo kys