Tips

Tips

39M Downloads

Getting a crash when removing all default tips

Boolyman opened this issue · 7 comments

commented

I have my own tips datapack'd in, and I want to remove all of the default ones. Below is the tips.toml file I am using, and it is crashing. Can you give me any tips as to why?

#The amount of time to wait before cycling the displayed tip. This is in miliseconds. 1000ms = 1s
cycleTime = 5000
#A list of tip IDs to remove from the list. Restart is required for changes to take effect.

removedTips = ["tips:blaze_snowball",
"tips:coarse_to_dirt",
"tips:note_block_instrument",
"tips:fall_damage_blocks",
"tips:job_site_dimension",
"tips:east",
"tips:mooshroom_lightning",
"tips:scrap_nuggets",
"tips:witch_conversion",
"tips:dog_rotten_flesh",
"tips:boat_passenger",
"tips:boat_jump",
"tips:animal_growing",
"tips:shulker_armor",
"tips:poison_immune",
"tips:zombie_armor",
"tips:poison_immune",
"tips:gravity_torch",
"tips:fishing_resources",
"tips:piglin_repellent",
"tips:undead_helmet",
"tips:crouch_blocks",
"tips:undead_damage",
"tips:lava_fuel",
"tips:dog_health",
"tips:dragon_blocks",
"tips:fossils",
"tips:deflect_ghast_fireballs",
"tips:cooked_drops",
"tips:shulker_golem",
"tips:wandering_invis",
"tips:arthropods",
"tips:barrel",
"tips:nether_lava",
"outer_end:purpur_golems",
"tips:bed_explode",
"tips:biome_fishing",
"outer_end:tangled_violite",
"tips:lure_animals",
"tips:water_grass",
"outer_end:catacombs",
"tips:enderman_blocks",
"tips:swamp_slimes",
"outer_end:end_towers",
"outer_end:crystal_rods",
"tips:nether_sponge",
"tips:creeper_cat",
"tips:villager_sweat",
"tips:string_wool",
"tips:baby_panda_slimeball",
"tips:creeper_drops_disc",
"tips:iron_golem_heal",
"tips:four_eggs",
"tips:turtle_shell",
"tips:biome_bonemeal",
"tips:piglin_gold",
"tips:wooden_tool_fuel",
"tips:fortress_triangulation",
"tips:ore_tiers",
"tips:bed_respawn"
]

#A list of tip namespaces to remove from the list. Restart is requird for changes to take effect.
removedTips = []

commented

@VallenFrostweaver Just to clarify, the namespace thing is a vanilla data pack concept which is why I don't spend too much time on explaining it in the wiki. Namespaces are just the ID of a data pack / resource pack / mod / thing that has added another thing to the game.

Yeah. I missed that at first. Now I'm trying to figure out how to datapack adding in tips while configuring to remove the vanilla ones. xD

commented

@VallenFrostweaver Just to clarify, the namespace thing is a vanilla data pack concept which is why I don't spend too much time on explaining it in the wiki. Namespaces are just the ID of a data pack / resource pack / mod / thing that has added another thing to the game.

commented

@VallenFrostweaver If you need a specific example you can always refer to this example pack. The IDs of the tips in this example would be

examplepack:basic_example
examplepack:formatted_example
examplepack:localized_example
commented

You've written the removedTips entry twice. Once at the top and again at the bottom.

Additionally, the recommended way to disable all default tips is to use the removedNamespaces option. Simply remove the tips namespace which is used by all default tips. If this removes your custom tips as well, your pack should be using it's own namespace.

commented

I've also tried it without the outer_end mod tip removal. It also crashes.

// Hi. I'm Minecraft, and I'm a crashaholic.

Time: 10/11/21 8:07 PM
Description: Rendering overlay

net.minecraftforge.fml.config.ConfigFileTypeHandler$ConfigLoadingException: Failed loading config file tips-client.toml of type CLIENT for modid tips
at net.minecraftforge.fml.config.ConfigFileTypeHandler.lambda$reader$1(ConfigFileTypeHandler.java:61) ~[?:?] {re:classloading}
at net.minecraftforge.fml.config.ConfigFileTypeHandler$$Lambda$17368/1245027572.apply(Unknown Source) ~[?:?] {}
at net.minecraftforge.fml.config.ConfigTracker.openConfig(ConfigTracker.java:104) ~[?:?] {re:classloading}
at net.minecraftforge.fml.config.ConfigTracker.lambda$loadConfigs$1(ConfigTracker.java:83) ~[?:?] {re:classloading}
at net.minecraftforge.fml.config.ConfigTracker$$Lambda$17367/1948764219.accept(Unknown Source) ~[?:?] {}
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:1.8.0_51] {}
at java.util.Collections$SynchronizedCollection.forEach(Collections.java:2062) ~[?:1.8.0_51] {}
at net.minecraftforge.fml.config.ConfigTracker.loadConfigs(ConfigTracker.java:83) ~[?:?] {re:classloading}
at net.minecraftforge.fml.ModLoader.lambda$null$18(ModLoader.java:208) ~[?:?] {re:classloading}
at net.minecraftforge.fml.ModLoader$$Lambda$17366/623546967.run(Unknown Source) ~[?:?] {}
at net.minecraftforge.fml.DistExecutor.unsafeRunWhenOn(DistExecutor.java:125) ~[?:?] {re:classloading}
at net.minecraftforge.fml.ModLoader.loadMods(ModLoader.java:208) ~[?:?] {re:classloading}
at net.minecraftforge.fml.client.ClientModLoader.lambda$startModLoading$7(ClientModLoader.java:132) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraftforge.fml.client.ClientModLoader$$Lambda$17360/808365868.run(Unknown Source) ~[?:?] {}
at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:123) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraftforge.fml.client.ClientModLoader$$Lambda$3029/1155317988.run(Unknown Source) ~[?:?] {}
at net.minecraftforge.fml.client.ClientModLoader.startModLoading(ClientModLoader.java:132) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraftforge.fml.client.ClientModLoader.lambda$onResourceReload$2(ClientModLoader.java:114) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraftforge.fml.client.ClientModLoader$$Lambda$17343/746608851.run(Unknown Source) ~[?:?] {}
at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:123) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraftforge.fml.client.ClientModLoader$$Lambda$3029/1155317988.run(Unknown Source) ~[?:?] {}
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1618) ~[?:1.8.0_51] {}
at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1610) ~[?:1.8.0_51] {}
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_51] {}
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) ~[?:1.8.0_51] {}
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689) ~[?:1.8.0_51] {re:computing_frames}
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) ~[?:1.8.0_51] {}
Caused by: com.electronwill.nightconfig.core.io.ParsingException: Invalid TOML data: entry "[removedTips]" defined twice in its table.
at com.electronwill.nightconfig.toml.TableParser.checkDuplicateKey(TableParser.java:88) ~[toml-3.6.3.jar:?] {}
at com.electronwill.nightconfig.toml.TableParser.parseNormal(TableParser.java:59) ~[toml-3.6.3.jar:?] {}
at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:44) ~[toml-3.6.3.jar:?] {}
at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:37) ~[toml-3.6.3.jar:?] {}
at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:113) ~[core-3.6.3.jar:?] {}
at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:219) ~[core-3.6.3.jar:?] {}
at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:202) ~[core-3.6.3.jar:?] {}
at com.electronwill.nightconfig.core.file.WriteSyncFileConfig.load(WriteSyncFileConfig.java:73) ~[core-3.6.3.jar:?] {}
at com.electronwill.nightconfig.core.file.AutosaveCommentedFileConfig.load(AutosaveCommentedFileConfig.java:85) ~[core-3.6.3.jar:?] {}
at net.minecraftforge.fml.config.ConfigFileTypeHandler.lambda$reader$1(ConfigFileTypeHandler.java:57) ~[?:?] {re:classloading}
... 26 more

commented

You've written the removedTips entry twice. Once at the top and again at the bottom.

Additionally, the recommended way to disable all default tips is to use the removedNamespaces option. Simply remove the tips namespace which is used by all default tips. If this removes your custom tips as well, your pack should be using it's own namespace.

So as an example (for others trying to do the same), are you stating that...

#The amount of time to wait before cycling the displayed tip. This is in miliseconds. 1000ms = 1s
cycleTime = 7000
#A list of tip IDs to remove from the list. Restart is required for changes to take effect.
removedTips = []
#A list of tip namespaces to remove from the list. Restart is requird for changes to take effect.
removedNamespaces = ["tips"]

...would remove the default vanilla tips because they are all assigned as "tips" namespace? I checked the documentation and do not see any info on how to create your own namespace to avoid your own tips being removed as well. Can you point to that or add a note here for future users with a similar issue? I basically did what Boolyman did above with trying to remove the Tips (minus the duplicate "removedTips") and think this would be useful to have that info here at least.
Nevermind. It's here: #40

commented

@VallenFrostweaver If you need a specific example you can always refer to this example pack. The IDs of the tips in this example would be

examplepack:basic_example
examplepack:formatted_example
examplepack:localized_example

Thanks very much for the example. To proceed further I'll have to learn how to datapack in general (which file goes where and does what, etc.). Sadly, it'll have to be for another time. I'll live with the default tips showing up for now. Thanks again for the help.