mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@75280ef Fix cancelling EntityDeathEvent for Armor Stands killed by players (#6478) PaperMC/Paper@6f57163 Add CompostItemEvent and EntityCompostItemEvent (#6356) PaperMC/Paper@5cc78f2 Use configured log prefix for spigot library loading (#7934)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
group = org.purpurmc.purpur
|
||||
version = 1.19.3-R0.1-SNAPSHOT
|
||||
|
||||
paperCommit = 541753be2513fcb3bdd0e60065b9cb61286b2bf2
|
||||
paperCommit = 5cc78f2b6f42132843b4fe02c3e509f727aa4714
|
||||
|
||||
org.gradle.caching = true
|
||||
org.gradle.parallel = true
|
||||
|
||||
@@ -17,7 +17,7 @@ index 90fdaee8b07df0acf8863103b47a1c68e38a3e4f..6319f6c1428d0e272681984c1b15ec05
|
||||
/**
|
||||
* This class was not meant to be constructed explicitly
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java
|
||||
index f9e67e20133d349e43d126dbb48b34d4d9aceb4c..f8efacb9447d72e66a1fd59db18425fe0629e266 100644
|
||||
index e4b6f278a811acbb0070e311c5c3bdaff7b00474..ee83ecb054099cb85168a9499dfe967a0a9ec796 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java
|
||||
@@ -65,6 +65,7 @@ public class LibraryLoader
|
||||
@@ -35,7 +35,7 @@ index f9e67e20133d349e43d126dbb48b34d4d9aceb4c..f8efacb9447d72e66a1fd59db18425fe
|
||||
+ if (!JavaPluginLoader.SuppressLibraryLoaderLogger) // Purpur
|
||||
logger.log( Level.INFO, "[{0}] Loading {1} libraries... please wait", new Object[]
|
||||
{
|
||||
desc.getName(), desc.getLibraries().size()
|
||||
java.util.Objects.requireNonNullElseGet(desc.getPrefix(), desc::getName), desc.getLibraries().size() // Paper - use configured log prefix
|
||||
@@ -118,6 +120,7 @@ public class LibraryLoader
|
||||
}
|
||||
|
||||
@@ -43,4 +43,4 @@ index f9e67e20133d349e43d126dbb48b34d4d9aceb4c..f8efacb9447d72e66a1fd59db18425fe
|
||||
+ if (!JavaPluginLoader.SuppressLibraryLoaderLogger) // Purpur
|
||||
logger.log( Level.INFO, "[{0}] Loaded library {1}", new Object[]
|
||||
{
|
||||
desc.getName(), file
|
||||
java.util.Objects.requireNonNullElseGet(desc.getPrefix(), desc::getName), file // Paper - use configured log prefix
|
||||
|
||||
@@ -6,13 +6,13 @@ Subject: [PATCH] Apply display names from item forms of entities to entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index 76c83fdd744cc8f31a52c733de521a6fb2024499..0c4b76cd3b6248df99d31d28c7521a0fe6aea89e 100644
|
||||
index 13faa9a0c923546eba04ab7e77840c3debce0e9f..195afbce5d366e8fa433dac57858bea28ce2d758 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -595,7 +595,13 @@ public class ArmorStand extends LivingEntity {
|
||||
}
|
||||
|
||||
private void brokenByPlayer(DamageSource damageSource) {
|
||||
private org.bukkit.event.entity.EntityDeathEvent brokenByPlayer(DamageSource damageSource) { // Paper
|
||||
- drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(new ItemStack(Items.ARMOR_STAND))); // CraftBukkit - add to drops
|
||||
+ // Purpur start
|
||||
+ final ItemStack armorStand = new ItemStack(Items.ARMOR_STAND);
|
||||
@@ -21,7 +21,7 @@ index 76c83fdd744cc8f31a52c733de521a6fb2024499..0c4b76cd3b6248df99d31d28c7521a0f
|
||||
+ }
|
||||
+ drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(armorStand)); // CraftBukkit - add to drops
|
||||
+ // Purpur end
|
||||
this.brokenByAnything(damageSource);
|
||||
return this.brokenByAnything(damageSource); // Paper
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||
@@ -142,7 +142,7 @@ index 489558eb0126e7a41e2e379e352bddc034375b61..062152b258224f28e07f96d6135bbb7a
|
||||
|
||||
if (((HangingEntity) object).survives()) {
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 7ebe655892cd22e06e41eea0cdb705ccbb123622..1da1995c56bbb0bd74df5b2bac08525336f53041 100644
|
||||
index c0afa86b018f2af481c7e0494d1274abceb0f783..3041cf05568f2b9b432fffa1d0c298440f102eeb 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -100,8 +100,10 @@ public class PurpurWorldConfig {
|
||||
|
||||
@@ -18,10 +18,10 @@ index 58b093bb1de78ee3b3b2ea364aa50474883f443a..2fd89736091bda7005ef27e42a2aad0d
|
||||
|
||||
if (enuminteractionresult.consumesAction()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||
index 564822911c25238900b361d564c5db3103900fb3..5d1567f7413b4065b5587ae45ccf9a3e11355c20 100644
|
||||
index f6268231e39f50bb6adedd85e3c18d746ae3792d..558563aed82adaa44d874a6cbb3e381819c2f638 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||
@@ -220,23 +220,21 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -220,26 +220,28 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
ItemStack itemstack = player.getItemInHand(hand);
|
||||
|
||||
if (i < 8 && ComposterBlock.COMPOSTABLES.containsKey(itemstack.getItem())) {
|
||||
@@ -32,7 +32,10 @@ index 564822911c25238900b361d564c5db3103900fb3..5d1567f7413b4065b5587ae45ccf9a3e
|
||||
- if (state != dummyBlockState && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, dummyBlockState).isCancelled()) { // if block state will change and event cancelled
|
||||
- return InteractionResult.sidedSuccess(world.isClientSide);
|
||||
- }
|
||||
- BlockState iblockdata1 = ComposterBlock.addItem(state, world, pos, itemstack, rand);
|
||||
- BlockState iblockdata1 = ComposterBlock.addItem(state, world, pos, itemstack, player);
|
||||
- if (iblockdata1 == null) {
|
||||
- return InteractionResult.PASS;
|
||||
- }
|
||||
- // Paper end
|
||||
-
|
||||
- world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);
|
||||
@@ -42,6 +45,10 @@ index 564822911c25238900b361d564c5db3103900fb3..5d1567f7413b4065b5587ae45ccf9a3e
|
||||
- }
|
||||
+ // Purpur start
|
||||
+ BlockState newState = process(i, state, world, itemstack, pos, player);
|
||||
+ if (newState == null) {
|
||||
+ return InteractionResult.PASS;
|
||||
}
|
||||
|
||||
+ if (world.purpurConfig.composterBulkProcess && player.isShiftKeyDown() && newState != state) {
|
||||
+ BlockState oldState;
|
||||
+ int oldCount, newCount, oldLevel, newLevel;
|
||||
@@ -50,16 +57,18 @@ index 564822911c25238900b361d564c5db3103900fb3..5d1567f7413b4065b5587ae45ccf9a3e
|
||||
+ oldCount = itemstack.getCount();
|
||||
+ oldLevel = oldState.getValue(ComposterBlock.LEVEL);
|
||||
+ newState = process(oldLevel, oldState, world, itemstack, pos, player);
|
||||
+ if (newState == null) {
|
||||
+ return InteractionResult.PASS;
|
||||
+ }
|
||||
+ newCount = itemstack.getCount();
|
||||
+ newLevel = newState.getValue(ComposterBlock.LEVEL);
|
||||
+ } while (newCount > 0 && (newCount != oldCount || newLevel != oldLevel || newState != oldState));
|
||||
}
|
||||
-
|
||||
+ }
|
||||
+ // Purpur end
|
||||
return InteractionResult.sidedSuccess(world.isClientSide);
|
||||
} else if (i == 8) {
|
||||
ComposterBlock.extractProduce(state, world, pos, (Entity) null); // CraftBukkit - no event for players
|
||||
@@ -246,6 +244,29 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -249,6 +251,32 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +81,10 @@ index 564822911c25238900b361d564c5db3103900fb3..5d1567f7413b4065b5587ae45ccf9a3e
|
||||
+ if (state != dummyBlockState && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, dummyBlockState).isCancelled()) { // if block state will change and event cancelled
|
||||
+ return state;
|
||||
+ }
|
||||
+ BlockState iblockdata1 = ComposterBlock.addItem(state, world, pos, itemstack, rand);
|
||||
+ BlockState iblockdata1 = ComposterBlock.addItem(state, world, pos, itemstack, player);
|
||||
+ if (iblockdata1 == null) {
|
||||
+ return iblockdata1;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
+ world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0);
|
||||
@@ -90,7 +102,7 @@ index 564822911c25238900b361d564c5db3103900fb3..5d1567f7413b4065b5587ae45ccf9a3e
|
||||
int i = (Integer) iblockdata.getValue(ComposterBlock.LEVEL);
|
||||
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 026d84d19c1a9077b17846dea050f3048eefe9e5..528a12dea32ac2646fb2039aaa1edeb6bec0c94a 100644
|
||||
index 83d7abde6a4da43d74fcf41910e00d7a32753567..ee3ef4ab817a8d7143ee34abb6beda4154ed1bfb 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -482,6 +482,11 @@ public class PurpurWorldConfig {
|
||||
|
||||
Reference in New Issue
Block a user