Skip to content

Commit

Permalink
fix: #8
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHillcox committed Nov 5, 2023
1 parent ce122db commit 46b0220
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
16 changes: 3 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -120,8 +122,13 @@ private static void yeetedEntitiesMessage(CommandSourceStack source, int yeetedA

private static int yeetEntities(BiPredicate<Player, Entity> tester, ServerLevel level, Player player) {
int entitiesKilled = 0;
Iterable<Entity> entities = level.getAllEntities();

for (Entity entity : level.getAllEntities()) {
// Copy the entities to a list to avoid concurrent modification
List<Entity> entityList = new ArrayList<>();
entities.forEach(entityList::add);

for (Entity entity : entityList) {
if (entity == null) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 46b0220

Please sign in to comment.