chore: Remove things marked as for removal (#3941)

* chore: Remove things marked as for removal

* Address feedback

Co-authored-by: Alexander Brandes <mc.cache@web.de>
This commit is contained in:
Jordan
2023-01-21 15:44:28 +00:00
committed by GitHub
parent cbacdd67eb
commit 5af8be4293
10 changed files with 7 additions and 389 deletions

View File

@ -37,7 +37,6 @@ import org.bukkit.block.Sign;
import org.bukkit.block.Skull;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
import org.checkerframework.checker.nullness.qual.NonNull;
@ -52,15 +51,6 @@ public class StateWrapper {
public org.bukkit.block.BlockState state = null;
public CompoundTag tag = null;
/**
* @deprecated in favour of using WE methods for obtaining NBT, specifically by obtaining a
* {@link com.sk89q.worldedit.world.block.BaseBlock} and then using {@link com.sk89q.worldedit.world.block.BaseBlock#getNbtData()}
*/
@Deprecated(forRemoval = true, since = "6.9.0")
public StateWrapper(org.bukkit.block.BlockState state) {
this.state = state;
}
public StateWrapper(CompoundTag tag) {
this.tag = tag;
}
@ -254,26 +244,6 @@ public class StateWrapper {
return false;
}
/**
* Get a CompoundTag of the contents of a block's inventory (chest, furnace, etc.).
*
* @deprecated in favour of using WorldEdit methods for obtaining NBT, specifically by obtaining a
* {@link com.sk89q.worldedit.world.block.BaseBlock} and then using {@link com.sk89q.worldedit.world.block.BaseBlock#getNbtData()}
*/
@Deprecated(forRemoval = true, since = "6.9.0")
public CompoundTag getTag() {
if (this.tag != null) {
return this.tag;
}
if (this.state instanceof InventoryHolder inv) {
ItemStack[] contents = inv.getInventory().getContents();
Map<String, Tag> values = new HashMap<>();
values.put("Items", new ListTag(CompoundTag.class, serializeInventory(contents)));
return new CompoundTag(values);
}
return null;
}
public String getId() {
String tileid = this.tag.getString("id").toLowerCase();
if (tileid.startsWith("minecraft:")) {