Skip to content

Commit

Permalink
Don't save cooldown of zero to Trophy ItemStack NBT (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss authored Jan 18, 2025
1 parent 3f29495 commit 12e8487
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
dependencies {
api('com.github.GTNewHorizons:OpenModsLib:0.11.1:dev')

devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.7.18-GTNH:dev')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.7.22-GTNH:dev')
compileOnly('openperipheral:OpenPeripheralCore-API:3.4.1')
compileOnly('curse.maven:computercraft-67504:2269339')
compileOnly('com.github.GTNewHorizons:Mobs-Info:0.5.0-GTNH:dev')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ private ItemStack getAsItem() {
final Trophy trophy = getTrophy();
if (trophy != null) {
ItemStack stack = trophy.getItemStack();
NBTTagCompound tag = ItemUtils.getItemTag(stack);
tag.setInteger(TAG_COOLDOWN, cooldown);
if (cooldown > 0) {
NBTTagCompound tag = ItemUtils.getItemTag(stack);
tag.setInteger(TAG_COOLDOWN, cooldown);
}
return stack;
}

Expand Down

0 comments on commit 12e8487

Please sign in to comment.