Move from ByteBuf to PacketBuffer

This commit is contained in:
covers1624
2020-06-02 11:07:46 +09:30
parent d4c9e5c490
commit 19cdea7eb5
58 changed files with 158 additions and 295 deletions
+3 -4
View File
@@ -30,13 +30,12 @@ import java.util.Random;
import javax.annotation.Nonnull;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.network.PacketBuffer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
@@ -148,7 +147,7 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
*
* @throws IOException
*/
void writeToStream( ByteBuf data ) throws IOException;
void writeToStream( PacketBuffer data ) throws IOException;
/**
* read data from bus packet.
@@ -159,7 +158,7 @@ public interface IPart extends IBoxProvider, ICustomCableConnection
*
* @throws IOException
*/
boolean readFromStream( ByteBuf data ) throws IOException;
boolean readFromStream( PacketBuffer data ) throws IOException;
/**
* get the Grid Node for the Bus, be sure your IGridBlock is NOT isWorldAccessible, if it is your going to cause
@@ -25,14 +25,12 @@ package appeng.api.storage;
import java.io.IOException;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import io.netty.buffer.ByteBuf;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.fluids.FluidStack;
import appeng.api.storage.data.IAEStack;
@@ -92,13 +90,12 @@ public interface IStorageChannel<T extends IAEStack<T>>
T createStack( @Nonnull Object input );
/**
*
* @param input
* @return
* @throws IOException
*/
@Nullable
T readFromPacket( @Nonnull ByteBuf input ) throws IOException;
T readFromPacket( @Nonnull PacketBuffer input ) throws IOException;
/**
* create from nbt data