feat: 初始化icon,去掉Example模组
This commit is contained in:
parent
4cf82e8f83
commit
948d38cbe2
|
|
@ -23,9 +23,9 @@ parchment_mappings_version=2025.12.21-nightly-SNAPSHOT
|
|||
## 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}
|
||||
# Must match the String constant located in the main mod class annotated with @Mod.
|
||||
mod_id=lendandregret
|
||||
mod_id=lib39
|
||||
# The human-readable display name for the mod.
|
||||
mod_name=Lend & Regret
|
||||
mod_name=Lib39
|
||||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||
mod_license=MIT
|
||||
# The mod version. See https://semver.org/
|
||||
|
|
@ -33,8 +33,8 @@ mod_version=0.0.1
|
|||
# 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=top.r3944realms.lendandregret
|
||||
mod_group_id=top.r3944realms.lib39
|
||||
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
|
||||
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.
|
||||
mod_description=Borrow me diamonds? Here's a fish in three days. No questions.
|
||||
mod_description=Lib39
|
||||
|
|
|
|||
|
|
@ -1,52 +0,0 @@
|
|||
package top.r3944realms.lendandregret;
|
||||
|
||||
import com.mojang.logging.LogUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
import net.neoforged.bus.api.IEventBus;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.fml.ModContainer;
|
||||
import net.neoforged.fml.common.EventBusSubscriber;
|
||||
import net.neoforged.fml.common.Mod;
|
||||
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.neoforged.neoforge.common.NeoForge;
|
||||
import net.neoforged.neoforge.event.server.ServerStartingEvent;
|
||||
import org.slf4j.Logger;
|
||||
import top.r3944realms.lendandregret.contents.LARBlocks;
|
||||
import top.r3944realms.lendandregret.contents.LARCreativeModeTab;
|
||||
import top.r3944realms.lendandregret.contents.LARItems;
|
||||
|
||||
@Mod(LendAndRegret.MOD_ID)
|
||||
public class LendAndRegret {
|
||||
public static final String MOD_ID = "lendandregret";
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
|
||||
public LendAndRegret(IEventBus modEventBus, ModContainer modContainer) {
|
||||
modEventBus.addListener(this::commonSetup);
|
||||
|
||||
LARItems.ITEMS.register(modEventBus);
|
||||
LARBlocks.BLOCKS.register(modEventBus);
|
||||
LARCreativeModeTab.CREATIVE_MODE_TABS.register(modEventBus);
|
||||
|
||||
NeoForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
private void commonSetup(final FMLCommonSetupEvent event) {
|
||||
LOGGER.info("Lend & Regret common setup complete");
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onServerStarting(ServerStartingEvent event) {
|
||||
LOGGER.info("Lend & Regret server starting");
|
||||
}
|
||||
|
||||
@EventBusSubscriber(modid = MOD_ID, value = Dist.CLIENT)
|
||||
public static class ClientModEvents {
|
||||
@SubscribeEvent
|
||||
static void onClientSetup(FMLClientSetupEvent event) {
|
||||
LOGGER.info("Lend & Regret client setup");
|
||||
LOGGER.info("Player: {}", Minecraft.getInstance().getUser().getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
package top.r3944realms.lendandregret.contents;
|
||||
|
||||
import net.neoforged.neoforge.registries.DeferredRegister;
|
||||
import top.r3944realms.lendandregret.LendAndRegret;
|
||||
|
||||
public class LARBlocks {
|
||||
public static final DeferredRegister.Blocks BLOCKS = DeferredRegister.createBlocks(LendAndRegret.MOD_ID);
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
package top.r3944realms.lendandregret.contents;
|
||||
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.item.CreativeModeTab;
|
||||
import net.neoforged.neoforge.registries.DeferredHolder;
|
||||
import net.neoforged.neoforge.registries.DeferredRegister;
|
||||
import top.r3944realms.lendandregret.LendAndRegret;
|
||||
|
||||
public class LARCreativeModeTab {
|
||||
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS =
|
||||
DeferredRegister.create(Registries.CREATIVE_MODE_TAB, LendAndRegret.MOD_ID);
|
||||
|
||||
public static final DeferredHolder<CreativeModeTab, CreativeModeTab> MAIN_TAB = CREATIVE_MODE_TABS.register("main",
|
||||
() -> CreativeModeTab.builder()
|
||||
.title(Component.translatable("itemGroup.lendandregret"))
|
||||
.icon(() -> LARItems.ICON_ITEM.get().getDefaultInstance())
|
||||
.displayItems((params, output) -> {
|
||||
output.accept(LARItems.ICON_ITEM.get());
|
||||
})
|
||||
.build());
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
package top.r3944realms.lendandregret.contents;
|
||||
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.neoforged.neoforge.registries.DeferredItem;
|
||||
import net.neoforged.neoforge.registries.DeferredRegister;
|
||||
import top.r3944realms.lendandregret.LendAndRegret;
|
||||
|
||||
public class LARItems {
|
||||
public static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(LendAndRegret.MOD_ID);
|
||||
|
||||
public static final DeferredItem<Item> ICON_ITEM = ITEMS.registerSimpleItem("icon_item");
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"itemGroup.lendandregret": "Lend & Regret",
|
||||
"item.lendandregret.icon_item": "Lend & Regret"
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"itemGroup.lendandregret": "有借无还",
|
||||
"item.lendandregret.icon_item": "有借无还模组图标"
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 261 KiB |
4
src/main/resources/assets/lib39/lang/en_us.json
Normal file
4
src/main/resources/assets/lib39/lang/en_us.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"itemGroup.lib39": "Lib39",
|
||||
"item.lib39.icon_item": "Lib39"
|
||||
}
|
||||
4
src/main/resources/assets/lib39/lang/zh_cn.json
Normal file
4
src/main/resources/assets/lib39/lang/zh_cn.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"itemGroup.lib39": "Lib39",
|
||||
"item.lib39.icon_item": "Lib39模组图标"
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "lendandregret:item/icon"
|
||||
"layer0": "lib39:item/icon"
|
||||
}
|
||||
}
|
||||
BIN
src/main/resources/assets/lib39/textures/item/icon.png
Normal file
BIN
src/main/resources/assets/lib39/textures/item/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 649 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 261 KiB After Width: | Height: | Size: 649 KiB |
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "top.r3944realms.lendandregret.mixin",
|
||||
"compatibilityLevel": "JAVA_25",
|
||||
"mixins": [
|
||||
],
|
||||
"client": [
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
},
|
||||
"overwrites": {
|
||||
"requireAnnotations": true
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user