bring back vararg constructor

This commit is contained in:
DBotThePony 2022-08-19 12:45:50 +07:00
parent 53e512e918
commit 3f36fb2843
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -65,6 +65,8 @@ class LootTableAppender(conditions: Array<out LootItemCondition>, private vararg
} }
class LootTableBasicAppender(conditions: Array<out LootItemCondition>, entries: List<Pair<ItemStack, Double>>) : LootModifier(conditions) { class LootTableBasicAppender(conditions: Array<out LootItemCondition>, entries: List<Pair<ItemStack, Double>>) : LootModifier(conditions) {
constructor(conditions: Array<out LootItemCondition>, vararg entries: Pair<ItemStack, Double>) : this(conditions, entries.toList())
private val entries = ImmutableList.copyOf(entries) private val entries = ImmutableList.copyOf(entries)
override fun doApply(generatedLoot: ObjectArrayList<ItemStack>, context: LootContext): ObjectArrayList<ItemStack> { override fun doApply(generatedLoot: ObjectArrayList<ItemStack>, context: LootContext): ObjectArrayList<ItemStack> {