Skip to content

Commit

Permalink
Read item adventure predicate nbt and property matchers as optionals
Browse files Browse the repository at this point in the history
  • Loading branch information
booky10 committed Aug 20, 2024
1 parent f4bb1dd commit 015e7a4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ public BlockPredicate(
public static BlockPredicate read(PacketWrapper<?> wrapper) {
MappedEntitySet<StateType.Mapped> blocks = wrapper.readOptional(
ew -> MappedEntitySet.read(ew, StateTypes::getMappedById));
List<PropertyMatcher> properties = wrapper.readList(PropertyMatcher::read);
NBTCompound nbt = wrapper.readNBT();
List<PropertyMatcher> properties = wrapper.readOptional(
ew -> wrapper.readList(PropertyMatcher::read));
NBTCompound nbt = wrapper.readOptional(PacketWrapper::readNBT);
return new BlockPredicate(blocks, properties, nbt);
}

Expand Down

0 comments on commit 015e7a4

Please sign in to comment.