Replace ItemTag API with new API that also expands to Tiles and Entities
By: Bjarne Koll <LynxPlay101@gmail.com>
This commit is contained in:
@@ -6,9 +6,11 @@ import net.minecraft.server.TileEntity;
|
||||
import net.minecraft.server.World;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.TileState;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.persistence.PersistentDataContainer;
|
||||
|
||||
public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState {
|
||||
public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState implements TileState {
|
||||
|
||||
private final Class<T> tileEntityClass;
|
||||
private final T tileEntity;
|
||||
@@ -118,4 +120,9 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PersistentDataContainer getPersistentDataContainer() {
|
||||
return this.getSnapshot().persistentDataContainer;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user