Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #108 from minecraft7771/FixAssemblyLineSlaveCon
Browse files Browse the repository at this point in the history
Use new API call instead of hack to prevent dropping of data sticks
  • Loading branch information
Dream-Master authored Oct 22, 2022
2 parents b5711d8 + 52bcb2a commit b528056
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

dependencies {
shadowImplementation('com.github.GTNewHorizons:AVRcore:master-SNAPSHOT')
compile('com.github.GTNewHorizons:GT5-Unofficial:5.09.41.66:dev')
compile('com.github.GTNewHorizons:GT5-Unofficial:5.09.41.91-pre:dev')
compile('com.github.GTNewHorizons:Yamcl:0.5.84:dev')
compile('com.github.GTNewHorizons:NotEnoughItems:2.3.7-GTNH:dev')
compile('com.github.GTNewHorizons:CodeChickenLib:1.1.5.5:dev')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,12 @@ public int getSizeInventory() {

@Override
public ItemStack getStackInSlot(int aIndex) {
if (stacks == null || aIndex >= stacks.length) {
return null;
}
// We return a stack with size 0 to prevent dropping when the hatch is broken
ItemStack stackCopy = stacks[aIndex].copy();
stackCopy.stackSize = 0;
return stackCopy;
return stacks != null && aIndex < stacks.length ? stacks[aIndex] : null;
}

@Override
public boolean shouldDropItemAt(int index) {
return false;
}

@Override
Expand Down

0 comments on commit b528056

Please sign in to comment.