mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +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,52 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 27 May 2021 04:04:23 -0500
|
||||
Subject: [PATCH] ShulkerBox allow oversized stacks
|
||||
|
||||
This fixes PaperMC/Paper#4748 where breaking a shulkerbox in survival mode
|
||||
with oversized itemstacks would cause a "chunk ban". This fixes it by always
|
||||
creating an itemstack using the TileEntity's NBT data (how it handles it for
|
||||
creative players) instead of routing it through the LootableBuilder.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 11270c763dc5e260074260e10a6dd9a9b7a09c8f..a25e4eeb1ce4e18c7cb14e269ad3852715209cb9 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -448,7 +448,7 @@ public class ServerPlayerGameMode {
|
||||
block.destroy(this.level, pos, iblockdata);
|
||||
}
|
||||
|
||||
- if (this.isCreative()) {
|
||||
+ if (this.isCreative() || (this.level.purpurConfig.shulkerBoxAllowOversizedStacks && block instanceof net.minecraft.world.level.block.ShulkerBoxBlock)) { // Purpur
|
||||
// return true; // CraftBukkit
|
||||
} else {
|
||||
ItemStack itemstack = this.player.getMainHandItem();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
index b9c558060024d380e89116489c7fc12ad88db8ad..0a0a4be15bed899812fcd4af0e311f5fc40d5570 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
@@ -122,7 +122,7 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity instanceof ShulkerBoxBlockEntity) {
|
||||
ShulkerBoxBlockEntity shulkerBoxBlockEntity = (ShulkerBoxBlockEntity)blockEntity;
|
||||
- if (!world.isClientSide && player.isCreative() && !shulkerBoxBlockEntity.isEmpty()) {
|
||||
+ if (world.purpurConfig.shulkerBoxAllowOversizedStacks || (player.isCreative() && !shulkerBoxBlockEntity.isEmpty())) { // Purpur
|
||||
ItemStack itemStack = getColoredItemStack(this.getColor());
|
||||
CompoundTag compoundTag = shulkerBoxBlockEntity.saveToTag(new CompoundTag());
|
||||
if (!compoundTag.isEmpty()) {
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 8955d05d414b232a9737b02d2330b93509241396..9b7e5299a67fd4f58d107e8e96c76e49117b75fd 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -675,6 +675,11 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
}
|
||||
|
||||
+ public boolean shulkerBoxAllowOversizedStacks = false;
|
||||
+ private void shulkerBoxSettings() {
|
||||
+ shulkerBoxAllowOversizedStacks = getBoolean("blocks.shulker_box.allow-oversized-stacks", shulkerBoxAllowOversizedStacks);
|
||||
+ }
|
||||
+
|
||||
public boolean signAllowColors = false;
|
||||
public boolean signRightClickEdit = false;
|
||||
private void signSettings() {
|
||||
Reference in New Issue
Block a user