Jump to content

[1.10.2] Achievements and checking if player has achievements (Capabilities)


SHsuperCM

Recommended Posts

First off I'd like if someone directed me to a good up to date achievement tutorial,

That'd be lovely!

Now, In alot of mods they have their custom tab in the achievement book and I want

to make sure that my achievements have their own tab..

 

Secondly, I want an block to view achievements select them and "buy" them with

EXP, I'll probably look at how the achievement gui does that but just to note that..

 

Now lastly I'll want to read if player got X achievement in another block,

Should be noted that the second block will "craft" stuff but will agree with the server

if the player unlocked the matching achievement for it...

 

 

TNX for anyone willing to help!

Doing stuff n' things

Link to comment
Share on other sites

Maybe now that i look it seems that i might not want to use the achevement system..

 

What's a good way to store information on a player other than that?

I want to "research" a part and be able to check anywhere if the player has researched

A part..

 

#phonekeyboard

Doing stuff n' things

Link to comment
Share on other sites

Maybe now that i look it seems that i might not want to use the achevement system..

 

What's a good way to store information on a player other than that?

I want to "research" a part and be able to check anywhere if the player has researched

A part..

 

#phonekeyboard

 

Use the Capability system to store data on players (among other things).

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.

Link to comment
Share on other sites

Heard about that, can it store nbt compounds maybe?

I know nothing about it...

 

And will it save across game sessions?

 

The data is stored as proper objects at runtime and saved to NBT on disk. It persists across game sessions.

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.

Link to comment
Share on other sites

When yoou say objects you mean i can also save custom objects? Like, my own?

 

Yes. You create the types that store your capability data at runtime, you write the code to read this from and write this to NBT.

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.

Link to comment
Share on other sites

Oh gosh, ill never understand it...

Is there a good tutorial for it somewhere?

 

I don't know of any tutorials, but you should read the official documentation page I linked in my first post.

 

For examples, you can look at the capabilities provided by Forge (look for usages of

CapabilityManager#register

), the capability test mod or my own mod's capabilities (API, implementation).

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.

Link to comment
Share on other sites

But you should read the official documentation page I linked in my first post.

Lead me to

Oh gosh, ill never understand it...

 

I never find the docs understandable for some reason.

 

Butt the

Really helped me understand most of it.... Still, I'll have to expirement with it myself but thanks alot for the help!

Doing stuff n' things

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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