mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 07:27:15 +01:00
fix: item duplication bug
Avoid ejecting the grid if mechanical crafter is moving. Should fix #3741
This commit is contained in:
parent
aeee9f8793
commit
737578a90e
1 changed files with 5 additions and 1 deletions
|
@ -3,6 +3,7 @@ package com.simibubi.create.content.contraptions.components.crafter;
|
|||
import com.simibubi.create.AllBlocks;
|
||||
import com.simibubi.create.AllItems;
|
||||
import com.simibubi.create.AllTileEntities;
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock;
|
||||
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
|
||||
import com.simibubi.create.content.contraptions.components.crafter.ConnectedInputHandler.ConnectedInput;
|
||||
|
@ -95,12 +96,15 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock
|
|||
}
|
||||
}
|
||||
|
||||
Create.LOGGER.info("onRemove:" + (isMoving ? "moving" : "not moving"));
|
||||
|
||||
if (state.hasBlockEntity() && state.getBlock() != newState.getBlock()) {
|
||||
MechanicalCrafterTileEntity crafter = CrafterHelper.getCrafter(worldIn, pos);
|
||||
if (crafter != null) {
|
||||
if (crafter.covered)
|
||||
Block.popResource(worldIn, pos, AllItems.CRAFTER_SLOT_COVER.asStack());
|
||||
crafter.ejectWholeGrid();
|
||||
if (!isMoving)
|
||||
crafter.ejectWholeGrid();
|
||||
}
|
||||
|
||||
for (Direction direction : Iterate.directions) {
|
||||
|
|
Loading…
Reference in a new issue