Add packet read methods for API.
This commit is contained in:
parent
a9629460bb
commit
e134a9806b
|
@ -1,5 +1,8 @@
|
|||
package appeng.core.api;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import appeng.api.networking.energy.IEnergySource;
|
||||
|
@ -47,4 +50,15 @@ public class ApiStorage implements IStorageHelper
|
|||
return Platform.poweredInsert( energy, cell, input, src );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEItemStack readItemFromPacket(DataInputStream input) throws IOException
|
||||
{
|
||||
return AEItemStack.loadItemStackFromPacket( input );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEFluidStack readFluidFromPacket(DataInputStream input) throws IOException
|
||||
{
|
||||
return AEFluidStack.loadFluidStackFromPacket( input );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -241,7 +241,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
|||
}
|
||||
}
|
||||
|
||||
public static IAEFluidStack loadItemStackFromPacket(DataInputStream data) throws IOException
|
||||
public static IAEFluidStack loadFluidStackFromPacket(DataInputStream data) throws IOException
|
||||
{
|
||||
byte mask = data.readByte();
|
||||
// byte PriorityType = (byte) (mask & 0x03);
|
||||
|
|
Loading…
Reference in a new issue