Compare commits

...
2 Commits
3 changed files with 10 additions and 3 deletions

No files matched your search

+1 -1
View File
@@ -21,7 +21,7 @@ buildscript {
apply plugin: 'scala'
apply plugin: 'forge'
version = "1.6.1"
version = "1.6.2"
if (project.hasProperty('buildnum')) {
project.version = project.version + '.' + project.buildnum
@@ -9,6 +9,7 @@
package net.bdew.lib.multiblock.data
import cpw.mods.fml.relauncher.{Side, SideOnly}
import net.bdew.lib.gui.Texture
abstract class SlotSet(val outputConfigId: String) {
@@ -16,13 +17,19 @@ abstract class SlotSet(val outputConfigId: String) {
var slotMap = Map.empty[String, Slot]
case class Slot(id: String, name: String, texture: Texture) {
case class Slot(id: String, name: String) {
slotMap += id -> this
def next = order(this)
@SideOnly(Side.CLIENT)
def texture = textures(this)
}
def default: Slot
val order: Map[Slot, Slot]
@SideOnly(Side.CLIENT)
def textures: Map[Slot, Texture]
def get(id: String) = slotMap(id)
}
@@ -68,7 +68,7 @@ class DataSlotResource(val name: String, val parent: TileDataSlots, initCapacity
def fillFluid(resource: FluidStack, doFill: Boolean): Int = rawFill(Resource.from(resource), onlyRound = true, doFill).toInt
def drainFluid(maxDrain: Int, doDrain: Boolean): FluidStack = {
(for {
res <- rawDrain(maxDrain, true, doDrain)
res <- rawDrain(maxDrain, true, false)
rKind <- Misc.asInstanceOpt(res.kind, classOf[FluidResource])
} yield {
if (doDrain)