YuRaNnNzZZ — Сегодня, в 11:46
а какой именно стак то блять
This commit is contained in:
parent
62df3558e7
commit
b3863a2820
@ -449,6 +449,7 @@ object MatterManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stream.map {
|
stream.map {
|
||||||
|
try {
|
||||||
ResolvedRecipe(
|
ResolvedRecipe(
|
||||||
it.ingredients.stream()
|
it.ingredients.stream()
|
||||||
.filter { !it.isActuallyEmpty }
|
.filter { !it.isActuallyEmpty }
|
||||||
@ -458,6 +459,9 @@ object MatterManager {
|
|||||||
name = it.id,
|
name = it.id,
|
||||||
allowBacktrack = allowBacktrack
|
allowBacktrack = allowBacktrack
|
||||||
)
|
)
|
||||||
|
} catch(err: Throwable) {
|
||||||
|
throw RuntimeException("Processing simple recipe ${it.id}", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.filter {
|
.filter {
|
||||||
if (it.inputs.isEmpty()) {
|
if (it.inputs.isEmpty()) {
|
||||||
@ -491,6 +495,7 @@ object MatterManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stream.map {
|
stream.map {
|
||||||
|
try {
|
||||||
// avoid reality snap when recipe has no output
|
// avoid reality snap when recipe has no output
|
||||||
val resultItem = it.getResultItem(server.registryAccess())
|
val resultItem = it.getResultItem(server.registryAccess())
|
||||||
|
|
||||||
@ -565,6 +570,9 @@ object MatterManager {
|
|||||||
allowBacktrack = allowBacktrack
|
allowBacktrack = allowBacktrack
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
} catch(err: Throwable) {
|
||||||
|
throw RuntimeException("Processing crafting table recipe ${it.id}", err)
|
||||||
|
}
|
||||||
}.filterNotNull().filter {
|
}.filterNotNull().filter {
|
||||||
if (it.inputs.isEmpty()) {
|
if (it.inputs.isEmpty()) {
|
||||||
LOGGER.warn("${it.formattedName} with output '${it.output.item.registryName}' ended up with no inputs!")
|
LOGGER.warn("${it.formattedName} with output '${it.output.item.registryName}' ended up with no inputs!")
|
||||||
@ -1346,8 +1354,8 @@ object MatterManager {
|
|||||||
val multiplier: Double = 1.0
|
val multiplier: Double = 1.0
|
||||||
) {
|
) {
|
||||||
init {
|
init {
|
||||||
require(!multiplier.isNaN()) { "Provided stack cost multiplier is NaN" }
|
require(!multiplier.isNaN()) { "Provided stack cost multiplier is NaN (item: $item)" }
|
||||||
require(!multiplier.isInfinite()) { "Provided stack cost multiplier is infinite" }
|
require(!multiplier.isInfinite()) { "Provided stack cost multiplier is infinite (item: $item)" }
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(item: Item, count: Int) : this(item, 1.0 / count.toDouble())
|
constructor(item: Item, count: Int) : this(item, 1.0 / count.toDouble())
|
||||||
|
Loading…
Reference in New Issue
Block a user