mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-27 23:33:08 +00:00
Fix issue with transmitters in multiparts not dropping items when harvested
This commit is contained in:
1 parent
b0d211582c
commit
0a519ca1e7
1 file changed
+7
-2
@@ -9,6 +9,7 @@ import mekanism.common.tile.transmitter.TileEntitySidedPipe;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -63,14 +64,18 @@ public class MultipartTransmitter implements IMultipart
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPartRemoved(IPartInfo part, IPartInfo otherPart)
|
||||
public void onPartHarvested(IPartInfo part, EntityPlayer player)
|
||||
{
|
||||
TileEntity tile = part.getTile().getTileEntity();
|
||||
|
||||
if(tile instanceof TileEntitySidedPipe)
|
||||
{
|
||||
((TileEntitySidedPipe)tile).onPartChanged(otherPart.getPart());
|
||||
IBlockState partState = part.getState();
|
||||
partState.getBlock().removedByPlayer(partState, part.getPartWorld(),
|
||||
part.getContainer().getPartPos(), player, true);
|
||||
}
|
||||
|
||||
IMultipart.super.onPartHarvested(part, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user