From a3431b135e759708bdc0ffb807bf22e3c9563fb0 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Tue, 23 Aug 2022 13:28:49 +0900 Subject: [PATCH] Impl ignore specific damage sources in battle Fixes #1. (Damage is inhibited, but some things like amount of air while underwater still decreases for the duration of being underwater regardless of being in battle.) Server-side config specifies which damage sources are ignored in battle. This can also be set in-game with `/tbm-server-edit`. Also updated config for entities which should reduce the amount of stuff printed into the logs (sorry about that). --- build.gradle | 2 +- .../client/ClientProxy.java | 14 +- .../common/BattleManager.java | 10 + .../TurnBasedMinecraft/common/Config.java | 63 +++- .../common/HurtEventHandler.java | 17 + .../common/TurnBasedMinecraftMod.java | 111 ++++++- src/main/resources/META-INF/mods.toml | 2 +- .../TBM_Config.toml | 293 +++++++++++++++++- src/main/resources/mcmod.info | 2 +- 9 files changed, 505 insertions(+), 9 deletions(-) create mode 100644 src/main/java/com/burnedkirby/TurnBasedMinecraft/common/HurtEventHandler.java diff --git a/build.gradle b/build.gradle index ca8a094..47e38ac 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,7 @@ apply plugin: 'net.minecraftforge.gradle' //apply plugin: 'eclipse' //apply plugin: 'maven-publish' -version = "1.19.0" +version = "1.20.0" group = "com.burnedkirby.TurnBasedMinecraft" archivesBaseName = "TurnBasedMinecraft" diff --git a/src/main/java/com/burnedkirby/TurnBasedMinecraft/client/ClientProxy.java b/src/main/java/com/burnedkirby/TurnBasedMinecraft/client/ClientProxy.java index f0ba408..a5763f6 100644 --- a/src/main/java/com/burnedkirby/TurnBasedMinecraft/client/ClientProxy.java +++ b/src/main/java/com/burnedkirby/TurnBasedMinecraft/client/ClientProxy.java @@ -17,7 +17,6 @@ import net.minecraft.world.entity.Entity; import net.minecraft.world.level.Level; import net.minecraftforge.network.NetworkEvent; -import java.util.UUID; import java.util.function.Supplier; public class ClientProxy extends CommonProxy { @@ -1050,6 +1049,19 @@ public class ClientProxy extends CommonProxy { "/tbm-server-edit creeper_always_allow_damage false"))); parent.getSiblings().add(sub); + sub = Component.literal("ignore_damage_sources "); + sub.setStyle(sub.getStyle() + .withColor(ChatFormatting.DARK_GREEN) + .withClickEvent(new ClickEvent( + ClickEvent.Action.RUN_COMMAND, + "/tbm-server-edit ignore_damage_sources")) + .withHoverEvent(new HoverEvent( + HoverEvent.Action.SHOW_TEXT, + Component.literal("Click to show current ignored damage sources (during battle), or use /tbm-server-edit ignore_damage_sources add/remove ") + )) + .withBold(true)); + parent.getSiblings().add(sub); + TurnBasedMinecraftMod.proxy.displayComponent(parent); break; } diff --git a/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/BattleManager.java b/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/BattleManager.java index 01d8668..ab8778f 100644 --- a/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/BattleManager.java +++ b/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/BattleManager.java @@ -350,4 +350,14 @@ public class BattleManager } return result; } + + public boolean isInBattle(int entityID) { + for (Battle battle : battleMap.values()) { + if (battle.hasCombatant(entityID)) { + return true; + } + } + + return false; + } } \ No newline at end of file diff --git a/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/Config.java b/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/Config.java index 7e53046..496f273 100644 --- a/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/Config.java +++ b/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/Config.java @@ -50,6 +50,9 @@ public class Config private boolean creeperStopExplodeOnLeaveBattle = true; private boolean creeperAlwaysAllowDamage = true; + private Set possibleIgnoreHurtDamageSources; + private Set ignoreHurtDamageSources; + public Config(Logger logger) { entityInfoMap = new HashMap(); @@ -59,6 +62,32 @@ public class Config musicBattleTypes = new HashSet(); musicSillyTypes = new HashSet(); battleIgnoringPlayers = new HashSet(); + possibleIgnoreHurtDamageSources = new HashSet(); + ignoreHurtDamageSources = new HashSet(); + + possibleIgnoreHurtDamageSources.add("inFire"); + possibleIgnoreHurtDamageSources.add("lightningBolt"); + possibleIgnoreHurtDamageSources.add("onFire"); + possibleIgnoreHurtDamageSources.add("lava"); + possibleIgnoreHurtDamageSources.add("hotFloor"); + possibleIgnoreHurtDamageSources.add("inWall"); + possibleIgnoreHurtDamageSources.add("cramming"); + possibleIgnoreHurtDamageSources.add("drown"); + possibleIgnoreHurtDamageSources.add("starve"); + possibleIgnoreHurtDamageSources.add("cactus"); + possibleIgnoreHurtDamageSources.add("fall"); + possibleIgnoreHurtDamageSources.add("flyIntoWall"); + possibleIgnoreHurtDamageSources.add("outOfWorld"); + possibleIgnoreHurtDamageSources.add("magic"); + possibleIgnoreHurtDamageSources.add("wither"); + possibleIgnoreHurtDamageSources.add("anvil"); + possibleIgnoreHurtDamageSources.add("fallingBlock"); + possibleIgnoreHurtDamageSources.add("dragonBreath"); + possibleIgnoreHurtDamageSources.add("dryout"); + possibleIgnoreHurtDamageSources.add("sweetBerryBush"); + possibleIgnoreHurtDamageSources.add("freeze"); + possibleIgnoreHurtDamageSources.add("fallingStalactite"); + possibleIgnoreHurtDamageSources.add("stalagmite"); { File confPath = new File(TurnBasedMinecraftMod.CONFIG_DIRECTORY); @@ -508,6 +537,17 @@ public class Config logTOMLInvalidValue("server_config.battle_turn_wait_forever", "false"); } + try { + Collection damage_sources = conf.get("server_config.ignore_damage_sources"); + for (String source : damage_sources) { + if (possibleIgnoreHurtDamageSources.contains(source)) { + ignoreHurtDamageSources.add(source); + } + } + } catch (ClassCastException e) { + logTOMLInvalidValue("server_config.ignore_damage_sources"); + } + Collection entities = null; try { entities = conf.get("server_config.entity"); @@ -1452,4 +1492,25 @@ public class Config public void setBattleDecisionDurationForever(boolean battleDecisionDurationForever) { this.battleDecisionDurationForever = battleDecisionDurationForever; } -} + + public final Collection getPossibleIgnoreHurtDamageSources() { + return possibleIgnoreHurtDamageSources; + } + + public final Collection getIgnoreHurtDamageSources() { + return ignoreHurtDamageSources; + } + + public boolean addIgnoreHurtDamageSource(String source) { + if (possibleIgnoreHurtDamageSources.contains(source) && !ignoreHurtDamageSources.contains(source)) { + ignoreHurtDamageSources.add(source); + return true; + } else { + return false; + } + } + + public boolean removeIgnoreHurtDamageSource(String source) { + return ignoreHurtDamageSources.remove(source); + } +} \ No newline at end of file diff --git a/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/HurtEventHandler.java b/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/HurtEventHandler.java new file mode 100644 index 0000000..551ff7c --- /dev/null +++ b/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/HurtEventHandler.java @@ -0,0 +1,17 @@ +package com.burnedkirby.TurnBasedMinecraft.common; + +import net.minecraftforge.event.entity.living.LivingHurtEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; + +public class HurtEventHandler { + @SubscribeEvent + public void handleHurtEvent(LivingHurtEvent event) { + CommonProxy proxy = TurnBasedMinecraftMod.proxy; + if (event.getEntity().level.isClientSide || proxy.getBattleManager() == null) { + return; + } else if (proxy.getBattleManager().isInBattle(event.getEntity().getId()) + && proxy.getConfig().getIgnoreHurtDamageSources().contains(event.getSource().msgId)) { + event.setCanceled(true); + } + } +} diff --git a/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/TurnBasedMinecraftMod.java b/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/TurnBasedMinecraftMod.java index ba4e6d0..fc70a52 100644 --- a/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/TurnBasedMinecraftMod.java +++ b/src/main/java/com/burnedkirby/TurnBasedMinecraft/common/TurnBasedMinecraftMod.java @@ -13,8 +13,8 @@ import net.minecraft.ChatFormatting; import net.minecraft.commands.Commands; import net.minecraft.commands.arguments.EntityArgument; import net.minecraft.network.chat.ClickEvent; -import net.minecraft.network.chat.HoverEvent; import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.HoverEvent; import net.minecraft.network.chat.MutableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; @@ -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.19.0"; + public static final String VERSION = "1.20.0"; 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/"; @@ -126,6 +126,7 @@ public class TurnBasedMinecraftMod { MinecraftForge.EVENT_BUS.register(new AttackEventHandler()); MinecraftForge.EVENT_BUS.register(new PlayerJoinEventHandler()); MinecraftForge.EVENT_BUS.register(new DimensionChangedHandler()); + MinecraftForge.EVENT_BUS.register(new HurtEventHandler()); logger.debug("Init com_burnedkirby_turnbasedminecraft"); } @@ -1065,7 +1066,7 @@ public class TurnBasedMinecraftMod { } c.getSource().sendFailure(Component.literal( - "Failed to remove category \"" + category + "\" to ignore_battle_types")); + "Failed to remove category \"" + category + "\" from ignore_battle_types")); return 1; })))) .then(Commands.literal("player_speed").executes(c -> { @@ -1484,6 +1485,110 @@ public class TurnBasedMinecraftMod { } return 1; }))) + .then(Commands.literal("ignore_damage_sources").executes(c -> { + MutableComponent response = Component.literal("Use "); + MutableComponent subResponse = Component.literal("/tbm-server-edit ignore_damage_sources add/remove "); + subResponse.setStyle(subResponse.getStyle().withColor(ChatFormatting.YELLOW)); + response.getSiblings().add(subResponse); + + subResponse = Component.literal("ignore_damage_sources is currently: ["); + response.getSiblings().add(subResponse); + + boolean isFirst = true; + for (String type : TurnBasedMinecraftMod.proxy.getConfig().getIgnoreHurtDamageSources()) { + if (!isFirst) { + response.getSiblings().add(Component.literal(", ")); + } + subResponse = Component.literal(type); + subResponse.setStyle(subResponse.getStyle() + .withColor(ChatFormatting.GREEN) + .withClickEvent(new ClickEvent( + ClickEvent.Action.RUN_COMMAND, + "/tbm-server-edit ignore_damage_sources remove " + type)) + .withHoverEvent(new HoverEvent( + HoverEvent.Action.SHOW_TEXT, + Component.literal("Click to remove type")))); + response.getSiblings().add(subResponse); + isFirst = false; + } + response.getSiblings().add(Component.literal("] ")); + + subResponse = Component.literal("Possible Damage Sources: ["); + response.getSiblings().add(subResponse); + + isFirst = true; + for (String type : TurnBasedMinecraftMod.proxy.getConfig().getPossibleIgnoreHurtDamageSources()) { + if (!isFirst) { + response.getSiblings().add(Component.literal(", ")); + } + subResponse = Component.literal(type); + subResponse.setStyle(subResponse.getStyle() + .withColor(ChatFormatting.YELLOW) + .withClickEvent(new ClickEvent( + ClickEvent.Action.RUN_COMMAND, + "/tbm-server-edit ignore_damage_sources add " + type)) + .withHoverEvent(new HoverEvent( + HoverEvent.Action.SHOW_TEXT, + Component.literal("Click to add type") + ))); + response.getSiblings().add(subResponse); + isFirst = false; + } + response.getSiblings().add(Component.literal("] ")); + + c.getSource().sendSuccess(response, false); + return 1; + }) + .then(Commands.literal("add").executes(c -> { + c.getSource().sendFailure(Component.literal("/tbm-server-edit ignore_damage_sources add ")); + return 1; + }) + .then(Commands.argument("type", StringArgumentType.greedyString()).executes(c -> { + String type = StringArgumentType.getString(c, "type"); + if (TurnBasedMinecraftMod.proxy.getConfig().addIgnoreHurtDamageSource(type) + && TurnBasedMinecraftMod.proxy.getConfig().updateConfigAppendToStringArray("server_config.ignore_damage_sources", type)) { + MutableComponent response = Component.literal("Successfully appended Damage Source type \""); + + MutableComponent sub = Component.literal(type); + sub.setStyle(sub.getStyle().withColor(ChatFormatting.GREEN)); + response.getSiblings().add(sub); + + sub = Component.literal("\" to ignore_damage_sources"); + response.getSiblings().add(sub); + + c.getSource().sendSuccess(response, true); + return 1; + } + + c.getSource().sendFailure(Component.literal( + "Failed to append type \"" + type + "\" to ignore_damage_sources" + )); + return 1; + }))) + .then(Commands.literal("remove").executes(c -> { + c.getSource().sendFailure(Component.literal("/tbm-server-edit ignore_damage_sources remove ")); + return 1; + }) + .then(Commands.argument("type", StringArgumentType.greedyString()).executes(c -> { + String type = StringArgumentType.getString(c, "type"); + if (TurnBasedMinecraftMod.proxy.getConfig().removeIgnoreHurtDamageSource(type) + && TurnBasedMinecraftMod.proxy.getConfig().updateConfigRemoveFromStringArray("server_config.ignore_damage_sources", type)) { + MutableComponent response = Component.literal("Successfully removed category \""); + + MutableComponent sub = Component.literal(type); + sub.setStyle(sub.getStyle().withColor(ChatFormatting.GREEN)); + response.getSiblings().add(sub); + + sub = Component.literal("\" from ignore_damage_sources"); + response.getSiblings().add(sub); + + c.getSource().sendSuccess(response, true); + return 1; + } + + c.getSource().sendFailure(Component.literal("Failed to remove type \"" + type + "\" from ignore_damage_sources")); + return 1; + })))) ); } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index cfe9f5d..53b47db 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -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.19.0" #mandatory +version="1.20.0" #mandatory # A display name for the mod displayName="TurnBasedMinecraftMod" #mandatory # A URL to query for updates for this mod. See the JSON update specification diff --git a/src/main/resources/assets/com_burnedkirby_turnbasedminecraft/TBM_Config.toml b/src/main/resources/assets/com_burnedkirby_turnbasedminecraft/TBM_Config.toml index 180671a..9dc6720 100644 --- a/src/main/resources/assets/com_burnedkirby_turnbasedminecraft/TBM_Config.toml +++ b/src/main/resources/assets/com_burnedkirby_turnbasedminecraft/TBM_Config.toml @@ -1,6 +1,6 @@ # Please do not change this option, the mod uses this to keep track of what new # changes to add to the config. -version = 8 +version = 9 do_not_overwrite = false [client_config] @@ -82,6 +82,24 @@ creeper_stop_explode_on_leave_battle = true # If false, creepers may not damage others outside of turn-based battle. creeper_always_allow_damage = true +# This array lists damage sources that are ignored for an entity in battle. +# To allow damage from all sources during battle, make this array empty. +# Valid values: +# "inFire", "lightningBolt", "onFire", "lava", "hotFloor", "inWall", "cramming", "drown", "starve", +# "cactus", "fall", "flyIntoWall", "outOfWorld", "magic", "wither", "anvil", "fallingBlock", +# "dragonBreath", "dryout", "sweetBerryBush", "freeze", "fallingStalactite", "stalagmite" +ignore_damage_sources = [ + "inFire", + "onFire", + "lava", + "hotFloor", + "inWall", + "drown", + "cactus", + "fallingBlock", + "sweetBerryBush" +] + # Each "server_config.entity" entry uses the following options: # name: full class name of the entity, cannot also have option "custom_name" @@ -107,12 +125,15 @@ attack_power = 5 attack_probability = 50 attack_effect = "fire" attack_effect_probability = 75 +attack_variance = 0 +defense_damage = 0 evasion = 5 category = "monster" speed = 45 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.CaveSpider" @@ -120,12 +141,15 @@ attack_power = 2 attack_probability = 75 attack_effect = "poison" attack_effect_probability = 90 +attack_variance = 0 +defense_damage = 0 evasion = 35 category = "monster" speed = 75 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Creeper" @@ -133,6 +157,8 @@ ignore_battle = false attack_power = 13 attack_probability = 95 attack_variance = 7 +attack_effect = "unknown" +defense_damage = 0 evasion = 5 category = "monster" speed = 25 @@ -145,17 +171,22 @@ name = "net.minecraft.world.entity.monster.Drowned" attack_power = 3 attack_probability = 70 attack_variance = 2 +attack_effect = "unknown" +defense_damage = 0 evasion = 5 category = "monster" speed = 25 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.ElderGuardian" attack_power = 8 attack_probability = 65 +attack_effect = "unknown" +attack_variance = 0 defense_damage = 2 defense_damage_probability = 35 evasion = 25 @@ -164,45 +195,61 @@ speed = 45 decision_attack_probability = 80 decision_defend_probability = 20 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.EnderMan" attack_power = 7 attack_probability = 80 +attack_effect = "unknown" +attack_variance = 0 +defense_damage = 0 evasion = 40 category = "monster" speed = 70 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Endermite" attack_power = 2 attack_probability = 80 +attack_effect = "unknown" +attack_variance = 0 +defense_damage = 0 evasion = 40 category = "monster" speed = 35 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Evoker" attack_power = 6 attack_probability = 60 +attack_effect = "unknown" +attack_variance = 0 +defense_damage = 0 evasion = 35 category = "monster" speed = 35 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Ghast" ignore_battle = true attack_power = 13 attack_probability = 20 +attack_effect = "unknown" +attack_variance = 0 +defense_damage = 0 evasion = 35 category = "monster" speed = 60 @@ -214,17 +261,23 @@ decision_flee_probability = 25 name = "net.minecraft.world.entity.monster.Giant" attack_power = 11 attack_probability = 35 +attack_effect = "unknown" +attack_variance = 0 +defense_damage = 0 evasion = 2 category = "monster" speed = 45 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Guardian" attack_power = 6 attack_probability = 55 +attack_effect = "unknown" +attack_variance = 0 defense_damage = 2 defense_damage_probability = 30 evasion = 25 @@ -233,18 +286,22 @@ speed = 50 decision_attack_probability = 80 decision_defend_probability = 20 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.hoglin.Hoglin" attack_power = 6 attack_variance = 2 attack_probability = 60 +attack_effect = "unknown" +defense_damage = 0 evasion = 20 category = "monster" speed = 40 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Husk" @@ -252,163 +309,210 @@ attack_power = 3 attack_probability = 70 attack_effect = "hunger" attack_effect_probability = 95 +attack_variance = 0 +defense_damage = 0 evasion = 5 category = "monster" speed = 25 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Illusioner" attack_power = 2 attack_probability = 70 attack_variance = 2 +attack_effect = "unknown" +defense_damage = 0 evasion = 5 category = "monster" speed = 35 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.IronGolem" attack_power = 14 attack_probability = 85 attack_variance = 7 +attack_effect = "unknown" +defense_damage = 0 evasion = 5 category = "monster" speed = 45 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.MagmaCube" attack_power = 3 attack_probability = 35 +attack_effect = "unknown" +attack_variance = 0 +defense_damage = 0 evasion = 12 category = "monster" speed = 35 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.piglin.Piglin" attack_power = 5 attack_variance = 2 attack_probability = 70 +attack_effect = "unknown" +defense_damage = 0 evasion = 20 category = "monster" speed = 25 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.piglin.PiglinBrute" attack_power = 10 attack_variance = 2 attack_probability = 75 +attack_effect = "unknown" +defense_damage = 0 evasion = 20 category = "monster" speed = 28 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Phantom" attack_power = 2 attack_probability = 90 attack_variance = 1 +attack_effect = "unknown" +defense_damage = 0 evasion = 35 category = "monster" speed = 65 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Pillager" attack_power = 3 attack_probability = 60 attack_variance = 1 +attack_effect = "unknown" +defense_damage = 0 evasion = 10 category = "monster" speed = 30 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Ravager" attack_power = 12 attack_probability = 70 attack_variance = 4 +attack_effect = "unknown" +defense_damage = 0 evasion = 4 category = "monster" speed = 35 decision_attack_probability = 90 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Shulker" attack_power = 4 attack_probability = 80 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 15 category = "monster" speed = 10 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Silverfish" attack_power = 1 attack_probability = 85 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 37 category = "monster" speed = 35 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Skeleton" attack_power = 3 attack_probability = 75 attack_variance = 1 +attack_effect = "unknown" +defense_damage = 0 evasion = 13 category = "monster" speed = 30 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Slime" attack_power = 2 attack_probability = 35 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 10 category = "monster" speed = 30 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Spider" attack_power = 2 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 25 category = "monster" speed = 70 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Stray" @@ -417,58 +521,74 @@ attack_probability = 75 attack_variance = 1 attack_effect = "slow" attack_effect_probability = 90 +defense_damage = 0 evasion = 13 category = "monster" speed = 30 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Vex" attack_power = 9 attack_probability = 65 +attack_effect = "unknown" +attack_variance = 0 +defense_damage = 0 evasion = 30 category = "monster" speed = 80 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Vindicator" attack_power = 13 attack_probability = 70 +attack_effect = "unknown" +attack_variance = 0 +defense_damage = 0 evasion = 10 category = "monster" speed = 35 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.warden.Warden" attack_power = 28 attack_probability = 65 attack_variance = 10 +attack_effect = "unknown" +defense_damage = 0 evasion = 7 category = "monster" speed = 50 decision_attack_probability = 95 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Witch" attack_power = 5 attack_probability = 75 attack_variance = 1 +attack_effect = "unknown" +defense_damage = 0 evasion = 8 category = "monster" speed = 35 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.WitherSkeleton" @@ -476,95 +596,127 @@ attack_power = 8 attack_probability = 70 attack_effect = "wither" attack_effect_probability = 90 +attack_variance = 0 +defense_damage = 0 evasion = 7 category = "monster" speed = 65 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Zoglin" attack_power = 6 attack_variance = 2 attack_probability = 60 +attack_effect = "unknown" +defense_damage = 0 evasion = 20 category = "monster" speed = 40 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Zombie" attack_power = 3 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 5 category = "monster" speed = 25 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.ZombifiedPiglin" attack_power = 8 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 10 category = "monster" speed = 50 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.ZombieVillager" attack_power = 3 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 5 category = "monster" speed = 25 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.allay.Allay" attack_power = 0 attack_probability = 50 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 40 category = "passive" speed = 50 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 100 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.axolotl.Axolotl" attack_power = 2 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 25 category = "passive" speed = 65 decision_attack_probability = 70 decision_defend_probability = 20 decision_flee_probability = 10 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.ambient.Bat" attack_power = 0 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 35 category = "passive" speed = 75 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 90 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Bee" attack_power = 2 attack_probability = 65 +attack_variance = 0 +defense_damage = 0 evasion = 30 category = "animal" speed = 20 @@ -573,322 +725,434 @@ decision_defend_probability = 0 decision_flee_probability = 0 attack_effect = "poison" attack_effect_probability = 50 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Cat" attack_power = 1 attack_probability = 70 attack_variance = 1 +attack_effect = "unknown" +defense_damage = 0 evasion = 30 category = "passive" speed = 75 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 90 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Chicken" attack_power = 0 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 10 category = "passive" speed = 35 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 90 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Cow" attack_power = 0 attack_probability = 50 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 1 category = "passive" speed = 20 decision_attack_probability = 0 decision_defend_probability = 10 decision_flee_probability = 80 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Dolphin" attack_power = 3 attack_probability = 80 attack_variance = 1 +attack_effect = "unknown" +defense_damage = 0 evasion = 45 category = "passive" speed = 75 decision_attack_probability = 70 decision_defend_probability = 0 decision_flee_probability = 30 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Fox" attack_power = 2 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 65 category = "animal" speed = 65 decision_attack_probability = 70 decision_defend_probability = 0 decision_flee_probability = 25 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.frog.Frog" attack_power = 2 attack_probability = 50 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 60 category = "animal" speed = 70 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 100 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.frog.Tadpole" attack_power = 0 attack_probability = 0 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 45 category = "animal" speed = 50 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 100 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.horse.Donkey" attack_power = 0 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 10 category = "passive" speed = 65 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 90 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.horse.Horse" attack_power = 0 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 10 category = "passive" speed = 65 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 90 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.goat.Goat" attack_power = 2 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 30 category = "passive" speed = 60 decision_attack_probability = 75 decision_defend_probability = 20 decision_flee_probability = 5 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.horse.Llama" attack_power = 1 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 10 category = "passive" speed = 50 decision_attack_probability = 65 decision_defend_probability = 0 decision_flee_probability = 25 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.MushroomCow" attack_power = 0 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 1 category = "passive" speed = 20 decision_attack_probability = 0 decision_defend_probability = 10 decision_flee_probability = 80 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.horse.Mule" attack_power = 0 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 10 category = "passive" speed = 50 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 90 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Ocelot" attack_power = 1 attack_probability = 70 attack_variance = 1 +attack_effect = "unknown" +defense_damage = 0 evasion = 30 category = "passive" speed = 75 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 90 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Panda" attack_power = 6 attack_probability = 60 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 10 category = "passive" speed = 30 decision_attack_probability = 45 decision_defend_probability = 25 decision_flee_probability = 30 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Parrot" attack_power = 0 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 35 category = "passive" speed = 70 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 90 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Pig" attack_power = 0 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 10 category = "passive" speed = 30 decision_attack_probability = 0 decision_defend_probability = 5 decision_flee_probability = 85 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.PolarBear" attack_power = 6 attack_probability = 67 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 5 category = "animal" speed = 35 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Rabbit" attack_power = 0 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 40 category = "passive" speed = 75 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 100 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Sheep" attack_power = 0 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 5 category = "passive" speed = 30 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 90 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.horse.SkeletonHorse" attack_power = 0 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 5 category = "passive" speed = 65 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 90 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.SnowGolem" attack_power = 0 attack_probability = 80 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 5 category = "passive" speed = 60 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Squid" attack_power = 0 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 15 category = "passive" speed = 40 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 90 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.horse.TraderLlama" attack_power = 1 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 10 category = "passive" speed = 50 decision_attack_probability = 65 decision_defend_probability = 0 decision_flee_probability = 25 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.npc.Villager" attack_power = 0 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 5 category = "passive" speed = 35 decision_attack_probability = 0 decision_defend_probability = 10 decision_flee_probability = 80 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Wolf" attack_power = 4 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 20 category = "animal" speed = 70 decision_attack_probability = 80 decision_defend_probability = 15 decision_flee_probability = 5 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.horse.ZombieHorse" attack_power = 0 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 8 category = "passive" speed = 65 decision_attack_probability = 0 decision_defend_probability = 0 decision_flee_probability = 90 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Cod" attack_power = 0 attack_probability = 50 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 50 category = "passive" speed = 75 decision_attack_probability = 25 decision_defend_probability = 0 decision_flee_probability = 75 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Pufferfish" attack_power = 0 attack_probability = 50 +attack_variance = 0 +attack_effect = "unknown" defense_damage = 3 defense_damage_probability = 75 evasion = 25 @@ -897,73 +1161,97 @@ speed = 45 decision_attack_probability = 35 decision_defend_probability = 0 decision_flee_probability = 65 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Salmon" attack_power = 0 attack_probability = 50 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 50 category = "passive" speed = 75 decision_attack_probability = 25 decision_defend_probability = 0 decision_flee_probability = 75 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.monster.Strider" attack_power = 0 attack_probability = 50 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 35 category = "passive" speed = 45 decision_attack_probability = 0 decision_defend_probability = 10 decision_flee_probability = 90 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.TropicalFish" attack_power = 0 attack_probability = 50 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 50 category = "passive" speed = 75 decision_attack_probability = 25 decision_defend_probability = 0 decision_flee_probability = 75 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.animal.Turtle" attack_power = 0 attack_probability = 20 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 35 category = "passive" speed = 50 decision_attack_probability = 0 decision_defend_probability = 40 decision_flee_probability = 60 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.npc.WanderingTrader" attack_power = 0 attack_probability = 70 +attack_variance = 0 +attack_effect = "unknown" +defense_damage = 0 evasion = 5 category = "passive" speed = 35 decision_attack_probability = 0 decision_defend_probability = 10 decision_flee_probability = 80 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.boss.enderdragon.EnderDragon" attack_power = 10 attack_probability = 70 attack_variance = 2 +attack_effect = "unknown" +defense_damage = 0 evasion = 27 category = "boss" speed = 63 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false [[server_config.entity]] name = "net.minecraft.world.entity.boss.wither.WitherBoss" @@ -971,9 +1259,12 @@ attack_power = 8 attack_probability = 70 attack_effect = "wither" attack_effect_probability = 90 +attack_variance = 0 +defense_damage = 0 evasion = 20 category = "boss" speed = 68 decision_attack_probability = 100 decision_defend_probability = 0 decision_flee_probability = 0 +ignore_battle = false diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index e43f6c0..7ac331b 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "com_burnedkirby_turnbasedminecraft", "name": "Turn Based Minecraft", "description": "Changes battles to be turn-based.", - "version": "1.19.0", + "version": "1.20.0", "mcversion": "1.18.2", "url": "", "updateUrl": "",