コード例 #1
0
 @Override
 public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
   if (hasValidMaster() && canDrain(from, null)) {
     SmelteryLogic smeltery =
         (SmelteryLogic)
             worldObj.getTileEntity(
                 getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
     return smeltery.drain(maxDrain, doDrain);
   }
   return null;
 }
コード例 #2
0
 @Override
 public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
   if (hasValidMaster() && resource != null && canFill(from, resource.getFluid())) {
     SmelteryLogic smeltery =
         (SmelteryLogic)
             worldObj.getTileEntity(
                 getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
     return smeltery.fill(resource, doFill);
   } else {
     return 0;
   }
 }
コード例 #3
0
 @Override
 public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
   if (hasValidMaster() && canDrain(from, resource.getFluid())) {
     SmelteryLogic smeltery =
         (SmelteryLogic)
             worldObj.getTileEntity(
                 getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
     if (resource.getFluid() == smeltery.getFluid().getFluid()) {
       return smeltery.drain(resource.amount, doDrain);
     }
   }
   return null;
 }
コード例 #4
0
 @Override
 public FluidTankInfo[] getTankInfo(ForgeDirection from) {
   if (hasValidMaster()
       && (from == getForgeDirection()
           || from == getForgeDirection().getOpposite()
           || from == ForgeDirection.UNKNOWN)) {
     SmelteryLogic smeltery =
         (SmelteryLogic)
             worldObj.getTileEntity(
                 getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
     return smeltery.getMultiTankInfo();
     // return new FluidTankInfo[] { smeltery.getInfo() };
   }
   return null;
 }