diff --git a/CHANGELOG.md b/CHANGELOG.md index c238f2c..8f47b94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,5 @@ -## 2.3.8 +## 2.3.9 -### Added +### Fixed -- Released for Forge & Fabric! 🎉 -- Unrestricted `/tk enchant add [enchantment] [level]` command that will allow items to be enchanted upto level `255` (Minecraft's internal cap) -- Command to remove enchantments `/tk enchant remove [enchantment]` -- Command to repair items `/tk repair` (this works for anything with damage values) -- More kill targets (players and me) -- More lang keys to support up to 255 in roman numerals for enchantment values. - -### Changed - -- Merged all various kill commands into a single command -- Updated to 1.19.2 +- An issue causing the kill commands to not always kill all the entities and throw an error message instead. diff --git a/common/src/main/java/com/sunekaer/toolkit/commands/CommandKill.java b/common/src/main/java/com/sunekaer/toolkit/commands/CommandKill.java index 2f1b6c2..114e55f 100644 --- a/common/src/main/java/com/sunekaer/toolkit/commands/CommandKill.java +++ b/common/src/main/java/com/sunekaer/toolkit/commands/CommandKill.java @@ -25,6 +25,8 @@ import net.minecraft.world.entity.vehicle.AbstractMinecart; import org.jetbrains.annotations.NotNull; +import java.util.ArrayList; +import java.util.List; import java.util.function.BiPredicate; public class CommandKill { @@ -120,8 +122,13 @@ private static void yeetedEntitiesMessage(CommandSourceStack source, int yeetedA private static int yeetEntities(BiPredicate tester, ServerLevel level, Player player) { int entitiesKilled = 0; + Iterable entities = level.getAllEntities(); - for (Entity entity : level.getAllEntities()) { + // Copy the entities to a list to avoid concurrent modification + List entityList = new ArrayList<>(); + entities.forEach(entityList::add); + + for (Entity entity : entityList) { if (entity == null) { continue; } diff --git a/gradle.properties b/gradle.properties index 5b21218..27f9bee 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ minecraft_version=1.19.2 enabled_platforms=fabric,forge archives_base_name=ToolKit -mod_version=2.3.8 +mod_version=2.3.9 maven_group=com.sunekaer.mods architectury_version=6.5.77