mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-18 23:23:19 +01:00
[ci skip] Remove nullable from SyncedEntityData#packAll (#11949)
This commit is contained in:
parent
ac3aaa248b
commit
775002a357
1 changed files with 2 additions and 3 deletions
|
@ -23,7 +23,7 @@
|
|||
public boolean isDirty() {
|
||||
return this.isDirty;
|
||||
}
|
||||
@@ -169,6 +_,20 @@
|
||||
@@ -169,6 +_,19 @@
|
||||
return new SynchedEntityData(this.entity, this.itemsById);
|
||||
}
|
||||
}
|
||||
|
@ -31,9 +31,8 @@
|
|||
+ // Paper start
|
||||
+ // We need to pack all as we cannot rely on "non default values" or "dirty" ones.
|
||||
+ // Because these values can possibly be desynced on the client.
|
||||
+ @Nullable
|
||||
+ public List<SynchedEntityData.DataValue<?>> packAll() {
|
||||
+ final List<SynchedEntityData.DataValue<?>> list = new ArrayList<>();
|
||||
+ final List<SynchedEntityData.DataValue<?>> list = new ArrayList<>(this.itemsById.length);
|
||||
+ for (final DataItem<?> dataItem : this.itemsById) {
|
||||
+ list.add(dataItem.value());
|
||||
+ }
|
||||
|
|
Loading…
Reference in a new issue