Jump to content

guid118

Members
  • Posts

    6
  • Joined

  • Last visited

guid118's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. So, if I understand correctly, capabilities are NBT tags? I want to make a method that saves an integer to a tag created by my mod, but I'm not entirely sure how to do that.
  2. I am changing the server config file, and i have to save data to it. (i want the data to be easily accessible and changeable) Would there be a different way to save this per-player data? its just three integers per player
  3. I need to save an HashMap to the config
  4. hey all, i cant seem to find an event that triggers before the server shuts down. I have found ServerStoppingEvent, but this event crashes the server because: Caused by: java.lang.IllegalArgumentException: Listener for event class net.minecraftforge.event.server.ServerStoppingEvent takes an argument that is not a subtype of the base type interface net.minecraftforge.fml.event.IModBusEvent
  5. No I know, I have a further setup that requires a player name (I should probably use UUID) and saves it under there. The problem is that there is no config being created at all.
  6. Hey all, I've been trying to make a config file in which (of course) some data will be stored, but for some reason the server never creates a file. The mod I'm making is server side only and should save an integer per player. I have made a config class and an init with: private ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder(); private ForgeConfigSpec spec; public CommonConfig() { spec = builder.build(); } public init() { builder.comment("time in seconds that a player gets per day").define("timeperday", 5400); builder.pop(); } // init gets called everytime the server starts, does this mean the value will always be set to 5400?
×
×
  • Create New...

Important Information

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