Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.14/1.15] Save List on player clientside
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
Tupaç

[1.14/1.15] Save List on player clientside

By Tupaç, March 31, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Tupaç    0

Tupaç

Tupaç    0

  • Tree Puncher
  • Tupaç
  • Members
  • 0
  • 18 posts
Posted March 31, 2020

Hi, is it possible to save a resourceLocation List on the player (or similar) clientside? if so, how?

 

i have a gui with a list of names and i want to keep those names after the client is closed and open.

 

thanks

  • Quote

Share this post


Link to post
Share on other sites

DavidM    179

DavidM

DavidM    179

  • World Shaper
  • DavidM
  • Members
  • 179
  • 1821 posts
Posted March 31, 2020

You can write a file to disk. When you need it simply read the file.

Capabilities would also work, and would probably be a bit simpler to implement.

  • Quote

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Share this post


Link to post
Share on other sites

Animefan8888    741

Animefan8888

Animefan8888    741

  • Reality Controller
  • Animefan8888
  • Forge Modder
  • 741
  • 6157 posts
Posted March 31, 2020 (edited)
2 minutes ago, DavidM said:

Capabilities would also work, and would probably be a bit simpler to implement.

Capabilities wouldn't save the data if the mod is meant to be client side. At least not on dedicated servers. So @Tupaç is better off writing the file to disk themselves.

Edited March 31, 2020 by Animefan8888
  • Like 1
  • Quote

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.

Share this post


Link to post
Share on other sites

Tupaç    0

Tupaç

Tupaç    0

  • Tree Puncher
  • Tupaç
  • Members
  • 0
  • 18 posts
Posted March 31, 2020

Ah, i see. ok
is there a suggested method for saving data on disk? or you recommend anyone in special?

  • Quote

Share this post


Link to post
Share on other sites

Animefan8888    741

Animefan8888

Animefan8888    741

  • Reality Controller
  • Animefan8888
  • Forge Modder
  • 741
  • 6157 posts
Posted March 31, 2020
9 hours ago, Tupaç said:

Ah, i see. ok
is there a suggested method for saving data on disk? or you recommend anyone in special?

Either to a JSON file via the GSON library(good if you want to easily be able to read the data with your eyes) or using CompoundNBT and CompressedStreamTools.

  • Quote

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Thorius
      [1.15.2] How Would I make a custom bow?

      By Thorius · Posted 13 minutes ago

      You have to create a new bullet entity class but you can use the snowball as a template. In kinematics there's not much difference between a snowball and a bullet. If it looks and hurts like a bullet then it's a bullet. But you have to register it as a new entity.
    • Ipsissimus418
      [1.16.4] WorldTickEvent Concurrent Access Exception

      By Ipsissimus418 · Posted 31 minutes ago

      That is something I hadn't considered in terms of threads.   I have the WorldTickEvent handler do nothing on the client but run on the server. I may have some paths for the addEntry running on both the client and server. Something I need to look into and check if that is where the conflict is coming from.   Thanks.
    • kiou.23
      [1.16] Custom Sign won't render

      By kiou.23 · Posted 36 minutes ago

      Did the classes, now the edit screen shows up, and if I use a vanilla WoodType for the sign, the texture shows up in the edit screen (not in the actual block tho, it still won't render) the changes are on github. How should I go about rendering the Sign again? I'll need to write my own TileEntityRenderer?
    • PedreHenrry
      my minecraft crashed by "rendering overlay"

      By PedreHenrry · Posted 40 minutes ago

      i fixed it re instaling the forge after delete it  
    • Somonestolemyusername
      [1.15.2] How Would I make a custom bow?

      By Somonestolemyusername · Posted 50 minutes ago

      but if I use the snowball class it will be like im shooting snowballs not bullets. you know mr crayfishes gun mod? i want my gun to be somewhat like that also i figured out how to connect my registered object to the class
  • Topics

    • Somonestolemyusername
      14
      [1.15.2] How Would I make a custom bow?

      By Somonestolemyusername
      Started Tuesday at 09:30 PM

    • Ipsissimus418
      2
      [1.16.4] WorldTickEvent Concurrent Access Exception

      By Ipsissimus418
      Started 2 hours ago

    • kiou.23
      14
      [1.16] Custom Sign won't render

      By kiou.23
      Started 10 hours ago

    • PedreHenrry
      5
      my minecraft crashed by "rendering overlay"

      By PedreHenrry
      Started Yesterday at 01:06 PM

    • e2rifia
      2
      (1.16.2) Making a new capability(2)

      By e2rifia
      Started 1 hour ago

  • Who's Online (See full list)

    • RedBobKid
    • MistyMarshes
    • Bailym
    • gamer650xd
    • Lellian
    • Thorius
    • Somonestolemyusername
    • Minnifloyd
    • Funyaah
    • Beethoven92
    • kiou.23
    • Choonster
    • Cheesebobby
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.14/1.15] Save List on player clientside
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community