GregTech CE Unofficial

GregTech CE Unofficial

412k Downloads

Miners collecting cobblestone while it shouldn't

CrossElectronics opened this issue ยท 1 comments

commented

GregTech CEu Version

v2.4.1-beta

Modpack Used

Nomifactory CEu Edition 1.4

Addons Installed

No response

Environment

Singleplayer

New Worlds

Unsure

Cross-Mod Interaction

Unsure

Expected Behavior

Both miners should be able to collect ore blocks and only ore blocks from their respective working area

Actual Behavior

image
survival, roof of nether: The miner placed down first is working properly while the other is constantly collecting cobblestone. Note that there are no cobblestone / stone in nether. If anything it should be netherrack.

image
creative, overworld: The miner placed down first is working properly while the other is collecting mostly cobblestone

Steps to Reproduce

  1. Install two miners close by and power them
  2. Observe the miners

Additional Information

Is it because the latter miner is trying to mine the block that has already been mined i.e. air cobblestone? Since the miner logic replaces the already mined block with cobble to prevent mob from spawning.

Might be related:

// if the block is not air, harvest it
if (blockState != Blocks.AIR.getDefaultState()) {
// get the small ore drops, if a small ore
getSmallOreBlockDrops(blockDrops, world, blocksToMine.getFirst(), blockState);
// get the block's drops.
getRegularBlockDrops(blockDrops, world, blocksToMine.getFirst(), blockState);
// try to insert them
mineAndInsertItems(blockDrops, world);
} else {

private void mineAndInsertItems(NonNullList<ItemStack> blockDrops, WorldServer world) {
// If the block's drops can fit in the inventory, move the previously mined position to the block
// replace the ore block with cobblestone instead of breaking it to prevent mob spawning
// remove the ore block's position from the mining queue
if (GTTransferUtils.addItemsToItemHandler(metaTileEntity.getExportItems(), true, blockDrops)) {
GTTransferUtils.addItemsToItemHandler(metaTileEntity.getExportItems(), false, blockDrops);
world.setBlockState(blocksToMine.getFirst(), Blocks.COBBLESTONE.getDefaultState());
mineX.set(blocksToMine.getFirst().getX());
mineZ.set(blocksToMine.getFirst().getZ());
mineY.set(blocksToMine.getFirst().getY());
blocksToMine.removeFirst();
onMineOperation();

commented

I'll fuck around with this one and find something out