mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-11-28 07:55:41 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a78467232 | ||
|
|
561833db33 |
No files matched your search
+1
-1
@@ -21,7 +21,7 @@ buildscript {
|
|||||||
apply plugin: 'scala'
|
apply plugin: 'scala'
|
||||||
apply plugin: 'forge'
|
apply plugin: 'forge'
|
||||||
|
|
||||||
version = "1.6.1"
|
version = "1.6.2"
|
||||||
|
|
||||||
if (project.hasProperty('buildnum')) {
|
if (project.hasProperty('buildnum')) {
|
||||||
project.version = project.version + '.' + project.buildnum
|
project.version = project.version + '.' + project.buildnum
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
package net.bdew.lib.multiblock.data
|
package net.bdew.lib.multiblock.data
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.{Side, SideOnly}
|
||||||
import net.bdew.lib.gui.Texture
|
import net.bdew.lib.gui.Texture
|
||||||
|
|
||||||
abstract class SlotSet(val outputConfigId: String) {
|
abstract class SlotSet(val outputConfigId: String) {
|
||||||
@@ -16,13 +17,19 @@ abstract class SlotSet(val outputConfigId: String) {
|
|||||||
|
|
||||||
var slotMap = Map.empty[String, Slot]
|
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
|
slotMap += id -> this
|
||||||
def next = order(this)
|
def next = order(this)
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
def texture = textures(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
def default: Slot
|
def default: Slot
|
||||||
val order: Map[Slot, Slot]
|
val order: Map[Slot, Slot]
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
def textures: Map[Slot, Texture]
|
||||||
|
|
||||||
def get(id: String) = slotMap(id)
|
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 fillFluid(resource: FluidStack, doFill: Boolean): Int = rawFill(Resource.from(resource), onlyRound = true, doFill).toInt
|
||||||
def drainFluid(maxDrain: Int, doDrain: Boolean): FluidStack = {
|
def drainFluid(maxDrain: Int, doDrain: Boolean): FluidStack = {
|
||||||
(for {
|
(for {
|
||||||
res <- rawDrain(maxDrain, true, doDrain)
|
res <- rawDrain(maxDrain, true, false)
|
||||||
rKind <- Misc.asInstanceOpt(res.kind, classOf[FluidResource])
|
rKind <- Misc.asInstanceOpt(res.kind, classOf[FluidResource])
|
||||||
} yield {
|
} yield {
|
||||||
if (doDrain)
|
if (doDrain)
|
||||||
|
|||||||
Reference in new issue
Block a user