forked from virt-mirrors/Sit
the REAL 1.20-1.20.1 fix this time
This commit is contained in:
parent
a1d651f2dd
commit
41474091dc
2 changed files with 7 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
|||
package one.oth3r.sit;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||
import net.fabricmc.fabric.api.networking.v1.PacketByteBufs;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
|
@ -12,10 +13,10 @@ public class PacketBuilder {
|
|||
public static final String SETTINGS = "settings_v1.0";
|
||||
private final String message;
|
||||
private PacketByteBuf packetByteBuf = PacketByteBufs.create();
|
||||
public PacketBuilder(PacketByteBuf buf) {
|
||||
public PacketBuilder(ByteBuf buf) {
|
||||
// Read any data sent in the packet
|
||||
message = buf.toString(StandardCharsets.UTF_8);
|
||||
packetByteBuf = buf;
|
||||
packetByteBuf.writeBytes(buf);
|
||||
message = packetByteBuf.toString(StandardCharsets.UTF_8);
|
||||
}
|
||||
public PacketBuilder(String message) {
|
||||
this.message = message;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue