mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: 6859765e4 Add PlayerShearBlockEvent a665c2ec0 added missing default perms 4f19b170d Add summary to /paper chunkinfo command
This commit is contained in:
@@ -7,26 +7,31 @@ Makes it so that when a TileEntity is placed in the world and then broken,
|
||||
the dropped ItemStack retains any original custom display name/lore.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||
index 4aa2b38f18..f863909992 100644
|
||||
index d621b11ba..c276a2896 100644
|
||||
--- a/src/main/java/net/minecraft/server/Block.java
|
||||
+++ b/src/main/java/net/minecraft/server/Block.java
|
||||
@@ -207,6 +207,7 @@ public class Block extends BlockBase implements IMaterial {
|
||||
@@ -207,7 +207,7 @@ public class Block extends BlockBase implements IMaterial {
|
||||
public static void a(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition, @Nullable TileEntity tileentity) {
|
||||
if (generatoraccess instanceof WorldServer) {
|
||||
a(iblockdata, (WorldServer) generatoraccess, blockposition, tileentity).forEach((itemstack) -> {
|
||||
+ itemstack = applyDisplayNameAndLoreFromTile(itemstack, tileentity); // Purpur
|
||||
a((World) ((WorldServer) generatoraccess), blockposition, itemstack);
|
||||
- a((World) ((WorldServer) generatoraccess), blockposition, itemstack);
|
||||
+ dropItem((WorldServer) generatoraccess, blockposition, applyDisplayNameAndLoreFromTile(itemstack, tileentity)); // Purpur
|
||||
});
|
||||
iblockdata.dropNaturally((WorldServer) generatoraccess, blockposition, ItemStack.b);
|
||||
@@ -217,6 +218,7 @@ public class Block extends BlockBase implements IMaterial {
|
||||
}
|
||||
@@ -216,14 +216,56 @@ public class Block extends BlockBase implements IMaterial {
|
||||
|
||||
public static void dropItems(IBlockData iblockdata, World world, BlockPosition blockposition, @Nullable TileEntity tileentity, Entity entity, ItemStack itemstack) {
|
||||
if (world instanceof WorldServer) {
|
||||
getDrops(iblockdata, (WorldServer) world, blockposition, tileentity, entity, itemstack).forEach((itemstack1) -> {
|
||||
+ itemstack1 = applyDisplayNameAndLoreFromTile(itemstack1, tileentity); // Purpur
|
||||
a(world, blockposition, itemstack1);
|
||||
- getDrops(iblockdata, (WorldServer) world, blockposition, tileentity, entity, itemstack).forEach((itemstack1) -> {
|
||||
- a(world, blockposition, itemstack1);
|
||||
+ // Purpur start
|
||||
+ getDrops(iblockdata, (WorldServer) world, blockposition, tileentity, entity, itemstack).forEach(stackToDrop -> {
|
||||
+ dropItem(world, blockposition, applyDisplayNameAndLoreFromTile(stackToDrop, tileentity));
|
||||
+ // Purpur end
|
||||
});
|
||||
iblockdata.dropNaturally((WorldServer) world, blockposition, itemstack);
|
||||
@@ -224,6 +226,46 @@ public class Block extends BlockBase implements IMaterial {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -70,11 +75,11 @@ index 4aa2b38f18..f863909992 100644
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
public static void dropItem(World world, BlockPosition blockposition, ItemStack itemstack) { a(world, blockposition, itemstack); } // Purpur - OBFHELPER
|
||||
public static void a(World world, BlockPosition blockposition, ItemStack itemstack) {
|
||||
public static void a(World world, BlockPosition blockposition, ItemStack itemstack) { dropItem(world, blockposition, itemstack); } public static void dropItem(World world, BlockPosition blockposition, ItemStack itemstack) { // Paper - OBFHELPER
|
||||
if (!world.isClientSide && !itemstack.isEmpty() && world.getGameRules().getBoolean(GameRules.DO_TILE_DROPS)) {
|
||||
float f = 0.5F;
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
|
||||
index bbb1de7d1a..d97efe3d47 100644
|
||||
index bbb1de7d1..d97efe3d4 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
|
||||
@@ -96,7 +96,24 @@ public class ItemBlock extends Item {
|
||||
@@ -104,7 +109,7 @@ index bbb1de7d1a..d97efe3d47 100644
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
index 58d958a88a..8e87490954 100644
|
||||
index 58d958a88..8e8749095 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
@@ -90,9 +90,25 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
||||
@@ -160,7 +165,7 @@ index 58d958a88a..8e87490954 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index b7e43839ae..7f3d25b5a2 100644
|
||||
index b7e43839a..7f3d25b5a 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -182,6 +182,7 @@ public class PurpurWorldConfig {
|
||||
|
||||
Reference in New Issue
Block a user