mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-10-27 14:53:44 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6eb495fe1 | ||
|
|
2d539e8013 | ||
|
|
c44729536c |
No files matched your search
+1
-1
@@ -1,4 +1,4 @@
|
||||
bdlib.version=1.9.2
|
||||
bdlib.version=1.9.3
|
||||
curseforge.id=70496
|
||||
|
||||
minecraft.version=1.7.10
|
||||
|
||||
@@ -16,13 +16,13 @@ object DecFormat {
|
||||
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)
|
||||
def round(x: Int) = thousandsFmt.format(x)
|
||||
def round(x: Double) = thousandsFmt.format(x).replace('\u00A0', ' ')
|
||||
def round(x: Float) = thousandsFmt.format(x).replace('\u00A0', ' ')
|
||||
def round(x: Int) = thousandsFmt.format(x).replace('\u00A0', ' ')
|
||||
|
||||
def dec2(x: Double) = dec2Fmt.format(x)
|
||||
def dec2(x: Float) = dec2Fmt.format(x)
|
||||
def dec2(x: Int) = dec2Fmt.format(x)
|
||||
def dec2(x: Double) = dec2Fmt.format(x).replace('\u00A0', ' ')
|
||||
def dec2(x: Float) = dec2Fmt.format(x).replace('\u00A0', ' ')
|
||||
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: Float) = if (x > 10) thousandsFmt.format(x) else if (x > 1) dec1Fmt.format(x) else dec2Fmt.format(x)
|
||||
|
||||
@@ -23,6 +23,13 @@ trait GuiProvider {
|
||||
def getContainer(te: TEClass, player: EntityPlayer): AnyRef
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
def getGui(te: TileEntity, player: EntityPlayer): AnyRef = getGui(te.asInstanceOf[TEClass], player)
|
||||
def getContainer(te: TileEntity, player: EntityPlayer): AnyRef = getContainer(te.asInstanceOf[TEClass], player)
|
||||
def getGui(te: TileEntity, player: EntityPlayer): AnyRef =
|
||||
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