Skip to content

Commit

Permalink
damn you jankson
Browse files Browse the repository at this point in the history
  • Loading branch information
CammiePone committed Nov 8, 2021
1 parent c56880e commit 998f6d7
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 57 deletions.
3 changes: 2 additions & 1 deletion src/main/java/dev/cammiescorner/arcanus/Arcanus.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import dev.cammiescorner.arcanus.core.util.*;
import me.shedaniel.autoconfig.AutoConfig;
import me.shedaniel.autoconfig.ConfigHolder;
import me.shedaniel.autoconfig.serializer.GsonConfigSerializer;
import me.shedaniel.autoconfig.serializer.JanksonConfigSerializer;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
Expand Down Expand Up @@ -64,7 +65,7 @@ public class Arcanus implements ModInitializer {
@Override
public void onInitialize() {
DataTrackers.MANA.getId();
AutoConfig.register(ArcanusConfig.class, JanksonConfigSerializer::new);
AutoConfig.register(ArcanusConfig.class, GsonConfigSerializer::new);
configHolder = AutoConfig.getConfigHolder(ArcanusConfig.class);

ServerPlayNetworking.registerGlobalReceiver(CastSpellMessage.ID, CastSpellMessage::handle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
import me.shedaniel.autoconfig.annotation.ConfigEntry;
import me.shedaniel.cloth.clothconfig.shadowed.blue.endless.jankson.Comment;

import java.util.Arrays;
import java.util.List;

@Config(name = Arcanus.MOD_ID)
public class ArcanusConfig implements ConfigData {
@Comment("Should the Lectern Structure Processor run?")
public boolean doLecternProcessor = true;

@Comment("Should the Bookshelf Structure Processor run?")
@Comment("Should the Bookshelf Structure Processor run? (Only" +
"\n recommended in Vanilla)")
public boolean doBookshelfProcessor = true;

@Comment("Should Stronghold Libraries have Spell Books spawn? (Does" +
Expand Down Expand Up @@ -41,23 +43,63 @@ public class ArcanusConfig implements ConfigData {
@ConfigEntry.Gui.CollapsibleObject
public SpellStuff spells = new SpellStuff();

@Comment("A list of structure paths that have Bookshelves to be replaced" +
"\n by Fillable Bookshelves from Arcanus.")
public List<String> structuresWithBookshelves = List.of(
@Comment("A list of structure paths that have Lecterns to be filled" +
"\n with Spell Books from Arcanus.")
public List<String> structuresWithLecterns = Arrays.asList(
"awesomedungeon:the_ztower",
"betterstrongholds:rooms/grand_library",
"betterstrongholds:rooms/library_md",
"betterstrongholds:rooms/treasure_room_lg",
"dungeons_arise:monastery/monastery_top_0",
"endrem:end_castle/castle_bl",
"endrem:end_castle/castle_br",
"endrem:end_castle/castle_ml",
"endrem:end_castle/castle_mr",
"endrem:end_castle/castle_tr",
"endrem:end_gate/main/library",
"endrem:end_gate/main/old_church",
"minecraft:village/desert/houses/desert_library_1",
"minecraft:village/plains/houses/plains_library_1",
"minecraft:village/plains/houses/plains_library_2",
"minecraft:village/savanna/houses/savanna_library_1",
"minecraft:village/snowy/houses/snowy_library_1",
"minecraft:village/taiga/houses/taiga_library_1",
"minecraft:village/taiga/houses/taiga_medium_house_3",
"minecraft:village/taiga/zombie/houses/taiga_library_1",
"minecraft:village/taiga/zombie/houses/taiga_medium_house_3",
"minecraft:woodland_mansion/1x1_b4",
"minecraft:woodland_mansion/1x2_c4",
"minecraft:woodland_mansion/1x2_d1",
"minecraft:woodland_mansion/2x2_b3",
"minecraft:woodland_mansion/2x2_b4",
"mostructures:factory/base",
"mostructures:market/main",
"mostructures:ship/bottom_lower",
"repurposed_structures:villages/badlands/houses/library_1",
"repurposed_structures:villages/badlands/houses/library_2",
"repurposed_structures:villages/birch/houses/library_1",
"repurposed_structures:villages/birch/houses/library_2",
"repurposed_structures:villages/crimson/houses/library_1",
"repurposed_structures:villages/crimson/houses/library_2",
"repurposed_structures:villages/dark_forest/houses/library_1",
"repurposed_structures:villages/dark_forest/houses/library_2",
"repurposed_structures:villages/giant_taiga/houses/library_1",
"repurposed_structures:villages/jungle/houses/library_1",
"repurposed_structures:villages/mountains/houses/library_1",
"repurposed_structures:villages/mountains/zombie/houses/library_1",
"repurposed_structures:villages/oak/houses/library_1",
"repurposed_structures:villages/oak/houses/library_2",
"repurposed_structures:villages/swamp/houses/library_1",
"repurposed_structures:villages/warped/houses/library_1",
"repurposed_structures:villages/warped/houses/library_2",
"soaringstructures2:soarings9",
"stoneholm:abandoned_poi/library_01",
"stoneholm:abandoned_poi/library_02",
"stoneholm:poi/library_01",
"stoneholm:poi/library_02",
"stonevaults:magetower/floors/library",
"stonevaults:pillager_dungeon/rooms/big_library",
"stonevaults:pillager_dungeon/rooms/storage_2"
);

@Comment("A list of structure paths that have Bookshelves to be replaced" +
"\n by Fillable Bookshelves from Arcanus.")
public List<String> structuresWithBookshelves = Arrays.asList(
"awesomedungeon:abandoned_oak_palace",
"awesomedungeon:the_ztower",
"betterstrongholds:rooms/cmd_yung",
"betterstrongholds:rooms/grand_library",
"betterstrongholds:rooms/library_md",
Expand Down Expand Up @@ -115,6 +157,36 @@ public class ArcanusConfig implements ConfigData {
"dungeons_arise:thornborn_towers/thornborn_towers_room_2",
"dungeons_arise:thornborn_towers/thornborn_towers_room_3",
"dungeons_arise:undead_pirate_ship/undead_pirate_ship_part_0",
"endrem:end_castle/castle_bl",
"endrem:end_castle/castle_br",
"endrem:end_castle/castle_ml",
"endrem:end_castle/castle_mr",
"endrem:end_castle/castle_tl",
"endrem:end_castle/castle_tm",
"endrem:end_castle/castle_tr",
"endrem:end_gate/main/enchanting_room",
"endrem:end_gate/main/library",
"endrem:end_gate/puzzles/end_gate",
"graveyard:haunted_house_01",
"minecraft:village/desert/houses/desert_library_1",
"minecraft:village/plains/houses/plains_library_1",
"minecraft:village/plains/houses/plains_library_2",
"minecraft:village/savanna/houses/savanna_library_1",
"minecraft:village/snowy/houses/snowy_library_1",
"minecraft:village/taiga/houses/taiga_library_1",
"minecraft:village/taiga/houses/taiga_medium_house_3",
"minecraft:village/taiga/zombie/houses/taiga_library_1",
"minecraft:village/taiga/zombie/houses/taiga_medium_house_3",
"minecraft:woodland_mansion/1x1_b4",
"minecraft:woodland_mansion/1x2_c4",
"minecraft:woodland_mansion/1x2_d1",
"minecraft:woodland_mansion/2x2_b3",
"minecraft:woodland_mansion/2x2_b4",
"morevillagesmod:mushroom_house/mushroom1",
"morevillagesmod:mushroom_house/mushroom2",
"morevillagesmod:mushroom_house/mushroom3",
"morevillagesmod:mushroom_house/mushroom12",
"morevillagesmod:mushroom_house/mushroom13",
"mostructures:market/main",
"mostructures:pyramid/base",
"mostructures:ship/bottom_lower",
Expand Down Expand Up @@ -178,6 +250,7 @@ public class ArcanusConfig implements ConfigData {
"repurposed_structures:villages/swamp/houses/library_1",
"repurposed_structures:villages/warped/houses/library_1",
"repurposed_structures:villages/warped/houses/library_2",
"soaringstructures2:soarings9",
"stoneholm:abandoned_poi/library_01",
"stoneholm:abandoned_poi/library_02",
"stoneholm:poi/copper_shop",
Expand All @@ -193,49 +266,6 @@ public class ArcanusConfig implements ConfigData {
"stonevaults:pillager_dungeon/rooms/library"
);

@Comment("A list of structure paths that have Lecterns to be filled" +
"\n with Spell Books from Arcanus.")
public List<String> structuresWithLecterns = List.of(
"minecraft:village/desert/houses/desert_library_1",
"minecraft:village/plains/houses/plains_library_1",
"minecraft:village/plains/houses/plains_library_2",
"minecraft:village/savanna/houses/savanna_library_1",
"minecraft:village/snowy/houses/snowy_library_1",
"minecraft:village/taiga/houses/taiga_library_1",
"minecraft:village/taiga/zombie/houses/taiga_library_1",
"betterstrongholds:rooms/grand_library",
"betterstrongholds:rooms/library_md",
"betterstrongholds:rooms/treasure_room_lg",
"dungeons_arise:monastery/monastery_top_0",
"mostructures:factory/base",
"mostructures:market/main",
"mostructures:ship/bottom_lower",
"repurposed_structures:villages/badlands/houses/library_1",
"repurposed_structures:villages/badlands/houses/library_2",
"repurposed_structures:villages/birch/houses/library_1",
"repurposed_structures:villages/birch/houses/library_2",
"repurposed_structures:villages/crimson/houses/library_1",
"repurposed_structures:villages/crimson/houses/library_2",
"repurposed_structures:villages/dark_forest/houses/library_1",
"repurposed_structures:villages/dark_forest/houses/library_2",
"repurposed_structures:villages/giant_taiga/houses/library_1",
"repurposed_structures:villages/jungle/houses/library_1",
"repurposed_structures:villages/mountains/houses/library_1",
"repurposed_structures:villages/mountains/zombie/houses/library_1",
"repurposed_structures:villages/oak/houses/library_1",
"repurposed_structures:villages/oak/houses/library_2",
"repurposed_structures:villages/swamp/houses/library_1",
"repurposed_structures:villages/warped/houses/library_1",
"repurposed_structures:villages/warped/houses/library_2",
"stoneholm:abandoned_poi/library_01",
"stoneholm:abandoned_poi/library_02",
"stoneholm:poi/library_01",
"stoneholm:poi/library_02",
"stonevaults:magetower/floors/library",
"stonevaults:pillager_dungeon/rooms/big_library",
"stonevaults:pillager_dungeon/rooms/storage_2"
);

public static class SpellStuff {
@Comment("Should Lunge be enabled? (Restart Required)")
public boolean enableLunge = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
],
"uniforms": [
{ "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] },
{ "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] },
{ "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] }
{ "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }
]
}

0 comments on commit 998f6d7

Please sign in to comment.