aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/network/chat/IChatBaseComponent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/og/net/minecraft/network/chat/IChatBaseComponent.patch')
-rw-r--r--patch-remap/og/net/minecraft/network/chat/IChatBaseComponent.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/network/chat/IChatBaseComponent.patch b/patch-remap/og/net/minecraft/network/chat/IChatBaseComponent.patch
new file mode 100644
index 0000000000..93751f5b13
--- /dev/null
+++ b/patch-remap/og/net/minecraft/network/chat/IChatBaseComponent.patch
@@ -0,0 +1,26 @@
+--- a/net/minecraft/network/chat/IChatBaseComponent.java
++++ b/net/minecraft/network/chat/IChatBaseComponent.java
+@@ -35,7 +35,22 @@
+ import net.minecraft.util.FormattedString;
+ import net.minecraft.world.level.ChunkCoordIntPair;
+
+-public interface IChatBaseComponent extends Message, IChatFormatted {
++// CraftBukkit start
++import java.util.stream.Stream;
++// CraftBukkit end
++
++public interface IChatBaseComponent extends Message, IChatFormatted, Iterable<IChatBaseComponent> { // CraftBukkit
++
++ // CraftBukkit start
++ default Stream<IChatBaseComponent> stream() {
++ return com.google.common.collect.Streams.concat(new Stream[]{Stream.of(this), this.getSiblings().stream().flatMap(IChatBaseComponent::stream)});
++ }
++
++ @Override
++ default Iterator<IChatBaseComponent> iterator() {
++ return this.stream().iterator();
++ }
++ // CraftBukkit end
+
+ ChatModifier getStyle();
+