Minecraft 1.21.4 forge mod 中的物品纹理空白

问题描述 投票:0回答:1

我正在编写我的第一个 Minecraft 模组。我的第一个项目 Creeper Meat 已成功添加并在创意库存中命名,但未使用我放入 src/main/resources/assets/creatures/textures/item/creeper_meat.png 中的纹理。相反,它是一个占位符黑色和紫色纹理。

我已经设置了 Creeper_meat.json 并且该项目在 moditems.java 中正确初始化(或者看起来是这样)

creatures.java 文件:

package net.noritei.creatures;

import net.minecraft.world.item.CreativeModeTabs;
import net.noritei.creatures.item.moditems;
import org.slf4j.Logger;

import com.mojang.logging.LogUtils;

import net.minecraft.client.Minecraft;
import net.minecraft.world.level.block.Blocks;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.BuildCreativeModeTabContentsEvent;
import net.minecraftforge.event.server.ServerStartingEvent;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.registries.ForgeRegistries;

// The value here should match an entry in the META-INF/mods.toml file
@Mod(creatures.modId)
public class creatures {
    // Define mod id in a common place for everything to reference
    public static final String modId = "creatures";
    // Directly reference a slf4j logger
    private static final Logger LOGGER = LogUtils.getLogger();

    public creatures(FMLJavaModLoadingContext context) {
        IEventBus modEventBus = context.getModEventBus();

        moditems.register(modEventBus);

        // Register the commonSetup method for modloading
        modEventBus.addListener(this::commonSetup);

        // Register ourselves for server and other game events we are interested in
        MinecraftForge.EVENT_BUS.register(this);

        // Register the item to a creative tab
        modEventBus.addListener(this::addCreative);

        // Register our mod's ForgeConfigSpec so that Forge can create and load the config file for us
        context.registerConfig(ModConfig.Type.COMMON, Config.SPEC);
    }

    private void commonSetup(final FMLCommonSetupEvent event) {
        // Some common setup code
        LOGGER.info("HELLO FROM COMMON SETUP");

        if (Config.logDirtBlock)
            LOGGER.info("DIRT BLOCK >> {}", ForgeRegistries.BLOCKS.getKey(Blocks.DIRT));

        LOGGER.info(Config.magicNumberIntroduction + Config.magicNumber);

        Config.items.forEach((item) -> LOGGER.info("ITEM >> {}", item.toString()));
    }

    private void addCreative(BuildCreativeModeTabContentsEvent event) {
        if (event.getTabKey() == CreativeModeTabs.FOOD_AND_DRINKS) {
            // Access the registered item correctly using .get()
            event.accept(moditems.CREEPERMEAT.get());
        }
    }

    // You can use SubscribeEvent and let the Event Bus discover methods to call
    @SubscribeEvent
    public void onServerStarting(ServerStartingEvent event) {
        // Do something when the server starts
        LOGGER.info("HELLO from server starting");
    }

    // You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent
    @Mod.EventBusSubscriber(modid = modId, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
    public static class ClientModEvents {
        @SubscribeEvent
        public static void onClientSetup(FMLClientSetupEvent event) {
            // Some client setup code
            LOGGER.info("HELLO FROM CLIENT SETUP");
            LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName());
        }
    }
}

moditems.java 文件:

package net.noritei.creatures.item;

import net.minecraft.world.item.Item;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;

import net.noritei.creatures.creatures;

// Register items in the mod
public class moditems {
    // Create a Deferred Register to hold items
    public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, creatures.modId);

    // Register the item (Creeper Meat in this case)
    public static final RegistryObject<Item> CREEPERMEAT = ITEMS.register("creeper_meat",
            () -> new Item(new Item.Properties()
                    .useItemDescriptionPrefix() // Ensures item description is prefixed
                    .setId(ResourceKey.create(ForgeRegistries.ITEMS.getRegistryKey(), ResourceLocation.parse("creatures:creeper_meat")))));

    // Register all items in the event bus
    public static void register(IEventBus eventBus) {
        // Register the Deferred Register to the event bus so that the items get registered
        ITEMS.register(eventBus);
    }
}

creeper_meat.json:

{
  "parent": "item/generated",
  "textures": {
    "layer0": "creatures:item/creeper_meat"
  }
}

这是我的文件夹树,在creatives/src/

中找到
├───java
│   └───net
│       └───noritei
│           └───creatures
│               │   Config.java
│               │   creatures.java
│               │
│               └───item
│                       moditems.java
│
└───resources
    │   pack.mcmeta
    │
    ├───assets
    │   └───creatures
    │       ├───lang
    │       │       en_us.json
    │       │
    │       ├───models
    │       │   └───item
    │       │           creeper_meat.json
    │       │
    │       └───textures
    │           └───item
    │                   creeper_meat.png
    │
    └───META-INF
            mods.toml

使用 gradle 运行客户端时,我的控制台日志中没有提及 Creeper_meat:

[31Dec2024 01:36:24.095] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forge_userdev_client, --version, MOD_DEV, --assetIndex, 19, --assetsDir, C:\Users\sacha\.gradle\caches\forge_gradle\assets, --gameDir, .]
[31Dec2024 01:36:24.097] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: JVM identified as Eclipse Adoptium OpenJDK 64-Bit Server VM 21.0.5+11-LTS
[31Dec2024 01:36:24.098] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.2.2 starting: java version 21.0.5 by Eclipse Adoptium; OS Windows 11 arch amd64 version 10.0
[31Dec2024 01:36:24.177] [main/INFO] [net.minecraftforge.fml.loading.ImmediateWindowHandler/]: Loading ImmediateWindowProvider fmlearlywindow
[net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: No dependencies to load found. Skipping!
[31Dec2024 01:36:25.921] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forge_userdev_client' with arguments [--version, MOD_DEV, --gameDir, ., --assetsDir, C:\Users\sacha\.gradle\caches\forge_gradle\assets, --assetIndex, 19]
[31Dec2024 01:36:27.115] [Datafixer Bootstrap/INFO] [com.mojang.datafixers.DataFixerBuilder/]: 243 Datafixer optimizations took 344 milliseconds
[net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:worldgen/biome_source
[31Dec2024 01:36:30.323] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:worldgen/chunk_generator
[31Dec2024 01:36:30.323] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:worldgen/material_condition
[31Dec2024 01:36:30.323] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:worldgen/material_rule
[31Dec2024 01:36:30.323] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:worldgen/density_function_type
[31Dec2024 01:36:30.323] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:block_type
[31Dec2024 01:36:30.324] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:worldgen/structure_pool_element
[31Dec2024 01:36:30.324] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:worldgen/pool_alias_binding
[31Dec2024 01:36:30.324] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:cat_variant
[31Dec2024 01:36:30.324] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:frog_variant
[31Dec2024 01:36:30.324] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:decorated_pot_pattern
[31Dec2024 01:36:30.324] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:creative_mode_tab
[31Dec2024 01:36:30.324] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:trigger_type
[31Dec2024 01:36:30.324] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:number_format_type
[31Dec2024 01:36:30.324] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:entity_sub_predicate_type
[31Dec2024 01:36:30.324] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:item_sub_predicate_type
[31Dec2024 01:36:30.324] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:enchantment_level_based_value_type
[31Dec2024 01:36:30.324] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:enchantment_entity_effect_type
[31Dec2024 01:36:30.324] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:enchantment_location_based_effect_type
[31Dec2024 01:36:30.324] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:enchantment_value_effect_type
[31Dec2024 01:36:30.325] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:enchantment_provider_type
[31Dec2024 01:36:30.325] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:consume_effect_type
[31Dec2024 01:36:30.325] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:recipe_display
[31Dec2024 01:36:30.325] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:slot_display
[31Dec2024 01:36:30.325] [pool-5-thread-1/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]:    minecraft:recipe_book_category
[31Dec2024 01:36:30.625] [Render thread/WARN] [net.minecraft.server.packs.VanillaPackResourcesBuilder/]: Assets URL 'union:/C:/Users/sacha/.gradle/caches/forge_gradle/minecraft_user_repo/net/minecraftforge/forge/1.21.4-54.0.12_mapped_parchment_2024.12.22-1.21.4/forge-1.21.4-54.0.12_mapped_parchment_2024.12.22-1.21.4-recomp.jar%230!/assets/.mcassetsroot' uses unexpected schema
[31Dec2024 01:36:30.625] [Render thread/WARN] [net.minecraft.server.packs.VanillaPackResourcesBuilder/]: Assets URL 'union:/C:/Users/sacha/.gradle/caches/forge_gradle/minecraft_user_repo/net/minecraftforge/forge/1.21.4-54.0.12_mapped_parchment_2024.12.22-1.21.4/forge-1.21.4-54.0.12_mapped_parchment_2024.12.22-1.21.4-recomp.jar%230!/data/.mcassetsroot' uses unexpected schema
[31Dec2024 01:36:30.645] [Render thread/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[31Dec2024 01:36:30.651] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Setting user: Dev
[31Dec2024 01:36:30.712] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Backend library: LWJGL version 3.3.3+5
[31Dec2024 01:36:30.919] [modloading-worker-0/INFO] [net.minecraftforge.common.ForgeMod/FORGEMOD]: Forge mod loading, version 54.0.12, for MC 1.21.4 with MCP 20241203.143248
[31Dec2024 01:36:30.919] [modloading-worker-0/INFO] [net.minecraftforge.common.MinecraftForge/FORGE]: MinecraftForge v54.0.12 Initialized
[31Dec2024 01:36:30.933] [modloading-worker-0/INFO] [net.minecraftforge.common.ForgeMod/FORGEMOD]: Opening jdk.naming.dns/com.sun.jndi.dns to java.naming
[31Dec2024 01:36:31.298] [Render thread/INFO] [net.minecraftforge.gametest.ForgeGameTestHooks/]: Enabled Gametest Namespaces: [creatures]
[31Dec2024 01:36:31.390] [Render thread/INFO] [net.minecraft.server.packs.resources.ReloadableResourceManager/]: Reloading ResourceManager: vanilla, mod_resources
[31Dec2024 01:36:31.431] [Worker-Main-15/INFO] [net.noritei.creatures.creatures/]: HELLO FROM COMMON SETUP
[31Dec2024 01:36:31.431] [Worker-Main-15/INFO] [net.noritei.creatures.creatures/]: DIRT BLOCK >> minecraft:dirt
[31Dec2024 01:36:31.431] [Worker-Main-15/INFO] [net.noritei.creatures.creatures/]: The magic number is... 42
[31Dec2024 01:36:31.432] [Worker-Main-15/INFO] [net.noritei.creatures.creatures/]: ITEM >> minecraft:iron_ingot
[31Dec2024 01:36:31.467] [Worker-Main-13/INFO] [net.minecraft.client.gui.font.providers.UnihexProvider/]: Found unifont_jp_patch-16.0.01.hex, loading
[31Dec2024 01:36:31.467] [Worker-Main-9/INFO] [net.minecraft.client.gui.font.providers.UnihexProvider/]: Found unifont_all_no_pua-16.0.01.hex, loading
[31Dec2024 01:36:31.545] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [forge] Starting version check at https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.json
[31Dec2024 01:36:31.570] [Worker-Main-8/INFO] [net.noritei.creatures.creatures/]: HELLO FROM CLIENT SETUP
[31Dec2024 01:36:31.571] [Worker-Main-8/INFO] [net.noritei.creatures.creatures/]: MINECRAFT NAME >> Dev
[31Dec2024 01:36:32.083] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [forge] Found status: BETA_OUTDATED Current: 54.0.12 Target: 54.0.14
[31Dec2024 01:36:33.310] [Render thread/INFO] [com.mojang.blaze3d.audio.Library/]: OpenAL initialized on device OpenAL Soft on Headphones (HyperX Cloud III Wireless)
[31Dec2024 01:36:33.311] [Render thread/INFO] [net.minecraft.client.sounds.SoundEngine/SOUNDS]: Sound engine started
[31Dec2024 01:36:33.372] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 1024x512x4 minecraft:textures/atlas/blocks.png-atlas
[31Dec2024 01:36:33.377] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 256x256x4 minecraft:textures/atlas/signs.png-atlas
[31Dec2024 01:36:33.377] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 512x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
[31Dec2024 01:36:33.377] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 512x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
[31Dec2024 01:36:33.377] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 2048x1024x4 minecraft:textures/atlas/armor_trims.png-atlas
[31Dec2024 01:36:33.380] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 128x64x4 minecraft:textures/atlas/decorated_pot.png-atlas
[31Dec2024 01:36:33.380] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
[31Dec2024 01:36:33.381] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
[31Dec2024 01:36:33.381] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
[31Dec2024 01:36:33.381] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 64x64x0 minecraft:textures/atlas/map_decorations.png-atlas
[31Dec2024 01:36:33.503] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 512x256x0 minecraft:textures/atlas/particles.png-atlas
[31Dec2024 01:36:33.504] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 512x256x0 minecraft:textures/atlas/paintings.png-atlas
[31Dec2024 01:36:33.505] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 256x128x0 minecraft:textures/atlas/mob_effects.png-atlas
[31Dec2024 01:36:33.505] [Render thread/INFO] [net.minecraft.client.renderer.texture.TextureAtlas/]: Created: 1024x512x0 minecraft:textures/atlas/gui.png-atlas
[31Dec2024 01:37:55.194] [Render thread/INFO] [net.minecraftforge.registries.GameData/REGISTRIES]: Injecting existing registry data into this CLIENT instance
[31Dec2024 01:37:56.349] [Render thread/INFO] [net.minecraft.world.item.crafting.RecipeManager/]: Loaded 1370 recipes
[31Dec2024 01:37:56.359] [Render thread/INFO] [net.minecraft.advancements.AdvancementTree/]: Loaded 1481 advancements
[31Dec2024 01:37:56.464] [Server thread/INFO] [net.minecraft.client.server.IntegratedServer/]: Starting integrated minecraft server version 1.21.4
[31Dec2024 01:37:56.465] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Generating keypair
[31Dec2024 01:37:56.694] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing start region for dimension minecraft:overworld
[31Dec2024 01:37:57.185] [Render thread/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 0%
[31Dec2024 01:37:57.250] [Render thread/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Preparing spawn area: 20%
[31Dec2024 01:37:57.281] [Server thread/INFO] [net.minecraftforge.server.permission.PermissionAPI/]: Successfully initialized permission handler forge:default_handler
[31Dec2024 01:37:57.281] [Server thread/INFO] [net.noritei.creatures.creatures/]: HELLO from server starting
[31Dec2024 01:37:57.286] [Render thread/INFO] [net.minecraft.server.level.progress.LoggerChunkProgressListener/]: Time elapsed: 545 ms
[31Dec2024 01:37:57.380] [Server thread/INFO] [net.minecraft.client.server.IntegratedServer/]: Changing view distance to 12, from 10
[31Dec2024 01:37:57.380] [Server thread/INFO] [net.minecraft.client.server.IntegratedServer/]: Changing simulation distance to 12, from 0
[31Dec2024 01:37:57.948] [Render thread/INFO] [net.minecraftforge.common.ForgeHooks/]: Connected to a modded server.
[31Dec2024 01:37:57.995] [Server thread/INFO] [net.minecraft.server.players.PlayerList/]: Dev[local:E:75175827] logged in with entity id 109 at (42.35696039330286, 112.0, 45.30000001192093)
[31Dec2024 01:37:58.031] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dev joined the game
[31Dec2024 01:37:58.315] [Render thread/INFO] [net.minecraft.advancements.AdvancementTree/]: Loaded 53 advancements
[31Dec2024 01:38:00.133] [Server thread/INFO] [net.minecraft.client.server.IntegratedServer/]: Saving and pausing game...
[31Dec2024 01:38:00.161] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld
[31Dec2024 01:38:00.200] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end
[31Dec2024 01:38:00.200] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether
[31Dec2024 01:38:00.845] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Stopping!
[31Dec2024 01:38:00.915] [Server thread/INFO] [net.minecraft.server.network.ServerGamePacketListenerImpl/]: Dev lost connection: Disconnected
[31Dec2024 01:38:00.915] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Dev left the game
[31Dec2024 01:38:00.926] [Server thread/INFO] [net.minecraft.server.network.ServerCommonPacketListenerImpl/]: Stopping singleplayer server as player logged out
[31Dec2024 01:38:00.979] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Stopping server
[31Dec2024 01:38:00.979] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving players
[31Dec2024 01:38:00.979] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving worlds
[31Dec2024 01:38:01.129] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld
[31Dec2024 01:38:01.848] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end
[31Dec2024 01:38:01.851] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether
[31Dec2024 01:38:01.865] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (New World): All chunks are saved
[31Dec2024 01:38:01.865] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[31Dec2024 01:38:01.865] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[31Dec2024 01:38:01.865] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: ThreadedAnvilChunkStorage: All dimensions are saved

我检查商品和代码的拼写的次数超出了我的记忆。

这是我的 GitHub 存储库:

https://github.com/johnnythesoap/creatures

我看了一堆教程,在网上搜索,并询问了很多 ChatGPT,但我似乎找到了无用或过时的资源。 我会自己进一步调试,但我几乎不懂 Java。

这是我目前正在学习模组的教程: https://www.youtube.com/watch?v=o6Xbp2dTEGA&list=PLKGarocXCE1H9Y21-pxjt5Pt8bW14twa-&index=7

java minecraft minecraft-forge
1个回答
0
投票

我解决了,你必须在下面添加一个额外的“items”文件夹

src/main/resources/assets/creatures/ 

在其中,您还需要添加另一个 creeper_meat.json 文件,其中包含以下内容:

{
  "model": {
    "type": "minecraft:model",
    "model": "creatures:item/creeper_meat"
  }
}

不知道为什么 Mojang 现在需要额外的 json,但事实就是这样。

来源:https://discord.gg/fM5u8S87P9 KaupenHub Discord,锻造帮助频道,“物品纹理显示为缺失的无纹理”

© www.soinside.com 2019 - 2024. All rights reserved.