public class WauzResource
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<org.bukkit.block.Block,WauzResourceSpawn> |
blockResourceMap
A map with resource spawns, indexed by block.
|
private static ChunkKeyMap<java.util.List<WauzResourceSpawn>> |
chunkResourcesMap
A map with lists of resource spawns, indexed by chunk keys.
|
private io.lumine.xikage.mythicmobs.drops.DropTable |
dropTable
The drop table of the resource.
|
private static io.lumine.xikage.mythicmobs.drops.DropManager |
mythicMobs
Access to the MythicMobs API.
|
private int |
nodeHealth
The maximum health of the resource node.
|
private java.lang.String |
nodeName
The display name of the resource node.
|
private int |
nodeTier
The tier of the resource node.
|
private WauzResourceNodeType |
nodeType
The type of the resource node.
|
private static int |
resourceCount
The number of all different registred resources.
|
private java.lang.String |
resourceName
The canonical name of the resource.
|
private int |
respawnMins
The respawn minutes of the resource.
|
private WauzResourceType |
type
The type of the resource.
|
Constructor and Description |
---|
WauzResource(java.lang.String resourceName)
Constructs a resource, based on the resource file name in the /WauzCore/ResourceData folder.
|
Modifier and Type | Method and Description |
---|---|
static void |
addToChunkMap(WauzResource resource,
java.util.List<org.bukkit.Location> locations)
Adds a resource to the chunk map, so it can spawn in related chunks.
|
io.lumine.xikage.mythicmobs.drops.DropTable |
getDropTable() |
int |
getNodeHealth() |
java.lang.String |
getNodeName() |
int |
getNodeTier() |
WauzResourceNodeType |
getNodeType() |
java.lang.String |
getResourceName() |
int |
getRespawnMins() |
WauzResourceType |
getType() |
static void |
highlightResourcesNearPlayer(org.bukkit.entity.Player player)
Highlights all the resources, near the given player.
|
static void |
init()
Initializes all resource configs and fills the internal resource maps.
|
static boolean |
tryToInteractWithResource(org.bukkit.entity.Player player,
org.bukkit.block.Block block)
Lets the player interact with the resource block, if it is valid.
|
private static io.lumine.xikage.mythicmobs.drops.DropManager mythicMobs
private static ChunkKeyMap<java.util.List<WauzResourceSpawn>> chunkResourcesMap
private static java.util.Map<org.bukkit.block.Block,WauzResourceSpawn> blockResourceMap
private static int resourceCount
private java.lang.String resourceName
private WauzResourceType type
private io.lumine.xikage.mythicmobs.drops.DropTable dropTable
private int respawnMins
private WauzResourceNodeType nodeType
private java.lang.String nodeName
private int nodeTier
private int nodeHealth
public WauzResource(java.lang.String resourceName)
resourceName
- The canonical name of the resource.public static void init()
public static void addToChunkMap(WauzResource resource, java.util.List<org.bukkit.Location> locations)
resource
- The resource to add.locations
- The spawn locations of the resource.public static void highlightResourcesNearPlayer(org.bukkit.entity.Player player)
player
- The player to highlight the resources for.public static boolean tryToInteractWithResource(org.bukkit.entity.Player player, org.bukkit.block.Block block)
player
- The player interacting with the resource.block
- The block the resource is located at.public java.lang.String getResourceName()
public WauzResourceType getType()
public io.lumine.xikage.mythicmobs.drops.DropTable getDropTable()
public int getRespawnMins()
public WauzResourceNodeType getNodeType()
public java.lang.String getNodeName()
public int getNodeTier()
public int getNodeHealth()