Skip to content

Commit 8959717

Browse files
committed
better container content preview defaults and fixed y inverse.
1 parent 7d4bacd commit 8959717

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/main/kotlin/com/lambda/module/modules/render/ContainerPreview.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ object ContainerPreview : Module(
6767
private val colorTint by setting("Color Tint", true, "Tint the background with the shulker box color").group(Group.ContainerTooltip)
6868

6969
private val contentPreview by setting("Content Preview", true, "Show a preview of the most common item in a container on the container item in inventories").group(Group.ContentPreview)
70-
private val previewItemScale by setting("Item Scale", 13f, 1f..32f, 0.1f, "Scale of the item icons on a container item") { contentPreview }.group(Group.ContentPreview)
71-
private val previewItemXOffset by setting("Item X Offset", 0f, -32f..32f, 0.1f, "X offset of the item icons on a container item") { contentPreview }.group(Group.ContentPreview)
72-
private val previewItemYOffset by setting("Item Y Offset", 0f, -32f..32f, 0.1f, "Y offset of the item icons on a container item") { contentPreview }.group(Group.ContentPreview)
70+
private val previewItemScale by setting("Item Scale", 11f, 1f..32f, 0.1f, "Scale of the item icons on a container item") { contentPreview }.group(Group.ContentPreview)
71+
private val previewItemXOffset by setting("Item X Offset", -2f, -32f..32f, 0.1f, "X offset of the item icons on a container item") { contentPreview }.group(Group.ContentPreview)
72+
private val previewItemYOffset by setting("Item Y Offset", 2f, -32f..32f, 0.1f, "Y offset of the item icons on a container item") { contentPreview }.group(Group.ContentPreview)
7373
private val previewItemWeightedCount by setting("Weighted Count", true, description = "Count items for preview in containers relative to max stack size") { contentPreview }.group(Group.ContentPreview)
7474
.onValueChange { _, _ ->
7575
containerCache.clear()
@@ -405,7 +405,7 @@ object ContainerPreview : Module(
405405
val shift = 8 * (1 - scale) // 0 at scale 1.0, 8 at scale 0.0
406406

407407
val newScreenX = ((x + previewItemXOffset + shift) / scale).toInt()
408-
val newScreenY = ((y + previewItemYOffset + shift) / scale).toInt()
408+
val newScreenY = (((y - previewItemYOffset) + shift) / scale).toInt()
409409

410410
itemMatrix.scale(scale, scale)
411411

src/main/kotlin/com/lambda/task/tasks/BuildTask.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ class BuildTask private constructor(
135135
runBlocking { job?.join(); job = null }
136136
results =
137137
results.filter { it.pos !in reSimPositions } +
138-
blueprint.structure.filter { it.key in reSimPositions }.simulate()
138+
blueprint.structure.filter {
139+
it.key in reSimPositions
140+
}.simulate()
139141
reSimPositions.clear()
140142
setViableResults()
141143
processResults()

0 commit comments

Comments
 (0)