fix getEnergyProvider compat hook, fix stripes block placing eating items
This commit is contained in:
parent
30d90f48b5
commit
cc6fc2324c
2 changed files with 9 additions and 2 deletions
|
@ -112,8 +112,11 @@ public class PipeTransportPower extends PipeTransport implements IDebuggable {
|
|||
// Disregard engines for this.
|
||||
return false;
|
||||
}
|
||||
if (tile instanceof IEnergyHandler || tile instanceof IEnergyReceiver) {
|
||||
IEnergyConnection handler = (IEnergyConnection) tile;
|
||||
|
||||
Object provider = CompatHooks.INSTANCE.getEnergyProvider(tile);
|
||||
|
||||
if (provider instanceof IEnergyHandler || provider instanceof IEnergyReceiver) {
|
||||
IEnergyConnection handler = (IEnergyConnection) provider;
|
||||
if (handler.canConnectEnergy(side.getOpposite())) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,10 @@ public class StripesHandlerPlaceBlock implements IStripesHandler {
|
|||
src.orientation = direction;
|
||||
src.moveBackwards(1.0D);
|
||||
if (stack.tryPlaceItemIntoWorld(player, world, (int) src.x, (int) src.y, (int) src.z, direction.ordinal(), 0.0f, 0.0f, 0.0f)) {
|
||||
if (stack.stackSize > 0) {
|
||||
activator.sendItem(stack, direction.getOpposite());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue