geforkt von Mirrors/Paper
475d2e005c
By: md_5 <git@md-5.net>
91 Zeilen
6.1 KiB
Diff
91 Zeilen
6.1 KiB
Diff
--- a/net/minecraft/world/entity/Display.java
|
|
+++ b/net/minecraft/world/entity/Display.java
|
|
@@ -183,11 +183,11 @@
|
|
|
|
@Override
|
|
protected void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
|
|
- DataResult dataresult;
|
|
+ // DataResult dataresult; // CraftBukkit - decompile error
|
|
Logger logger;
|
|
|
|
if (nbttagcompound.contains("transformation")) {
|
|
- dataresult = Transformation.EXTENDED_CODEC.decode(DynamicOpsNBT.INSTANCE, nbttagcompound.get("transformation"));
|
|
+ DataResult<Pair<Transformation, net.minecraft.nbt.NBTBase>> dataresult = Transformation.EXTENDED_CODEC.decode(DynamicOpsNBT.INSTANCE, nbttagcompound.get("transformation")); // CraftBukkit - decompile error
|
|
logger = Display.LOGGER;
|
|
Objects.requireNonNull(logger);
|
|
dataresult.resultOrPartial(SystemUtils.prefix("Display entity", logger::error)).ifPresent((pair) -> {
|
|
@@ -208,7 +208,7 @@
|
|
}
|
|
|
|
if (nbttagcompound.contains("billboard", 8)) {
|
|
- dataresult = Display.BillboardConstraints.CODEC.decode(DynamicOpsNBT.INSTANCE, nbttagcompound.get("billboard"));
|
|
+ DataResult<Pair<Display.BillboardConstraints, net.minecraft.nbt.NBTBase>> dataresult = Display.BillboardConstraints.CODEC.decode(DynamicOpsNBT.INSTANCE, nbttagcompound.get("billboard")); // CraftBukkit - decompile error
|
|
logger = Display.LOGGER;
|
|
Objects.requireNonNull(logger);
|
|
dataresult.resultOrPartial(SystemUtils.prefix("Display entity", logger::error)).ifPresent((pair) -> {
|
|
@@ -241,7 +241,7 @@
|
|
}
|
|
|
|
if (nbttagcompound.contains("brightness", 10)) {
|
|
- dataresult = Brightness.CODEC.decode(DynamicOpsNBT.INSTANCE, nbttagcompound.get("brightness"));
|
|
+ DataResult<Pair<Brightness, net.minecraft.nbt.NBTBase>> dataresult = Brightness.CODEC.decode(DynamicOpsNBT.INSTANCE, nbttagcompound.get("brightness")); // CraftBukkit - decompile error
|
|
logger = Display.LOGGER;
|
|
Objects.requireNonNull(logger);
|
|
dataresult.resultOrPartial(SystemUtils.prefix("Display entity", logger::error)).ifPresent((pair) -> {
|
|
@@ -594,8 +594,8 @@
|
|
private static final byte INITIAL_TEXT_OPACITY = -1;
|
|
public static final int INITIAL_BACKGROUND = 1073741824;
|
|
private static final DataWatcherObject<IChatBaseComponent> DATA_TEXT_ID = DataWatcher.defineId(Display.TextDisplay.class, DataWatcherRegistry.COMPONENT);
|
|
- private static final DataWatcherObject<Integer> DATA_LINE_WIDTH_ID = DataWatcher.defineId(Display.TextDisplay.class, DataWatcherRegistry.INT);
|
|
- private static final DataWatcherObject<Integer> DATA_BACKGROUND_COLOR_ID = DataWatcher.defineId(Display.TextDisplay.class, DataWatcherRegistry.INT);
|
|
+ public static final DataWatcherObject<Integer> DATA_LINE_WIDTH_ID = DataWatcher.defineId(Display.TextDisplay.class, DataWatcherRegistry.INT);
|
|
+ public static final DataWatcherObject<Integer> DATA_BACKGROUND_COLOR_ID = DataWatcher.defineId(Display.TextDisplay.class, DataWatcherRegistry.INT);
|
|
private static final DataWatcherObject<Byte> DATA_TEXT_OPACITY_ID = DataWatcher.defineId(Display.TextDisplay.class, DataWatcherRegistry.BYTE);
|
|
private static final DataWatcherObject<Byte> DATA_STYLE_FLAGS_ID = DataWatcher.defineId(Display.TextDisplay.class, DataWatcherRegistry.BYTE);
|
|
private static final IntSet TEXT_RENDER_STATE_IDS = IntSet.of(new int[]{Display.TextDisplay.DATA_TEXT_ID.getId(), Display.TextDisplay.DATA_LINE_WIDTH_ID.getId(), Display.TextDisplay.DATA_BACKGROUND_COLOR_ID.getId(), Display.TextDisplay.DATA_TEXT_OPACITY_ID.getId(), Display.TextDisplay.DATA_STYLE_FLAGS_ID.getId()});
|
|
@@ -614,7 +614,7 @@
|
|
this.entityData.define(Display.TextDisplay.DATA_TEXT_ID, IChatBaseComponent.empty());
|
|
this.entityData.define(Display.TextDisplay.DATA_LINE_WIDTH_ID, 200);
|
|
this.entityData.define(Display.TextDisplay.DATA_BACKGROUND_COLOR_ID, 1073741824);
|
|
- this.entityData.define(Display.TextDisplay.DATA_TEXT_OPACITY_ID, -1);
|
|
+ this.entityData.define(Display.TextDisplay.DATA_TEXT_OPACITY_ID, (byte) -1); // CraftBukkit - decompile error
|
|
this.entityData.define(Display.TextDisplay.DATA_STYLE_FLAGS_ID, (byte) 0);
|
|
}
|
|
|
|
@@ -639,7 +639,7 @@
|
|
return (Integer) this.entityData.get(Display.TextDisplay.DATA_LINE_WIDTH_ID);
|
|
}
|
|
|
|
- public void setLineWidth(int i) {
|
|
+ private void setLineWidth(int i) {
|
|
this.entityData.set(Display.TextDisplay.DATA_LINE_WIDTH_ID, i);
|
|
}
|
|
|
|
@@ -655,7 +655,7 @@
|
|
return (Integer) this.entityData.get(Display.TextDisplay.DATA_BACKGROUND_COLOR_ID);
|
|
}
|
|
|
|
- public void setBackgroundColor(int i) {
|
|
+ private void setBackgroundColor(int i) {
|
|
this.entityData.set(Display.TextDisplay.DATA_BACKGROUND_COLOR_ID, i);
|
|
}
|
|
|
|
@@ -690,7 +690,7 @@
|
|
|
|
b0 = loadFlag(b0, nbttagcompound, "see_through", (byte) 2);
|
|
b0 = loadFlag(b0, nbttagcompound, "default_background", (byte) 4);
|
|
- DataResult dataresult = Display.TextDisplay.Align.CODEC.decode(DynamicOpsNBT.INSTANCE, nbttagcompound.get("alignment"));
|
|
+ DataResult<Pair<Display.TextDisplay.Align, net.minecraft.nbt.NBTBase>> dataresult = Display.TextDisplay.Align.CODEC.decode(DynamicOpsNBT.INSTANCE, nbttagcompound.get("alignment")); // CraftBukkit - decompile error
|
|
Logger logger = Display.LOGGER;
|
|
|
|
Objects.requireNonNull(logger);
|
|
@@ -961,7 +961,7 @@
|
|
super.readAdditionalSaveData(nbttagcompound);
|
|
this.setItemStack(ItemStack.of(nbttagcompound.getCompound("item")));
|
|
if (nbttagcompound.contains("item_display", 8)) {
|
|
- DataResult dataresult = ItemDisplayContext.CODEC.decode(DynamicOpsNBT.INSTANCE, nbttagcompound.get("item_display"));
|
|
+ DataResult<Pair<ItemDisplayContext, net.minecraft.nbt.NBTBase>> dataresult = ItemDisplayContext.CODEC.decode(DynamicOpsNBT.INSTANCE, nbttagcompound.get("item_display")); // CraftBukkit - decompile error
|
|
Logger logger = Display.LOGGER;
|
|
|
|
Objects.requireNonNull(logger);
|