Store "is bulk" flag inside painting table itself
This commit is contained in:
parent
e61d98e54d
commit
edd16768e3
@ -30,9 +30,16 @@ class PainterBlockEntity(blockPos: BlockPos, blockState: BlockState) : MatteryDe
|
|||||||
private val dyeStored = EnumMap<DyeColor, Int>(DyeColor::class.java)
|
private val dyeStored = EnumMap<DyeColor, Int>(DyeColor::class.java)
|
||||||
val dyeStoredView: Map<DyeColor, Int> = Collections.unmodifiableMap(dyeStored)
|
val dyeStoredView: Map<DyeColor, Int> = Collections.unmodifiableMap(dyeStored)
|
||||||
|
|
||||||
|
var isBulk = false
|
||||||
|
set(value) {
|
||||||
|
field = value
|
||||||
|
markDirtyFast()
|
||||||
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
addDroppableContainer(dyeInput)
|
addDroppableContainer(dyeInput)
|
||||||
savetables.stateful(dyeInput, INVENTORY_KEY)
|
savetables.stateful(dyeInput, INVENTORY_KEY)
|
||||||
|
savetables.bool(::isBulk)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun takeDyes(dyes: Map<DyeColor, Int>) {
|
fun takeDyes(dyes: Map<DyeColor, Int>) {
|
||||||
|
@ -427,8 +427,6 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
private var nextDischargeHurt = 20
|
private var nextDischargeHurt = 20
|
||||||
private var nextHealTick = 0
|
private var nextHealTick = 0
|
||||||
|
|
||||||
var painterBulkCrafting = false
|
|
||||||
|
|
||||||
// players tracking us
|
// players tracking us
|
||||||
// stored separately because EntityTracker and ChunkMup, etc are buried deep and
|
// stored separately because EntityTracker and ChunkMup, etc are buried deep and
|
||||||
// getting them unburied will be a very work intense task
|
// getting them unburied will be a very work intense task
|
||||||
@ -568,7 +566,6 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
|||||||
savetables.int(::ticksIExist)
|
savetables.int(::ticksIExist)
|
||||||
savetables.int(::iteration)
|
savetables.int(::iteration)
|
||||||
|
|
||||||
savetables.bool(::painterBulkCrafting)
|
|
||||||
savetables.bool(::shouldSendIteration)
|
savetables.bool(::shouldSendIteration)
|
||||||
savetables.bool(::wasInLiquid)
|
savetables.bool(::wasInLiquid)
|
||||||
savetables.bool(::isAndroid)
|
savetables.bool(::isAndroid)
|
||||||
|
@ -44,7 +44,7 @@ class PainterMenu(
|
|||||||
private var lastRecipe: PainterRecipe? = null
|
private var lastRecipe: PainterRecipe? = null
|
||||||
var selectedRecipe by mSynchronizer.Field(null, ResourceLocationValueCodec.nullable).also { it.addListener { rescan() } }
|
var selectedRecipe by mSynchronizer.Field(null, ResourceLocationValueCodec.nullable).also { it.addListener { rescan() } }
|
||||||
|
|
||||||
val isBulk = BooleanInputWithFeedback(this, true, player.matteryPlayer!!::painterBulkCrafting)
|
val isBulk = BooleanInputWithFeedback(this, tile?.let { it::isBulk })
|
||||||
|
|
||||||
val selectRecipe = PlayerInput(ResourceLocationValueCodec) {
|
val selectRecipe = PlayerInput(ResourceLocationValueCodec) {
|
||||||
selectedRecipe = it
|
selectedRecipe = it
|
||||||
|
Loading…
Reference in New Issue
Block a user