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
@@ -19,8 +19,7 @@
package appeng.helpers;
import io.netty.buffer.ByteBuf;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.Direction;
import net.minecraft.util.math.Vec3d;
@@ -68,7 +67,7 @@ public class Splotch
this.side = side;
}
public Splotch( final ByteBuf data )
public Splotch( final PacketBuffer data )
{
this.pos = data.readByte();
@@ -79,7 +78,7 @@ public class Splotch
this.lumen = ( ( val >> 7 ) & 0x01 ) > 0;
}
public void writeToStream( final ByteBuf stream )
public void writeToStream( final PacketBuffer stream )
{
stream.writeByte( this.pos );
final int val = this.getSide().ordinal() | ( this.getColor().ordinal() << 3 ) | ( this.isLumen() ? 0x80 : 0x00 );