Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8124)

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:
607ce370 SPIGOT-7069: Material.BARREL has Directional data class, should also be Openable
f14cea82 SPIGOT-7070: Material.SCULK_VEIN has Waterlogged data class, should also be MultipleFacing
8e43b278 PR-767: Add support checking/survivability methods for BlockData
b3dee151 SPIGOT-7083: Add Boat.WoodenType, Boat.Status; deprecate TreeSpecies

CraftBukkit Changes:
9a8e08010 SPIGOT-7069: Material.BARREL has Directional data class, should also be Openable
26bd88ccd SPIGOT-7070: Material.SCULK_VEIN has Waterlogged data class, should also be MultipleFacing
7ba06e15b SPIGOT-7095: StructureGrowEvent doesn't fire for mangrove propagules growing to a tree
163e35c91 PR-1079: Add support checking/survivability methods for BlockData
4230f8f0e SPIGOT-7083: Add Boat.WoodenType, Boat.Status; deprecate TreeSpecies

Spigot Changes:
14a2382f Rebuild patches
This commit is contained in:
Jake Potrebic 2022-07-12 10:16:05 -07:00
parent 35eca19853
commit 820aef3f3c
6 changed files with 11 additions and 55 deletions

View file

@ -8,24 +8,19 @@ diff --git a/src/main/java/org/bukkit/entity/Boat.java b/src/main/java/org/bukki
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/entity/Boat.java
+++ b/src/main/java/org/bukkit/entity/Boat.java
@@ -0,0 +0,0 @@
package org.bukkit.entity;
+import org.bukkit.Material;
import org.bukkit.TreeSpecies;
import org.jetbrains.annotations.NotNull;
@@ -0,0 +0,0 @@ public interface Boat extends Vehicle {
*/
@Deprecated
public void setWorkOnLand(boolean workOnLand);
ON_LAND,
IN_AIR;
}
+
+ // Paper start
+ /**
+ * Gets the {@link Material} that represents this Boat type.
+ *
+ * @return the boat material.
+ * @deprecated use {@link #getBoatType()} and {@link Type#getMaterial()}
+ */
+ @Deprecated
+ @NotNull
+ public Material getBoatMaterial();
+ // Paper end

View file

@ -1,39 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Noah van der Aa <ndvdaa@gmail.com>
Date: Mon, 20 Jun 2022 15:46:46 +0200
Subject: [PATCH] Call StructureGrowEvent for mangrove propagule
diff --git a/src/main/java/net/minecraft/world/level/block/MangrovePropaguleBlock.java b/src/main/java/net/minecraft/world/level/block/MangrovePropaguleBlock.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/level/block/MangrovePropaguleBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/MangrovePropaguleBlock.java
@@ -0,0 +0,0 @@ public class MangrovePropaguleBlock extends SaplingBlock implements SimpleWaterl
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
if (!isHanging(state)) {
if (random.nextInt(7) == 0) {
+ world.captureTreeGeneration = true; // Paper
this.advanceTree(world, pos, state, random);
+ // Paper start
+ world.captureTreeGeneration = false;
+ if (world.capturedBlockStates.size() > 0) {
+ org.bukkit.TreeType treeType = SaplingBlock.treeType;
+ SaplingBlock.treeType = null;
+ org.bukkit.Location location = new org.bukkit.Location(world.getWorld(), pos.getX(), pos.getY(), pos.getZ());
+ java.util.List<org.bukkit.block.BlockState> blocks = new java.util.ArrayList<>(world.capturedBlockStates.values());
+ world.capturedBlockStates.clear();
+ org.bukkit.event.world.StructureGrowEvent event = null;
+ if (treeType != null) {
+ event = new org.bukkit.event.world.StructureGrowEvent(location, treeType, false, null, blocks);
+ org.bukkit.Bukkit.getPluginManager().callEvent(event);
+ }
+ if (event == null || !event.isCancelled()) {
+ for (org.bukkit.block.BlockState blockstate : blocks) {
+ blockstate.update(true);
+ }
+ }
+ }
+ // Paper end
}
} else {

View file

@ -15,13 +15,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start
+ @Override
+ public org.bukkit.Material getBoatMaterial() {
+ return org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(getHandle().getDropItem());
+ return this.getBoatType().getMaterial();
+ }
+ // Paper end
+
@Override
public net.minecraft.world.entity.vehicle.Boat getHandle() {
return (net.minecraft.world.entity.vehicle.Boat) entity;
public Status getStatus() {
return CraftBoat.boatStatusFromNms(this.getHandle().status);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java

@ -1 +1 @@
Subproject commit d41796deb5e14fd69558db71324e8feb12a1effa
Subproject commit 607ce370a5e526985c050c9cec6abfc5fb2f475d

@ -1 +1 @@
Subproject commit 991aeda1218e72e9237942071e7ea55cc77b541c
Subproject commit 9a8e080108222cf09aed735a3b5089d3da6350c6

@ -1 +1 @@
Subproject commit 475f600885a8f58aee83aa7473f37dfe6b8ac3b5
Subproject commit 14a2382f7da41c880fdbf64536fb222df98dc111