feat: 初始化icon,去掉Example模组

This commit is contained in:
叁玖领域 2026-07-05 01:15:52 +08:00
parent f391f54b3f
commit 2bc94f4a85
15 changed files with 47 additions and 47 deletions

View File

@ -23,9 +23,9 @@ parchment_mappings_version=2025.12.21-nightly-SNAPSHOT
## Mod Properties ## Mod Properties
# The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63} # 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. # Must match the String constant located in the main mod class annotated with @Mod.
mod_id=lib39 mod_id=superlead
# The human-readable display name for the mod. # The human-readable display name for the mod.
mod_name=Lib39 mod_name=SuperLead
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=MIT mod_license=MIT
# The mod version. See https://semver.org/ # The mod version. See https://semver.org/
@ -33,7 +33,7 @@ mod_version=0.0.1
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # 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. # This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html # See https://maven.apache.org/guides/mini/guide-naming-conventions.html
mod_group_id=top.r3944realms.lib39 mod_group_id=top.r3944realms.superlead
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list. # The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
mod_authors=R3944Realms mod_authors=R3944Realms
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list. # The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.

View File

@ -1,8 +0,0 @@
package top.r3944realms.lib39.contents;
import net.neoforged.neoforge.registries.DeferredRegister;
import top.r3944realms.lib39.Lib39;
public class Lib39Blocks {
public static final DeferredRegister.Blocks BLOCKS = DeferredRegister.createBlocks(Lib39.MOD_ID);
}

View File

@ -1,4 +1,4 @@
package top.r3944realms.lib39; package top.r3944realms.superlead;
import com.mojang.logging.LogUtils; import com.mojang.logging.LogUtils;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
@ -13,39 +13,39 @@ import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
import net.neoforged.neoforge.common.NeoForge; import net.neoforged.neoforge.common.NeoForge;
import net.neoforged.neoforge.event.server.ServerStartingEvent; import net.neoforged.neoforge.event.server.ServerStartingEvent;
import org.slf4j.Logger; import org.slf4j.Logger;
import top.r3944realms.lib39.contents.Lib39Blocks; import top.r3944realms.superlead.contents.SuperLeadBlocks;
import top.r3944realms.lib39.contents.Lib39CreativeModeTab; import top.r3944realms.superlead.contents.SuperLeadCreativeModeTab;
import top.r3944realms.lib39.contents.Lib39Items; import top.r3944realms.superlead.contents.SuperLeadItems;
@Mod(Lib39.MOD_ID) @Mod(SuperLead.MOD_ID)
public class Lib39 { public class SuperLead {
public static final String MOD_ID = "lib39"; public static final String MOD_ID = "superlead";
private static final Logger LOGGER = LogUtils.getLogger(); private static final Logger LOGGER = LogUtils.getLogger();
public Lib39(IEventBus modEventBus, ModContainer modContainer) { public SuperLead(IEventBus modEventBus, ModContainer modContainer) {
modEventBus.addListener(this::commonSetup); modEventBus.addListener(this::commonSetup);
Lib39Items.ITEMS.register(modEventBus); SuperLeadItems.ITEMS.register(modEventBus);
Lib39Blocks.BLOCKS.register(modEventBus); SuperLeadBlocks.BLOCKS.register(modEventBus);
Lib39CreativeModeTab.CREATIVE_MODE_TABS.register(modEventBus); SuperLeadCreativeModeTab.CREATIVE_MODE_TABS.register(modEventBus);
NeoForge.EVENT_BUS.register(this); NeoForge.EVENT_BUS.register(this);
} }
private void commonSetup(final FMLCommonSetupEvent event) { private void commonSetup(final FMLCommonSetupEvent event) {
LOGGER.info("Lib39 common setup complete"); LOGGER.info("SuperLead common setup complete");
} }
@SubscribeEvent @SubscribeEvent
public void onServerStarting(ServerStartingEvent event) { public void onServerStarting(ServerStartingEvent event) {
LOGGER.info("Lib39 server starting"); LOGGER.info("SuperLead server starting");
} }
@EventBusSubscriber(modid = MOD_ID, value = Dist.CLIENT) @EventBusSubscriber(modid = MOD_ID, value = Dist.CLIENT)
public static class ClientModEvents { public static class ClientModEvents {
@SubscribeEvent @SubscribeEvent
static void onClientSetup(FMLClientSetupEvent event) { static void onClientSetup(FMLClientSetupEvent event) {
LOGGER.info("Lib39 client setup"); LOGGER.info("SuperLead client setup");
LOGGER.info("Player: {}", Minecraft.getInstance().getUser().getName()); LOGGER.info("Player: {}", Minecraft.getInstance().getUser().getName());
} }
} }

View File

@ -0,0 +1,8 @@
package top.r3944realms.superlead.contents;
import net.neoforged.neoforge.registries.DeferredRegister;
import top.r3944realms.superlead.SuperLead;
public class SuperLeadBlocks {
public static final DeferredRegister.Blocks BLOCKS = DeferredRegister.createBlocks(SuperLead.MOD_ID);
}

View File

@ -1,22 +1,22 @@
package top.r3944realms.lib39.contents; package top.r3944realms.superlead.contents;
import net.minecraft.core.registries.Registries; import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.CreativeModeTab;
import net.neoforged.neoforge.registries.DeferredHolder; import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister; import net.neoforged.neoforge.registries.DeferredRegister;
import top.r3944realms.lib39.Lib39; import top.r3944realms.superlead.SuperLead;
public class Lib39CreativeModeTab { public class SuperLeadCreativeModeTab {
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS =
DeferredRegister.create(Registries.CREATIVE_MODE_TAB, Lib39.MOD_ID); DeferredRegister.create(Registries.CREATIVE_MODE_TAB, SuperLead.MOD_ID);
public static final DeferredHolder<CreativeModeTab, CreativeModeTab> MAIN_TAB = CREATIVE_MODE_TABS.register("main", public static final DeferredHolder<CreativeModeTab, CreativeModeTab> MAIN_TAB = CREATIVE_MODE_TABS.register("main",
() -> CreativeModeTab.builder() () -> CreativeModeTab.builder()
.title(Component.translatable("itemGroup.lib39")) .title(Component.translatable("itemGroup.superlead"))
.icon(() -> Lib39Items.ICON_ITEM.get().getDefaultInstance()) .icon(() -> SuperLeadItems.ICON_ITEM.get().getDefaultInstance())
.displayItems((params, output) -> { .displayItems((params, output) -> {
output.accept(Lib39Items.ICON_ITEM.get()); output.accept(SuperLeadItems.ICON_ITEM.get());
}) })
.build()); .build());
} }

View File

@ -1,12 +1,12 @@
package top.r3944realms.lib39.contents; package top.r3944realms.superlead.contents;
import net.minecraft.world.item.Item; import net.minecraft.world.item.Item;
import net.neoforged.neoforge.registries.DeferredItem; import net.neoforged.neoforge.registries.DeferredItem;
import net.neoforged.neoforge.registries.DeferredRegister; import net.neoforged.neoforge.registries.DeferredRegister;
import top.r3944realms.lib39.Lib39; import top.r3944realms.superlead.SuperLead;
public class Lib39Items { public class SuperLeadItems {
public static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(Lib39.MOD_ID); public static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(SuperLead.MOD_ID);
public static final DeferredItem<Item> ICON_ITEM = ITEMS.registerSimpleItem("icon_item"); public static final DeferredItem<Item> ICON_ITEM = ITEMS.registerSimpleItem("icon_item");
} }

View File

@ -1,4 +0,0 @@
{
"itemGroup.lib39": "Lib39",
"item.lib39.icon_item": "Lib39"
}

View File

@ -1,4 +0,0 @@
{
"itemGroup.lib39": "Lib39",
"item.lib39.icon_item": "Lib39模组图标"
}

View File

@ -1,6 +1,6 @@
{ {
"model": { "model": {
"type": "minecraft:model", "type": "minecraft:model",
"model": "lendandregret:item/icon_item" "model": "superlead:item/icon_item"
} }
} }

View File

@ -0,0 +1,4 @@
{
"itemGroup.superlead": "Super Lead",
"item.superlead.icon_item": "Super Lead"
}

View File

@ -0,0 +1,4 @@
{
"itemGroup.superlead": "超级拴绳",
"item.superlead.icon_item": "超级拴绳"
}

View File

@ -1,6 +1,6 @@
{ {
"parent": "minecraft:item/generated", "parent": "minecraft:item/generated",
"textures": { "textures": {
"layer0": "lib39:item/icon" "layer0": "superlead:item/icon"
} }
} }

View File

Before

Width:  |  Height:  |  Size: 649 KiB

After

Width:  |  Height:  |  Size: 649 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 649 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -1,7 +1,7 @@
{ {
"required": true, "required": true,
"minVersion": "0.8", "minVersion": "0.8",
"package": "top.r3944realms.lib39.mixin", "package": "top.r3944realms.superlead.mixin",
"compatibilityLevel": "JAVA_25", "compatibilityLevel": "JAVA_25",
"mixins": [ "mixins": [
], ],