2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/network/chat/IChatBaseComponent.java
|
|
|
|
+++ b/net/minecraft/network/chat/IChatBaseComponent.java
|
2022-06-07 18:00:00 +02:00
|
|
|
@@ -40,7 +40,23 @@
|
2021-03-15 23:00:00 +01:00
|
|
|
import net.minecraft.util.ChatTypeAdapterFactory;
|
2021-06-11 07:00:00 +02:00
|
|
|
import net.minecraft.util.FormattedString;
|
2021-03-08 22:47:33 +01:00
|
|
|
|
|
|
|
-public interface IChatBaseComponent extends Message, IChatFormatted {
|
2020-06-25 02:00:00 +02:00
|
|
|
+// CraftBukkit start
|
|
|
|
+import com.google.common.collect.Streams;
|
|
|
|
+import java.util.stream.Stream;
|
2021-03-08 22:47:33 +01:00
|
|
|
+// CraftBukkit end
|
|
|
|
+
|
|
|
|
+public interface IChatBaseComponent extends Message, IChatFormatted, Iterable<IChatBaseComponent> { // CraftBukkit
|
2020-06-25 02:00:00 +02:00
|
|
|
+
|
2021-03-08 22:47:33 +01:00
|
|
|
+ // CraftBukkit start
|
2020-06-25 02:00:00 +02:00
|
|
|
+ default Stream<IChatBaseComponent> stream() {
|
|
|
|
+ return Streams.concat(new Stream[]{Stream.of(this), this.getSiblings().stream().flatMap(IChatBaseComponent::stream)});
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ default Iterator<IChatBaseComponent> iterator() {
|
|
|
|
+ return this.stream().iterator();
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
ChatModifier getStyle();
|
2020-06-25 02:00:00 +02:00
|
|
|
|