mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-11-24 05:54:39 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e345e6675 | ||
|
|
e78e565ec8 | ||
|
|
573330efd3 |
No files matched your search
+3
-2
@@ -21,7 +21,7 @@ buildscript {
|
||||
apply plugin: 'scala'
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "1.6.0"
|
||||
version = "1.6.1"
|
||||
|
||||
if (project.hasProperty('buildnum')) {
|
||||
project.version = project.version + '.' + project.buildnum
|
||||
@@ -70,7 +70,8 @@ task sourceJar(type: Jar) {
|
||||
}
|
||||
|
||||
task deobfJar(type: Jar) {
|
||||
from sourceSets.main.output.classesDir
|
||||
from sourceSets.main.output
|
||||
duplicatesStrategy "exclude"
|
||||
}
|
||||
|
||||
jar {
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.text.DecimalFormat
|
||||
object DecFormat {
|
||||
val thousandsFmt = new DecimalFormat("#,##0")
|
||||
val dec2Fmt = new DecimalFormat("#,##0.00")
|
||||
val dec1Fmt = new DecimalFormat("#,##0.0")
|
||||
|
||||
def round(x: Double) = thousandsFmt.format(x)
|
||||
def round(x: Float) = thousandsFmt.format(x)
|
||||
@@ -22,4 +23,8 @@ object DecFormat {
|
||||
def dec2(x: Double) = dec2Fmt.format(x)
|
||||
def dec2(x: Float) = dec2Fmt.format(x)
|
||||
def dec2(x: Int) = dec2Fmt.format(x)
|
||||
|
||||
def short(x: Double) = if (x > 10) thousandsFmt.format(x) else if (x > 1) dec1Fmt.format(x) else dec2Fmt.format(x)
|
||||
def short(x: Float) = if (x > 10) thousandsFmt.format(x) else if (x > 1) dec1Fmt.format(x) else dec2Fmt.format(x)
|
||||
def short(x: Int) = if (x > 10) thousandsFmt.format(x) else if (x > 1) dec1Fmt.format(x) else dec2Fmt.format(x)
|
||||
}
|
||||
@@ -56,7 +56,7 @@ class DataSlotResource(val name: String, val parent: TileDataSlots, initCapacity
|
||||
if (onlyRound) canDrain = canDrain.floor
|
||||
if (doDrain) execWithChangeNotify {
|
||||
resource =
|
||||
if (canDrain == res.amount)
|
||||
if (res.amount - canDrain < 0.000001)
|
||||
None
|
||||
else
|
||||
Some(Resource(res.kind, res.amount - canDrain))
|
||||
|
||||
Reference in new issue
Block a user