Update Mekanism holder blocks to support Digital Miner

Override `getDrops` in BlockBasic, BlockCardboardBox, BlockEnergyCube, BlockGasTank, BlockMachine, and BlockGenerator to correctly handle returning the needed ItemStack for the Digital Miner when attempting to be broken.
Closes #133
This commit is contained in:
Spoilers committed 2025-01-08 16:07:16 -05:00
1 parent 13db7cb1df
commit 264230f37d
6 files changed
+42 -68

No files matched your search

@@ -1,5 +1,7 @@
package mekanism.common.block;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Random;
import mekanism.api.MekanismConfig;
@@ -185,17 +187,10 @@ public class BlockCardboardBox extends BlockContainer
return world.setBlockToAir(x, y, z);
}
@Override
public int quantityDropped(Random random)
{
return 0;
}
@Override
public Item getItemDropped(int i, Random random, int j)
{
return null;
}
@Override
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
return new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
}
public static class BlockData
{