13
0
geforkt von Mirrors/Paper

Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
fc460d1b PR-735: Add Villager#zombify
c8c8331e PR-690: Add method to read ItemStack input
62845f2f SPIGOT-6829: Add per-player world border API

CraftBukkit Changes:
a459f4d4 PR-1033: Add Villager#zombify
d65d1430 PR-975: Add method to read ItemStack input
b5559f8c SPIGOT-6990: Fix setRepairCost(0) in Anvil
6c308e1b SPIGOT-6829: Add per-player world border API

Spigot Changes:
42b61526 SPIGOT-7000: Generation and /locate issues when using custom structure seeds
Dieser Commit ist enthalten in:
Nassim Jahnke 2022-04-16 10:29:50 +02:00
Ursprung 79d17079aa
Commit ed7396781e
12 geänderte Dateien mit 16 neuen und 53 gelöschten Zeilen

Datei anzeigen

@ -119,11 +119,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
import org.bukkit.Keyed;
import org.bukkit.Location;
import org.bukkit.NamespacedKey;
import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable; // Paper
/**
* Represents a villager NPC
@@ -0,0 +0,0 @@ public interface Villager extends AbstractVillager {
return key;
}

Datei anzeigen

@ -202,20 +202,12 @@ diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
@@ -0,0 +0,0 @@ package org.bukkit.inventory;
import org.bukkit.Color;
import org.bukkit.Material;
import org.bukkit.Server;
+import org.bukkit.UndefinedNullability;
import org.bukkit.inventory.meta.BookMeta;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.SkullMeta;
@@ -0,0 +0,0 @@ public interface ItemFactory {
* @return a new ItemMeta that could be applied to an item stack of the
* specified material
*/
- @Nullable
+ @UndefinedNullability // Paper
+ @org.bukkit.UndefinedNullability // Paper
ItemMeta getItemMeta(@NotNull final Material material);
/**

Datei anzeigen

@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end
/**
* Gets the map from the given item ID.
* Create a new virtual {@link WorldBorder}.
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/Server.java
@ -47,8 +47,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end
+
/**
* Gets the map from the given item ID.
*
* Create a new virtual {@link WorldBorder}.
* <p>
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/World.java

Datei anzeigen

@ -9,11 +9,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
@@ -0,0 +0,0 @@ public abstract class ChunkGenerator implements BiomeManager.NoiseBiomeSource {
int k = placement.spread();
int k = concentricringsstructureplacement.spread();
Random random = new Random();
+ // Paper start
+ if (strongholdSet.is(net.minecraft.world.level.levelgen.structure.BuiltinStructureSets.STRONGHOLDS) && this.conf.strongholdSeed != null) {
+ if (this.conf.strongholdSeed != null && this.structureSets.getResourceKey(holder).orElse(null) == net.minecraft.world.level.levelgen.structure.BuiltinStructureSets.STRONGHOLDS) {
+ random.setSeed(this.conf.strongholdSeed);
+ } else {
+ // Paper end

Datei anzeigen

@ -65,9 +65,9 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/sr
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
@@ -0,0 +0,0 @@ import org.bukkit.entity.Villager;
import org.bukkit.entity.Villager.Profession;
import org.bukkit.entity.Villager.Type;
@@ -0,0 +0,0 @@ import org.bukkit.entity.EntityType;
import org.bukkit.entity.Villager;
import org.bukkit.entity.ZombieVillager;
+// Paper start
+import com.destroystokyo.paper.entity.villager.Reputation;

Datei anzeigen

@ -35,9 +35,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private double health = 20;
private boolean scaledHealth = false;
private double healthScale = 20;
private CraftWorldBorder clientWorldBorder = null;
private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener();
+ // Paper start
+ private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
+ private String resourcePackHash;

Datei anzeigen

@ -1,19 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jan Tuck <jan@tuck.dk>
Date: Mon, 15 Nov 2021 15:20:41 -0500
Subject: [PATCH] Fix anvil prepare event not working with zero xp
diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
@@ -0,0 +0,0 @@ public class AnvilMenu extends ItemCombinerMenu {
@Override
protected boolean mayPickup(Player player, boolean present) {
- return (player.getAbilities().instabuild || player.experienceLevel >= this.cost.get()) && this.cost.get() > 0;
+ return (player.getAbilities().instabuild || player.experienceLevel >= this.cost.get()) && this.cost.get() >= 0; // Paper - fix anvil prepare event not working with 0 xp
}
@Override

Datei anzeigen

@ -33,8 +33,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
import net.minecraft.world.level.block.Blocks;
+import net.minecraft.world.level.biome.BiomeManager;
import net.minecraft.world.level.block.entity.SignBlockEntity;
import net.minecraft.world.level.border.BorderChangeListener;
import net.minecraft.world.level.saveddata.maps.MapDecoration;
import net.minecraft.world.level.saveddata.maps.MapItemSavedData;
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return server.getPlayer(getUniqueId()) != null;
}

Datei anzeigen

@ -15,13 +15,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- BlockEntity tileentity = this.player.level.getBlockEntity(blockposition);
+ // Paper start
+ BlockEntity tileentity = null;
+ if (this.player.getLevel().isLoadedAndInBounds(blockposition)) {
+ if (this.player.distanceToSqr(blockposition.getX(), blockposition.getY(), blockposition.getZ()) < 32 * 32 && this.player.getLevel().isLoadedAndInBounds(blockposition)) {
+ tileentity = this.player.level.getBlockEntity(blockposition);
+ } else {
+ // failed to find, cleanup
+ nbttagcompound.remove("x");
+ nbttagcompound.remove("y");
+ nbttagcompound.remove("z");
+ }
+ // Paper end

@ -1 +1 @@
Subproject commit 7902647a668318b7e04f817e07ae9b955d7c0485
Subproject commit fc460d1bb8d5f2bc9ff07dad1b7b402eed06d7c4

@ -1 +1 @@
Subproject commit 2542945ef49093f6e1041dd817d6f640b7fc25b5
Subproject commit a459f4d4f5f89e6266be8db2e7facea1cb00b5d0

@ -1 +1 @@
Subproject commit ffceeae314d56fe07395e3e8f8262c0484d2bbd1
Subproject commit 42b61526f13ff472e32714d8e7b75fce31cf1151