diff --git a/gradle.properties b/gradle.properties index 5228f3b..9f63827 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ minecraft_version=1.20.4 yarn_mappings=1.20.4+build.1 loader_version=0.15.1 # Mod Properties -mod_version=4.0.0-beta.2 +mod_version=4.0.0 maven_group=dev.louis archives_base_name=Nebula # Dependencies diff --git a/src/main/java/dev/louis/nebula/api/NebulaPlayer.java b/src/main/java/dev/louis/nebula/api/NebulaPlayer.java index a827656..7c886c5 100644 --- a/src/main/java/dev/louis/nebula/api/NebulaPlayer.java +++ b/src/main/java/dev/louis/nebula/api/NebulaPlayer.java @@ -20,6 +20,10 @@ default SpellManager setSpellManager(SpellManager spellManager) { throw new UnsupportedOperationException("Injected Interface method was not overridden!"); } + /** + * This creates the ManaManager and the SpellManager if they are not already created. + * This should not be called manually, unless you know what you are doing. + */ default void createManagersIfNecessary() { throw new UnsupportedOperationException("Injected Interface method was not overridden!"); }; diff --git a/src/main/java/dev/louis/nebula/mana/manager/NebulaManaManager.java b/src/main/java/dev/louis/nebula/mana/manager/NebulaManaManager.java index 262e731..4c37bdb 100644 --- a/src/main/java/dev/louis/nebula/mana/manager/NebulaManaManager.java +++ b/src/main/java/dev/louis/nebula/mana/manager/NebulaManaManager.java @@ -37,7 +37,7 @@ public void setMana(int mana, boolean syncToClient) { } public void setMana(int mana) { - this.setMana(mana, true); + this.setMana(mana, this.isServer()); } public void addMana(int mana) { diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index f35502a..7f36330 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -28,8 +28,6 @@ "minecraft": ">=1.20.2" }, "custom": { - "nebula:contains_mana_manager": true, - "nebula:contains_spell_manager": true, "loom:injected_interfaces": { "net/minecraft/class_1657": ["dev/louis/nebula/api/NebulaPlayer"] }