mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Updated Upstream (Paper & Pufferfish)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@e4f5e1c Bump netty Pufferfish Changes: pufferfish-gg/Pufferfish@a8543a4 #33 Fix anti-xray related crash bug pufferfish-gg/Pufferfish@aefcb1a Updated Upstream (Paper)
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Tue, 4 Aug 2020 22:08:23 -0500
|
||||
Subject: [PATCH] Allow anvil colors
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||
index c1ed57bae737fca803c2dd8666207dbffc6758c3..10cd589e427f847936f29e33edee3923a4661210 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||
@@ -279,6 +279,17 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||
} else if (!this.itemName.equals(itemstack.getHoverName().getString())) {
|
||||
b1 = 1;
|
||||
i += b1;
|
||||
+ // Purpur start
|
||||
+ if (player != null && player.level.purpurConfig.anvilAllowColors && player.getBukkitEntity().hasPermission("purpur.anvil.color")) {
|
||||
+ final net.kyori.adventure.text.Component renameTextComponent;
|
||||
+ if (itemName.startsWith("&r") && player.getBukkitEntity().hasPermission("purpur.anvil.remove_italics")) {
|
||||
+ renameTextComponent = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacyAmpersand().deserialize(itemName.substring(2)).decoration(net.kyori.adventure.text.format.TextDecoration.ITALIC, false);
|
||||
+ } else {
|
||||
+ renameTextComponent = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacyAmpersand().deserialize(itemName);
|
||||
+ }
|
||||
+ itemstack1.setHoverName(io.papermc.paper.adventure.PaperAdventure.asVanilla(renameTextComponent));
|
||||
+ } else
|
||||
+ // Purpur end
|
||||
itemstack1.setHoverName(Component.literal(this.itemName));
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 85b4f00796521d007a1b741c5dcc47a6e359d71a..4d474c2d2f6c1a7a28daba2d9886cf6e5e12b343 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -296,6 +296,11 @@ public class PurpurWorldConfig {
|
||||
});
|
||||
}
|
||||
|
||||
+ public boolean anvilAllowColors = false;
|
||||
+ private void anvilSettings() {
|
||||
+ anvilAllowColors = getBoolean("blocks.anvil.allow-colors", anvilAllowColors);
|
||||
+ }
|
||||
+
|
||||
public boolean bedExplode = true;
|
||||
public double bedExplosionPower = 5.0D;
|
||||
public boolean bedExplosionFire = true;
|
||||
Reference in New Issue
Block a user