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
+4 -4
View File
@@ -29,7 +29,7 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import appeng.core.AELog;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import net.minecraft.block.BlockState;
@@ -199,7 +199,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
return data;
}
private boolean readUpdateData( ByteBuf stream )
private boolean readUpdateData( PacketBuffer stream )
{
boolean output = false;
@@ -248,7 +248,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
@Override
public void handleUpdateTag( CompoundNBT tag )
{
final ByteBuf stream = Unpooled.copiedBuffer( tag.getByteArray( "X" ) );
final PacketBuffer stream = new PacketBuffer( Unpooled.copiedBuffer( tag.getByteArray( "X" ) ) );
if( this.readUpdateData( stream ) )
{
@@ -256,7 +256,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
}
}
protected boolean readFromStream( final ByteBuf data ) throws IOException
protected boolean readFromStream( final PacketBuffer data ) throws IOException
{
if( this.canBeRotated() )
{