@@ -125,11 +125,11 @@ public static void readExtraNBTInterface(DualityInterface dual, NBTTagCompound n
125125
126126 public static ItemStack removeFluidPackets (InventoryCrafting inv , int index ) {
127127 ItemStack stack = inv .getStackInSlot (index );
128- if (stack != ItemStack . EMPTY && stack .getItem () == FCItems .FLUID_PACKET ) {
128+ if (! stack . isEmpty () && stack .getItem () == FCItems .FLUID_PACKET ) {
129129 FluidStack fluid = FakeItemRegister .getStack (stack );
130130 return FakeFluids .packFluid2Drops (fluid );
131131 }
132- if (ModAndClassUtil .GAS && stack != ItemStack . EMPTY && stack .getItem () == FCGasItems .GAS_PACKET ) {
132+ if (ModAndClassUtil .GAS && ! stack . isEmpty () && stack .getItem () == FCGasItems .GAS_PACKET ) {
133133 GasStack gas = FakeItemRegister .getStack (stack );
134134 return FakeGases .packGas2Drops (gas );
135135 }
@@ -141,8 +141,7 @@ public static ItemStack removeFluidPackets(InventoryCrafting inv, int index) {
141141 public static long getCraftingByteCost (IAEItemStack stack ) {
142142 if (stack .getItem () == FCItems .FLUID_DROP ) {
143143 return (long ) Math .ceil (stack .getStackSize () / 1000D );
144- }
145- if (ModAndClassUtil .GAS && stack .getItem () == FCGasItems .GAS_DROP ) {
144+ } else if (ModAndClassUtil .GAS && stack .getItem () == FCGasItems .GAS_DROP ) {
146145 return (long ) Math .ceil (stack .getStackSize () / 4000D );
147146 }
148147 return stack .getStackSize ();
@@ -151,8 +150,7 @@ public static long getCraftingByteCost(IAEItemStack stack) {
151150 public static long getCraftingByteCost (long originBytes , long missingBytes , IAEItemStack stack ) {
152151 if (stack != null && stack .getItem () == FCItems .FLUID_DROP ) {
153152 return (long ) Math .ceil (missingBytes / 1000D ) + originBytes ;
154- }
155- if (ModAndClassUtil .GAS && stack != null && stack .getItem () == FCGasItems .GAS_DROP ) {
153+ } else if (ModAndClassUtil .GAS && stack != null && stack .getItem () == FCGasItems .GAS_DROP ) {
156154 return (long ) Math .ceil (missingBytes / 4000D ) + originBytes ;
157155 }
158156 return missingBytes + originBytes ;
@@ -251,8 +249,7 @@ public static long getFluidSize(IAEItemStack aeStack) {
251249 if (aeStack .getDefinition () != null && !aeStack .getDefinition ().isEmpty ()) {
252250 if (aeStack .getDefinition ().getItem () == FCItems .FLUID_DROP ) {
253251 return (long ) Math .max (aeStack .getStackSize () / 1000D , 1 );
254- }
255- if (ModAndClassUtil .GAS && aeStack .getDefinition ().getItem () == FCGasItems .GAS_DROP ) {
252+ } else if (ModAndClassUtil .GAS && aeStack .getDefinition ().getItem () == FCGasItems .GAS_DROP ) {
256253 return (long ) Math .max (aeStack .getStackSize () / 4000D , 1 );
257254 }
258255 }
0 commit comments