compile fixes
Dieser Commit ist enthalten in:
Ursprung
ce0e78c103
Commit
25f7c68e6b
@ -5037,7 +5037,7 @@ index 6691950f6ffb8b6bf70d5aaf011ec9b476974d19..31054e7e1d69bfeeb2ddee5bfeb8ee50
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 625035216d1ce4ab965b5eef15f1201fc5df576b..01773a85fd9a30a0925826ef038a867a13d5b919 100644
|
||||
index 625035216d1ce4ab965b5eef15f1201fc5df576b..18efbab29f20436848894c66541aa6c7d3481aae 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -843,6 +843,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@ -5047,12 +5047,12 @@ index 625035216d1ce4ab965b5eef15f1201fc5df576b..01773a85fd9a30a0925826ef038a867a
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public net.kyori.adventure.text.Component displayName() {
|
||||
+ return displayName == null ? null : net.kyori.adventure.text.serializer.gson.GsonComponentSerializer.gson().deserialize(displayName);
|
||||
+ return displayName == null ? null : io.papermc.paper.adventure.PaperAdventure.asAdventure(displayName);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void displayName(final net.kyori.adventure.text.Component displayName) {
|
||||
+ this.displayName = displayName == null ? null : net.kyori.adventure.text.serializer.gson.GsonComponentSerializer.gson().serialize(displayName);
|
||||
+ this.displayName = displayName == null ? null : io.papermc.paper.adventure.PaperAdventure.asVanilla(displayName);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@ -5066,12 +5066,12 @@ index 625035216d1ce4ab965b5eef15f1201fc5df576b..01773a85fd9a30a0925826ef038a867a
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public List<net.kyori.adventure.text.Component> lore() {
|
||||
+ return this.lore != null ? io.papermc.paper.adventure.PaperAdventure.asAdventureFromJson(this.lore) : null;
|
||||
+ return this.lore != null ? io.papermc.paper.adventure.PaperAdventure.asAdventure(this.lore) : null;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void lore(final List<? extends net.kyori.adventure.text.Component> lore) {
|
||||
+ this.lore = lore != null ? io.papermc.paper.adventure.PaperAdventure.asJson(lore) : null;
|
||||
+ this.lore = lore != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(lore) : null;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Support components in ItemMeta
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 01773a85fd9a30a0925826ef038a867a13d5b919..04a1c602a1d94f1b84cbeaa3abf90b8fcc31e89f 100644
|
||||
index 18efbab29f20436848894c66541aa6c7d3481aae..f9340ce662157bc141b515b02db5f8d9aa116f32 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -860,11 +860,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@ -15,7 +15,7 @@ index 01773a85fd9a30a0925826ef038a867a13d5b919..04a1c602a1d94f1b84cbeaa3abf90b8f
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public net.md_5.bungee.api.chat.BaseComponent[] getDisplayNameComponent() {
|
||||
+ return displayName == null ? new net.md_5.bungee.api.chat.BaseComponent[0] : net.md_5.bungee.chat.ComponentSerializer.parse(displayName);
|
||||
+ return displayName == null ? new net.md_5.bungee.api.chat.BaseComponent[0] : net.md_5.bungee.chat.ComponentSerializer.parse(CraftChatMessage.toJSON(displayName));
|
||||
+ }
|
||||
+ // Paper end
|
||||
@Override
|
||||
@ -26,7 +26,7 @@ index 01773a85fd9a30a0925826ef038a867a13d5b919..04a1c602a1d94f1b84cbeaa3abf90b8f
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public void setDisplayNameComponent(net.md_5.bungee.api.chat.BaseComponent[] component) {
|
||||
+ this.displayName = net.md_5.bungee.chat.ComponentSerializer.toString(component);
|
||||
+ this.displayName = CraftChatMessage.fromJSON(net.md_5.bungee.chat.ComponentSerializer.toString(component));
|
||||
+ }
|
||||
+ // Paper end
|
||||
@Override
|
||||
@ -40,7 +40,7 @@ index 01773a85fd9a30a0925826ef038a867a13d5b919..04a1c602a1d94f1b84cbeaa3abf90b8f
|
||||
+ @Override
|
||||
+ public List<net.md_5.bungee.api.chat.BaseComponent[]> getLoreComponents() {
|
||||
+ return this.lore == null ? null : new ArrayList<>(this.lore.stream().map(entry ->
|
||||
+ net.md_5.bungee.chat.ComponentSerializer.parse(entry)
|
||||
+ net.md_5.bungee.chat.ComponentSerializer.parse(CraftChatMessage.toJSON(entry))
|
||||
+ ).collect(java.util.stream.Collectors.toList()));
|
||||
+ }
|
||||
+ // Paper end
|
||||
@ -74,8 +74,8 @@ index 01773a85fd9a30a0925826ef038a867a13d5b919..04a1c602a1d94f1b84cbeaa3abf90b8f
|
||||
|
||||
for (Object object : addFrom) {
|
||||
+ // Paper start - support components
|
||||
+ if(object instanceof net.md_5.bungee.api.chat.BaseComponent[]) {
|
||||
+ addTo.add(net.md_5.bungee.chat.ComponentSerializer.toString((net.md_5.bungee.api.chat.BaseComponent[]) object));
|
||||
+ if(object instanceof net.md_5.bungee.api.chat.BaseComponent[] baseComponentArr) {
|
||||
+ addTo.add(CraftChatMessage.fromJSON(net.md_5.bungee.chat.ComponentSerializer.toString(baseComponentArr)));
|
||||
+ } else
|
||||
+ // Paper end
|
||||
if (!(object instanceof String)) {
|
||||
|
@ -5,14 +5,14 @@ Subject: [PATCH] Configurable baby zombie movement speed
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
index bf573c3ca0b34e58525b547ae0228f8af7a4d333..767b8f4db39db9a3732282536b52ae1cb077b503 100644
|
||||
index bf573c3ca0b34e58525b547ae0228f8af7a4d333..8256af275e468a5aa506f0af22428f4082204956 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -75,6 +75,7 @@ public class Zombie extends Monster {
|
||||
|
||||
private static final UUID SPEED_MODIFIER_BABY_UUID = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
|
||||
private static final AttributeModifier SPEED_MODIFIER_BABY = new AttributeModifier(Zombie.SPEED_MODIFIER_BABY_UUID, "Baby speed boost", 0.5D, AttributeModifier.Operation.ADD_MULTIPLIED_BASE);
|
||||
+ private final AttributeModifier babyModifier = new net.minecraft.world.entity.ai.attributes.AttributeModifier(SPEED_MODIFIER_BABY.getId(), SPEED_MODIFIER_BABY.name, this.level().paperConfig().entities.behavior.babyZombieMovementModifier, SPEED_MODIFIER_BABY.getOperation()); // Paper - Make baby speed configurable
|
||||
+ private final AttributeModifier babyModifier = new net.minecraft.world.entity.ai.attributes.AttributeModifier(SPEED_MODIFIER_BABY.id(), SPEED_MODIFIER_BABY.name(), this.level().paperConfig().entities.behavior.babyZombieMovementModifier, SPEED_MODIFIER_BABY.operation()); // Paper - Make baby speed configurable
|
||||
private static final EntityDataAccessor<Boolean> DATA_BABY_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.BOOLEAN);
|
||||
private static final EntityDataAccessor<Integer> DATA_SPECIAL_TYPE_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.INT);
|
||||
public static final EntityDataAccessor<Boolean> DATA_DROWNED_CONVERSION_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.BOOLEAN);
|
||||
@ -21,7 +21,7 @@ index bf573c3ca0b34e58525b547ae0228f8af7a4d333..767b8f4db39db9a3732282536b52ae1c
|
||||
AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED);
|
||||
|
||||
- attributemodifiable.removeModifier(Zombie.SPEED_MODIFIER_BABY.id());
|
||||
+ attributemodifiable.removeModifier(this.babyModifier.getId()); // Paper - Make baby speed configurable
|
||||
+ attributemodifiable.removeModifier(this.babyModifier.id()); // Paper - Make baby speed configurable
|
||||
if (baby) {
|
||||
- attributemodifiable.addTransientModifier(Zombie.SPEED_MODIFIER_BABY);
|
||||
+ attributemodifiable.addTransientModifier(this.babyModifier); // Paper - Make baby speed configurable
|
||||
|
@ -60,7 +60,7 @@ index 95e9d38dbccbd1c43ababd707e18dfe6779256c1..9ff42b0ae2b82dc3092e38e1439d89b4
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
index 767b8f4db39db9a3732282536b52ae1cb077b503..1226abd6ce7bb13942a0583c721835aeb769bbb6 100644
|
||||
index 8256af275e468a5aa506f0af22428f4082204956..c71d4f91df7ec1cf26888b00fac444bccbbe472e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -322,7 +322,7 @@ public class Zombie extends Monster {
|
||||
|
@ -144,7 +144,7 @@ index 1f99a9b9a0510ab19a5913588d6d677d6cada5e5..09c363f483cb12be01afd9a274c541f3
|
||||
|
||||
static Map<Enchantment, Integer> getEnchantments(net.minecraft.world.item.ItemStack item) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 04a1c602a1d94f1b84cbeaa3abf90b8fcc31e89f..54e3059f405de2e6306cea16d045fb448bb5b099 100644
|
||||
index f9340ce662157bc141b515b02db5f8d9aa116f32..d9583b6f4e78a3fac594a7448e105507f33caa91 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
|
||||
|
@ -7,7 +7,7 @@ Subject: [PATCH] Add more Zombie API
|
||||
public net.minecraft.world.entity.monster.Zombie isSunSensitive()Z
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
index 1226abd6ce7bb13942a0583c721835aeb769bbb6..7c206dc6f8db4b21d6d068eccc768203d041f51b 100644
|
||||
index c71d4f91df7ec1cf26888b00fac444bccbbe472e..2d6cf6ea1717b28871c40de69120336c59a4d347 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -93,6 +93,7 @@ public class Zombie extends Monster {
|
||||
|
@ -8,7 +8,7 @@ This allows you to solve an issue in vanilla behavior where:
|
||||
* On normal difficulty they will have a 50% of getting infected or dying.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
index 7c206dc6f8db4b21d6d068eccc768203d041f51b..a2816b5334e962aee4beeac116e1c8543fa89808 100644
|
||||
index 2d6cf6ea1717b28871c40de69120336c59a4d347..66fa70762ba3387aa200caa4d8a4e557498cfff1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -443,10 +443,8 @@ public class Zombie extends Monster {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] misc debugging dumps
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/util/TraceUtil.java b/src/main/java/io/papermc/paper/util/TraceUtil.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..2d5494d2813b773e60ddba6790b750a9a08f21f8
|
||||
index 0000000000000000000000000000000000000000..479bb92d159f33c54c2d9c39d8a63aa9e74d95b9
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/util/TraceUtil.java
|
||||
@@ -0,0 +1,18 @@
|
||||
@@ -0,0 +1,25 @@
|
||||
+package io.papermc.paper.util;
|
||||
+
|
||||
+import org.bukkit.Bukkit;
|
||||
@ -18,14 +18,21 @@ index 0000000000000000000000000000000000000000..2d5494d2813b773e60ddba6790b750a9
|
||||
+
|
||||
+ public static void dumpTraceForThread(Thread thread, String reason) {
|
||||
+ Bukkit.getLogger().warning(thread.getName() + ": " + reason);
|
||||
+ StackTraceElement[] trace = thread.getStackTrace();
|
||||
+ StackTraceElement[] trace = StacktraceDeobfuscator.INSTANCE.deobfuscateStacktrace(thread.getStackTrace());
|
||||
+ for (StackTraceElement traceElement : trace) {
|
||||
+ Bukkit.getLogger().warning("\tat " + traceElement);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public static void dumpTraceForThread(String reason) {
|
||||
+ new Throwable(reason).printStackTrace();
|
||||
+ final Throwable thr = new Throwable(reason);
|
||||
+ StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr);
|
||||
+ thr.printStackTrace();
|
||||
+ }
|
||||
+
|
||||
+ public static void printStackTrace(Throwable thr) {
|
||||
+ StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr);
|
||||
+ thr.printStackTrace();
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
|
@ -30,7 +30,7 @@ index de40e522960469b98f987bd688489740446d9f85..a0a34f680e21007ebf2c2497d2e6505e
|
||||
public CraftAttributeMap(AttributeMap handle) {
|
||||
this.handle = handle;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 54e3059f405de2e6306cea16d045fb448bb5b099..b355663fe21510b8b15deefb28cdb0460c4d1baa 100644
|
||||
index d9583b6f4e78a3fac594a7448e105507f33caa91..93350ee9ad3a6309e6baae97105328f78d485656 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -607,7 +607,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add zombie targets turtle egg config
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
index a2816b5334e962aee4beeac116e1c8543fa89808..eacfdfb47299af6900bd39595da8daedb640b959 100644
|
||||
index 66fa70762ba3387aa200caa4d8a4e557498cfff1..bb3c46c9faaf300f7c755c3b8316434e51d0c408 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -106,7 +106,7 @@ public class Zombie extends Monster {
|
||||
|
@ -18,7 +18,7 @@ index a19a51a40d69ad71b85b2e7e8b4cfab6d8343196..7013f1b76311a11fb7e2543ab1e79247
|
||||
LocalDate localdate = LocalDate.now();
|
||||
int i = localdate.get(ChronoField.DAY_OF_MONTH);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
index eacfdfb47299af6900bd39595da8daedb640b959..c8ce36d67901e2897f521d5b4f5041348f235ae7 100644
|
||||
index bb3c46c9faaf300f7c755c3b8316434e51d0c408..18b147c9488e8dffd25da139ff4c9d2197d72616 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -498,7 +498,7 @@ public class Zombie extends Monster {
|
||||
|
@ -23,7 +23,7 @@ index d4ed75afc61620cbc79da07b6511c247b829e41f..b3da310d6fd1d533da805c38c2f449cf
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
index c8ce36d67901e2897f521d5b4f5041348f235ae7..e4fc7f96aac9cc2ed5b4158b6663de397ee1162f 100644
|
||||
index 18b147c9488e8dffd25da139ff4c9d2197d72616..8f8bba0e6690443823c8e2301db82cae3eb66551 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -97,7 +97,7 @@ public class Zombie extends Monster {
|
||||
|
@ -9,7 +9,7 @@ so this resets it after each call to
|
||||
Zombie#getExperienceReward
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
index e4fc7f96aac9cc2ed5b4158b6663de397ee1162f..d22464521f41c6a13d6c33f0a361497a3e04197f 100644
|
||||
index 8f8bba0e6690443823c8e2301db82cae3eb66551..e42dfc62bb179be1ab01b0096c05c6549d38abbc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -172,11 +172,16 @@ public class Zombie extends Monster {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix CraftMetaItem#getAttributeModifier duplication check
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index b355663fe21510b8b15deefb28cdb0460c4d1baa..4fe613191ffd564d681311311504e44fd4709721 100644
|
||||
index 93350ee9ad3a6309e6baae97105328f78d485656..62dc63e2825d4144b80193b94f3e2b0d070b39c9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -1255,7 +1255,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren