Nameable Banner API

This commit is contained in:
Owen1212055
2022-04-07 17:49:25 -04:00
parent 24d356944c
commit 1f68916ac9
2 changed files with 31 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/entity/BannerBlockEntity.java
+++ b/net/minecraft/world/level/block/entity/BannerBlockEntity.java
@@ -19,6 +19,10 @@
@@ -19,13 +19,17 @@
import net.minecraft.world.level.block.state.BlockState;
import org.slf4j.Logger;
@@ -11,6 +11,14 @@
public class BannerBlockEntity extends BlockEntity implements Nameable {
private static final Logger LOGGER = LogUtils.getLogger();
public static final int MAX_PATTERNS = 6;
private static final String TAG_PATTERNS = "patterns";
@Nullable
- private Component name;
+ public Component name; // Paper - public
public DyeColor baseColor;
private BannerPatternLayers patterns;
@@ -74,7 +78,7 @@
BannerPatternLayers.CODEC.parse(registries.createSerializationContext(NbtOps.INSTANCE), nbt.get("patterns")).resultOrPartial((s) -> {
BannerBlockEntity.LOGGER.error("Failed to parse banner patterns: '{}'", s);