Comments (2)
Right - PacketContainer yields access to the internal fields in the packet class, not the serialized packet data as seen on the wire. So, if we take the SCOREBOARD_TEAM packet:
public class PacketPlayOutScoreboardTeam extends Packet {
private String a = "";
private String b = "";
private String c = "";
private String d = "";
private Collection e = new ArrayList();
private int f;
private int g;
// ..
public void a(PacketDataSerializer paramPacketDataSerializer) {
this.a = paramPacketDataSerializer.c(16);
this.f = paramPacketDataSerializer.readByte();
if ((this.f == 0) || (this.f == 2)) {
this.b = paramPacketDataSerializer.c(32);
this.c = paramPacketDataSerializer.c(16);
this.d = paramPacketDataSerializer.c(16);
this.g = paramPacketDataSerializer.readByte();
}
if ((this.f == 0) || (this.f == 3) || (this.f == 4)) {
int i = paramPacketDataSerializer.readShort();
for (int j = 0; j < i; j++)
this.e.add(paramPacketDataSerializer.c(16));
}
}
You have to use integers for action and friendly fire, not bytes. And a collection modifier to write the string collection:
packet.getModifier().<Collection>withType(Collection.class).write(0, null);
from protocollib.
Interesting.
It was working before (as far as I know), so I guess there was some kind of regression that made byte not work.
I'll update the code accordingly tomorrow, thanks for your help.
from protocollib.
Related Issues (20)
- Swimming pose
- ProtocolLib HOT 1
- Exception during update check while running in read only docker environment HOT 2
- Show Invisibles to only some clients
- ProtocolLibrary.getProtocolManager(); return null? HOT 4
- Question about error message
- Null when sending message using net.kyori.adventure.text.Component HOT 4
- Adding 1.17.1 support to TinyProtocol
- Support for Minecraft 1.0.0 HOT 25
- Register custom packet with modded client
- [1.18.2] Holder<DimensionManager> does not translate to a known ProtocolLib StructureModifier
- [1.19] DecoderException: Received unexpected null component.
- add PacketPlayOutWindowItems
- [1.19.2] Error when sending PacketPlayOutEntityEffect using Wrapper
- API Down status: 503 Service Unavailable HOT 1
- [1.19.4] ProtocolLibrary.getProtocolManager() returning null
- optionIntercept() replace for what?
- Layer7 Attacks HOT 1
- ProtocolLib could not be loaded
- [ Bug ] Javadocs - JavaScript is disabled on your browser.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protocollib.