Skip to content

Commit

Permalink
fix: clear itemList every tick
Browse files Browse the repository at this point in the history
Fortunately in most cases this is negligble, but in long running servers
this list may eventually build up such that iterating through the list
introduces a signficant performance penalty.
  • Loading branch information
sam-kirby committed Jan 20, 2021
1 parent 1734bf9 commit b4d07c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version_base = 1.7
version_base = 1.8

# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/tv/darkosto/sevpatches/SevPatches.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public void onServerTick(TickEvent.ServerTickEvent event) {
item.setDead();
item.setItem(ItemStack.EMPTY);
}

itemList.clear();
}

@Mod.EventHandler
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"modid": "sevpatches",
"name": "SevPatches",
"description": "Consolidated patches for mods that are EOL used in SevTech: Ages",
"version": "1.6",
"version": "1.8",
"mcversion": "1.12.2",
"url": "https://www.curseforge.com/minecraft/mc-mods/sevpatches",
"updateUrl": "",
Expand Down

0 comments on commit b4d07c9

Please sign in to comment.