Skip to content

Commit

Permalink
fix: pattern encoder item drops
Browse files Browse the repository at this point in the history
  • Loading branch information
leytilera committed Jan 28, 2023
1 parent a4003cf commit 55eec4d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/main/java/appeng/tile/legacy/TilePatternEncoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;

public class TilePatternEncoder extends AEBaseInvTile {
Expand Down Expand Up @@ -293,4 +294,20 @@ public void onChangeInventory(
public int[] getAccessibleSlotsBySide(ForgeDirection side) {
return new int[] { side == ForgeDirection.DOWN ? 11 : 10 };
}

@Override
public void getDrops(
final World w, final int x, final int y, final int z, final List<ItemStack> drops
) {
if (this instanceof IInventory) {
final IInventory inv = (IInventory) this;

for (int l = 10; l < inv.getSizeInventory(); l++) {
final ItemStack is = inv.getStackInSlot(l);
if (is != null) {
drops.add(is);
}
}
}
}
}

0 comments on commit 55eec4d

Please sign in to comment.