dan donn
Members-
Posts
36 -
Joined
-
Last visited
-
Days Won
1
dan donn last won the day on July 16 2022
dan donn had the most liked content!
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
dan donn's Achievements
Tree Puncher (2/8)
4
Reputation
-
Can Confirm Servers Are Down With Bad Gateway Error.
-
Cheers Luis That Has Done The Trick
-
I have Looked and it still prints as a json object. I just need the method to convert or get the text out from the json.
-
I'm currently working with the written books nbt tag. The text on the pages are stored inside of a json format and I am looking to retrieve the data from within. the format is as follows {"text":"example text here"} and it's the example text here that I need to retrieve.
-
I may just stick to basic nbt saving, this seems like a headache to me. Thank you for the help anyways but I don't fully understand it Mainly outside of my range of abilities.
-
https://github.com/DDX5/TSPaintball it is under src/main/java/uk/nf/teamserpentalise/tspaintball/capability/ the main class has the register and eventinit has the attach capability
-
Now the error is to do with INBT and CompoundNBT. not sure why
-
package uk.nf.teamserpentalise.tspaintball.capability; import net.minecraft.nbt.CompoundNBT; public class PlayerTeamImpl implements PlayerTeam { private final String Team; public PlayerTeamImpl(){ this("None"); } public PlayerTeamImpl(String team) { Team = team; } @Override public String GetTeam() { return null; } @Override public void SetTeam(String Team) { } @Override public CompoundNBT serializeNBT() { final CompoundNBT nbt = new CompoundNBT(); nbt.putString("player.team", this.GetTeam()); return nbt; } @Override public void deserializeNBT(CompoundNBT nbt) { this.SetTeam(nbt.getString("player.team")); } } Does that seem right
-
That hasn't fixed it. still same error
-
Required type Provided type: Class<T> Class<PlayerTeam> storage: IStorage<T> CapabilityTeamStorage factory: Callable<? extends T> <method reference> reason: no instance(s) of type variable(s) exist so that CapabilityTeamStorage conforms to PlayerTeam inference variable T has incompatible bounds: equality constraints: PlayerTeam lower bounds: CapabilityTeamStorage It's the top one giving me isssues
-
@urbanxx001Yes just managed to get that however now the first parameter does not meet type class<T> instead it is class<PlayerTeam> not sure what is going on there
-
nevermind i misread the tutorial code
-
no instance(s) of type variable(s) exist so that CapabilityTeamStorage conforms to PlayerTeam inference variable T has incompatible bounds: equality constraints: PlayerTeam lower bounds: CapabilityTeamStorage Managed to find a basic example and went from there but the error above is now what is happening
-
Still don't quite get how to do this with the capability, I do understand the idea but having trouble implementing it. Sorry if this is too much to ask but could you possibly show me how and what I've done wrong. package uk.nf.teamserpentalise.tspaintball.capability; public class CapabilityFactory { public PlayerTeamCapability get(){ return new PlayerTeamCapability(); } } @diesieben07 Again my apologies if this is too much to ask
-
@diesieben07 not familiar with the factory could you possibly provide a basic example that way I can try to comprehend what it is.