Posted November 13, 201410 yr I'm trying to add achievements to an established mod (Soul Shards: Reborn by Moze_Intel) I've got crafting a shard/cage achievements already in the bag, but I'm trying to add an achievement for each tier of shard you can level up (Maximum 5) But I have no idea how to grab the NBT data to be used for said achievements, all the code is visible at github I'm not asking to be spoonfed any code, just would like it if someone could point me in the right direction. Thank you for your time.
November 13, 201410 yr Author Basically a soul shard is a single item, when you craft it you get an 'unbound' shard, you have to kill something to bind the shard to that mob type, and you level it by killing more mobs of the same type e.g. Zombie, you need a default of 1024 kills to reach level 5 (Maximum level) but I know I'm not very good at java (I'm surprised I've managed to maintain / contribute to the mod at all)
November 15, 201410 yr Author I've looked the code over and over, and I can't actually find (I'm more than likely blind) the code that fires the tier leveling... also, I have 2 achievements that seem to 'auto-unlock' as soon as you start the game... I think something screwed up in my code lol
November 15, 201410 yr Looks like right here https://github.com/SgtPunishment/Soul-Shards-Reborn/blob/master/src/main/java/moze_intel/ssr/utils/Utils.java#L74 is where the shards tier levels up, it also looks like it can return the same tier as it was before, so you'd need to do a check to see if the previous tier is higher than the current route.
November 16, 201410 yr Author Looks like right here https://github.com/SgtPunishment/Soul-Shards-Reborn/blob/master/src/main/java/moze_intel/ssr/utils/Utils.java#L74 is where the shards tier levels up, it also looks like it can return the same tier as it was before, so you'd need to do a check to see if the previous tier is higher than the current route. Actually, if I look at that page you linked (Thank you by the way) a bit futher down (#L92) looks like that would be a better choice as it will return a byte value between 0 and 5... Now to hook into that to fire off the achievements (And figure out why an achievement I have already made is auto-giving)
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.