]> git.seodisparate.com - TurnBasedMinecraftMod/commitdiff
Version 1.21.4, bug fix 1.21.4
authorStephen Seo <seo.disparate@gmail.com>
Fri, 2 Sep 2022 10:46:26 +0000 (19:46 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Fri, 2 Sep 2022 10:46:26 +0000 (19:46 +0900)
Fix bug where client may not be able to attack entities for which an entry did
not exist on the client-side config.

Changelog.md
README.md
build.gradle
src/main/java/com/burnedkirby/TurnBasedMinecraft/common/Battle.java
src/main/java/com/burnedkirby/TurnBasedMinecraft/common/TurnBasedMinecraftMod.java
src/main/resources/META-INF/mods.toml
src/main/resources/mcmod.info

index e27d61bcc8db96768a3ead76fea29b06a71a33b8..356bcd5b78bae8f6f647bc8c386ec485a64180ec 100644 (file)
@@ -1,7 +1,13 @@
 # Upcoming changes
 
+# Version 1.21.4
+
 More refactoring of check-if-in-battle lookup code.
 
+Fix potential bug where clients cannot attack entities if their config didn't
+exist client-side. They should now always be available to attack regardless of
+whether or not the client has the config entry for an entity.
+
 # Version 1.21.3
 
 Implemented "player-only" battles, which can be enabled in the server-side
index 26e107c1a086b4aeb1b1a68252347b6bef4daac5..6425146808121f5bcac194c5a816dd3b68de0389 100644 (file)
--- a/README.md
+++ b/README.md
@@ -58,7 +58,7 @@ configured for them.)
 # Building
 
 Simply invoke `./gradlew build` in the mod directory and after some time the
-finished jar will be saved at "build/libs/TurnBasedMinecraft-1.21.3.jar"
+finished jar will be saved at "build/libs/TurnBasedMinecraft-1.21.4.jar"
 
 # Other notes
 
index 00d5ea0e58f72a5696e9fff59198478fa8fd4778..20135615d22c63b7c074de4fb3f898272de94f5e 100644 (file)
@@ -14,7 +14,7 @@ apply plugin: 'net.minecraftforge.gradle'
 //apply plugin: 'eclipse'
 //apply plugin: 'maven-publish'
 
-version = "1.21.3"
+version = "1.21.4"
 group = "com.burnedkirby.TurnBasedMinecraft"
 archivesBaseName = "TurnBasedMinecraft"
 
index cf192deb561c7fba90bcd468295180706310f2d2..cde34afe60435e609d89016260d6c19ec05d9a3b 100644 (file)
@@ -266,7 +266,7 @@ public class Battle {
             entityInfo = TurnBasedMinecraftMod.proxy.getConfig().getMatchingEntityInfo(e);
         }
 
-        if (entityInfo == null && !(e instanceof Player) && TurnBasedMinecraftMod.proxy.isServerRunning()) {
+        if (isServer && entityInfo == null && !(e instanceof Player) && TurnBasedMinecraftMod.proxy.isServerRunning()) {
             return;
         }
         Combatant newCombatant = new Combatant(e, entityInfo);
@@ -314,7 +314,7 @@ public class Battle {
             entityInfo = TurnBasedMinecraftMod.proxy.getConfig().getMatchingEntityInfo(e);
         }
 
-        if (entityInfo == null && !(e instanceof Player) && TurnBasedMinecraftMod.proxy.isServerRunning()) {
+        if (isServer && entityInfo == null && !(e instanceof Player) && TurnBasedMinecraftMod.proxy.isServerRunning()) {
             return;
         }
         Combatant newCombatant = new Combatant(e, entityInfo);
index 115125f762b979e43b08b7f53bc96b8f1852f466..b7924a6f9aaa3e0017fe9ea68594c047b19c1a62 100644 (file)
@@ -39,7 +39,7 @@ import org.apache.logging.log4j.Logger;
 public class TurnBasedMinecraftMod {
     public static final String MODID = "com_burnedkirby_turnbasedminecraft";
     public static final String NAME = "Turn Based Minecraft Mod";
-    public static final String VERSION = "1.21.3";
+    public static final String VERSION = "1.21.4";
     public static final String CONFIG_FILENAME = "TBM_Config.toml";
     public static final String DEFAULT_CONFIG_FILENAME = "TBM_Config_DEFAULT.toml";
     public static final String CONFIG_DIRECTORY = "config/TurnBasedMinecraft/";
index 847c7384ad9fc5185e53caaa730e04d38913e20b..b8bae1e538bf9ad0e61483c774cdd5e2059e917d 100644 (file)
@@ -15,7 +15,7 @@ license="MIT"
 # The modid of the mod
 modId="com_burnedkirby_turnbasedminecraft" #mandatory
 # The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
-version="1.21.3" #mandatory
+version="1.21.4" #mandatory
  # A display name for the mod
 displayName="TurnBasedMinecraftMod" #mandatory
 # A URL to query for updates for this mod. See the JSON update specification <here>
index 906078962479e34b47c1c1dbac0ae72502ed8520..f0920b1c9b02036a37b3e8a3b70c3d42c7e1a273 100644 (file)
@@ -3,7 +3,7 @@
   "modid": "com_burnedkirby_turnbasedminecraft",
   "name": "Turn Based Minecraft",
   "description": "Changes battles to be turn-based.",
-  "version": "1.21.3",
+  "version": "1.21.4",
   "mcversion": "1.18.2",
   "url": "",
   "updateUrl": "",