Skip to content

Commit

Permalink
moved to gson
Browse files Browse the repository at this point in the history
  • Loading branch information
Globox1997 committed Sep 1, 2022
1 parent e0f8a3b commit 08ff6e5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/main/java/net/rpgz/RpgzMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ public void onInitialize() {
ConfigInit.init();
SoundInit.init();
TagInit.init();

}
}
}
7 changes: 2 additions & 5 deletions src/main/java/net/rpgz/config/RpgzConfig.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.rpgz.config;

import java.util.ArrayList;
import java.util.List;

import me.shedaniel.autoconfig.ConfigData;
import me.shedaniel.autoconfig.annotation.ConfigEntry;
Expand All @@ -20,10 +21,6 @@ public class RpgzConfig implements ConfigData {
public boolean despawn_immediately_when_empty = true;
public boolean surfacing_in_water = true;
@Comment("Example: minecraft:zombie or adventurez:brown_fungus")
public ArrayList<String> excluded_entities = new ArrayList<>() {
{
add("minecraft:shulker");
}
};
public ArrayList<String> excluded_entities = new ArrayList<>(List.of("minecraft:shulker"));

}
4 changes: 2 additions & 2 deletions src/main/java/net/rpgz/init/ConfigInit.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package net.rpgz.init;

import me.shedaniel.autoconfig.AutoConfig;
import me.shedaniel.autoconfig.serializer.JanksonConfigSerializer;
import me.shedaniel.autoconfig.serializer.GsonConfigSerializer;
import net.rpgz.config.RpgzConfig;

public class ConfigInit {

public static RpgzConfig CONFIG = new RpgzConfig();

public static void init() {
AutoConfig.register(RpgzConfig.class, JanksonConfigSerializer::new);
AutoConfig.register(RpgzConfig.class, GsonConfigSerializer::new);
CONFIG = AutoConfig.getConfigHolder(RpgzConfig.class).getConfig();
}

Expand Down

0 comments on commit 08ff6e5

Please sign in to comment.