mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 03:22:19 +01:00
7caf863b52
And remove a dumb log change in PacketEncoder
23 lines
821 B
Diff
23 lines
821 B
Diff
--- a/net/minecraft/network/chat/Component.java
|
|
+++ b/net/minecraft/network/chat/Component.java
|
|
@@ -37,7 +_,19 @@
|
|
import net.minecraft.util.FormattedCharSequence;
|
|
import net.minecraft.world.level.ChunkPos;
|
|
|
|
-public interface Component extends Message, FormattedText {
|
|
+public interface Component extends Message, FormattedText, Iterable<Component> { // CraftBukkit
|
|
+
|
|
+ // CraftBukkit start
|
|
+ default java.util.stream.Stream<Component> stream() {
|
|
+ return com.google.common.collect.Streams.concat(java.util.stream.Stream.of(this), this.getSiblings().stream().flatMap(Component::stream));
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ default java.util.Iterator<Component> iterator() {
|
|
+ return this.stream().iterator();
|
|
+ }
|
|
+ // CraftBukkit end
|
|
+
|
|
Style getStyle();
|
|
|
|
ComponentContents getContents();
|