idk some "cool" stuff
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package hdvtdev.blockAndSeek.roulette;
|
||||
|
||||
import com.lewdev.probabilitylib.ProbabilityCollection;
|
||||
import hdvtdev.blockAndSeek.BlockAndSeekMap;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -11,9 +12,9 @@ public class RouletteGenerator {
|
||||
|
||||
private final ProbabilityCollection<ItemStack> probabilityCollection = new ProbabilityCollection<>();
|
||||
|
||||
public RouletteGenerator(List<Block> blocks) {
|
||||
for (Block block : blocks) {
|
||||
probabilityCollection.add(block.itemStack, block.chance);
|
||||
public RouletteGenerator(List<BlockAndSeekMap.Block> blocks) {
|
||||
for (BlockAndSeekMap.Block block : blocks) {
|
||||
probabilityCollection.add(block.block(), block.chance());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +24,5 @@ public class RouletteGenerator {
|
||||
return items;
|
||||
}
|
||||
|
||||
public record Block(ItemStack itemStack, int chance) {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user