-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Easy JSON Configuration Ingame! Hold the item you want to configure in your main hand, and then run the command you want to use. /simpledifficulty addArmor <temperature> /simpledifficulty addBlock <temperature> /simpledifficulty addConsumableTemperature <group> <temperature> <duration> /simpledifficulty addConsumableThirst <amount> <saturation> <thirstyChance> /simpledifficulty addFluid <temperature> After you've changed things, you can write it all to the actual json files with /simpledifficulty exportJson The load JSON got changed to /simpledifficulty reloadJson Remember, "reload" will make you lose any in-game changes if you don't "export" first! Also added an ability for mods to disable their own mod compatibility. This'll let mod makers replace the built-in compatibility with their own.
- Loading branch information
1 parent
c088a29
commit 87d65ec
Showing
14 changed files
with
609 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/main/java/com/charles445/simpledifficulty/api/SDCompatibility.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.charles445.simpledifficulty.api; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class SDCompatibility | ||
{ | ||
/** | ||
* Don't change this directly, use {@link #disableBuiltInModJsonConfiguration(String) disableBuiltInModJsonConfiguration} | ||
* <br> | ||
*/ | ||
public static List<String> disabledDefaultJson = new ArrayList<String>(); | ||
|
||
/** | ||
* Don't change this directly, use {@link #disableBuiltInModCompatibility(String) disableBuiltInModCompatibility} | ||
* <br> | ||
*/ | ||
public static List<String> disabledCompletely = new ArrayList<String>(); | ||
|
||
/** | ||
* Call this in preInit or init with your mod's modid.<br> | ||
* SimpleDifficulty won't automatically make settings for your mod.<br> | ||
* This is useful if you want to make defaults yourself. | ||
* @param modid | ||
*/ | ||
public static void disableBuiltInModJsonConfiguration(String modid) | ||
{ | ||
disabledDefaultJson.add(modid); | ||
} | ||
|
||
/** | ||
* Call this in preInit or init with your mod's modid<br> | ||
* SimpleDifficulty will stop automatically being compatible with your mod.<br> | ||
* This is useful if you want to make the mod compatibility in your own way!<br> | ||
* NOTE that this will disable any built in mod json configuration as well. | ||
*/ | ||
public static void disableBuiltInModCompatibility(String modid) | ||
{ | ||
disabledDefaultJson.add(modid); | ||
disabledCompletely.add(modid); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.