- 8
- 0
Привет я писал мод по учебнику и у меня возникла ошибка при запуске в IDEA код ошибки "1"
Код:
1. ItemKey:
public class ItemKey extends Item {
public ItemKey() {
this.setRegistryName("NewKey");
this.setUnlocalizedName("NewKey");
}
}
2.ItemReg:
public class ItemRegisry extends Item {
@GameRegistry.ObjectHolder("tut")
@Mod.EventBusSubscriber
public class ItemRegistry {}
@GameRegistry.ObjectHolder("Key")
public static final Item KEY = null;
@SubscribeEvent
public static void onRegistryItem(RegistryEvent.Register <Item> e) {
e.getRegistry().register(new ItemKey());
}
@SubscribeEvent
@SideOnly(Side.CLIENT)
public static void onRegistryModel(ModelRegistryEvent e) {
}
}
Скрин ошибки:
Прошу помощи, спасибо всем кто папробывал или же помог мне решить ошибку.
Код:
1. ItemKey:
public class ItemKey extends Item {
public ItemKey() {
this.setRegistryName("NewKey");
this.setUnlocalizedName("NewKey");
}
}
2.ItemReg:
public class ItemRegisry extends Item {
@GameRegistry.ObjectHolder("tut")
@Mod.EventBusSubscriber
public class ItemRegistry {}
@GameRegistry.ObjectHolder("Key")
public static final Item KEY = null;
@SubscribeEvent
public static void onRegistryItem(RegistryEvent.Register <Item> e) {
e.getRegistry().register(new ItemKey());
}
@SubscribeEvent
@SideOnly(Side.CLIENT)
public static void onRegistryModel(ModelRegistryEvent e) {
}
}
Скрин ошибки:
Прошу помощи, спасибо всем кто папробывал или же помог мне решить ошибку.
- Краш-лог
-
Thread: Client thread
Stacktrace:
at net.minecraftforge.registries.ObjectHolderRegistry.scanTarget(ObjectHolderRegistry.java:125)
at net.minecraftforge.registries.ObjectHolderRegistry.findObjectHolders(ObjectHolderRegistry.java:80)
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:626)
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:252)
at net.minecraft.client.Minecraft.init(Minecraft.java:467)
-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:378)
at net.minecraft.client.main.Main.main(Main.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraftforge.legacydev.Main.start(Main.java:86)
at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29)
-- System Details --
Details:
Minecraft Version: 1.12.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_361, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 254166288 bytes (242 MB) / 633339904 bytes (604 MB) up to 3806855168 bytes (3630 MB)
JVM Flags: 0 total;
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP 9.42 Powered by Forge 14.23.5.2860 4 mods loaded, 4 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
| State | ID | Version | Source | Signature |
|:----- |:--------- |:------------ |:------------------------------------------------------------------ |:--------- |
| LC | minecraft | 1.12.2 | minecraft.jar | None |
| LC | mcp | 9.42 | minecraft.jar | None |
| LC | FML | 8.0.99.99 | forge-1.12.2-14.23.5.2860_mapped_snapshot_20171003-1.12-recomp.jar | None |
| LC | forge | 14.23.5.2860 | forge-1.12.2-14.23.5.2860_mapped_snapshot_20171003-1.12-recomp.jar | None |
Loaded coremods (and transformers):
GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.6.13596 Compatibility Profile Context 20.10.35.02 27.20.1034.6' Renderer: 'AMD Radeon HD 7700 Series'
Launched Version: ${MC_VERSION}
LWJGL: 2.9.4
OpenGL: *************************** Compatibility Profile Context 20.10.35.02 27.20.1034.6, ATI Technologies Inc.
GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.
Using VBOs: Yes
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs:
Current Language: Русский (Россия)
Profiler Position: N/A (disabled)
Краш-лог:
Thread: Client thread
Stacktrace:
at net.minecraftforge.registries.ObjectHolderRegistry.scanTarget(ObjectHolderRegistry.java:125)
at net.minecraftforge.registries.ObjectHolderRegistry.findObjectHolders(ObjectHolderRegistry.java:80)
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:626)
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:252)
at net.minecraft.client.Minecraft.init(Minecraft.java:467)
-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:378)
at net.minecraft.client.main.Main.main(Main.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraftforge.legacydev.Main.start(Main.java:86)
at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29)
-- System Details --
Details:
Minecraft Version: 1.12.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_361, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 254166288 bytes (242 MB) / 633339904 bytes (604 MB) up to 3806855168 bytes (3630 MB)
JVM Flags: 0 total;
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP 9.42 Powered by Forge 14.23.5.2860 4 mods loaded, 4 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
| State | ID | Version | Source | Signature |
|:----- |:--------- |:------------ |:------------------------------------------------------------------ |:--------- |
| LC | minecraft | 1.12.2 | minecraft.jar | None |
| LC | mcp | 9.42 | minecraft.jar | None |
| LC | FML | 8.0.99.99 | forge-1.12.2-14.23.5.2860_mapped_snapshot_20171003-1.12-recomp.jar | None |
| LC | forge | 14.23.5.2860 | forge-1.12.2-14.23.5.2860_mapped_snapshot_20171003-1.12-recomp.jar | None |
Loaded coremods (and transformers):
GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.6.13596 Compatibility Profile Context 20.10.35.02 27.20.1034.6' Renderer: 'AMD Radeon HD 7700 Series'
Launched Version: ${MC_VERSION}
LWJGL: 2.9.4
OpenGL: *************************** Compatibility Profile Context 20.10.35.02 27.20.1034.6, ATI Technologies Inc.
GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.
Using VBOs: Yes
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs:
Current Language: Русский (Россия)
Profiler Position: N/A (disabled)