mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-11-24 05:54:39 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57a1192dc0 | ||
|
|
81e051b592 | ||
|
|
a6eb495fe1 | ||
|
|
2d539e8013 | ||
|
|
c44729536c |
No files matched your search
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
bdlib.version=1.9.2
|
bdlib.version=1.9.4
|
||||||
curseforge.id=70496
|
curseforge.id=70496
|
||||||
|
|
||||||
minecraft.version=1.7.10
|
minecraft.version=1.7.10
|
||||||
forge.version=10.13.4.1448-1.7.10
|
forge.version=10.13.4.1558-1.7.10
|
||||||
+1
-1
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-bin.zip
|
||||||
@@ -16,15 +16,15 @@ object DecFormat {
|
|||||||
val dec2Fmt = new DecimalFormat("#,##0.00")
|
val dec2Fmt = new DecimalFormat("#,##0.00")
|
||||||
val dec1Fmt = new DecimalFormat("#,##0.0")
|
val dec1Fmt = new DecimalFormat("#,##0.0")
|
||||||
|
|
||||||
def round(x: Double) = thousandsFmt.format(x)
|
def round(x: Double) = thousandsFmt.format(x).replace('\u00A0', ' ')
|
||||||
def round(x: Float) = thousandsFmt.format(x)
|
def round(x: Float) = thousandsFmt.format(x).replace('\u00A0', ' ')
|
||||||
def round(x: Int) = thousandsFmt.format(x)
|
def round(x: Int) = thousandsFmt.format(x).replace('\u00A0', ' ')
|
||||||
|
|
||||||
def dec2(x: Double) = dec2Fmt.format(x)
|
def dec2(x: Double) = dec2Fmt.format(x).replace('\u00A0', ' ')
|
||||||
def dec2(x: Float) = dec2Fmt.format(x)
|
def dec2(x: Float) = dec2Fmt.format(x).replace('\u00A0', ' ')
|
||||||
def dec2(x: Int) = dec2Fmt.format(x)
|
def dec2(x: Int) = dec2Fmt.format(x).replace('\u00A0', ' ')
|
||||||
|
|
||||||
def short(x: Double) = if (x > 10) thousandsFmt.format(x) else if (x > 1) dec1Fmt.format(x) else dec2Fmt.format(x)
|
def short(x: Double) = (if (x > 10) thousandsFmt.format(x) else if (x > 1) dec1Fmt.format(x) else dec2Fmt.format(x)).replace('\u00A0', ' ')
|
||||||
def short(x: Float) = 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)).replace('\u00A0', ' ')
|
||||||
def short(x: Int) = 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)).replace('\u00A0', ' ')
|
||||||
}
|
}
|
||||||
@@ -23,6 +23,13 @@ trait GuiProvider {
|
|||||||
def getContainer(te: TEClass, player: EntityPlayer): AnyRef
|
def getContainer(te: TEClass, player: EntityPlayer): AnyRef
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
def getGui(te: TileEntity, player: EntityPlayer): AnyRef = getGui(te.asInstanceOf[TEClass], player)
|
def getGui(te: TileEntity, player: EntityPlayer): AnyRef =
|
||||||
def getContainer(te: TileEntity, player: EntityPlayer): AnyRef = getContainer(te.asInstanceOf[TEClass], player)
|
if (te != null)
|
||||||
|
getGui(te.asInstanceOf[TEClass], player)
|
||||||
|
else null
|
||||||
|
|
||||||
|
def getContainer(te: TileEntity, player: EntityPlayer): AnyRef =
|
||||||
|
if (te != null)
|
||||||
|
getContainer(te.asInstanceOf[TEClass], player)
|
||||||
|
else null
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user