Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash during PREINIT, Seems to be from misbehaving imports #1

Open
kd8lvt opened this issue Apr 2, 2017 · 0 comments
Open

Crash during PREINIT, Seems to be from misbehaving imports #1

kd8lvt opened this issue Apr 2, 2017 · 0 comments

Comments

@kd8lvt
Copy link

kd8lvt commented Apr 2, 2017

Crash Report: https://pastebin.com/3f4CK0Pq

I have the right versions of TC and AoA (according to your Curse page) but it seems to be crashing :/

Looks to me that you are using a depreciated/removed function (AKA: getUniqueIdentifierFor). To get the mod id for an item, try this:

//Getting the full registry name. ex: minecraft:stone
String name = itemInstance.getRegistryName();
//Checking if the modid is 'nevermine'
if (name.substring(0,8) == 'nevermine'){//Note, like most things Java, it starts counting from zero
//Do aspect code here
}

Which, I mean, it's a whole lot easier, to say the least! (Of course, error if you have to :P)

NOTE: It's been a while since I've used getRegistryName (or even modded in general), so it might not return a string. (and coding practices may be rough around the edges in the snippet I gave you :P) 99% sure it does though :)

I'm sick nevermind the quoted bit - but good to know for the future (aka I'm an idiot and I thought I was playing 1.10) I honestly have no clue why it would be crashing other than imports misbehaving...?

Cool mod idea (haven't played it yet though :/)

Once you fix it I'll be putting up a modpack on Curse with it too, incase you wanted to know ;)

If you need to contact me, feel free to hit me up on Curse (same name as here) or, you know, just reply here :P
-kd8lvt

@kd8lvt kd8lvt changed the title Crash during PREINIT, Seems to be from getUniqueIdentifierFor not existing in 1.10 Crash during PREINIT, Seems to be from misbehaving imports Apr 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant