use of logisticspipes.interfaces.IBufferItems in project LogisticsPipes by RS485.
the class PipeLogisticsChassi method addToBuffer.
@Override
public int addToBuffer(ItemIdentifierStack item, IAdditionalTargetInformation info) {
if (MainProxy.isServer(getWorld())) {
if (info instanceof ChassiTargetInformation) {
ChassiTargetInformation target = (ChassiTargetInformation) info;
LogisticsModule module = _module.getSubModule(target.moduleSlot);
if (module instanceof IBufferItems) {
return ((IBufferItems) module).addToBuffer(item, info);
}
} else {
if (LPConstants.DEBUG) {
System.out.println(item);
new RuntimeException("[AddToBuffer] Information weren't ment for a chassi pipe").printStackTrace();
}
}
}
return item.getStackSize();
}
use of logisticspipes.interfaces.IBufferItems in project LogisticsPipes by RS485.
the class PipeLogisticsChassis method addToBuffer.
@Override
public int addToBuffer(ItemIdentifierStack item, IAdditionalTargetInformation info) {
if (MainProxy.isServer(getWorld())) {
if (info instanceof ChassiTargetInformation) {
ChassiTargetInformation target = (ChassiTargetInformation) info;
LogisticsModule module = getSubModule(target.moduleSlot);
if (module instanceof IBufferItems) {
return ((IBufferItems) module).addToBuffer(item, info);
}
} else {
if (LogisticsPipes.isDEBUG()) {
System.out.println(item);
new RuntimeException("[AddToBuffer] Information weren't ment for a chassi pipe").printStackTrace();
}
}
}
return item.getStackSize();
}
Aggregations