Fix REntity.setBowDrawn
Fix PacketProcessor
Dieser Commit ist enthalten in:
Ursprung
da35cb6f10
Commit
0add346878
@ -308,9 +308,9 @@ class PacketProcessor {
|
||||
private void bow() throws IOException {
|
||||
int entityId = source.rInt();
|
||||
boolean drawn = source.rBoolean();
|
||||
int hand = source.rInt();
|
||||
boolean offHand = source.rBoolean();
|
||||
|
||||
execSync(() -> REntity.getEntity(entityId).setBowDrawn(drawn, hand));
|
||||
execSync(() -> REntity.getEntity(entityId).setBowDrawn(drawn, offHand));
|
||||
}
|
||||
|
||||
private void damage() throws IOException {
|
||||
|
@ -168,11 +168,11 @@ public abstract class REntity {
|
||||
sendDataWatcher(dataWatcher);
|
||||
}
|
||||
|
||||
public void setBowDrawn(boolean drawn, int hand) {
|
||||
public void setBowDrawn(boolean drawn, boolean offHand) {
|
||||
DataWatcher dataWatcher = new DataWatcher(null);
|
||||
|
||||
DataWatcherObject<Byte> dataWatcherObject = new DataWatcherObject<>(7, DataWatcherRegistry.a);
|
||||
dataWatcher.register(dataWatcherObject, (byte) ((drawn?1:0) + (hand * 2)));
|
||||
dataWatcher.register(dataWatcherObject, (byte) ((drawn ? 1 : 0) + (offHand ? 2 : 0)));
|
||||
dataWatcher.markDirty(dataWatcherObject);
|
||||
|
||||
sendDataWatcher(dataWatcher);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren