Jump to content

[1.10.2] Multiple Items/Blocks crash launcher


luckie12

Recommended Posts

So, i tried to add new items + blocks to the mod, but everytime when i do that, at the blocks it says :

 

 

 

[00:45:19] [Client thread/INFO] [FML]: MinecraftForge v12.18.1.2045 Initialized

[00:45:19] [Client thread/INFO] [FML]: Replaced 233 ore recipes

[00:45:19] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer

[00:45:19] [Client thread/INFO] [FML]: Searching C:\Users\Luc\Documents\eclipse\Tutorial\run\mods for mods

[00:45:20] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load

[00:45:21] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, bot] at CLIENT

[00:45:21] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, bot] at SERVER

[00:45:21] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:BitofTuts

[00:45:21] [Client thread/INFO] [FML]: Processing ObjectHolder annotations

[00:45:21] [Client thread/INFO] [FML]: Found 423 ObjectHolder annotations

[00:45:21] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations

[00:45:21] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations

[00:45:21] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0

[00:45:21] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json

[00:45:21] [Client thread/INFO] [sTDOUT]: [Fatal1tyGC.BitofTuts.init.ModItems:registerItem:87]: Registered Item: copper_ingot

[00:45:21] [Client thread/INFO] [sTDOUT]: [Fatal1tyGC.BitofTuts.init.ModBlocks:registerBlock:50]: Registered Block: copper_ore

[00:45:21] [Client thread/INFO] [FML]: Applying holder lookups

[00:45:21] [Client thread/INFO] [FML]: Holder lookups applied

[00:45:21] [Client thread/INFO] [FML]: Injecting itemstacks

[00:45:21] [Client thread/INFO] [FML]: Itemstack injection complete

[00:45:21] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue

[00:45:21] [Client thread/ERROR] [FML]:

States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

UCH mcp{9.19} [Minecraft Coder Pack] (minecraft.jar)

UCH FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10.2-12.18.1.2045.jar)

UCH Forge{12.18.1.2045} [Minecraft Forge] (forgeSrc-1.10.2-12.18.1.2045.jar)

UCE bot{1.0} [bitofTuts] (bin)

[00:45:21] [Client thread/ERROR] [FML]: The following problems were captured during this phase

[00:45:21] [Client thread/ERROR] [FML]: Caught exception from bot

java.lang.IllegalStateException: Attempted to set registry name with existing registry name! New: copper_ore Old: bot:copper_ore

at net.minecraftforge.fml.common.registry.IForgeRegistryEntry$Impl.setRegistryName(IForgeRegistryEntry.java:73) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]

at Fatal1tyGC.BitofTuts.init.ModBlocks.registerBlock(ModBlocks.java:38) ~[bin/:?]

at Fatal1tyGC.BitofTuts.init.ModBlocks.register(ModBlocks.java:27) ~[bin/:?]

at Fatal1tyGC.BitofTuts.BitofTuts.preInit(BitofTuts.java:29) ~[bin/:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:597) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]

at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:239) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]

at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:142) [LoadController.class:?]

at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:607) [Loader.class:?]

at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:255) [FMLClientHandler.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:477) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]

at GradleStart.main(GradleStart.java:26) [start/:?]

[00:45:21] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: ---- Minecraft Crash Report ----

// I just don't know what went wrong :(

 

Time: 4-8-16 0:45

Description: Initializing game

 

java.lang.IllegalStateException: Attempted to set registry name with existing registry name! New: copper_ore Old: bot:copper_ore

at net.minecraftforge.fml.common.registry.IForgeRegistryEntry$Impl.setRegistryName(IForgeRegistryEntry.java:73)

at Fatal1tyGC.BitofTuts.init.ModBlocks.registerBlock(ModBlocks.java:38)

at Fatal1tyGC.BitofTuts.init.ModBlocks.register(ModBlocks.java:27)

at Fatal1tyGC.BitofTuts.BitofTuts.preInit(BitofTuts.java:29)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:597)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:239)

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:142)

at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:607)

at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:255)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:477)

at net.minecraft.client.Minecraft.run(Minecraft.java:386)

at net.minecraft.client.main.Main.main(Main.java:118)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)

at GradleStart.main(GradleStart.java:26)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Thread: Client thread

Stacktrace:

at net.minecraftforge.fml.common.registry.IForgeRegistryEntry$Impl.setRegistryName(IForgeRegistryEntry.java:73)

at Fatal1tyGC.BitofTuts.init.ModBlocks.registerBlock(ModBlocks.java:38)

at Fatal1tyGC.BitofTuts.init.ModBlocks.register(ModBlocks.java:27)

at Fatal1tyGC.BitofTuts.BitofTuts.preInit(BitofTuts.java:29)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:597)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:239)

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:142)

at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:607)

at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:255)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:477)

 

-- Initialization --

Details:

Stacktrace:

at net.minecraft.client.Minecraft.run(Minecraft.java:386)

at net.minecraft.client.main.Main.main(Main.java:118)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)

at GradleStart.main(GradleStart.java:26)

 

-- System Details --

Details:

Minecraft Version: 1.10.2

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.8.0_101, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 636770824 bytes (607 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: MCP 9.32 Powered by Forge 12.18.1.2045 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

UCH mcp{9.19} [Minecraft Coder Pack] (minecraft.jar)

UCH FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10.2-12.18.1.2045.jar)

UCH Forge{12.18.1.2045} [Minecraft Forge] (forgeSrc-1.10.2-12.18.1.2045.jar)

UCE bot{1.0} [bitofTuts] (bin)

Loaded coremods (and transformers):

GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 368.69' Renderer: 'GeForce GTX 760/PCIe/SSE2'

Launched Version: 1.10.2

LWJGL: 2.9.4

OpenGL: GeForce GTX 760/PCIe/SSE2 GL version 4.5.0 NVIDIA 368.69, NVIDIA Corporation

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: English (US)

Profiler Position: N/A (disabled)

CPU: 4x Intel® Core i5-4430 CPU @ 3.00GHz

[00:45:21] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Luc\Documents\eclipse\Tutorial\run\.\crash-reports\crash-2016-08-04_00.45.21-client.txt

Java HotSpot 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

 

 

 

My ModBlocks.java

 

package Fatal1tyGC.BitofTuts.init;

import Fatal1tyGC.BitofTuts.Reference;
import Fatal1tyGC.BitofTuts.blocks.blockCopperBlock;
import Fatal1tyGC.BitofTuts.blocks.blockCopperOre;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class ModBlocks {

public static Block copper_ore;
public static Block copper_block;

public static void init(){
	copper_ore = new blockCopperOre("copper_ore").setCreativeTab(CreativeTabs.MISC);
	copper_block = new blockCopperBlock("copper_block").setCreativeTab(CreativeTabs.MISC);
}

public static void register(){
	registerBlock(copper_ore);
	registerBlock(copper_block);
}

public static void registerRenders(){
	registerRender(copper_ore);
	registerRender(copper_block);
}

public static void registerBlock(Block block){
	//GameRegistry.register(block.setRegistryName("copper_ore"));

	GameRegistry.register(copper_ore.setRegistryName("copper_ore"));
	GameRegistry.register(new ItemBlock(copper_ore).setRegistryName(copper_ore.getRegistryName()));


	GameRegistry.register(copper_block.setRegistryName("copper_block"));
	GameRegistry.register(new ItemBlock(copper_block).setRegistryName(copper_block.getRegistryName()));

	//Add blocks




	System.out.println("Registered Block: " + block.getUnlocalizedName().substring(5));
}

public static void registerRender(Block block){
	Item item = Item.getItemFromBlock(block);
	ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(),"inventory"));
}
}

 

 

My ModItems.java gives this:

 

 

 

[00:47:09] [Client thread/INFO] [FML]: MinecraftForge v12.18.1.2045 Initialized

[00:47:09] [Client thread/INFO] [FML]: Replaced 233 ore recipes

[00:47:09] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer

[00:47:09] [Client thread/INFO] [FML]: Searching C:\Users\Luc\Documents\eclipse\Tutorial\run\mods for mods

[00:47:10] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load

[00:47:10] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, bot] at CLIENT

[00:47:10] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, bot] at SERVER

[00:47:11] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:BitofTuts

[00:47:11] [Client thread/INFO] [FML]: Processing ObjectHolder annotations

[00:47:11] [Client thread/INFO] [FML]: Found 423 ObjectHolder annotations

[00:47:11] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations

[00:47:11] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations

[00:47:11] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0

[00:47:11] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json

[00:47:11] [Client thread/INFO] [sTDOUT]: [Fatal1tyGC.BitofTuts.init.ModItems:registerItem:87]: Registered Item: copper_ingot

[00:47:11] [Client thread/INFO] [FML]: Applying holder lookups

[00:47:11] [Client thread/INFO] [FML]: Holder lookups applied

[00:47:11] [Client thread/INFO] [FML]: Injecting itemstacks

[00:47:11] [Client thread/INFO] [FML]: Itemstack injection complete

[00:47:11] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue

[00:47:11] [Client thread/ERROR] [FML]:

States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

UCH mcp{9.19} [Minecraft Coder Pack] (minecraft.jar)

UCH FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10.2-12.18.1.2045.jar)

UCH Forge{12.18.1.2045} [Minecraft Forge] (forgeSrc-1.10.2-12.18.1.2045.jar)

UCE bot{1.0} [bitofTuts] (bin)

[00:47:11] [Client thread/ERROR] [FML]: The following problems were captured during this phase

[00:47:11] [Client thread/ERROR] [FML]: Caught exception from bot

java.lang.IllegalStateException: Attempted to set registry name with existing registry name! New: copper_pickaxe Old: bot:copper_pickaxe

at net.minecraftforge.fml.common.registry.IForgeRegistryEntry$Impl.setRegistryName(IForgeRegistryEntry.java:73) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]

at Fatal1tyGC.BitofTuts.init.ModItems.registerItem(ModItems.java:85) ~[bin/:?]

at Fatal1tyGC.BitofTuts.init.ModItems.register(ModItems.java:66) ~[bin/:?]

at Fatal1tyGC.BitofTuts.BitofTuts.preInit(BitofTuts.java:27) ~[bin/:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:597) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]

at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:239) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]

at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:142) [LoadController.class:?]

at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:607) [Loader.class:?]

at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:255) [FMLClientHandler.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:477) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]

at GradleStart.main(GradleStart.java:26) [start/:?]

[00:47:11] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: ---- Minecraft Crash Report ----

// Hey, that tickles! Hehehe!

 

Time: 4-8-16 0:47

Description: Initializing game

 

java.lang.IllegalStateException: Attempted to set registry name with existing registry name! New: copper_pickaxe Old: bot:copper_pickaxe

at net.minecraftforge.fml.common.registry.IForgeRegistryEntry$Impl.setRegistryName(IForgeRegistryEntry.java:73)

at Fatal1tyGC.BitofTuts.init.ModItems.registerItem(ModItems.java:85)

at Fatal1tyGC.BitofTuts.init.ModItems.register(ModItems.java:66)

at Fatal1tyGC.BitofTuts.BitofTuts.preInit(BitofTuts.java:27)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:597)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:239)

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:142)

at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:607)

at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:255)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:477)

at net.minecraft.client.Minecraft.run(Minecraft.java:386)

at net.minecraft.client.main.Main.main(Main.java:118)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)

at GradleStart.main(GradleStart.java:26)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Thread: Client thread

Stacktrace:

at net.minecraftforge.fml.common.registry.IForgeRegistryEntry$Impl.setRegistryName(IForgeRegistryEntry.java:73)

at Fatal1tyGC.BitofTuts.init.ModItems.registerItem(ModItems.java:85)

at Fatal1tyGC.BitofTuts.init.ModItems.register(ModItems.java:66)

at Fatal1tyGC.BitofTuts.BitofTuts.preInit(BitofTuts.java:27)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:597)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:239)

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)

at com.google.common.eventbus.EventBus.post(EventBus.java:275)

at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:142)

at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:607)

at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:255)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:477)

 

-- Initialization --

Details:

Stacktrace:

at net.minecraft.client.Minecraft.run(Minecraft.java:386)

at net.minecraft.client.main.Main.main(Main.java:118)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)

at GradleStart.main(GradleStart.java:26)

 

-- System Details --

Details:

Minecraft Version: 1.10.2

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.8.0_101, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 667962848 bytes (637 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: MCP 9.32 Powered by Forge 12.18.1.2045 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

UCH mcp{9.19} [Minecraft Coder Pack] (minecraft.jar)

UCH FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10.2-12.18.1.2045.jar)

UCH Forge{12.18.1.2045} [Minecraft Forge] (forgeSrc-1.10.2-12.18.1.2045.jar)

UCE bot{1.0} [bitofTuts] (bin)

Loaded coremods (and transformers):

GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 368.69' Renderer: 'GeForce GTX 760/PCIe/SSE2'

Launched Version: 1.10.2

LWJGL: 2.9.4

OpenGL: GeForce GTX 760/PCIe/SSE2 GL version 4.5.0 NVIDIA 368.69, NVIDIA Corporation

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: English (US)

Profiler Position: N/A (disabled)

CPU: 4x Intel® Core i5-4430 CPU @ 3.00GHz

[00:47:11] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Luc\Documents\eclipse\Tutorial\run\.\crash-reports\crash-2016-08-04_00.47.11-client.txt

Java HotSpot 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

 

 

 

 

Its code:

package Fatal1tyGC.BitofTuts.init;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;




import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemHoe;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemSword;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fml.common.registry.GameRegistry;
import Fatal1tyGC.BitofTuts.Reference;
import Fatal1tyGC.BitofTuts.items.ItemModAxe;
import Fatal1tyGC.BitofTuts.items.ItemModHoe;
import Fatal1tyGC.BitofTuts.items.ItemModPickaxe;
import Fatal1tyGC.BitofTuts.items.ItemModShovel;
import Fatal1tyGC.BitofTuts.items.ItemModSword;

public class ModItems {

public static final Set<Item> ITEMS = new HashSet<Item>();

public static List<Item>ItemList=new ArrayList<Item>();

public static Item copper_ingot;

//Tool Materials
public static ToolMaterial copperMaterial = EnumHelper.addToolMaterial("copper", 2, 300, 5.0F, 2.0F, 10);


//Tools
public static ItemPickaxe copper_pickaxe;
public static ItemHoe copper_hoe;
//public static ItemAxe copper_axe;
public static ItemSpade copper_shovel;
public static ItemSword copper_sword;

public static void init(){
	copper_ingot = new Item().setUnlocalizedName("copper_ingot").setCreativeTab(CreativeTabs.MISC).setMaxStackSize(64);

	//Tools
	copper_pickaxe = new ItemModPickaxe(copperMaterial, "copper_pickaxe");
	copper_hoe = new ItemModHoe(copperMaterial, "copper_hoe");
	//copper_axe = new ItemModAxe(copperMaterial, "copper_axe");
	copper_shovel = new ItemModShovel(copperMaterial, "copper_shovel");
	copper_sword = new ItemModSword(copperMaterial, "copper_sword");


}

public static void register(){
	registerItem(copper_ingot);

	//Tools
	registerItem(copper_pickaxe);
	///////////registerItem(copper_axe); WONT WORK IN 1.9
	registerItem(copper_hoe);
	registerItem(copper_shovel);
	registerItem(copper_sword);
}

public static void registerRenders(){
	registerRender(copper_ingot);

	//Tools
	registerRender(copper_pickaxe);
	//registerRender(copper_axe);
	registerRender(copper_hoe);
	registerRender(copper_shovel);
	registerRender(copper_sword);	
}

public static void registerItem(Item item){
	GameRegistry.register(item.setRegistryName(item.getUnlocalizedName().substring(5)));

	System.out.println("Registered Item: " + item.getUnlocalizedName().substring(5));
	//GameRegistry.registerItem(item, item.getUnlocalizedName().substring(5));
}

public static void registerRender(Item item){
	//Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
	//Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(),"inventory"));	
	//ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
	ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(),"inventory"));
	//Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
}

}

 

I have tried on both alot of ways to get it working, changing the code everytime etc, nothing works :/

 

Link to comment
Share on other sites

I guess you are talking about:

 

	//GameRegistry.register(copper_ore.setRegistryName("copper_ore"));
	GameRegistry.register(new ItemBlock(copper_ore).setRegistryName(copper_ore.getRegistryName()));

If so, ill remove the one with new ItemBlock

Link to comment
Share on other sites

When you remove

GameRegistry.register(copper_ore.setRegistryName("copper_ore"));

You get

 

 

[00:56:34] [Client thread/ERROR] [FML]: Caught exception from bot

java.lang.NullPointerException

at net.minecraftforge.fml.common.registry.IForgeRegistryEntry$Impl.setRegistryName(IForgeRegistryEntry.java:90) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]

at Fatal1tyGC.BitofTuts.init.ModBlocks.registerBlock(ModBlocks.java:39) ~[bin/:?]

at Fatal1tyGC.BitofTuts.init.ModBlocks.register(ModBlocks.java:26) ~[bin/:?]

at Fatal1tyGC.BitofTuts.BitofTuts.preInit(BitofTuts.java:29) ~[bin/:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:597) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]

at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:239) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]

at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]

at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]

at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:142) [LoadController.class:?]

at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:607) [Loader.class:?]

at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:255) [FMLClientHandler.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:477) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]

at GradleStart.main(GradleStart.java:26) [start/:?]

[00:56:34] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: ---- Minecraft Crash Report ----

// Don't do that.

 

 

 

if you keep that one and remove the one with new ItemBlock, then it comes back to the same starting error

Link to comment
Share on other sites

What he is talking about is the fact that you are calling setRegistryName twice when you only need to call it once.

GameRegistry.registerBlock(block.setRegistryName("blockName"));
GameRegistry.registerItem(new ItemBlock(block));

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Actually I think it is happening in Items not blocks.

 

 

java.lang.IllegalStateException: Attempted to set registry name with existing registry name! New: copper_pickaxe Old: bot:copper_pickaxe

  at net.minecraftforge.fml.common.registry.IForgeRegistryEntry$Impl.setRegistryName(IForgeRegistryEntry.java:73)

  at Fatal1tyGC.BitofTuts.init.ModItems.registerItem(ModItems.java:85)

  at Fatal1tyGC.BitofTuts.init.ModItems.register(ModItems.java:66)

  at Fatal1tyGC.BitofTuts.BitofTuts.preInit(BitofTuts.java:27)

 

 

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

What he is talking about is the fact that you are calling setRegistryName twice when you only need to call it once.

GameRegistry.registerBlock(block.setRegistryName("blockName"));
GameRegistry.registerItem(new ItemBlock(block));

 

Aaah alright!

 

I changed that, this is what my code looks like now:

 

 

package Fatal1tyGC.BitofTuts.init;

import Fatal1tyGC.BitofTuts.Reference;
import Fatal1tyGC.BitofTuts.blocks.blockCopperBlock;
import Fatal1tyGC.BitofTuts.blocks.blockCopperOre;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class ModBlocks {

public static Block copper_ore;
public static Block copper_block;

public static void init(){
	copper_ore = new blockCopperOre("copper_ore").setCreativeTab(CreativeTabs.MISC);
	copper_block = new blockCopperBlock("copper_block").setCreativeTab(CreativeTabs.MISC);
}

public static void register(){
	registerBlock(copper_ore);
	registerBlock(copper_block);
}

public static void registerRenders(){
	registerRender(copper_ore);
	registerRender(copper_block);
}

public static void registerBlock(Block block){
	//GameRegistry.register(block.setRegistryName("copper_ore"));

	GameRegistry.register(block.setRegistryName("copper_ore"));
	GameRegistry.register(new ItemBlock(block));

	GameRegistry.register(block.setRegistryName("copper_block"));
	GameRegistry.register(new ItemBlock(block));



	System.out.println("Registered Block: " + block.getUnlocalizedName().substring(5));

}

public static void registerRender(Block block){
	Item item = Item.getItemFromBlock(block);
	ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(),"inventory"));
}
}

 

Getting a new error:

 

 

 

[01:11:37] [Client thread/ERROR] [FML]: The following problems were captured during this phase
[01:11:37] [Client thread/ERROR] [FML]: Caught exception from bot
java.lang.IllegalArgumentException: No registry name set for object net.minecraft.item.ItemBlock@788be73c (net.minecraft.item.ItemBlock)
at net.minecraftforge.fml.common.registry.GameData.register_impl(GameData.java:251) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]
at net.minecraftforge.fml.common.registry.GameRegistry.register(GameRegistry.java:153) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]
at Fatal1tyGC.BitofTuts.init.ModBlocks.registerBlock(ModBlocks.java:39) ~[bin/:?]
at Fatal1tyGC.BitofTuts.init.ModBlocks.register(ModBlocks.java:26) ~[bin/:?]
at Fatal1tyGC.BitofTuts.BitofTuts.preInit(BitofTuts.java:29) ~[bin/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:597) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:239) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217) ~[forgeSrc-1.10.2-12.18.1.2045.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:142) [LoadController.class:?]
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:607) [Loader.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:255) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:477) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
[01:11:37] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: ---- Minecraft Crash Report ----
// Ouch. That hurt 

Time: 4-8-16 1:11
Description: Initializing game

java.lang.IllegalArgumentException: No registry name set for object net.minecraft.item.ItemBlock@788be73c (net.minecraft.item.ItemBlock)
at net.minecraftforge.fml.common.registry.GameData.register_impl(GameData.java:251)
at net.minecraftforge.fml.common.registry.GameRegistry.register(GameRegistry.java:153)
at Fatal1tyGC.BitofTuts.init.ModBlocks.registerBlock(ModBlocks.java:39)
at Fatal1tyGC.BitofTuts.init.ModBlocks.register(ModBlocks.java:26)
at Fatal1tyGC.BitofTuts.BitofTuts.preInit(BitofTuts.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:597)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:239)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:217)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:142)
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:607)
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:255)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:477)
at net.minecraft.client.Minecraft.run(Minecraft.java:386)
at net.minecraft.client.main.Main.main(Main.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:26)

 

 

 

I thought it WAS beingset by calling registerBlock(copper_ore);

 

 

**EDITTTT: ModItems is not causing an error anymore, i turned off the lines with the crash results to fix the block issue first

Link to comment
Share on other sites

What he is talking about is the fact that you are calling setRegistryName twice when you only need to call it once.

GameRegistry.registerBlock(block.setRegistryName("blockName"));
GameRegistry.registerItem(new ItemBlock(block));

No, this is not what I am talking about. The code you have shown luckie12 is completely fine.

But there is code somewhere else (which you have not shown) that already calls setRegistryName on these Blocks so that the calls which you have shown here fail.

 

The only thing i use to attach to blocks is the class itself:

package Fatal1tyGC.BitofTuts.blocks;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;

public class blockCopperOre extends Block{

public blockCopperOre(String unlocalizedName) {
	super(Material.ROCK);
	this.setUnlocalizedName(unlocalizedName);
}

}

 

 

 

 

 

 

EDIT AGAIN

 

 

my ClientProxy:

 

package Fatal1tyGC.BitofTuts.proxy;

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import Fatal1tyGC.BitofTuts.init.ModBlocks;
import Fatal1tyGC.BitofTuts.init.ModItems;

public class ClientProxy extends CommonProxy{

public void PreInit(FMLPreInitializationEvent event){
	ModItems.registerRenders();
	ModBlocks.registerRenders();
}

public void registerRenders() {
	ModItems.registerRenders();
	ModBlocks.registerRenders();
}

}

Link to comment
Share on other sites

Actually I was wrong at least the new error pointed that out, but your problem is that when you call registerBlock you set the registry twice

	GameRegistry.register(block.setRegistryName("copper_ore"));
	GameRegistry.register(new ItemBlock(block));

	GameRegistry.register(block.setRegistryName("copper_block"));
	GameRegistry.register(new ItemBlock(block));

You only need this once, but you need to pass a string.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Once changed that,

it says

java.lang.IllegalArgumentException: No registry name set for object net.minecraft.item.ItemBlock@788be73c (net.minecraft.item.ItemBlock)
at net.minecraftforge.fml.common.registry.GameData.register_impl(GameData.java:251)

Link to comment
Share on other sites

Code example

private void registerBlock(Block block, String registryName) {
	GameRegistry.register(block.setRegistryName(registryName));
	GameRegistry.register(new ItemBlock(block).setRegistryName(registryName));
}

public void registerBlocks() {
	registerBlock(block1, "block1");
	registerBlock(block2), "block2");
	// Add more
}

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

That line of code points the mods block to the JSON model, then from there that handles all texture stuff. I would 1 check your model location 2 check your texture location.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

i fixed it tho,

 

my ModItems crashes me now,

 

package Fatal1tyGC.BitofTuts.init;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;







import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemHoe;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemSword;
import net.minecraft.item.ItemTool;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fml.common.registry.GameRegistry;
import Fatal1tyGC.BitofTuts.Reference;
import Fatal1tyGC.BitofTuts.items.ItemModAxe;
import Fatal1tyGC.BitofTuts.items.ItemModHoe;
import Fatal1tyGC.BitofTuts.items.ItemModPickaxe;
import Fatal1tyGC.BitofTuts.items.ItemModShovel;
import Fatal1tyGC.BitofTuts.items.ItemModSword;

public class ModItems {


public static Item copper_ingot;

//Tool Materials
public static ToolMaterial copperMaterial = EnumHelper.addToolMaterial("copper", 2, 300, 5.0F, 2.0F, 10);


//Tools
public static ItemPickaxe copper_pickaxe;
public static ItemHoe copper_hoe;
//public static ItemAxe copper_axe;
public static ItemSpade copper_shovel;
public static ItemSword copper_sword;

public static void init(){
	copper_ingot = new Item().setUnlocalizedName("copper_ingot").setCreativeTab(CreativeTabs.MISC).setMaxStackSize(64);

	//Tools
	copper_pickaxe = new ItemModPickaxe(copperMaterial, "copper_pickaxe");
	copper_hoe = new ItemModHoe(copperMaterial, "copper_hoe");
	//copper_axe = new ItemModAxe(copperMaterial, "copper_axe");
	copper_shovel = new ItemModShovel(copperMaterial, "copper_shovel");
	copper_sword = new ItemModSword(copperMaterial, "copper_sword");


}

public static void register(){
	registerItem(copper_ingot, "copper_ingot");

	//Tools
	registerItem(copper_pickaxe,"copper_pickaxe");
	///////////registerItem(copper_axe); WONT WORK IN 1.9
	registerItem(copper_hoe,"copper_hoe");
	registerItem(copper_shovel, "copper_shovel");
	registerItem(copper_sword, "copper_sword");
}

public static void registerRenders(){
	registerRender(copper_ingot);

	//Tools
	registerRender(copper_pickaxe);
	////////////registerRender(copper_axe); WONT WORK IN 1.9
	registerRender(copper_hoe);
	registerRender(copper_shovel);
	registerRender(copper_sword);	
}

public static void registerItem(Item item, String registryName){

	GameRegistry.register(item.setRegistryName(registryName));
	GameRegistry.register(new Item().setRegistryName(registryName));

	//GameRegistry.register(item.setRegistryName(item.getUnlocalizedName().substring(5)));

	System.out.println("Registered Item: " + item.getUnlocalizedName().substring(5));
	//GameRegistry.registerItem(item, item.getUnlocalizedName().substring(5));
}

public static void registerRender(Item item){
	//Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
	//Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(),"inventory"));	
	//ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
	ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(),"inventory"));
	//Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
}

}

 

I tried the same way as the blocks... no luck

 

java.lang.IllegalArgumentException: The name bot:copper_ingot has been registered twice, for net.minecraft.item.Item@4e67f0a0 and net.minecraft.item.Item@656c356c.

at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.add(FMLControlledNamespacedRegistry.java:471)

Link to comment
Share on other sites

You only need one GameRegistry for items when you do it with blocks you are refistering the block and the item that corresponds with the block.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

So only use this one?

 

	GameRegistry.register(item.setRegistryName(registryName));

 

java.lang.IllegalStateException: Attempted to set registry name with existing registry name! New: copper_pickaxe Old: bot:copper_pickaxe

at net.minecraftforge.fml.common.registry.IForgeRegistryEntry$Impl.setRegistryName(IForgeRegistryEntry.java:73)

Link to comment
Share on other sites

Jesus...

 

ffs.png

 

Why you do this? ;_;

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.