All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.aurelium.auraskills.api.loot.LootTable Maven / Gradle / Ivy

There is a newer version: 2.2.3
Show newest version
package dev.aurelium.auraskills.api.loot;

import dev.aurelium.auraskills.api.registry.NamespacedId;
import org.jetbrains.annotations.Nullable;

import java.util.List;
import java.util.UUID;

public class LootTable {

	private final NamespacedId id;
	private final UUID uuid;
	private final LootTableType type;
	private final List pools;
	
	public LootTable(NamespacedId id, UUID uuid, LootTableType type, List pools) {
		this.id = id;
		this.uuid = uuid;
		this.type = type;
		this.pools = pools;
	}

	public NamespacedId getId() {
		return id;
	}

	public UUID uuid() {
		return uuid;
	}

	public LootTableType getType() {
		return type;
	}

	@Nullable
	public LootPool getPool(String name) {
		for (LootPool pool : pools) {
			if (pool.getName().equals(name)) {
				return pool;
			}
		}
		return null;
	}

	public List getPools() {
		return pools;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy