mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly Paper Changes: d985976 Add config for mobs immune to default effects (#4835) Tuinity Changes: ea43797 Fix portalling from the overworld above y 255
This commit is contained in:
@@ -1,54 +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 ddfb89d62d2ec316683e9f0f5550e298ab26d137..410ac71efff92dfa1f1e11895d0f5bf3fca1be17 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||
@@ -2,6 +2,9 @@ package net.minecraft.world.inventory;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
+
|
||||
+import io.papermc.paper.adventure.PaperAdventure;
|
||||
+import net.kyori.adventure.text.format.TextDecoration;
|
||||
import net.minecraft.nbt.IntTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
@@ -277,6 +280,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 = PaperAdventure.LEGACY_AMPERSAND.deserialize(itemName.substring(2)).decoration(TextDecoration.ITALIC, false);
|
||||
+ } else {
|
||||
+ renameTextComponent = PaperAdventure.LEGACY_AMPERSAND.deserialize(itemName);
|
||||
+ }
|
||||
+ itemstack1.setHoverName(PaperAdventure.asVanilla(renameTextComponent));
|
||||
+ } else
|
||||
+ // Purpur end
|
||||
itemstack1.setHoverName((Component) (new TextComponent(this.itemName)));
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index cce72e2574486fb178caa3bc1a89cbf39d66e4d1..f2e4cd773a3a3145d7a67245e23534fc77fadb72 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -287,6 +287,11 @@ public class PurpurWorldConfig {
|
||||
voidDamageDealt = getDouble("gameplay-mechanics.void-damage-dealt", voidDamageDealt);
|
||||
}
|
||||
|
||||
+ 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