aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/network/chat/Component.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/network/chat/Component.java.patch')
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/network/chat/Component.java.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/network/chat/Component.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/network/chat/Component.java.patch
new file mode 100644
index 0000000000..81502c0e4c
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/network/chat/Component.java.patch
@@ -0,0 +1,27 @@
+--- a/net/minecraft/network/chat/Component.java
++++ b/net/minecraft/network/chat/Component.java
+@@ -33,8 +34,23 @@
+ import net.minecraft.resources.ResourceLocation;
+ import net.minecraft.util.FormattedCharSequence;
+ import net.minecraft.world.level.ChunkPos;
++// CraftBukkit start
++import java.util.stream.Stream;
++// CraftBukkit end
+
+-public interface Component extends Message, FormattedText {
++public interface Component extends Message, FormattedText, Iterable<Component> { // CraftBukkit
++
++ // CraftBukkit start
++ default Stream<Component> stream() {
++ return com.google.common.collect.Streams.concat(new Stream[]{Stream.of(this), this.getSiblings().stream().flatMap(Component::stream)});
++ }
++
++ @Override
++ default Iterator<Component> iterator() {
++ return this.stream().iterator();
++ }
++ // CraftBukkit end
++
+ Style getStyle();
+
+ ComponentContents getContents();