From 9b5b636fc2e485e56879ed56da4a99c162d3eb36 Mon Sep 17 00:00:00 2001 From: D1p4k <82884007+D1p4k@users.noreply.github.com> Date: Sun, 10 Dec 2023 10:15:03 +0100 Subject: [PATCH 1/4] Only call sendSync if on Server. --- .../java/dev/louis/nebula/mana/manager/NebulaManaManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { From b20994e19f6516438972de045d85ccbc6cd4c2fe Mon Sep 17 00:00:00 2001 From: D1p4k <82884007+D1p4k@users.noreply.github.com> Date: Sun, 10 Dec 2023 10:16:34 +0100 Subject: [PATCH 2/4] Remove old json keys from fabric.mod.json --- src/main/resources/fabric.mod.json | 2 -- 1 file changed, 2 deletions(-) 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"] } From bf5ef637090d9ae442504d4576097f439de331b3 Mon Sep 17 00:00:00 2001 From: D1p4k <82884007+D1p4k@users.noreply.github.com> Date: Sun, 10 Dec 2023 10:27:14 +0100 Subject: [PATCH 3/4] Add Javadoc --- src/main/java/dev/louis/nebula/api/NebulaPlayer.java | 4 ++++ 1 file changed, 4 insertions(+) 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!"); }; From bf123a38184214f2db09248f9c8a97b8ddf9a48f Mon Sep 17 00:00:00 2001 From: D1p4k <82884007+D1p4k@users.noreply.github.com> Date: Sun, 10 Dec 2023 10:27:21 +0100 Subject: [PATCH 4/4] Bump Version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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