Compare commits

..
3 Commits
3 changed files with 16 additions and 9 deletions

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
bdlib.version=1.9.2
bdlib.version=1.9.3
curseforge.id=70496
minecraft.version=1.7.10
+6 -6
View File
@@ -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)
+9 -2
View File
@@ -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
}