use of buildcraft.transport.plug.PluggableLens in project BuildCraft by BuildCraft.
the class ItemPluggableLens method onPlace.
@Override
public PipePluggable onPlace(@Nonnull ItemStack stack, IPipeHolder holder, EnumFacing side, EntityPlayer player, EnumHand hand) {
IPipe pipe = holder.getPipe();
if (pipe == null || !(pipe.getFlow() instanceof IFlowItems)) {
return null;
}
LensData data = getData(stack);
SoundUtil.playBlockPlace(holder.getPipeWorld(), holder.getPipePos(), Blocks.STONE.getDefaultState());
PluggableDefinition def = BCTransportPlugs.lens;
return new PluggableLens(def, holder, side, data.colour, data.isFilter);
}
Aggregations