mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 04:02:50 +01:00
9d8d38d137
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 CraftBukkit Changes: 66fd94322 SPIGOT-7652: Remove remap for SPELL_MOB_AMBIENT which no longer exists ecfa4f973 SPIGOT-7654: ItemStack#isSimilar does not work with empty BlockStateMeta 4460ecc49 SPIGOT-7655: ItemMeta#addItemFlags(ItemFlag.HIDE_ATTRIBUTES) not working when no attribute modifiers set 5d84f48a4 SPIGOT-7653: Update ApiVersion.CURRENT with latest version and include tests
24 lines
1.1 KiB
Diff
24 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Thu, 11 Jan 2024 12:41:50 -0800
|
|
Subject: [PATCH] Add BlockStateMeta#clearBlockState
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
|
|
index 17ed658bd2afb1c115af2140a987edc84af3bef2..ad2bc225a93fc90661c488252b9139533d5803a2 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
|
|
@@ -292,6 +292,13 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
|
|
return this.blockEntityTag != null;
|
|
}
|
|
|
|
+ // Paper start - add method to clear block state
|
|
+ @Override
|
|
+ public void clearBlockState() {
|
|
+ this.blockEntityTag = null;
|
|
+ }
|
|
+ // Paper end - add method to clear block state
|
|
+
|
|
@Override
|
|
public BlockState getBlockState() {
|
|
return (this.blockEntityTag != null) ? this.blockEntityTag.copy() : CraftMetaBlockState.getBlockState(this.material, null);
|