use of blusunrize.immersiveengineering.common.blocks.metal.TileEntityMetalBarrel in project ImmersiveEngineering by BluSunrize.
the class TileEntityWoodenBarrel method interact.
@Override
public boolean interact(EnumFacing side, EntityPlayer player, EnumHand hand, ItemStack heldItem, float hitX, float hitY, float hitZ) {
FluidStack f = FluidUtil.getFluidContained(heldItem);
boolean metal = this instanceof TileEntityMetalBarrel;
if (f != null)
if (!metal && f.getFluid().isGaseous(f)) {
ChatUtils.sendServerNoSpamMessages(player, new TextComponentTranslation(Lib.CHAT_INFO + "noGasAllowed"));
return true;
} else if (!metal && f.getFluid().getTemperature(f) >= TileEntityWoodenBarrel.IGNITION_TEMPERATURE) {
ChatUtils.sendServerNoSpamMessages(player, new TextComponentTranslation(Lib.CHAT_INFO + "tooHot"));
return true;
}
if (FluidUtil.interactWithFluidHandler(heldItem, tank, player)) {
this.markDirty();
this.markContainingBlockForUpdate(null);
return true;
}
// }
return false;
}
Aggregations