Skip to content

Commit

Permalink
Fixed ammunition press using null instead of ItemStack#EMPTY
Browse files Browse the repository at this point in the history
  • Loading branch information
Desoroxxx committed Nov 25, 2024
1 parent fa4c34a commit 11aa279
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project follows the [Ragnarök Versioning Convention](https://github.co
### Fixed

- Fixed accidental use of `akka.japi.Predicate` instead `java.util.function.Predicate`
- Fixed ammunition press using `null` instead of `ItemStack#EMPTY`

## Modern Warfare Cubed Version 0.1.8 Changelog - 2024-08-16

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public int getDismantlingTime(IModernCraftingRecipe crafting) {


public ItemStack getLatestStackInQueue() {
if(this.craftStack.isEmpty()) return null;
if(this.craftStack.isEmpty())
return ItemStack.EMPTY;
ItemStack stack = craftStack.peek();
if(stack.isEmpty()) {
craftStack.pop();
Expand Down Expand Up @@ -94,7 +95,7 @@ public void readBytesFromClientSync(ByteBuf buf) {
}

public boolean hasStack() {
return !this.craftStack.isEmpty() && getLatestStackInQueue() != null;
return !this.craftStack.isEmpty() && getLatestStackInQueue() != ItemStack.EMPTY;
}

public void addStack(ItemStack stack) {
Expand Down

0 comments on commit 11aa279

Please sign in to comment.