2024-12-11 22:26:55 +01:00
|
|
|
--- a/net/minecraft/network/chat/Component.java
|
|
|
|
+++ b/net/minecraft/network/chat/Component.java
|
2024-12-14 18:44:07 +01:00
|
|
|
@@ -37,7 +_,19 @@
|
2024-12-11 22:26:55 +01:00
|
|
|
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
|
2024-12-14 18:44:07 +01:00
|
|
|
+ default java.util.stream.Stream<Component> stream() {
|
2024-12-17 16:50:59 +01:00
|
|
|
+ return com.google.common.collect.Streams.concat(java.util.stream.Stream.of(this), this.getSiblings().stream().flatMap(Component::stream));
|
2024-12-11 22:26:55 +01:00
|
|
|
+ }
|
2024-12-14 18:44:07 +01:00
|
|
|
+
|
2024-12-11 22:26:55 +01:00
|
|
|
+ @Override
|
2024-12-14 18:44:07 +01:00
|
|
|
+ default java.util.Iterator<Component> iterator() {
|
2024-12-11 22:26:55 +01:00
|
|
|
+ return this.stream().iterator();
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
+
|
|
|
|
Style getStyle();
|
|
|
|
|
|
|
|
ComponentContents getContents();
|