我正在进入Minecraft modding,当我尝试为我的项目(refined_iron)加载纹理时,它只显示为黑色和紫色的方块。
我在日志中注意到的是这个
[Client thread/ERROR] [FML]: Model definition for location skistone:refined_iron#inventory not found
在整个日志中出现两次。 这是:
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
[12:34:18] [main/INFO] [GradleStart]: Extra: []
[12:34:18] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, /Users/HillFamily/.gradle/caches/minecraft/assets, --assetIndex, 1.8, --accessToken, {REDACTED}, --version, 1.8, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[12:34:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[12:34:18] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[12:34:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[12:34:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[12:34:18] [main/INFO] [FML]: Forge Mod Loader version 8.99.124.1450 for Minecraft 1.8 loading
[12:34:18] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_31, running on Mac OS X:x86_64:10.10.4, installed at /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre
[12:34:18] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[12:34:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[12:34:18] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[12:34:18] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[12:34:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[12:34:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[12:34:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[12:34:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[12:34:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[12:34:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[12:34:18] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[12:34:19] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[12:34:19] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[12:34:19] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[12:34:19] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[12:34:19] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[12:34:19] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[12:34:19] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[12:34:20] [Client thread/INFO]: Setting user: Player563
[12:34:23] [Client thread/INFO]: LWJGL Version: 2.9.2
[12:34:24] [Client thread/INFO] [STDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:235]: ---- Minecraft Crash Report ----
// There are four lights!
Time: 8/7/15 12:34 PM
Description: Loading screen debug info
This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.8
Operating System: Mac OS X (x86_64) version 10.10.4
Java Version: 1.8.0_31, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 713043144 bytes (680 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML:
Loaded coremods (and transformers):
GL info: ' Vendor: 'Intel Inc.' Version: '2.1 INTEL-10.6.31' Renderer: 'Intel Iris OpenGL Engine'
[12:34:24] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
[12:34:24] [Client thread/INFO] [FML]: MinecraftForge v11.14.3.1450 Initialized
[12:34:24] [Client thread/INFO] [FML]: Replaced 204 ore recipies
[12:34:24] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
[12:34:24] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[12:34:24] [Client thread/INFO] [FML]: Searching /Users/HillFamily/Desktop/Modding/forge-1.8-11.14.3.1450-src/eclipse/mods for mods
[12:34:26] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[12:34:27] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, skistone] at CLIENT
[12:34:27] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, skistone] at SERVER
[12:34:27] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:skistone
[12:34:27] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
[12:34:27] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations
[12:34:27] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
[12:34:27] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
[12:34:27] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[12:34:27] [Client thread/INFO] [FML]: Applying holder lookups
[12:34:27] [Client thread/INFO] [FML]: Holder lookups applied
[12:34:27] [Client thread/INFO] [FML]: Injecting itemstacks
[12:34:27] [Client thread/INFO] [FML]: Itemstack injection complete
[12:34:27] [Sound Library Loader/INFO]: Starting up SoundSystem...
[12:34:28] [Thread-8/INFO]: Initializing LWJGL OpenAL
[12:34:28] [Thread-8/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[12:34:28] [Thread-8/INFO]: OpenAL initialized.
[12:34:28] [Sound Library Loader/INFO]: Sound engine started
[12:34:30] [Client thread/INFO]: Created: 512x512 textures-atlas
[12:34:31] [Client thread/ERROR] [FML]: Model definition for location skistone:refined_iron#inventory not found
[12:34:31] [Client thread/INFO] [FML]: Injecting itemstacks
[12:34:31] [Client thread/INFO] [FML]: Itemstack injection complete
[12:34:31] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
[12:34:31] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:skistone
[12:34:31] [Client thread/INFO]: SoundSystem shutting down...
[12:34:32] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
[12:34:32] [Sound Library Loader/INFO]: Starting up SoundSystem...
[12:34:32] [Thread-10/INFO]: Initializing LWJGL OpenAL
[12:34:32] [Thread-10/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org)
[12:34:32] [Thread-10/INFO]: OpenAL initialized.
[12:34:32] [Sound Library Loader/INFO]: Sound engine started
[12:34:33] [Client thread/INFO]: Created: 512x512 textures-atlas
[12:34:33] [Client thread/ERROR] [FML]: Model definition for location skistone:refined_iron#inventory not found
[12:35:32] [Client thread/INFO]: Stopping!
[12:35:32] [Client thread/INFO]: SoundSystem shutting down...
AL lib: (WW) FreeDevice: (0x7fb866dfa800) Deleting 3 Buffer(s)
[12:35:32] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
我的代码是(我离开了导入): SkiStone.java:
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class SkiStone {
public static Item refined_iron;
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
refined_iron = new RefinedIron();
}
@EventHandler
public void init(FMLInitializationEvent event) {
if(event.getSide() == Side.CLIENT)
{
RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
renderItem.getItemModelMesher().register(refined_iron, 0, new ModelResourceLocation(Reference.MODID + ":" + ((RefinedIron) refined_iron).getName(), "inventory"));
}
}
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
}
}
Reference.java:
public class Reference {
public static final String MODID = "skistone";
public static final String VERSION = "1.0";
public static final String NAME = "skistone";
}
RefinedIron.java
public class RefinedIron extends Item {
private final String name = "refined_iron";
public RefinedIron() {
GameRegistry.registerItem(this, name);
setUnlocalizedName(Reference.MODID + "_" + name);
setCreativeTab(CreativeTabs.tabMisc);
}
public String getName() {
return name;
}
}
refined_iron.json:
{
"parent": "builtin/generated",
"textures": {
"layer0": "skistone:items/refined_iron"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}
我的文件路径:
答案 0 :(得分:0)
您的Resources文件夹嵌套太深。 你应该:
skippyMN/skistone/items
skippyMN/resources/assets/skistone/<asset folders>
我不知道这部分是否必要,但通常你会想要像这样命名你的文件夹:
skippyMN/java/<mod_packages>/<mod_classes>
答案 1 :(得分:0)
Resources文件夹应位于src\main
因此您应该src\main\java\<packagename>\<etc>
和src\main\resources\asstes\<etc>