mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-02 12:35:27 +02:00
Simplify the design of Repairable
This commit is contained in:
@@ -9,8 +9,6 @@ import org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack;
|
||||
import org.bukkit.craftbukkit.v1_13_R2.util.CraftNBTTagConfigSerializer;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
|
||||
|
||||
public class NBTManager {
|
||||
|
||||
private static final String CRAFT_META_ITEM_CLASS_PATH = "org.bukkit.craftbukkit.inventory.CraftMetaItem";
|
||||
@@ -47,4 +45,9 @@ public class NBTManager {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasNBT(NBTTagCompound root, NBTTagCompound nbtData) {
|
||||
//TODO: Implement this
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,5 +1,7 @@
|
||||
package com.gmail.nossr50.util.nbt;
|
||||
|
||||
import net.minecraft.server.v1_13_R2.NBTTagCompound;
|
||||
|
||||
/**
|
||||
* A simple class that acts as a container for raw NBT data
|
||||
* NBT data will be constructed from the raw NBT string using server internals
|
||||
@@ -10,13 +12,14 @@ package com.gmail.nossr50.util.nbt;
|
||||
* 1) Read partial or complete NBT from the config file for an item
|
||||
* 2) Check an items NBT tree for this NBT data during runtime once transformed
|
||||
*/
|
||||
public class RawNBT<T> {
|
||||
public class RawNBT {
|
||||
private String nbtContents;
|
||||
private T nbtTree; //Will be constructed using server internals to make matching NBT easier
|
||||
private NBTTagCompound nbtData; //Will be constructed using server internals to make matching NBT easier
|
||||
|
||||
public RawNBT(String nbtContents, T nbtTree) {
|
||||
|
||||
public RawNBT(String nbtContents, NBTTagCompound nbtData) {
|
||||
this.nbtContents = nbtContents;
|
||||
NBTManager
|
||||
this.nbtData = nbtData;
|
||||
}
|
||||
|
||||
public String getNbtContents() {
|
||||
@@ -27,4 +30,7 @@ public class RawNBT<T> {
|
||||
this.nbtContents = nbtContents;
|
||||
}
|
||||
|
||||
public NBTTagCompound getNbtData() {
|
||||
return nbtData;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user