Jump to content

Recommended Posts

Posted

When I run my Minecraft mod, it runs fine for a few seconds, but then crashes before I get to the title screen. The console says, "AL lib: (EE) alc_cleanup: 1 device not closed".

 

Forge crash report

 

 

---- Minecraft Crash Report ----

// Surprise! Haha. Well, this is awkward.

 

Time: 8/9/16 3:15 PM

Description: Initializing game

 

java.lang.IllegalArgumentException: Attempted to register a item with conflicting names. Old: renewabilitymod:chain_mail New: chain_mail

at net.minecraftforge.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:423)

at main.ModItems.items(ModItems.java:17)

at com.renewability.renewabilitymod.RenewabilityMod.init(RenewabilityMod.java:24)

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:575)

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:235)

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

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.initializeMods(Loader.java:774)

at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:322)

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

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.GameRegistry.registerItem(GameRegistry.java:423)

at main.ModItems.items(ModItems.java:17)

at com.renewability.renewabilitymod.RenewabilityMod.init(RenewabilityMod.java:24)

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:575)

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:235)

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

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.initializeMods(Loader.java:774)

at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:322)

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

 

-- 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

Operating System: Windows 10 (amd64) version 10.0

Java Version: 1.8.0_91, Oracle Corporation

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

Memory: 660494800 bytes (629 MB) / 1257766912 bytes (1199 MB) up to 2837446656 bytes (2706 MB)

JVM Flags: 0 total;

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP 9.32 Powered by Forge 12.18.0.2000 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

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

UCHI FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10-12.18.0.2000-1.10.0.jar)

UCHI Forge{12.18.0.2000} [Minecraft Forge] (forgeSrc-1.10-12.18.0.2000-1.10.0.jar)

UCHE renewabilitymod{1.10} [renewabilitymod] (bin)

Loaded coremods (and transformers):

GL info: ' Vendor: 'Intel' Version: '4.3.0 - Build 20.19.15.4463' Renderer: 'Intel® HD Graphics 4400'

Launched Version: 1.10

LWJGL: 2.9.4

OpenGL: Intel® HD Graphics 4400 GL version 4.3.0 - Build 20.19.15.4463, Intel

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-4200U CPU @ 1.60GHz

 

 

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Posted

Please read the actual error message, it clearly tells you whats wrong (especially if you then look at the code that's producing it).

Also, stop using deprecated methods.

From my best guess, it has something to do with registering items. I haven't been able to properly learn how to register an item in versions 1.8 and later. Can you please teach me? Also, if registerItem() is deprecated, what should I use instead?

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Posted

register(IForgeRegistryObject)

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.

Posted

Almost anything is an IForgeRegistryObject Items and Blocks are the mainly used one but Enchantments and PotionEffects(something to do with potions). You need to call setRegistryName on the object first or it will not work, but for blocks you need to register the item as well as the blocks themselves or there won't be any Item for 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.

Posted

The interface is actually called

IForgeRegistryEntry

and the method to register it is

GameRegistry.register

.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Thanks, I could not remember the exact interface name and was unable to look it up (traveling).

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.

Posted

For registering blocks and items I have in both item and block libraries a register fuction for when I'm registering things.

 

Here's the item version:

 

    public static void regItems(Item item){
    	GameRegistry.registerItem(item, item.getUnlocalizedName().substring(5));
    }
}

 

Here's the block version:

 

public static void regBlocks(Block block){
	GameRegistry.registerBlock(block, block.getUnlocalizedName().substring(5));
}
}

 

All in All, they're very similar.

 

EDIT: And I've just posted for no reason it seemes. I just looked at the date of the first post and BAM! from the 9.  :P :P :P

Well if someone else is having trouble with the same thing, they could get some info out of this.

Posted

For registering blocks and items I have in both item and block libraries a register fuction for when I'm registering things.

 

Here's the item version:

 

    public static void regItems(Item item){
    	GameRegistry.registerItem(item, item.getUnlocalizedName().substring(5));
    }
}

 

Here's the block version:

 

public static void regBlocks(Block block){
	GameRegistry.registerBlock(block, block.getUnlocalizedName().substring(5));
}
}

 

All in All, they're very similar.

 

EDIT: And I've just posted for no reason it seemes. I just looked at the date of the first post and BAM! from the 9.  :P :P :P

Well if someone else is having trouble with the same thing, they could get some info out of this.

Dont use the deprecated version use the GameRegistry.register (item.setRegistryName (name) not unlocalized name

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.

Posted

For registering blocks and items I have in both item and block libraries a register fuction for when I'm registering things.

 

Here's the item version:

 

    public static void regItems(Item item){
    	GameRegistry.registerItem(item, item.getUnlocalizedName().substring(5));
    }
}

 

Here's the block version:

 

public static void regBlocks(Block block){
	GameRegistry.registerBlock(block, block.getUnlocalizedName().substring(5));
}
}

 

All in All, they're very similar.

 

EDIT: And I've just posted for no reason it seemes. I just looked at the date of the first post and BAM! from the 9.  :P :P :P

Well if someone else is having trouble with the same thing, they could get some info out of this.

Dont use the deprecated version use the GameRegistry.register (item.setRegistryName (name) not unlocalized name

 

I don't see the problem with the code I gave. I use it in my 1.10.2 mod and it works perfectly.

Posted

For registering blocks and items I have in both item and block libraries a register fuction for when I'm registering things.

 

Here's the item version:

 

    public static void regItems(Item item){
    	GameRegistry.registerItem(item, item.getUnlocalizedName().substring(5));
    }
}

 

Here's the block version:

 

public static void regBlocks(Block block){
	GameRegistry.registerBlock(block, block.getUnlocalizedName().substring(5));
}
}

 

All in All, they're very similar.

 

EDIT: And I've just posted for no reason it seemes. I just looked at the date of the first post and BAM! from the 9.  :P :P :P

Well if someone else is having trouble with the same thing, they could get some info out of this.

Dont use the deprecated version use the GameRegistry.register (item.setRegistryName (name) not unlocalized name

 

I don't see the problem with the code I gave. I use it in my 1.10.2 mod and it works perfectly.

The problem is that it will be removed in the next version of minecraft and you will need to change it anyway.

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.

Posted

For registering blocks and items I have in both item and block libraries a register fuction for when I'm registering things.

 

Here's the item version:

 

    public static void regItems(Item item){
    	GameRegistry.registerItem(item, item.getUnlocalizedName().substring(5));
    }
}

 

Here's the block version:

 

public static void regBlocks(Block block){
	GameRegistry.registerBlock(block, block.getUnlocalizedName().substring(5));
}
}

 

All in All, they're very similar.

 

EDIT: And I've just posted for no reason it seemes. I just looked at the date of the first post and BAM! from the 9.  :P :P :P

Well if someone else is having trouble with the same thing, they could get some info out of this.

Dont use the deprecated version use the GameRegistry.register (item.setRegistryName (name) not unlocalized name

 

I don't see the problem with the code I gave. I use it in my 1.10.2 mod and it works perfectly.

The problem is that it will be removed in the next version of minecraft and you will need to change it anyway.

 

Really!? I really need to get up-to-date with the next updates then!

Posted

C# had ways to mark methods as deprecated too.

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.

Posted

I mean the fact that after using the method it gets a nice line through it that's supposed to hint to you, "Hey dummy! This method is deprecated!" And then you look at the Javadoc (C# had something similar too) and read it and think, "Oh, this method is deprecated and tells me what to use instead, maybe I should dip that thing."

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.

Posted

In my code right now, my item is being registered twice. Is it better to register all the items in one class, or is it better to register each item in its own class?

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Posted

I have multiple ways you could do this.

1. In the constructor of the class you can add this to an array in a class then have a method that loops through all of the values in the array and register them.

2. You could pass a string into the constructor of your items class and register them there as you said.

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.

Posted

Almost anything is an IForgeRegistryObject Items and Blocks are the mainly used one but Enchantments and PotionEffects(something to do with potions). You need to call setRegistryName on the object first or it will not work, but for blocks you need to register the item as well as the blocks themselves or there won't be any Item for the block.

This was slightly confusing. Can you please give an example or link me to a tutorial that's up-to-date?

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

Posted

You can look at the link in my signature and look at my RegistryHelper class for an example on how that is handled.

Thanks. It's registered now.

If people call you garbage, don't let them stop you from doing great things. It's called a garbage can, not a garbage can't.

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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I tried do download the essential mod to my mod pack but i didnt work. I paly on 1.21 and it should work. I use neoforge for my modding. The weird things is my friend somehow added the mod to his modpack and many others that I somehow can´t. Is there anything i can do? 
    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
  • Topics

×
×
  • Create New...

Important Information

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