carpet client synchronizations and protocols

This commit is contained in:
gnembon committed 2020-05-28 00:06:28 -03:00
1 parent 2522884da3
commit e540f9e238
19 files changed
+406 -173

No files matched your search

@@ -0,0 +1,27 @@
package carpet.mixins;
import carpet.fakes.CustomPayloadC2SPacketInterface;
import net.minecraft.network.packet.c2s.play.CustomPayloadC2SPacket;
import net.minecraft.util.Identifier;
import net.minecraft.util.PacketByteBuf;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@Mixin(CustomPayloadC2SPacket.class)
public class CustomPayloadC2SPacketMixin implements CustomPayloadC2SPacketInterface
{
@Shadow
private Identifier channel;
@Shadow
private PacketByteBuf data;
@Override
public Identifier getPacketChannel() {
return channel;
}
@Override
public PacketByteBuf getPacketData() {
return new PacketByteBuf(this.data.copy());
}
}