-
-
-
diff --git a/.idea/scopes/lib.xml b/.idea/scopes/lib.xml
deleted file mode 100644
index 389b774..0000000
--- a/.idea/scopes/lib.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/scopes/main.xml b/.idea/scopes/main.xml
deleted file mode 100644
index 731fb81..0000000
--- a/.idea/scopes/main.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/scopes/my_files.xml b/.idea/scopes/my_files.xml
deleted file mode 100644
index af16f14..0000000
--- a/.idea/scopes/my_files.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml
deleted file mode 100644
index 922003b..0000000
--- a/.idea/scopes/scope_settings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020..0000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 6547ec2..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build.gradle b/build.gradle
index 909d1b3..60cea3b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -22,8 +22,8 @@ buildscript {
apply plugin: 'scala'
apply plugin: 'forge'
-version = "1.4.3"
-ext.bdlibver = "1.5.1.32"
+version = "1.4.4"
+ext.bdlibver = "1.6.0.34"
ext.versuffix = "mc1710"
ext.apiVer = version
@@ -66,9 +66,9 @@ repositories {
dependencies {
compile "net.bdew:bdlib:" + bdlibver
compile "codechicken:NotEnoughItems:1.7.10-1.0.3.74:dev"
- compile "codechicken:CodeChickenLib:1.7.10-1.1.1.106:dev"
+ compile "codechicken:CodeChickenLib:1.7.10-1.1.1.110:dev"
compile "codechicken:CodeChickenCore:1.7.10-1.0.4.29:dev"
- compile "com.mod-buildcraft:buildcraft:6.2.0:dev"
+ compile "com.mod-buildcraft:buildcraft:6.2.6:dev"
compile "net.industrial-craft:industrialcraft-2:2.2.650-experimental:api"
compile "net.sengir.forestry:forestry_1.7.10:3.3.0.337-unstable:api"
compile "mcp.mobius.waila:Waila:1.5.6a_1.7.10"
diff --git a/src/net/bdew/gendustry/Gendustry.scala b/src/net/bdew/gendustry/Gendustry.scala
index 23aa7a0..e9ab3d9 100644
--- a/src/net/bdew/gendustry/Gendustry.scala
+++ b/src/net/bdew/gendustry/Gendustry.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry
@@ -86,21 +86,21 @@ object Gendustry {
NetworkRegistry.INSTANCE.registerGuiHandler(this, Config.guiHandler)
RecipeSorter.register("gendustry:GeneCopyRecipe", classOf[GeneRecipe], RecipeSorter.Category.SHAPELESS, "")
Upgrades.init()
- TuningLoader.loadDealayed()
+ TuningLoader.loadDelayed()
if (ForestryHelper.haveRoot("Bees")) {
CustomContent.registerBranches()
CustomContent.registerSpecies()
} else {
logInfo("Apiculture module seems to be disabled in Forestry, not registering custom bees")
}
- FMLInterModComms.sendMessage("Waila", "register", "net.bdew.gendustry.waila.WailaHandler.loadCallabck")
+ FMLInterModComms.sendMessage("Waila", "register", "net.bdew.gendustry.waila.WailaHandler.loadCallback")
}
@EventHandler
def postInit(event: FMLPostInitializationEvent) {
if (ForestryHelper.haveRoot("Bees")) {
CustomContent.registerTemplates()
- CustomContent.registerMuations()
+ CustomContent.registerMutations()
}
if (event.getSide == Side.CLIENT) {
GeneticsCache.load()
diff --git a/src/net/bdew/gendustry/api/ApiaryModifiers.java b/src/net/bdew/gendustry/api/ApiaryModifiers.java
index 6ca2c43..98eba37 100644
--- a/src/net/bdew/gendustry/api/ApiaryModifiers.java
+++ b/src/net/bdew/gendustry/api/ApiaryModifiers.java
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.api;
diff --git a/src/net/bdew/gendustry/api/GendustryAPI.java b/src/net/bdew/gendustry/api/GendustryAPI.java
index 73349e8..e19729e 100644
--- a/src/net/bdew/gendustry/api/GendustryAPI.java
+++ b/src/net/bdew/gendustry/api/GendustryAPI.java
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.api;
diff --git a/src/net/bdew/gendustry/api/blocks/IAdvancedMutatron.java b/src/net/bdew/gendustry/api/blocks/IAdvancedMutatron.java
index 49efe76..fbd8f94 100644
--- a/src/net/bdew/gendustry/api/blocks/IAdvancedMutatron.java
+++ b/src/net/bdew/gendustry/api/blocks/IAdvancedMutatron.java
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.api.blocks;
diff --git a/src/net/bdew/gendustry/api/blocks/IBlockAPI.java b/src/net/bdew/gendustry/api/blocks/IBlockAPI.java
index 59b9570..e8295e1 100644
--- a/src/net/bdew/gendustry/api/blocks/IBlockAPI.java
+++ b/src/net/bdew/gendustry/api/blocks/IBlockAPI.java
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.api.blocks;
@@ -12,7 +12,7 @@ package net.bdew.gendustry.api.blocks;
import net.minecraft.world.World;
/**
- * Interface to various informations about blocks and TileEntities
+ * Interface to various information about blocks and TileEntities
* WARNING: Everything retrieved from this interface is not guaranteed to be correct or up to date on client side!
*/
public interface IBlockAPI {
@@ -42,7 +42,7 @@ public interface IBlockAPI {
boolean isWorkerMachine(World w, int x, int y, int z);
/**
- * @return wroker interface
+ * @return worker interface
*/
IWorkerMachine getWorkerMachine(World w, int x, int y, int z);
}
diff --git a/src/net/bdew/gendustry/api/blocks/IIndustrialApiary.java b/src/net/bdew/gendustry/api/blocks/IIndustrialApiary.java
index 8dcb48a..c653095 100644
--- a/src/net/bdew/gendustry/api/blocks/IIndustrialApiary.java
+++ b/src/net/bdew/gendustry/api/blocks/IIndustrialApiary.java
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.api.blocks;
@@ -28,7 +28,7 @@ public interface IIndustrialApiary extends IBeeHousing {
public ApiaryModifiers getModifiers();
/**
- * @return List of upgrade itemstacks
+ * @return List of upgrade item stacks
*/
public List getUpgrades();
}
diff --git a/src/net/bdew/gendustry/api/blocks/IWorkerMachine.java b/src/net/bdew/gendustry/api/blocks/IWorkerMachine.java
index a9dc699..a2d0e68 100644
--- a/src/net/bdew/gendustry/api/blocks/IWorkerMachine.java
+++ b/src/net/bdew/gendustry/api/blocks/IWorkerMachine.java
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.api.blocks;
diff --git a/src/net/bdew/gendustry/api/items/IApiaryUpgrade.java b/src/net/bdew/gendustry/api/items/IApiaryUpgrade.java
index 7832f18..094f0da 100644
--- a/src/net/bdew/gendustry/api/items/IApiaryUpgrade.java
+++ b/src/net/bdew/gendustry/api/items/IApiaryUpgrade.java
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.api.items;
@@ -30,12 +30,12 @@ public interface IApiaryUpgrade {
List getDisplayDetails(ItemStack stack);
/**
- * A unique ID for stacking purposes. If 2 itemstacks return the same ID they will
+ * A unique ID for stacking purposes. If 2 item stacks return the same ID they will
* be added together when counting upgrades to check maximum number.
* If two stacks return the same stacking ID they should return the same number from
* getMaxNumber or weirdness will ensue.
*
- * @return Uniquie stacking id
+ * @return Unique stacking id
*/
long getStackingId(ItemStack stack);
diff --git a/src/net/bdew/gendustry/api/items/IGeneSample.java b/src/net/bdew/gendustry/api/items/IGeneSample.java
index 9c19490..cd3d325 100644
--- a/src/net/bdew/gendustry/api/items/IGeneSample.java
+++ b/src/net/bdew/gendustry/api/items/IGeneSample.java
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.api.items;
diff --git a/src/net/bdew/gendustry/api/items/IItemAPI.java b/src/net/bdew/gendustry/api/items/IItemAPI.java
index 9439b0a..d378a65 100644
--- a/src/net/bdew/gendustry/api/items/IItemAPI.java
+++ b/src/net/bdew/gendustry/api/items/IItemAPI.java
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.api.items;
@@ -16,7 +16,7 @@ import java.util.List;
public interface IItemAPI {
/**
- * @return true if stack is a template with atleast 1 sample added
+ * @return true if stack is a template with at least 1 sample added
*/
boolean isFullTemplate(ItemStack stack);
diff --git a/src/net/bdew/gendustry/api/package-info.java b/src/net/bdew/gendustry/api/package-info.java
index 9a2c498..33cf36a 100644
--- a/src/net/bdew/gendustry/api/package-info.java
+++ b/src/net/bdew/gendustry/api/package-info.java
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
@API(apiVersion = "GENDUSTRY_APIVER", owner = "gendustry", provides = "gendustryAPI") //
diff --git a/src/net/bdew/gendustry/apiimpl/BlockApiImpl.scala b/src/net/bdew/gendustry/apiimpl/BlockApiImpl.scala
index 9469c4c..3164495 100644
--- a/src/net/bdew/gendustry/apiimpl/BlockApiImpl.scala
+++ b/src/net/bdew/gendustry/apiimpl/BlockApiImpl.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.apiimpl
@@ -22,19 +22,19 @@ object BlockApiImpl extends IBlockAPI {
getTypedTileEntity(w, x, y, z, classOf[TileWorker]).isDefined
override def getWorkerMachine(w: World, x: Int, y: Int, z: Int) =
- getTypedTileEntity(w, x, y, z, classOf[TileWorker]) getOrElse null
+ getTypedTileEntity(w, x, y, z, classOf[TileWorker]).orNull
override def isAdvancedMutatron(w: World, x: Int, y: Int, z: Int) =
getTypedTileEntity(w, x, y, z, classOf[TileMutatronAdv]).isDefined
override def getAdvancedMutatron(w: World, x: Int, y: Int, z: Int) =
- getTypedTileEntity(w, x, y, z, classOf[TileMutatronAdv]) getOrElse null
+ getTypedTileEntity(w, x, y, z, classOf[TileMutatronAdv]).orNull
override def isIndustrialApiary(w: World, x: Int, y: Int, z: Int) =
getTypedTileEntity(w, x, y, z, classOf[TileApiary]).isDefined
override def getIndustrialApiary(w: World, x: Int, y: Int, z: Int) =
- getTypedTileEntity(w, x, y, z, classOf[TileApiary]) getOrElse null
+ getTypedTileEntity(w, x, y, z, classOf[TileApiary]).orNull
}
diff --git a/src/net/bdew/gendustry/apiimpl/ItemApiImpl.scala b/src/net/bdew/gendustry/apiimpl/ItemApiImpl.scala
index 09ea434..478cf28 100644
--- a/src/net/bdew/gendustry/apiimpl/ItemApiImpl.scala
+++ b/src/net/bdew/gendustry/apiimpl/ItemApiImpl.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.apiimpl
@@ -28,7 +28,7 @@ object ItemApiImpl extends IItemAPI {
stack.getItem == GeneTemplate && GeneTemplate.getSamples(stack).isEmpty
override def isFullTemplate(stack: ItemStack) =
- stack.getItem == GeneTemplate && !GeneTemplate.getSamples(stack).isEmpty
+ stack.getItem == GeneTemplate && GeneTemplate.getSamples(stack).nonEmpty
override def isCompleteTemplate(stack: ItemStack) =
stack.getItem == GeneTemplate && GeneTemplate.isComplete(stack)
diff --git a/src/net/bdew/gendustry/apiimpl/TileWorker.scala b/src/net/bdew/gendustry/apiimpl/TileWorker.scala
index af10d3c..fa6fff3 100644
--- a/src/net/bdew/gendustry/apiimpl/TileWorker.scala
+++ b/src/net/bdew/gendustry/apiimpl/TileWorker.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.apiimpl
diff --git a/src/net/bdew/gendustry/compat/PowerProxy.scala b/src/net/bdew/gendustry/compat/PowerProxy.scala
index 1965331..d95730d 100644
--- a/src/net/bdew/gendustry/compat/PowerProxy.scala
+++ b/src/net/bdew/gendustry/compat/PowerProxy.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.compat
@@ -36,10 +36,10 @@ object PowerProxy {
lazy val haveIC2 = haveModVersion(IC2_MOD_ID)
lazy val haveTE = haveModVersion(TE_MOD_ID)
- def haveModVersion(modid: String) = lookup.contains(modid)
+ def haveModVersion(modId: String) = lookup.contains(modId)
- def getModVersion(modid: String): String = {
- val cont = lookup.getOrElse(modid, return "NOT FOUND")
+ def getModVersion(modId: String): String = {
+ val cont = lookup.getOrElse(modId, return "NOT FOUND")
cont.getModId + " " + cont.getVersion
}
diff --git a/src/net/bdew/gendustry/compat/itempush/BCPipePushProxy.scala b/src/net/bdew/gendustry/compat/itempush/BCPipePushProxy.scala
index 73d8a42..ab3d903 100644
--- a/src/net/bdew/gendustry/compat/itempush/BCPipePushProxy.scala
+++ b/src/net/bdew/gendustry/compat/itempush/BCPipePushProxy.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.compat.itempush
diff --git a/src/net/bdew/gendustry/compat/itempush/CofhConduitPushProxy.scala b/src/net/bdew/gendustry/compat/itempush/CofhConduitPushProxy.scala
index 465598c..09f3faa 100644
--- a/src/net/bdew/gendustry/compat/itempush/CofhConduitPushProxy.scala
+++ b/src/net/bdew/gendustry/compat/itempush/CofhConduitPushProxy.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.compat.itempush
diff --git a/src/net/bdew/gendustry/compat/itempush/ItemPush.scala b/src/net/bdew/gendustry/compat/itempush/ItemPush.scala
index c672b80..e4ae951 100644
--- a/src/net/bdew/gendustry/compat/itempush/ItemPush.scala
+++ b/src/net/bdew/gendustry/compat/itempush/ItemPush.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.compat.itempush
diff --git a/src/net/bdew/gendustry/compat/itempush/ItemPushProxy.scala b/src/net/bdew/gendustry/compat/itempush/ItemPushProxy.scala
index 343659e..b8eea86 100644
--- a/src/net/bdew/gendustry/compat/itempush/ItemPushProxy.scala
+++ b/src/net/bdew/gendustry/compat/itempush/ItemPushProxy.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.compat.itempush
diff --git a/src/net/bdew/gendustry/compat/itempush/VanillaPush.scala b/src/net/bdew/gendustry/compat/itempush/VanillaPush.scala
index 8109852..7104d11 100644
--- a/src/net/bdew/gendustry/compat/itempush/VanillaPush.scala
+++ b/src/net/bdew/gendustry/compat/itempush/VanillaPush.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.compat.itempush
diff --git a/src/net/bdew/gendustry/compat/triggers/BaseTrigger.scala b/src/net/bdew/gendustry/compat/triggers/BaseTrigger.scala
index 290ec7e..0cd086e 100644
--- a/src/net/bdew/gendustry/compat/triggers/BaseTrigger.scala
+++ b/src/net/bdew/gendustry/compat/triggers/BaseTrigger.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.compat.triggers
diff --git a/src/net/bdew/gendustry/compat/triggers/ForestryErrorTriggers.scala b/src/net/bdew/gendustry/compat/triggers/ForestryErrorTriggers.scala
index 5c79130..ad3f9aa 100644
--- a/src/net/bdew/gendustry/compat/triggers/ForestryErrorTriggers.scala
+++ b/src/net/bdew/gendustry/compat/triggers/ForestryErrorTriggers.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.compat.triggers
diff --git a/src/net/bdew/gendustry/compat/triggers/PowerTriggers.scala b/src/net/bdew/gendustry/compat/triggers/PowerTriggers.scala
index d56a6df..cec7c53 100644
--- a/src/net/bdew/gendustry/compat/triggers/PowerTriggers.scala
+++ b/src/net/bdew/gendustry/compat/triggers/PowerTriggers.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.compat.triggers
diff --git a/src/net/bdew/gendustry/compat/triggers/TriggerProvider.scala b/src/net/bdew/gendustry/compat/triggers/TriggerProvider.scala
index 072191b..9883d88 100644
--- a/src/net/bdew/gendustry/compat/triggers/TriggerProvider.scala
+++ b/src/net/bdew/gendustry/compat/triggers/TriggerProvider.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.compat.triggers
diff --git a/src/net/bdew/gendustry/compat/triggers/TriggerWorking.scala b/src/net/bdew/gendustry/compat/triggers/TriggerWorking.scala
index fc29ad8..ec3c76e 100644
--- a/src/net/bdew/gendustry/compat/triggers/TriggerWorking.scala
+++ b/src/net/bdew/gendustry/compat/triggers/TriggerWorking.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.compat.triggers
diff --git a/src/net/bdew/gendustry/config/Blocks.scala b/src/net/bdew/gendustry/config/Blocks.scala
index 4eeef5e..bd1196b 100644
--- a/src/net/bdew/gendustry/config/Blocks.scala
+++ b/src/net/bdew/gendustry/config/Blocks.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.config
diff --git a/src/net/bdew/gendustry/config/Config.scala b/src/net/bdew/gendustry/config/Config.scala
index c3aeab7..fcd22ad 100644
--- a/src/net/bdew/gendustry/config/Config.scala
+++ b/src/net/bdew/gendustry/config/Config.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.config
diff --git a/src/net/bdew/gendustry/config/Fluids.scala b/src/net/bdew/gendustry/config/Fluids.scala
index bdee427..799c06f 100644
--- a/src/net/bdew/gendustry/config/Fluids.scala
+++ b/src/net/bdew/gendustry/config/Fluids.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.config
@@ -35,14 +35,14 @@ object Fluids extends FluidManager {
false
} else {
Gendustry.logInfo("Registering fluid %s", id)
- val newfluid = new Fluid(id)
- newfluid.setUnlocalizedName((Misc.getActiveModId + "." + id).toLowerCase)
- newfluid.setLuminosity(luminosity)
- newfluid.setDensity(density)
- newfluid.setTemperature(temperature)
- newfluid.setViscosity(viscosity)
- newfluid.setGaseous(isGaseous)
- FluidRegistry.registerFluid(newfluid)
+ val newFluid = new Fluid(id)
+ newFluid.setUnlocalizedName((Misc.getActiveModId + "." + id).toLowerCase)
+ newFluid.setLuminosity(luminosity)
+ newFluid.setDensity(density)
+ newFluid.setTemperature(temperature)
+ newFluid.setViscosity(viscosity)
+ newFluid.setGaseous(isGaseous)
+ FluidRegistry.registerFluid(newFluid)
true
}
val fluid = FluidRegistry.getFluid(id.toLowerCase)
diff --git a/src/net/bdew/gendustry/config/Items.scala b/src/net/bdew/gendustry/config/Items.scala
index 01f6fa1..5c8da1b 100644
--- a/src/net/bdew/gendustry/config/Items.scala
+++ b/src/net/bdew/gendustry/config/Items.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.config
diff --git a/src/net/bdew/gendustry/config/Machines.scala b/src/net/bdew/gendustry/config/Machines.scala
index 7e1d358..9473dd3 100644
--- a/src/net/bdew/gendustry/config/Machines.scala
+++ b/src/net/bdew/gendustry/config/Machines.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.config
diff --git a/src/net/bdew/gendustry/config/Tuning.scala b/src/net/bdew/gendustry/config/Tuning.scala
index 6ed04cd..edb0825 100644
--- a/src/net/bdew/gendustry/config/Tuning.scala
+++ b/src/net/bdew/gendustry/config/Tuning.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.config
diff --git a/src/net/bdew/gendustry/config/loader/Loader.scala b/src/net/bdew/gendustry/config/loader/Loader.scala
index 5f2baa1..0e3ed5f 100644
--- a/src/net/bdew/gendustry/config/loader/Loader.scala
+++ b/src/net/bdew/gendustry/config/loader/Loader.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.config.loader
diff --git a/src/net/bdew/gendustry/config/loader/Parser.scala b/src/net/bdew/gendustry/config/loader/Parser.scala
index e5a370f..96cd5c2 100644
--- a/src/net/bdew/gendustry/config/loader/Parser.scala
+++ b/src/net/bdew/gendustry/config/loader/Parser.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.config.loader
diff --git a/src/net/bdew/gendustry/config/loader/TuningLoader.scala b/src/net/bdew/gendustry/config/loader/TuningLoader.scala
index 588adf6..37c8f5b 100644
--- a/src/net/bdew/gendustry/config/loader/TuningLoader.scala
+++ b/src/net/bdew/gendustry/config/loader/TuningLoader.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.config.loader
@@ -17,14 +17,14 @@ import net.bdew.lib.recipes.RecipesHelper
object TuningLoader {
val loader = new Loader
- def loadDealayed() = loader.processRecipeStatements()
+ def loadDelayed() = loader.processRecipeStatements()
def loadConfigFiles() {
if (!Gendustry.configDir.exists()) {
Gendustry.configDir.mkdir()
val nl = System.getProperty("line.separator")
val f = new FileWriter(new File(Gendustry.configDir, "readme.txt"))
- f.write("Any .cfg files in this directory will be loaded after the internal configuration, in alpahabetic order" + nl)
+ f.write("Any .cfg files in this directory will be loaded after the internal configuration, in alphabetic order" + nl)
f.write("Files in 'overrides' directory with matching names cab be used to override internal configuration" + nl)
f.close()
}
diff --git a/src/net/bdew/gendustry/config/loader/ast.scala b/src/net/bdew/gendustry/config/loader/ast.scala
index 5a9fb85..2119ecb 100644
--- a/src/net/bdew/gendustry/config/loader/ast.scala
+++ b/src/net/bdew/gendustry/config/loader/ast.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.config.loader
diff --git a/src/net/bdew/gendustry/custom/BeeIconProvider.scala b/src/net/bdew/gendustry/custom/BeeIconProvider.scala
index 31d0da9..fdf04c4 100644
--- a/src/net/bdew/gendustry/custom/BeeIconProvider.scala
+++ b/src/net/bdew/gendustry/custom/BeeIconProvider.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.custom
diff --git a/src/net/bdew/gendustry/custom/BeeMutation.scala b/src/net/bdew/gendustry/custom/BeeMutation.scala
index 27f9c70..8e623f9 100644
--- a/src/net/bdew/gendustry/custom/BeeMutation.scala
+++ b/src/net/bdew/gendustry/custom/BeeMutation.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.custom
diff --git a/src/net/bdew/gendustry/custom/BeeSpecies.scala b/src/net/bdew/gendustry/custom/BeeSpecies.scala
index 9090a87..970c511 100644
--- a/src/net/bdew/gendustry/custom/BeeSpecies.scala
+++ b/src/net/bdew/gendustry/custom/BeeSpecies.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.custom
@@ -72,7 +72,7 @@ class BeeSpecies(cfg: ConfigSection, ident: String) extends IAlleleBeeSpecies {
import scala.collection.JavaConverters._
def prepareLootList(name: String) =
- TuningLoader.loader.resolveLootList(cfg.rawget(name, classOf[EntryLootList]))
+ TuningLoader.loader.resolveLootList(cfg.getRaw(name, classOf[EntryLootList]))
.toMap.map(x => x._2 -> new Integer(x._1))
Gendustry.logInfo("Resolving products list for bee '%s'...", ident)
@@ -114,17 +114,17 @@ class BeeSpecies(cfg: ConfigSection, ident: String) extends IAlleleBeeSpecies {
override def getResearchSuitability(itemStack: ItemStack): Float = {
import scala.collection.JavaConversions._
if (itemStack == null || itemStack.getItem == null)
- 0
+ return 0
else if (products.keys.exists(itemStack.isItemEqual))
- 1
+ return 1
else if (specialty.keys.exists(itemStack.isItemEqual))
- 1
+ return 1
else if (OreDictionary.getOres("beeComb").exists(OreDictionary.itemMatches(_, itemStack, false)))
- 0.4F
+ return 0.4F
else if (OreDictionary.getOres("dropHoney").exists(OreDictionary.itemMatches(_, itemStack, false)))
- 0.5F
+ return 0.5F
else if (itemStack.getItem == ForestryItems.honeydew)
- 0.7F
+ return 0.7F
getRoot.getResearchCatalysts.find(x => ItemUtils.isSameItem(x._1, itemStack)).foreach(x => return x._2)
return 0
}
diff --git a/src/net/bdew/gendustry/custom/CustomContent.scala b/src/net/bdew/gendustry/custom/CustomContent.scala
index ddc0efb..4b82525 100644
--- a/src/net/bdew/gendustry/custom/CustomContent.scala
+++ b/src/net/bdew/gendustry/custom/CustomContent.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.custom
@@ -54,7 +54,7 @@ object CustomContent {
.getOrElse(sys.error("Species '%s' not found".format(uid)))
.asInstanceOf[IAlleleBeeSpecies]
- def registerMuations() {
+ def registerMutations() {
Gendustry.logInfo("Registering mutations")
val added = TuningLoader.loader.mutations count { st =>
@@ -78,7 +78,7 @@ object CustomContent {
case MReqBlock(ref: StackBlock) =>
val stack = TuningLoader.loader.getConcreteStack(ref)
val block = Block.getBlockFromItem(stack.getItem)
- if (block == null) sys.error("Ivalid block reference: %s".format(ref))
+ if (block == null) sys.error("Invalid block reference: %s".format(ref))
mutation.reqBlock = Some(block)
if (stack.getItemDamage != OreDictionary.WILDCARD_VALUE)
mutation.reqBlockMeta = Some(stack.getItemDamage)
diff --git a/src/net/bdew/gendustry/custom/CustomHoneyComb.scala b/src/net/bdew/gendustry/custom/CustomHoneyComb.scala
index 0b07564..fc9cece 100644
--- a/src/net/bdew/gendustry/custom/CustomHoneyComb.scala
+++ b/src/net/bdew/gendustry/custom/CustomHoneyComb.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.custom
diff --git a/src/net/bdew/gendustry/custom/CustomHoneyDrop.scala b/src/net/bdew/gendustry/custom/CustomHoneyDrop.scala
index 0c65f97..f6994b2 100644
--- a/src/net/bdew/gendustry/custom/CustomHoneyDrop.scala
+++ b/src/net/bdew/gendustry/custom/CustomHoneyDrop.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.custom
diff --git a/src/net/bdew/gendustry/fluids/BlockFluid.scala b/src/net/bdew/gendustry/fluids/BlockFluid.scala
index 098201e..eddbc9c 100644
--- a/src/net/bdew/gendustry/fluids/BlockFluid.scala
+++ b/src/net/bdew/gendustry/fluids/BlockFluid.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.fluids
diff --git a/src/net/bdew/gendustry/fluids/ItemFluidBucket.scala b/src/net/bdew/gendustry/fluids/ItemFluidBucket.scala
index ac17595..b6cc3d2 100644
--- a/src/net/bdew/gendustry/fluids/ItemFluidBucket.scala
+++ b/src/net/bdew/gendustry/fluids/ItemFluidBucket.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.fluids
diff --git a/src/net/bdew/gendustry/fluids/ItemFluidCan.scala b/src/net/bdew/gendustry/fluids/ItemFluidCan.scala
index e7c4ef6..12324de 100644
--- a/src/net/bdew/gendustry/fluids/ItemFluidCan.scala
+++ b/src/net/bdew/gendustry/fluids/ItemFluidCan.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.fluids
diff --git a/src/net/bdew/gendustry/fluids/MutagenSources.scala b/src/net/bdew/gendustry/fluids/MutagenSources.scala
index c5f24a1..26c02c8 100644
--- a/src/net/bdew/gendustry/fluids/MutagenSources.scala
+++ b/src/net/bdew/gendustry/fluids/MutagenSources.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.fluids
diff --git a/src/net/bdew/gendustry/forestry/ForestryItems.scala b/src/net/bdew/gendustry/forestry/ForestryItems.scala
index b0c975d..3a1d3f2 100644
--- a/src/net/bdew/gendustry/forestry/ForestryItems.scala
+++ b/src/net/bdew/gendustry/forestry/ForestryItems.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.forestry
diff --git a/src/net/bdew/gendustry/forestry/GeneRecipe.scala b/src/net/bdew/gendustry/forestry/GeneRecipe.scala
index a64e3cc..ebfae02 100644
--- a/src/net/bdew/gendustry/forestry/GeneRecipe.scala
+++ b/src/net/bdew/gendustry/forestry/GeneRecipe.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.forestry
diff --git a/src/net/bdew/gendustry/forestry/GeneSampleInfo.scala b/src/net/bdew/gendustry/forestry/GeneSampleInfo.scala
index a786544..471cb1f 100644
--- a/src/net/bdew/gendustry/forestry/GeneSampleInfo.scala
+++ b/src/net/bdew/gendustry/forestry/GeneSampleInfo.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.forestry
@@ -27,7 +27,7 @@ case class GeneSampleInfo(root: ISpeciesRoot, chromosome: Int, allele: IAllele)
def getLocalizedName: String = {
import scala.collection.JavaConverters._
val chr = GeneSampleInfo.getChromosomeName(root, chromosome)
- val alstr = allele match {
+ val str = allele match {
// Custom localized names, see https://github.com/bdew/gendustry/issues/41
case a: IAlleleTreeSpecies =>
val k = "for.trees.custom.treealyzer.sapling." + a.getUnlocalizedName.replace("trees.species.", "")
@@ -51,12 +51,12 @@ case class GeneSampleInfo(root: ISpeciesRoot, chromosome: Int, allele: IAllele)
case b: IAlleleBoolean => if (b.getValue) Misc.toLocal("gendustry.allele.true") else Misc.toLocal("gendustry.allele.false")
case x => x.getName
}
- if (alstr == "")
+ if (str == "")
return "%s: %s".format(Misc.toLocal("gendustry.chromosome." + chr), allele.getUID)
- else if (alstr.startsWith("for."))
- return "%s: %s".format(Misc.toLocal("gendustry.chromosome." + chr), alstr.replace("for.", ""))
+ else if (str.startsWith("for."))
+ return "%s: %s".format(Misc.toLocal("gendustry.chromosome." + chr), str.replace("for.", ""))
else
- return "%s: %s".format(Misc.toLocal("gendustry.chromosome." + chr), alstr)
+ return "%s: %s".format(Misc.toLocal("gendustry.chromosome." + chr), str)
}
}
diff --git a/src/net/bdew/gendustry/forestry/GeneticsHelper.scala b/src/net/bdew/gendustry/forestry/GeneticsHelper.scala
index f62b379..8115daa 100644
--- a/src/net/bdew/gendustry/forestry/GeneticsHelper.scala
+++ b/src/net/bdew/gendustry/forestry/GeneticsHelper.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.forestry
@@ -100,7 +100,7 @@ object GeneticsHelper {
secret(random.nextInt(secret.size))
}
} else {
- // All calid mutations aren't secret - choose 1 randomly
+ // All valid mutations aren't secret - choose 1 randomly
normal(random.nextInt(normal.size))
}
} else {
@@ -115,13 +115,13 @@ object GeneticsHelper {
val individual = root.templateAsIndividual(selected.getTemplate)
val res = individual match {
- case newbee: IBee =>
+ case newBee: IBee =>
val orig = root.getMember(fromStack).asInstanceOf[IBee]
- newbee.mate(newbee)
- newbee.setIsNatural(orig.isNatural)
- root.getMemberStack(newbee, EnumBeeType.QUEEN.ordinal)
- case newtree: ITree =>
- root.getMemberStack(newtree, EnumGermlingType.SAPLING.ordinal)
+ newBee.mate(newBee)
+ newBee.setIsNatural(orig.isNatural)
+ root.getMemberStack(newBee, EnumBeeType.QUEEN.ordinal)
+ case newTree: ITree =>
+ root.getMemberStack(newTree, EnumGermlingType.SAPLING.ordinal)
case _ =>
root.getMemberStack(individual, 0)
}
diff --git a/src/net/bdew/gendustry/gui/BlockGuiWrenchable.scala b/src/net/bdew/gendustry/gui/BlockGuiWrenchable.scala
index c0fe2a6..d3be21f 100644
--- a/src/net/bdew/gendustry/gui/BlockGuiWrenchable.scala
+++ b/src/net/bdew/gendustry/gui/BlockGuiWrenchable.scala
@@ -4,13 +4,16 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.gui
import buildcraft.api.tools.IToolWrench
+import cofh.api.block.IDismantleable
+import cpw.mods.fml.common.Optional
import net.bdew.gendustry.Gendustry
+import net.bdew.gendustry.compat.PowerProxy
import net.bdew.lib.items.ItemUtils
import net.bdew.lib.tile.inventory.BreakableInventoryTile
import net.minecraft.block.Block
@@ -20,9 +23,8 @@ import net.minecraft.world.World
import net.minecraftforge.common.util.ForgeDirection
import net.minecraftforge.fluids.{FluidContainerRegistry, IFluidHandler}
-//FIXME Reenable when TE support is readded
-//@Optional.Interface(modid = PowerProxy.TE_MOD_ID, iface = "cofh.api.block.IDismantleable")
-trait BlockGuiWrenchable extends Block /*with IDismantleable*/ {
+@Optional.Interface(modid = PowerProxy.TE_MOD_ID, iface = "cofh.api.block.IDismantleable")
+trait BlockGuiWrenchable extends Block with IDismantleable {
val guiId: Int
def dismantleBlock(player: EntityPlayer, world: World, x: Int, y: Int, z: Int, returnBlock: Boolean): ItemStack = {
@@ -48,9 +50,9 @@ trait BlockGuiWrenchable extends Block /*with IDismantleable*/ {
if (activeItem != null && tileEntity != null && tileEntity.isInstanceOf[IFluidHandler]) {
val fluidHandler = tileEntity.asInstanceOf[IFluidHandler]
if (FluidContainerRegistry.isEmptyContainer(activeItem)) {
- val fstack = fluidHandler.drain(side, Int.MaxValue, false)
- if (fstack != null) {
- val filled = FluidContainerRegistry.fillFluidContainer(fstack, activeItem)
+ val fStack = fluidHandler.drain(side, Int.MaxValue, false)
+ if (fStack != null) {
+ val filled = FluidContainerRegistry.fillFluidContainer(fStack, activeItem)
if (filled != null) {
fluidHandler.drain(side, FluidContainerRegistry.getFluidForFilledItem(filled), true)
player.inventory.decrStackSize(player.inventory.currentItem, 1)
@@ -59,9 +61,9 @@ trait BlockGuiWrenchable extends Block /*with IDismantleable*/ {
}
}
} else if (FluidContainerRegistry.isFilledContainer(activeItem)) {
- val fstack = FluidContainerRegistry.getFluidForFilledItem(activeItem)
- if (fstack != null && (fluidHandler.fill(side, fstack, false) == fstack.amount)) {
- fluidHandler.fill(side, fstack, true)
+ val fStack = FluidContainerRegistry.getFluidForFilledItem(activeItem)
+ if (fStack != null && (fluidHandler.fill(side, fStack, false) == fStack.amount)) {
+ fluidHandler.fill(side, fStack, true)
val cont = activeItem.getItem.getContainerItem(activeItem)
player.inventory.decrStackSize(player.inventory.currentItem, 1)
if (cont != null) ItemUtils.dropItemToPlayer(world, player, cont)
@@ -72,9 +74,9 @@ trait BlockGuiWrenchable extends Block /*with IDismantleable*/ {
return false
}
- override def onBlockActivated(world: World, x: Int, y: Int, z: Int, player: EntityPlayer, side: Int, xoffs: Float, yoffs: Float, zoffs: Float): Boolean = {
+ override def onBlockActivated(world: World, x: Int, y: Int, z: Int, player: EntityPlayer, side: Int, xOffs: Float, yOffs: Float, zOffs: Float): Boolean = {
// If the click can be handled by something else - ignore it
- if (super.onBlockActivated(world, x, y, z, player, side, xoffs, yoffs, zoffs)) return true
+ if (super.onBlockActivated(world, x, y, z, player, side, xOffs, yOffs, zOffs)) return true
if (player.isSneaking) {
val equipped = if (player.getCurrentEquippedItem != null) player.getCurrentEquippedItem.getItem else null
if (equipped.isInstanceOf[IToolWrench] && equipped.asInstanceOf[IToolWrench].canWrench(player, x, y, z)) {
diff --git a/src/net/bdew/gendustry/gui/HintIcons.scala b/src/net/bdew/gendustry/gui/HintIcons.scala
index 226cd67..0237fde 100644
--- a/src/net/bdew/gendustry/gui/HintIcons.scala
+++ b/src/net/bdew/gendustry/gui/HintIcons.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.gui
diff --git a/src/net/bdew/gendustry/gui/Textures.scala b/src/net/bdew/gendustry/gui/Textures.scala
index 0374ed6..839cfc3 100644
--- a/src/net/bdew/gendustry/gui/Textures.scala
+++ b/src/net/bdew/gendustry/gui/Textures.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.gui
diff --git a/src/net/bdew/gendustry/gui/WidgetPowerCustom.scala b/src/net/bdew/gendustry/gui/WidgetPowerCustom.scala
index fef9ae9..b471dba 100644
--- a/src/net/bdew/gendustry/gui/WidgetPowerCustom.scala
+++ b/src/net/bdew/gendustry/gui/WidgetPowerCustom.scala
@@ -4,18 +4,19 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.gui
import net.bdew.gendustry.config.Config
+import net.bdew.lib.DecFormat
import net.bdew.lib.gui.{Point, Rect, Texture}
import net.bdew.lib.power.{DataSlotPower, WidgetPowerGauge}
import scala.collection.mutable
-class WidgetPowerCustom(rect: Rect, texture: Texture, dslot: DataSlotPower) extends WidgetPowerGauge(rect, texture, dslot) {
+class WidgetPowerCustom(rect: Rect, texture: Texture, dSlot: DataSlotPower) extends WidgetPowerGauge(rect, texture, dSlot) {
override def handleTooltip(p: Point, tip: mutable.MutableList[String]) =
- tip += formater.format(dslot.stored * Config.powerShowMultiplier) + "/" + formater.format(dslot.capacity * Config.powerShowMultiplier) + " " + Config.powerShowUnits
+ tip += DecFormat.round(dSlot.stored * Config.powerShowMultiplier) + "/" + DecFormat.round(dSlot.capacity * Config.powerShowMultiplier) + " " + Config.powerShowUnits
}
diff --git a/src/net/bdew/gendustry/gui/WidgetProgressBarNEI.scala b/src/net/bdew/gendustry/gui/WidgetProgressBarNEI.scala
index 07dc2a8..a7044b9 100644
--- a/src/net/bdew/gendustry/gui/WidgetProgressBarNEI.scala
+++ b/src/net/bdew/gendustry/gui/WidgetProgressBarNEI.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.gui
@@ -17,10 +17,10 @@ import net.bdew.lib.gui.{Point, Rect, Texture}
import scala.collection.mutable
-class WidgetProgressBarNEI(rect: Rect, texture: Texture, dslot: DataSlotFloat, recipeid: String) extends WidgetProgressBar(rect, texture, dslot) {
+class WidgetProgressBarNEI(rect: Rect, texture: Texture, dSlot: DataSlotFloat, recipeId: String) extends WidgetProgressBar(rect, texture, dSlot) {
override def mouseClicked(p: Point, button: Int) {
if (NEIRecipeProxy.hasNei)
- NEIRecipeProxy.openRecipes(recipeid)
+ NEIRecipeProxy.openRecipes(recipeId)
}
override def handleTooltip(p: Point, tip: mutable.MutableList[String]) {
diff --git a/src/net/bdew/gendustry/gui/rscontrol/ContainerRSControllable.scala b/src/net/bdew/gendustry/gui/rscontrol/ContainerRSControllable.scala
index 679eb81..ce5a7d4 100644
--- a/src/net/bdew/gendustry/gui/rscontrol/ContainerRSControllable.scala
+++ b/src/net/bdew/gendustry/gui/rscontrol/ContainerRSControllable.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.gui.rscontrol
@@ -13,7 +13,7 @@ import net.bdew.lib.data.base.ContainerDataSlots
import net.minecraft.entity.player.EntityPlayer
trait ContainerRSControllable extends ContainerDataSlots {
- val dataSource: TileRSContollable
+ val dataSource: TileRSControllable
/**
* This implementation is piggybacking on vanilla Packet102WindowClick
@@ -21,11 +21,11 @@ trait ContainerRSControllable extends ContainerDataSlots {
*/
final val RSMODE_SLOT_NUM = 1000
- override def slotClick(slotnum: Int, button: Int, modifiers: Int, player: EntityPlayer) =
- if (slotnum == RSMODE_SLOT_NUM) {
+ override def slotClick(slotNum: Int, button: Int, modifiers: Int, player: EntityPlayer) =
+ if (slotNum == RSMODE_SLOT_NUM) {
dataSource.rsmode := RSMode(button)
null
} else {
- super.slotClick(slotnum, button, modifiers, player)
+ super.slotClick(slotNum, button, modifiers, player)
}
}
diff --git a/src/net/bdew/gendustry/gui/rscontrol/DataslotRSMode.scala b/src/net/bdew/gendustry/gui/rscontrol/DataslotRSMode.scala
index 561a3b7..f0268ea 100644
--- a/src/net/bdew/gendustry/gui/rscontrol/DataslotRSMode.scala
+++ b/src/net/bdew/gendustry/gui/rscontrol/DataslotRSMode.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.gui.rscontrol
@@ -12,8 +12,8 @@ package net.bdew.gendustry.gui.rscontrol
import net.bdew.lib.data.base.{DataSlotVal, TileDataSlots, UpdateKind}
import net.minecraft.nbt.NBTTagCompound
-case class DataslotRSMode(name: String, parent: TileDataSlots) extends DataSlotVal[RSMode.Value] {
- var cval: RSMode.Value = RSMode.ALWAYS
- def save(t: NBTTagCompound, kind: UpdateKind.Value) = t.setByte(name, cval.id.toByte)
- def load(t: NBTTagCompound, kind: UpdateKind.Value) = cval = RSMode(t.getByte(name))
+case class DataSlotRSMode(name: String, parent: TileDataSlots) extends DataSlotVal[RSMode.Value] {
+ var value: RSMode.Value = RSMode.ALWAYS
+ def save(t: NBTTagCompound, kind: UpdateKind.Value) = t.setByte(name, value.id.toByte)
+ def load(t: NBTTagCompound, kind: UpdateKind.Value) = value = RSMode(t.getByte(name))
}
diff --git a/src/net/bdew/gendustry/gui/rscontrol/RSMode.scala b/src/net/bdew/gendustry/gui/rscontrol/RSMode.scala
index a3417b4..bc88188 100644
--- a/src/net/bdew/gendustry/gui/rscontrol/RSMode.scala
+++ b/src/net/bdew/gendustry/gui/rscontrol/RSMode.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.gui.rscontrol
diff --git a/src/net/bdew/gendustry/gui/rscontrol/TileRSContollable.scala b/src/net/bdew/gendustry/gui/rscontrol/TileRSControllable.scala
similarity index 78%
rename from src/net/bdew/gendustry/gui/rscontrol/TileRSContollable.scala
rename to src/net/bdew/gendustry/gui/rscontrol/TileRSControllable.scala
index e433498..deedf1b 100644
--- a/src/net/bdew/gendustry/gui/rscontrol/TileRSContollable.scala
+++ b/src/net/bdew/gendustry/gui/rscontrol/TileRSControllable.scala
@@ -4,15 +4,15 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.gui.rscontrol
import net.bdew.lib.data.base.{TileDataSlots, UpdateKind}
-trait TileRSContollable extends TileDataSlots {
- val rsmode = DataslotRSMode("rsmode", this).setUpdate(UpdateKind.SAVE, UpdateKind.GUI, UpdateKind.WORLD)
+trait TileRSControllable extends TileDataSlots {
+ val rsmode = DataSlotRSMode("rsmode", this).setUpdate(UpdateKind.SAVE, UpdateKind.GUI, UpdateKind.WORLD)
def canWork = {
val powered = getWorldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)
diff --git a/src/net/bdew/gendustry/gui/rscontrol/WidgetRSModeButton.scala b/src/net/bdew/gendustry/gui/rscontrol/WidgetRSModeButton.scala
index 6a7f26d..d2e57fa 100644
--- a/src/net/bdew/gendustry/gui/rscontrol/WidgetRSModeButton.scala
+++ b/src/net/bdew/gendustry/gui/rscontrol/WidgetRSModeButton.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.gui.rscontrol
@@ -18,7 +18,7 @@ import net.minecraft.util.ResourceLocation
import scala.collection.mutable
-class WidgetRSModeButton(p: Point, te: TileRSContollable, container: ContainerRSControllable) extends Widget {
+class WidgetRSModeButton(p: Point, te: TileRSControllable, container: ContainerRSControllable) extends Widget {
val rect = new Rect(p, 16, 16)
val iconRect = new Rect(p +(1, 1), 14, 14)
@@ -35,7 +35,7 @@ class WidgetRSModeButton(p: Point, te: TileRSContollable, container: ContainerRS
}
override def handleTooltip(p: Point, tip: mutable.MutableList[String]) {
- tip += Misc.toLocal("gendustry.rsmode." + te.rsmode.cval.toString.toLowerCase)
+ tip += Misc.toLocal("gendustry.rsmode." + te.rsmode.value.toString.toLowerCase)
}
override def mouseClicked(p: Point, button: Int) {
diff --git a/src/net/bdew/gendustry/items/EjectCover.scala b/src/net/bdew/gendustry/items/EjectCover.scala
index 141b7d1..28221f7 100644
--- a/src/net/bdew/gendustry/items/EjectCover.scala
+++ b/src/net/bdew/gendustry/items/EjectCover.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.items
diff --git a/src/net/bdew/gendustry/items/GeneSample.scala b/src/net/bdew/gendustry/items/GeneSample.scala
index 8fdab95..0196513 100644
--- a/src/net/bdew/gendustry/items/GeneSample.scala
+++ b/src/net/bdew/gendustry/items/GeneSample.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.items
diff --git a/src/net/bdew/gendustry/items/GeneTemplate.scala b/src/net/bdew/gendustry/items/GeneTemplate.scala
index d0c09f7..fa67905 100644
--- a/src/net/bdew/gendustry/items/GeneTemplate.scala
+++ b/src/net/bdew/gendustry/items/GeneTemplate.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.items
diff --git a/src/net/bdew/gendustry/items/ImportCover.scala b/src/net/bdew/gendustry/items/ImportCover.scala
index d6eca1e..0b070ee 100644
--- a/src/net/bdew/gendustry/items/ImportCover.scala
+++ b/src/net/bdew/gendustry/items/ImportCover.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.items
diff --git a/src/net/bdew/gendustry/items/IndustrialGrafter.scala b/src/net/bdew/gendustry/items/IndustrialGrafter.scala
index 053febc..fd42b6a 100644
--- a/src/net/bdew/gendustry/items/IndustrialGrafter.scala
+++ b/src/net/bdew/gendustry/items/IndustrialGrafter.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.items
@@ -90,8 +90,8 @@ object IndustrialGrafter extends ItemTool(0, Item.ToolMaterial.IRON, new util.Ha
}
override def getItemEnchantability: Int = 0
- override def getIsRepairable(par1ItemStack: ItemStack, par2ItemStack: ItemStack): Boolean = false
- override def isBookEnchantable(itemstack1: ItemStack, itemstack2: ItemStack): Boolean = false
+ override def getIsRepairable(stack1: ItemStack, stack2: ItemStack): Boolean = false
+ override def isBookEnchantable(stack1: ItemStack, stack2: ItemStack): Boolean = false
def getSaplingModifier(stack: ItemStack, world: World, player: EntityPlayer, x: Int, y: Int, z: Int): Float = if (hasCharges(stack)) saplingModifier else 0
diff --git a/src/net/bdew/gendustry/items/IndustrialScoop.scala b/src/net/bdew/gendustry/items/IndustrialScoop.scala
index e51c170..9fb3daf 100644
--- a/src/net/bdew/gendustry/items/IndustrialScoop.scala
+++ b/src/net/bdew/gendustry/items/IndustrialScoop.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.items
@@ -75,8 +75,8 @@ object IndustrialScoop extends ItemTool(0, Item.ToolMaterial.IRON, new util.Hash
}
override def getItemEnchantability: Int = 0
- override def getIsRepairable(par1ItemStack: ItemStack, par2ItemStack: ItemStack): Boolean = false
- override def isBookEnchantable(itemstack1: ItemStack, itemstack2: ItemStack): Boolean = false
+ override def getIsRepairable(stack1: ItemStack, stack2: ItemStack): Boolean = false
+ override def isBookEnchantable(stack1: ItemStack, stack2: ItemStack): Boolean = false
@SideOnly(Side.CLIENT)
override def registerIcons(reg: IIconRegister) {
diff --git a/src/net/bdew/gendustry/machines/advmutatron/BlockMutatronAdv.scala b/src/net/bdew/gendustry/machines/advmutatron/BlockMutatronAdv.scala
index 5d5ca3d..af27d80 100644
--- a/src/net/bdew/gendustry/machines/advmutatron/BlockMutatronAdv.scala
+++ b/src/net/bdew/gendustry/machines/advmutatron/BlockMutatronAdv.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.advmutatron
diff --git a/src/net/bdew/gendustry/machines/advmutatron/ContainerMutatronAdv.scala b/src/net/bdew/gendustry/machines/advmutatron/ContainerMutatronAdv.scala
index 6690147..29f28f6 100644
--- a/src/net/bdew/gendustry/machines/advmutatron/ContainerMutatronAdv.scala
+++ b/src/net/bdew/gendustry/machines/advmutatron/ContainerMutatronAdv.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.advmutatron
@@ -29,19 +29,15 @@ class ContainerMutatronAdv(val te: TileMutatronAdv, player: EntityPlayer) extend
te.lastPlayer := player.getGameProfile
- override def slotClick(slotnum: Int, button: Int, modifiers: Int, player: EntityPlayer): ItemStack = {
+ override def slotClick(slotNum: Int, button: Int, modifiers: Int, player: EntityPlayer): ItemStack = {
te.lastPlayer := player.getGameProfile
// This is a hacky workaround!
// When a player changes the contents of a slot, playerInventoryBeingManipulated is set to true,
// preventing updates to OTHER slots from being detected and sent back
// Here i ensure changes are sent back before returning so NetServerHandler.handleWindowClick doesn't
// get the opportunity to mess things up
- val r = super.slotClick(slotnum, button, modifiers, player)
+ val r = super.slotClick(slotNum, button, modifiers, player)
detectAndSendChanges()
return r
}
-
- def canInteractWith(entityplayer: EntityPlayer): Boolean = {
- return te.isUseableByPlayer(entityplayer)
- }
}
\ No newline at end of file
diff --git a/src/net/bdew/gendustry/machines/advmutatron/GuiMutatronAdv.scala b/src/net/bdew/gendustry/machines/advmutatron/GuiMutatronAdv.scala
index 8dd3f43..77c6490 100644
--- a/src/net/bdew/gendustry/machines/advmutatron/GuiMutatronAdv.scala
+++ b/src/net/bdew/gendustry/machines/advmutatron/GuiMutatronAdv.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.advmutatron
@@ -25,8 +25,8 @@ class GuiMutatronAdv(val te: TileMutatronAdv, player: EntityPlayer) extends Base
widgets.add(new WidgetPowerCustom(new Rect(8, 19, 16, 58), Textures.powerFill, te.power))
widgets.add(new WidgetFluidGauge(new Rect(32, 19, 16, 58), Textures.tankOverlay, te.tank))
widgets.add(new WidgetSelector(new Point(7, 84), te.selectedMutation, -1))
- widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.mutatron.adv.name"), 8, 6, Color.darkgray))
- widgets.add(new WidgetLabel(Misc.toLocal("gendustry.label.select"), 8, 89, Color.darkgray))
+ widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.mutatron.adv.name"), 8, 6, Color.darkGray))
+ widgets.add(new WidgetLabel(Misc.toLocal("gendustry.label.select"), 8, 89, Color.darkGray))
inventorySlots.getSlotFromInventory(te, te.slots.inIndividual1).setBackgroundIcon(HintIcons.queenOrSapling)
inventorySlots.getSlotFromInventory(te, te.slots.inIndividual2).setBackgroundIcon(HintIcons.droneOrPollen)
diff --git a/src/net/bdew/gendustry/machines/advmutatron/MachineMutatronAdv.scala b/src/net/bdew/gendustry/machines/advmutatron/MachineMutatronAdv.scala
index 715b5f7..9fb1e15 100644
--- a/src/net/bdew/gendustry/machines/advmutatron/MachineMutatronAdv.scala
+++ b/src/net/bdew/gendustry/machines/advmutatron/MachineMutatronAdv.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.advmutatron
diff --git a/src/net/bdew/gendustry/machines/advmutatron/SlotSelector.scala b/src/net/bdew/gendustry/machines/advmutatron/SlotSelector.scala
index 26c1cbb..93c067f 100644
--- a/src/net/bdew/gendustry/machines/advmutatron/SlotSelector.scala
+++ b/src/net/bdew/gendustry/machines/advmutatron/SlotSelector.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.advmutatron
diff --git a/src/net/bdew/gendustry/machines/advmutatron/TileMutatronAdv.scala b/src/net/bdew/gendustry/machines/advmutatron/TileMutatronAdv.scala
index 68f0d2a..a87a125 100644
--- a/src/net/bdew/gendustry/machines/advmutatron/TileMutatronAdv.scala
+++ b/src/net/bdew/gendustry/machines/advmutatron/TileMutatronAdv.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.advmutatron
@@ -77,14 +77,14 @@ class TileMutatronAdv extends TileItemProcessor with TileWorker with TilePowered
getStackInSlot(slots.inIndividual2) != null &&
getStackInSlot(slots.inLabware) != null &&
tank.getFluidAmount >= cfg.mutagenPerItem &&
- slots.selectors.contains(selectedMutation.cval) &&
- inv(selectedMutation.cval) != null
+ slots.selectors.contains(selectedMutation.value) &&
+ inv(selectedMutation.value) != null
def tryStart(): Boolean = {
if (canStart) {
- output := GeneticsHelper.applyMutationDecayChance(getStackInSlot(selectedMutation.cval), getStackInSlot(0))
+ output := GeneticsHelper.applyMutationDecayChance(getStackInSlot(selectedMutation.value), getStackInSlot(0))
tank.drain(cfg.mutagenPerItem, true)
- if (lastPlayer.cval != null)
+ if (lastPlayer.value != null)
GeneticsHelper.addMutationToTracker(inv(0), inv(1), output, lastPlayer, worldObj)
decrStackSize(slots.inIndividual1, 1)
decrStackSize(slots.inIndividual2, 1)
@@ -100,14 +100,14 @@ class TileMutatronAdv extends TileItemProcessor with TileWorker with TilePowered
v
}
- override def isItemValidForSlot(slot: Int, itemstack: ItemStack): Boolean = {
+ override def isItemValidForSlot(slot: Int, stack: ItemStack): Boolean = {
slot match {
case 0 =>
- return GeneticsHelper.isPotentialMutationPair(itemstack, getStackInSlot(1))
+ return GeneticsHelper.isPotentialMutationPair(stack, getStackInSlot(1))
case 1 =>
- return GeneticsHelper.isPotentialMutationPair(getStackInSlot(0), itemstack)
+ return GeneticsHelper.isPotentialMutationPair(getStackInSlot(0), stack)
case 3 =>
- return itemstack.getItem == Items.labware
+ return stack.getItem == Items.labware
case _ =>
return false
}
diff --git a/src/net/bdew/gendustry/machines/advmutatron/WidgetSelector.scala b/src/net/bdew/gendustry/machines/advmutatron/WidgetSelector.scala
index 038b0ea..62bc49a 100644
--- a/src/net/bdew/gendustry/machines/advmutatron/WidgetSelector.scala
+++ b/src/net/bdew/gendustry/machines/advmutatron/WidgetSelector.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.advmutatron
@@ -14,12 +14,12 @@ import net.bdew.lib.data.DataSlotInt
import net.bdew.lib.gui.widgets.Widget
import net.bdew.lib.gui.{Point, Rect}
-class WidgetSelector(origin: Point, dslot: DataSlotInt, slotOffset: Int) extends Widget {
+class WidgetSelector(origin: Point, dSlot: DataSlotInt, slotOffset: Int) extends Widget {
val rect = new Rect(origin, 0, 0)
val texture = Textures.slotSelect
override def draw(mouse: Point) = {
- if (dslot > 0)
- parent.drawTexture(Rect(rect.origin.x + (dslot.cval + slotOffset) * 18, rect.origin.y, 18, 18), texture)
+ if (dSlot > 0)
+ parent.drawTexture(Rect(rect.origin.x + (dSlot.value + slotOffset) * 18, rect.origin.y, 18, 18), texture)
}
}
diff --git a/src/net/bdew/gendustry/machines/apiary/BlockApiary.scala b/src/net/bdew/gendustry/machines/apiary/BlockApiary.scala
index 331ce88..622b2c2 100644
--- a/src/net/bdew/gendustry/machines/apiary/BlockApiary.scala
+++ b/src/net/bdew/gendustry/machines/apiary/BlockApiary.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.apiary
diff --git a/src/net/bdew/gendustry/machines/apiary/ContainerApiary.scala b/src/net/bdew/gendustry/machines/apiary/ContainerApiary.scala
index 0b52c80..3604a57 100644
--- a/src/net/bdew/gendustry/machines/apiary/ContainerApiary.scala
+++ b/src/net/bdew/gendustry/machines/apiary/ContainerApiary.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.apiary
@@ -59,24 +59,24 @@ class ContainerApiary(val te: TileApiary, player: EntityPlayer) extends BaseCont
}
override def slotClick(slot: Int, button: Int, modifiers: Int, player: EntityPlayer): ItemStack = {
- var pstack = player.inventory.getItemStack
- if (te.slots.upgrades.contains(slot) && te.isUpgrade(pstack)) {
+ var oldStack = player.inventory.getItemStack
+ if (te.slots.upgrades.contains(slot) && te.isUpgrade(oldStack)) {
val idx = inventorySlots.get(slot).asInstanceOf[Slot].getSlotIndex
if (te.slots.upgrades.contains(idx) && modifiers == 0 && button <= 1) {
- if (te.getStackInSlot(idx) == null || ItemUtils.isSameItem(pstack, te.getStackInSlot(idx))) {
- var canAdd = te.getMaxAdditionalUpgrades(pstack)
+ if (te.getStackInSlot(idx) == null || ItemUtils.isSameItem(oldStack, te.getStackInSlot(idx))) {
+ var canAdd = te.getMaxAdditionalUpgrades(oldStack)
if (canAdd > 0) {
if (button == 1) canAdd = 1
- var nstack: ItemStack = null
- if (canAdd >= pstack.stackSize) {
- nstack = pstack
- pstack = null
+ val newStack = if (canAdd >= oldStack.stackSize) {
+ val t = oldStack
+ oldStack = null
+ t
} else {
- nstack = pstack.splitStack(canAdd)
+ oldStack.splitStack(canAdd)
}
- player.inventory.setItemStack(nstack)
+ player.inventory.setItemStack(newStack)
val res = super.slotClick(slot, button, modifiers, player)
- player.inventory.setItemStack(pstack)
+ player.inventory.setItemStack(oldStack)
return res
}
}
@@ -84,6 +84,4 @@ class ContainerApiary(val te: TileApiary, player: EntityPlayer) extends BaseCont
}
return super.slotClick(slot, button, modifiers, player)
}
-
- def canInteractWith(entityplayer: EntityPlayer): Boolean = te.isUseableByPlayer(entityplayer)
}
\ No newline at end of file
diff --git a/src/net/bdew/gendustry/machines/apiary/ErrorCodes.scala b/src/net/bdew/gendustry/machines/apiary/ErrorCodes.scala
index 8cd17c2..eb4da62 100644
--- a/src/net/bdew/gendustry/machines/apiary/ErrorCodes.scala
+++ b/src/net/bdew/gendustry/machines/apiary/ErrorCodes.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.apiary
@@ -50,4 +50,4 @@ case class GendustryErrorState(name: String, id: Short) extends IErrorState {
object GendustryErrorStates {
val Disabled = GendustryErrorState("disabled", 500)
-}
\ No newline at end of file
+}
diff --git a/src/net/bdew/gendustry/machines/apiary/GuiApiary.scala b/src/net/bdew/gendustry/machines/apiary/GuiApiary.scala
index 49a3987..52b3e51 100644
--- a/src/net/bdew/gendustry/machines/apiary/GuiApiary.scala
+++ b/src/net/bdew/gendustry/machines/apiary/GuiApiary.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.apiary
@@ -24,7 +24,7 @@ class GuiApiary(val te: TileApiary, player: EntityPlayer, cont: ContainerApiary)
widgets.add(new WidgetError(155, 5, te))
widgets.add(new WidgetPowerCustom(new Rect(8, 19, 16, 58), Textures.powerFill, te.power))
widgets.add(new WidgetApiaryProgress(new Rect(69, 22, 36, 15), te.guiBreeding, te.guiProgress))
- widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.apiary.name"), 8, 6, Color.darkgray))
+ widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.apiary.name"), 8, 6, Color.darkGray))
widgets.add(new WidgetRSModeButton(Point(137, 5), te, cont))
te.slots.upgrades.foreach(inventorySlots.getSlot(_).setBackgroundIcon(HintIcons.upgrade))
diff --git a/src/net/bdew/gendustry/machines/apiary/MachineApiary.scala b/src/net/bdew/gendustry/machines/apiary/MachineApiary.scala
index dceb4ee..56e3b39 100644
--- a/src/net/bdew/gendustry/machines/apiary/MachineApiary.scala
+++ b/src/net/bdew/gendustry/machines/apiary/MachineApiary.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.apiary
diff --git a/src/net/bdew/gendustry/machines/apiary/Sanity.scala b/src/net/bdew/gendustry/machines/apiary/Sanity.scala
index 700894a..d55b8fb 100644
--- a/src/net/bdew/gendustry/machines/apiary/Sanity.scala
+++ b/src/net/bdew/gendustry/machines/apiary/Sanity.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.apiary
diff --git a/src/net/bdew/gendustry/machines/apiary/TileApiary.scala b/src/net/bdew/gendustry/machines/apiary/TileApiary.scala
index 3193e51..8231d59 100644
--- a/src/net/bdew/gendustry/machines/apiary/TileApiary.scala
+++ b/src/net/bdew/gendustry/machines/apiary/TileApiary.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.apiary
@@ -19,7 +19,7 @@ import net.bdew.gendustry.api.blocks.IIndustrialApiary
import net.bdew.gendustry.api.items.IApiaryUpgrade
import net.bdew.gendustry.compat.triggers.ForestryErrorSource
import net.bdew.gendustry.config.Config
-import net.bdew.gendustry.gui.rscontrol.TileRSContollable
+import net.bdew.gendustry.gui.rscontrol.TileRSControllable
import net.bdew.gendustry.power.TilePowered
import net.bdew.lib.Misc
import net.bdew.lib.covers.TileCoverable
@@ -40,7 +40,7 @@ with SidedInventory
with BreakableInventoryTile
with TilePowered
with ForestryErrorSource
-with TileRSContollable
+with TileRSControllable
with TileCoverable
with IIndustrialApiary {
@@ -164,7 +164,7 @@ with IIndustrialApiary {
strings :+= Misc.toLocalF("gendustry.label.temperature", Misc.toLocal(getTemperature.getName))
strings :+= Misc.toLocalF("gendustry.label.humidity", Misc.toLocal(getHumidity.getName))
- if (queen.cval != null) {
+ if (queen.value != null) {
val bee = beeRoot.getMember(queen)
if (bee != null && bee.isAnalyzed) {
val genome = bee.getGenome
@@ -181,7 +181,6 @@ with IIndustrialApiary {
// Misc
def getBiome = worldObj.getBiomeGenForCoordsBody(xCoord, zCoord)
- def getPowerDataslot(from: ForgeDirection) = power
override def getSizeInventory = 15
override def canInsertItem(slot: Int, stack: ItemStack, side: Int) = slots.bees.contains(slot) && isItemValidForSlot(slot, stack)
@@ -207,8 +206,8 @@ with IIndustrialApiary {
override def onPollenRetrieved(queen: IBee, pollen: IIndividual, isHandled: Boolean): Boolean = {
if (isHandled) return true
if (!mods.isCollectingPollen) return false
- val sproot = pollen.getGenome.getSpeciesRoot
- val stack = sproot.getMemberStack(pollen, EnumGermlingType.POLLEN.ordinal())
+ val spRoot = pollen.getGenome.getSpeciesRoot
+ val stack = spRoot.getMemberStack(pollen, EnumGermlingType.POLLEN.ordinal())
addProduct(stack, true)
return true
}
@@ -226,8 +225,8 @@ with IIndustrialApiary {
override def isHellish = getModifiedBiome == BiomeGenBase.hell
// IBeeHousing
- override def setQueen(itemstack: ItemStack) = setInventorySlotContents(0, itemstack)
- override def setDrone(itemstack: ItemStack) = setInventorySlotContents(1, itemstack)
+ override def setQueen(stack: ItemStack) = setInventorySlotContents(0, stack)
+ override def setDrone(stack: ItemStack) = setInventorySlotContents(1, stack)
override def getQueen = getStackInSlot(slots.queen)
override def getDrone = getStackInSlot(slots.drone)
override def canBreed = true
diff --git a/src/net/bdew/gendustry/machines/apiary/WidgetApiaryProgress.scala b/src/net/bdew/gendustry/machines/apiary/WidgetApiaryProgress.scala
index 42e2771..a7a3745 100644
--- a/src/net/bdew/gendustry/machines/apiary/WidgetApiaryProgress.scala
+++ b/src/net/bdew/gendustry/machines/apiary/WidgetApiaryProgress.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.apiary
@@ -22,18 +22,18 @@ class WidgetApiaryProgress(val rect: Rect, breeding: DataSlotFloat, progress: Da
val texture = Textures.whiteProgress(rect.w)
override def handleTooltip(p: Point, tip: mutable.MutableList[String]) {
- if (breeding.cval > 0) {
- tip += "%s - %.0f%%".format(Misc.toLocal(Gendustry.modId + ".label.breeding"), breeding.cval * 100)
- } else if (progress.cval > 0) {
- tip += "%s - %.0f%%".format(Misc.toLocal(Gendustry.modId + ".label.working"), progress.cval * 100)
+ if (breeding.value > 0) {
+ tip += "%s - %.0f%%".format(Misc.toLocal(Gendustry.modId + ".label.breeding"), breeding.value * 100)
+ } else if (progress.value > 0) {
+ tip += "%s - %.0f%%".format(Misc.toLocal(Gendustry.modId + ".label.working"), progress.value * 100)
}
}
override def draw(mouse: Point) {
- if (breeding.cval > 0) {
- parent.drawTextureInterpolate(rect, texture, 0, 0, breeding.cval, 1)
- } else if (progress.cval > 0) {
- parent.drawTextureInterpolate(rect, texture, 0, 0, progress.cval, 1)
+ if (breeding.value > 0) {
+ parent.drawTextureInterpolate(rect, texture, 0, 0, breeding.value, 1)
+ } else if (progress.value > 0) {
+ parent.drawTextureInterpolate(rect, texture, 0, 0, progress.value, 1)
}
}
}
diff --git a/src/net/bdew/gendustry/machines/apiary/WidgetError.scala b/src/net/bdew/gendustry/machines/apiary/WidgetError.scala
index ca2e3fd..269a1af 100644
--- a/src/net/bdew/gendustry/machines/apiary/WidgetError.scala
+++ b/src/net/bdew/gendustry/machines/apiary/WidgetError.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.apiary
@@ -17,11 +17,11 @@ import scala.collection.mutable
class WidgetError(x: Int, y: Int, apiary: TileApiary) extends Widget {
val rect: Rect = new Rect(x, y, 16, 16)
override def draw(mouse: Point) {
- parent.drawTexture(rect, ErrorCodes.getIcon(apiary.errorState.cval))
+ parent.drawTexture(rect, ErrorCodes.getIcon(apiary.errorState.value))
}
override def handleTooltip(p: Point, tip: mutable.MutableList[String]) {
- tip += ErrorCodes.getDescription(apiary.errorState.cval)
+ tip += ErrorCodes.getDescription(apiary.errorState.value)
tip ++= apiary.getStats
}
}
diff --git a/src/net/bdew/gendustry/machines/apiary/upgrades/ItemApiaryUpgrade.scala b/src/net/bdew/gendustry/machines/apiary/upgrades/ItemApiaryUpgrade.scala
index ae3dc5b..7cf0936 100644
--- a/src/net/bdew/gendustry/machines/apiary/upgrades/ItemApiaryUpgrade.scala
+++ b/src/net/bdew/gendustry/machines/apiary/upgrades/ItemApiaryUpgrade.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.apiary.upgrades
diff --git a/src/net/bdew/gendustry/machines/apiary/upgrades/Upgrades.scala b/src/net/bdew/gendustry/machines/apiary/upgrades/Upgrades.scala
index 667331c..8c43318 100644
--- a/src/net/bdew/gendustry/machines/apiary/upgrades/Upgrades.scala
+++ b/src/net/bdew/gendustry/machines/apiary/upgrades/Upgrades.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.apiary.upgrades
@@ -66,10 +66,10 @@ object Upgrades {
val id = sect.getInt("id")
val max = sect.getInt("max")
val mods = sect.flatMap({
- case (pname, EntryStr(v)) => Some(makeStrMod(name, pname, v))
- case (pname, x: EntryModifier) => Some(makeNumMod(name, pname, x))
+ case (pName, EntryStr(v)) => Some(makeStrMod(name, pName, v))
+ case (pName, x: EntryModifier) => Some(makeNumMod(name, pName, x))
case ("id", _) | ("max", _) => None
- case (pname, v) => sys.error("Unknown upgrade modifier '%s' - %s in upgrade '%s'".format(pname, v, name))
+ case (pName, v) => sys.error("Unknown upgrade modifier '%s' - %s in upgrade '%s'".format(pName, v, name))
})
map += id -> Upgrade(id, name, max, mods.toSeq)
GameRegistry.registerCustomItemStack("upgrade." + name, new ItemStack(ItemApiaryUpgrade, 1, id))
diff --git a/src/net/bdew/gendustry/machines/extractor/BlockExtractor.scala b/src/net/bdew/gendustry/machines/extractor/BlockExtractor.scala
index 631f64b..1842eb9 100644
--- a/src/net/bdew/gendustry/machines/extractor/BlockExtractor.scala
+++ b/src/net/bdew/gendustry/machines/extractor/BlockExtractor.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.extractor
diff --git a/src/net/bdew/gendustry/machines/extractor/ContainerExtractor.scala b/src/net/bdew/gendustry/machines/extractor/ContainerExtractor.scala
index b799d6a..277ff66 100644
--- a/src/net/bdew/gendustry/machines/extractor/ContainerExtractor.scala
+++ b/src/net/bdew/gendustry/machines/extractor/ContainerExtractor.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.extractor
@@ -19,6 +19,4 @@ class ContainerExtractor(val te: TileExtractor, player: EntityPlayer) extends Ba
addSlotToContainer(new SlotValidating(te, te.slots.inIndividual, 44, 41))
addSlotToContainer(new SlotValidating(te, te.slots.inLabware, 94, 19))
bindPlayerInventory(player.inventory, 8, 84, 142)
-
- def canInteractWith(entityplayer: EntityPlayer): Boolean = te.isUseableByPlayer(entityplayer)
}
\ No newline at end of file
diff --git a/src/net/bdew/gendustry/machines/extractor/GuiExtractor.scala b/src/net/bdew/gendustry/machines/extractor/GuiExtractor.scala
index 579c5db..6867fd6 100644
--- a/src/net/bdew/gendustry/machines/extractor/GuiExtractor.scala
+++ b/src/net/bdew/gendustry/machines/extractor/GuiExtractor.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.extractor
@@ -24,7 +24,7 @@ class GuiExtractor(val te: TileExtractor, player: EntityPlayer) extends BaseScre
widgets.add(new WidgetProgressBarNEI(new Rect(79, 41, 53, 15), Textures.greenProgress(53), te.progress, "Extractor"))
widgets.add(new WidgetPowerCustom(new Rect(8, 19, 16, 58), Textures.powerFill, te.power))
widgets.add(new WidgetFluidGauge(new Rect(152, 19, 16, 58), Textures.tankOverlay, te.tank))
- widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.extractor.name"), 8, 6, Color.darkgray))
+ widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.extractor.name"), 8, 6, Color.darkGray))
inventorySlots.getSlotFromInventory(te, te.slots.inIndividual).setBackgroundIcon(HintIcons.droneOrSapling)
inventorySlots.getSlotFromInventory(te, te.slots.inLabware).setBackgroundIcon(HintIcons.labware)
diff --git a/src/net/bdew/gendustry/machines/extractor/MachineExtractor.scala b/src/net/bdew/gendustry/machines/extractor/MachineExtractor.scala
index 00e316f..5e720ec 100644
--- a/src/net/bdew/gendustry/machines/extractor/MachineExtractor.scala
+++ b/src/net/bdew/gendustry/machines/extractor/MachineExtractor.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.extractor
diff --git a/src/net/bdew/gendustry/machines/extractor/TileExtractor.scala b/src/net/bdew/gendustry/machines/extractor/TileExtractor.scala
index 7e77574..43ade11 100644
--- a/src/net/bdew/gendustry/machines/extractor/TileExtractor.scala
+++ b/src/net/bdew/gendustry/machines/extractor/TileExtractor.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.extractor
@@ -51,7 +51,7 @@ class TileExtractor extends TileBaseProcessor with TileWorker with TilePowered w
}
def tryFinish(): Boolean = {
- if (tank.fill(output, false) == output.cval) {
+ if (tank.fill(output, false) == output.value) {
tank.fill(output, true)
output := -1
return true
@@ -77,9 +77,9 @@ class TileExtractor extends TileBaseProcessor with TileWorker with TilePowered w
}
allowSided = true
- override def isItemValidForSlot(slot: Int, itemstack: ItemStack): Boolean = slot match {
- case slots.inIndividual => LiquidDNASources.getValue(itemstack) > 0
- case slots.inLabware => itemstack.getItem == Items.labware
+ override def isItemValidForSlot(slot: Int, stack: ItemStack): Boolean = slot match {
+ case slots.inIndividual => LiquidDNASources.getValue(stack) > 0
+ case slots.inLabware => stack.getItem == Items.labware
case _ => false
}
override def canExtractItem(slot: Int, item: ItemStack, side: Int): Boolean = false
diff --git a/src/net/bdew/gendustry/machines/imprinter/BlockImprinter.scala b/src/net/bdew/gendustry/machines/imprinter/BlockImprinter.scala
index 8d225ac..9e2e1e5 100644
--- a/src/net/bdew/gendustry/machines/imprinter/BlockImprinter.scala
+++ b/src/net/bdew/gendustry/machines/imprinter/BlockImprinter.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.imprinter
diff --git a/src/net/bdew/gendustry/machines/imprinter/ContainerImprinter.scala b/src/net/bdew/gendustry/machines/imprinter/ContainerImprinter.scala
index f89a188..e76d3ff 100644
--- a/src/net/bdew/gendustry/machines/imprinter/ContainerImprinter.scala
+++ b/src/net/bdew/gendustry/machines/imprinter/ContainerImprinter.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.imprinter
@@ -21,8 +21,4 @@ class ContainerImprinter(val te: TileImprinter, player: EntityPlayer) extends Ba
addSlotToContainer(new SlotValidating(te, 2, 41, 49))
addSlotToContainer(new SlotValidating(te, 3, 137, 49))
bindPlayerInventory(player.inventory, 8, 84, 142)
-
- def canInteractWith(entityplayer: EntityPlayer): Boolean = {
- return te.isUseableByPlayer(entityplayer)
- }
}
\ No newline at end of file
diff --git a/src/net/bdew/gendustry/machines/imprinter/GuiImprinter.scala b/src/net/bdew/gendustry/machines/imprinter/GuiImprinter.scala
index f20738f..9544777 100644
--- a/src/net/bdew/gendustry/machines/imprinter/GuiImprinter.scala
+++ b/src/net/bdew/gendustry/machines/imprinter/GuiImprinter.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.imprinter
@@ -23,7 +23,7 @@ class GuiImprinter(val te: TileImprinter, player: EntityPlayer) extends BaseScre
super.initGui()
widgets.add(new WidgetProgressBarNEI(new Rect(63, 49, 66, 15), Textures.whiteProgress(66), te.progress, "Imprinter"))
widgets.add(new WidgetPowerCustom(new Rect(8, 19, 16, 58), Textures.powerFill, te.power))
- widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.imprinter.name"), 8, 6, Color.darkgray))
+ widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.imprinter.name"), 8, 6, Color.darkGray))
inventorySlots.getSlotFromInventory(te, te.slots.inIndividual).setBackgroundIcon(HintIcons.queenOrSapling)
inventorySlots.getSlotFromInventory(te, te.slots.inLabware).setBackgroundIcon(HintIcons.labware)
diff --git a/src/net/bdew/gendustry/machines/imprinter/MachineImprinter.scala b/src/net/bdew/gendustry/machines/imprinter/MachineImprinter.scala
index 36273e8..5db0221 100644
--- a/src/net/bdew/gendustry/machines/imprinter/MachineImprinter.scala
+++ b/src/net/bdew/gendustry/machines/imprinter/MachineImprinter.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.imprinter
diff --git a/src/net/bdew/gendustry/machines/imprinter/TileImprinter.scala b/src/net/bdew/gendustry/machines/imprinter/TileImprinter.scala
index 2e63a79..21cba6d 100644
--- a/src/net/bdew/gendustry/machines/imprinter/TileImprinter.scala
+++ b/src/net/bdew/gendustry/machines/imprinter/TileImprinter.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.imprinter
diff --git a/src/net/bdew/gendustry/machines/liquifier/BlockLiquifier.scala b/src/net/bdew/gendustry/machines/liquifier/BlockLiquifier.scala
index 4e773e3..fa88bbf 100644
--- a/src/net/bdew/gendustry/machines/liquifier/BlockLiquifier.scala
+++ b/src/net/bdew/gendustry/machines/liquifier/BlockLiquifier.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.liquifier
diff --git a/src/net/bdew/gendustry/machines/liquifier/ContainerLiquifier.scala b/src/net/bdew/gendustry/machines/liquifier/ContainerLiquifier.scala
index 06c791f..831d589 100644
--- a/src/net/bdew/gendustry/machines/liquifier/ContainerLiquifier.scala
+++ b/src/net/bdew/gendustry/machines/liquifier/ContainerLiquifier.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.liquifier
@@ -18,6 +18,4 @@ class ContainerLiquifier(val te: TileLiquifier, player: EntityPlayer) extends Ba
addSlotToContainer(new SlotValidating(te, te.slots.inMeat, 44, 41))
bindPlayerInventory(player.inventory, 8, 84, 142)
-
- def canInteractWith(entityplayer: EntityPlayer): Boolean = te.isUseableByPlayer(entityplayer)
}
\ No newline at end of file
diff --git a/src/net/bdew/gendustry/machines/liquifier/GuiLiquifier.scala b/src/net/bdew/gendustry/machines/liquifier/GuiLiquifier.scala
index e27ff83..a868bf0 100644
--- a/src/net/bdew/gendustry/machines/liquifier/GuiLiquifier.scala
+++ b/src/net/bdew/gendustry/machines/liquifier/GuiLiquifier.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.liquifier
@@ -24,7 +24,7 @@ class GuiLiquifier(val te: TileLiquifier, player: EntityPlayer) extends BaseScre
widgets.add(new WidgetProgressBarNEI(new Rect(79, 41, 53, 15), Textures.greenProgress(53), te.progress, "Liquifier"))
widgets.add(new WidgetPowerCustom(new Rect(8, 19, 16, 58), Textures.powerFill, te.power))
widgets.add(new WidgetFluidGauge(new Rect(152, 19, 16, 58), Textures.tankOverlay, te.tank))
- widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.liquifier.name"), 8, 6, Color.darkgray))
+ widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.liquifier.name"), 8, 6, Color.darkGray))
inventorySlots.getSlotFromInventory(te, te.slots.inMeat).setBackgroundIcon(HintIcons.meat)
}
diff --git a/src/net/bdew/gendustry/machines/liquifier/MachineLiquifier.scala b/src/net/bdew/gendustry/machines/liquifier/MachineLiquifier.scala
index c6b6933..c3427ed 100644
--- a/src/net/bdew/gendustry/machines/liquifier/MachineLiquifier.scala
+++ b/src/net/bdew/gendustry/machines/liquifier/MachineLiquifier.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.liquifier
diff --git a/src/net/bdew/gendustry/machines/liquifier/TileLiquifier.scala b/src/net/bdew/gendustry/machines/liquifier/TileLiquifier.scala
index 579fe9f..a48c02f 100644
--- a/src/net/bdew/gendustry/machines/liquifier/TileLiquifier.scala
+++ b/src/net/bdew/gendustry/machines/liquifier/TileLiquifier.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.liquifier
@@ -47,7 +47,7 @@ class TileLiquifier extends TileBaseProcessor with TileWorker with TilePowered w
}
def tryFinish(): Boolean = {
- if (tank.fill(output, false) == output.cval) {
+ if (tank.fill(output, false) == output.value) {
tank.fill(output, true)
output := -1
return true
@@ -73,7 +73,7 @@ class TileLiquifier extends TileBaseProcessor with TileWorker with TilePowered w
}
allowSided = true
- override def isItemValidForSlot(slot: Int, itemstack: ItemStack): Boolean = ProteinSources.getValue(itemstack) > 0
+ override def isItemValidForSlot(slot: Int, stack: ItemStack): Boolean = ProteinSources.getValue(stack) > 0
override def canExtractItem(slot: Int, item: ItemStack, side: Int): Boolean = false
override def fill(from: ForgeDirection, resource: FluidStack, doFill: Boolean) = 0
diff --git a/src/net/bdew/gendustry/machines/mproducer/BlockMutagenProducer.scala b/src/net/bdew/gendustry/machines/mproducer/BlockMutagenProducer.scala
index f7b1383..5e42aac 100644
--- a/src/net/bdew/gendustry/machines/mproducer/BlockMutagenProducer.scala
+++ b/src/net/bdew/gendustry/machines/mproducer/BlockMutagenProducer.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.mproducer
diff --git a/src/net/bdew/gendustry/machines/mproducer/ContainerMutagenProducer.scala b/src/net/bdew/gendustry/machines/mproducer/ContainerMutagenProducer.scala
index 2fd6f4d..5fd90ac 100644
--- a/src/net/bdew/gendustry/machines/mproducer/ContainerMutagenProducer.scala
+++ b/src/net/bdew/gendustry/machines/mproducer/ContainerMutagenProducer.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.mproducer
@@ -18,6 +18,4 @@ class ContainerMutagenProducer(val te: TileMutagenProducer, player: EntityPlayer
addSlotToContainer(new SlotValidating(te, 0, 44, 41))
bindPlayerInventory(player.inventory, 8, 84, 142)
-
- def canInteractWith(entityplayer: EntityPlayer): Boolean = te.isUseableByPlayer(entityplayer)
}
\ No newline at end of file
diff --git a/src/net/bdew/gendustry/machines/mproducer/GuiMutagenProducer.scala b/src/net/bdew/gendustry/machines/mproducer/GuiMutagenProducer.scala
index 2dea40e..f320542 100644
--- a/src/net/bdew/gendustry/machines/mproducer/GuiMutagenProducer.scala
+++ b/src/net/bdew/gendustry/machines/mproducer/GuiMutagenProducer.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.mproducer
@@ -24,6 +24,6 @@ class GuiMutagenProducer(val te: TileMutagenProducer, player: EntityPlayer) exte
widgets.add(new WidgetProgressBarNEI(new Rect(79, 41, 53, 15), Textures.greenProgress(53), te.progress, "MutagenProducer"))
widgets.add(new WidgetPowerCustom(new Rect(8, 19, 16, 58), Textures.powerFill, te.power))
widgets.add(new WidgetFluidGauge(new Rect(152, 19, 16, 58), Textures.tankOverlay, te.tank))
- widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.mutagen.producer.name"), 8, 6, Color.darkgray))
+ widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.mutagen.producer.name"), 8, 6, Color.darkGray))
}
}
\ No newline at end of file
diff --git a/src/net/bdew/gendustry/machines/mproducer/MachineMutagenProducer.scala b/src/net/bdew/gendustry/machines/mproducer/MachineMutagenProducer.scala
index a1a0fd1..861b976 100644
--- a/src/net/bdew/gendustry/machines/mproducer/MachineMutagenProducer.scala
+++ b/src/net/bdew/gendustry/machines/mproducer/MachineMutagenProducer.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.mproducer
diff --git a/src/net/bdew/gendustry/machines/mproducer/TileMutagenProducer.scala b/src/net/bdew/gendustry/machines/mproducer/TileMutagenProducer.scala
index 33a9033..2b8428b 100644
--- a/src/net/bdew/gendustry/machines/mproducer/TileMutagenProducer.scala
+++ b/src/net/bdew/gendustry/machines/mproducer/TileMutagenProducer.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.mproducer
@@ -43,7 +43,7 @@ class TileMutagenProducer extends TileBaseProcessor with TileWorker with TilePow
}
def tryFinish(): Boolean = {
- if (tank.fill(output, false) == output.cval) {
+ if (tank.fill(output, false) == output.value) {
tank.fill(output, true)
output := -1
return true
@@ -69,8 +69,8 @@ class TileMutagenProducer extends TileBaseProcessor with TileWorker with TilePow
}
allowSided = true
- override def isItemValidForSlot(slot: Int, itemstack: ItemStack): Boolean = MutagenSources.getValue(itemstack) > 0
- override def canExtractItem(slot: Int, item: ItemStack, side: Int): Boolean = false
+ override def isItemValidForSlot(slot: Int, stack: ItemStack): Boolean = MutagenSources.getValue(stack) > 0
+ override def canExtractItem(slot: Int, stack: ItemStack, side: Int): Boolean = false
override def fill(from: ForgeDirection, resource: FluidStack, doFill: Boolean) = 0
override def canFill(from: ForgeDirection, fluid: Fluid) = false
diff --git a/src/net/bdew/gendustry/machines/mutatron/BlockMutatron.scala b/src/net/bdew/gendustry/machines/mutatron/BlockMutatron.scala
index 4b0a44b..4db1ee3 100644
--- a/src/net/bdew/gendustry/machines/mutatron/BlockMutatron.scala
+++ b/src/net/bdew/gendustry/machines/mutatron/BlockMutatron.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.mutatron
diff --git a/src/net/bdew/gendustry/machines/mutatron/ContainerMutatron.scala b/src/net/bdew/gendustry/machines/mutatron/ContainerMutatron.scala
index eb8c442..91f69f6 100644
--- a/src/net/bdew/gendustry/machines/mutatron/ContainerMutatron.scala
+++ b/src/net/bdew/gendustry/machines/mutatron/ContainerMutatron.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.mutatron
@@ -25,12 +25,8 @@ class ContainerMutatron(val te: TileMutatron, player: EntityPlayer) extends Base
te.lastPlayer := player.getGameProfile
- override def slotClick(slotnum: Int, button: Int, modifiers: Int, player: EntityPlayer): ItemStack = {
+ override def slotClick(slotNum: Int, button: Int, modifiers: Int, player: EntityPlayer): ItemStack = {
te.lastPlayer := player.getGameProfile
- super.slotClick(slotnum, button, modifiers, player)
- }
-
- def canInteractWith(entityplayer: EntityPlayer): Boolean = {
- return te.isUseableByPlayer(entityplayer)
+ super.slotClick(slotNum, button, modifiers, player)
}
}
\ No newline at end of file
diff --git a/src/net/bdew/gendustry/machines/mutatron/GuiMutatron.scala b/src/net/bdew/gendustry/machines/mutatron/GuiMutatron.scala
index 7f1d98b..81b37aa 100644
--- a/src/net/bdew/gendustry/machines/mutatron/GuiMutatron.scala
+++ b/src/net/bdew/gendustry/machines/mutatron/GuiMutatron.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.mutatron
@@ -24,7 +24,7 @@ class GuiMutatron(val te: TileMutatron, player: EntityPlayer) extends BaseScreen
widgets.add(new WidgetProgressBarNEI(new Rect(89, 41, 40, 15), Textures.greenProgress(40), te.progress, "Mutatron"))
widgets.add(new WidgetPowerCustom(new Rect(8, 19, 16, 58), Textures.powerFill, te.power))
widgets.add(new WidgetFluidGauge(new Rect(32, 19, 16, 58), Textures.tankOverlay, te.tank))
- widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.mutatron.name"), 8, 6, Color.darkgray))
+ widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.mutatron.name"), 8, 6, Color.darkGray))
inventorySlots.getSlotFromInventory(te, te.slots.inIndividual1).setBackgroundIcon(HintIcons.queenOrSapling)
inventorySlots.getSlotFromInventory(te, te.slots.inIndividual2).setBackgroundIcon(HintIcons.droneOrPollen)
diff --git a/src/net/bdew/gendustry/machines/mutatron/MachineMutatron.scala b/src/net/bdew/gendustry/machines/mutatron/MachineMutatron.scala
index d58998d..7eaf6d1 100644
--- a/src/net/bdew/gendustry/machines/mutatron/MachineMutatron.scala
+++ b/src/net/bdew/gendustry/machines/mutatron/MachineMutatron.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.mutatron
diff --git a/src/net/bdew/gendustry/machines/mutatron/TileMutatron.scala b/src/net/bdew/gendustry/machines/mutatron/TileMutatron.scala
index b53f04b..da74ee1 100644
--- a/src/net/bdew/gendustry/machines/mutatron/TileMutatron.scala
+++ b/src/net/bdew/gendustry/machines/mutatron/TileMutatron.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.mutatron
@@ -50,7 +50,7 @@ class TileMutatron extends TileItemProcessor with TileWorker with TilePowered wi
if (canStart) {
output := GeneticsHelper.getMutationResult(getStackInSlot(slots.inIndividual1), getStackInSlot(slots.inIndividual2))
tank.drain(cfg.mutagenPerItem, true)
- if (lastPlayer.cval != null)
+ if (lastPlayer.value != null)
GeneticsHelper.addMutationToTracker(inv(slots.inIndividual1), inv(slots.inIndividual2), output, lastPlayer, worldObj)
decrStackSize(slots.inIndividual1, 1)
decrStackSize(slots.inIndividual2, 1)
@@ -60,14 +60,14 @@ class TileMutatron extends TileItemProcessor with TileWorker with TilePowered wi
} else return false
}
- override def isItemValidForSlot(slot: Int, itemstack: ItemStack): Boolean = {
+ override def isItemValidForSlot(slot: Int, stack: ItemStack): Boolean = {
slot match {
case slots.inIndividual1 =>
- return GeneticsHelper.isPotentialMutationPair(itemstack, getStackInSlot(slots.inIndividual2))
+ return GeneticsHelper.isPotentialMutationPair(stack, getStackInSlot(slots.inIndividual2))
case slots.inIndividual2 =>
- return GeneticsHelper.isPotentialMutationPair(getStackInSlot(slots.inIndividual1), itemstack)
+ return GeneticsHelper.isPotentialMutationPair(getStackInSlot(slots.inIndividual1), stack)
case slots.inLabware =>
- return itemstack.getItem == Items.labware
+ return stack.getItem == Items.labware
case _ =>
return false
}
diff --git a/src/net/bdew/gendustry/machines/replicator/BlockReplicator.scala b/src/net/bdew/gendustry/machines/replicator/BlockReplicator.scala
index 3fc8de2..04a1480 100644
--- a/src/net/bdew/gendustry/machines/replicator/BlockReplicator.scala
+++ b/src/net/bdew/gendustry/machines/replicator/BlockReplicator.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.replicator
diff --git a/src/net/bdew/gendustry/machines/replicator/ContainerReplicator.scala b/src/net/bdew/gendustry/machines/replicator/ContainerReplicator.scala
index 8eefabc..b68f401 100644
--- a/src/net/bdew/gendustry/machines/replicator/ContainerReplicator.scala
+++ b/src/net/bdew/gendustry/machines/replicator/ContainerReplicator.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.replicator
@@ -19,8 +19,4 @@ class ContainerReplicator(val te: TileReplicator, player: EntityPlayer) extends
addSlotToContainer(new SlotValidating(te, te.slots.inTemplate, 98, 17))
addSlotToContainer(new SlotValidating(te, te.slots.outIndividual, 142, 41))
bindPlayerInventory(player.inventory, 8, 84, 142)
-
- def canInteractWith(entityplayer: EntityPlayer): Boolean = {
- return te.isUseableByPlayer(entityplayer)
- }
}
\ No newline at end of file
diff --git a/src/net/bdew/gendustry/machines/replicator/GuiReplicator.scala b/src/net/bdew/gendustry/machines/replicator/GuiReplicator.scala
index d659349..35ec24d 100644
--- a/src/net/bdew/gendustry/machines/replicator/GuiReplicator.scala
+++ b/src/net/bdew/gendustry/machines/replicator/GuiReplicator.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.replicator
@@ -25,7 +25,7 @@ class GuiReplicator(val te: TileReplicator, player: EntityPlayer) extends BaseSc
widgets.add(new WidgetPowerCustom(new Rect(8, 19, 16, 58), Textures.powerFill, te.power))
widgets.add(new WidgetFluidGauge(new Rect(32, 19, 16, 58), Textures.tankOverlay, te.dnaTank))
widgets.add(new WidgetFluidGauge(new Rect(56, 19, 16, 58), Textures.tankOverlay, te.proteinTank))
- widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.replicator.name"), 8, 6, Color.darkgray))
+ widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.replicator.name"), 8, 6, Color.darkGray))
inventorySlots.getSlotFromInventory(te, te.slots.inTemplate).setBackgroundIcon(HintIcons.template)
}
diff --git a/src/net/bdew/gendustry/machines/replicator/MachineReplicator.scala b/src/net/bdew/gendustry/machines/replicator/MachineReplicator.scala
index 3ad8042..fd046f6 100644
--- a/src/net/bdew/gendustry/machines/replicator/MachineReplicator.scala
+++ b/src/net/bdew/gendustry/machines/replicator/MachineReplicator.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.replicator
diff --git a/src/net/bdew/gendustry/machines/replicator/TileReplicator.scala b/src/net/bdew/gendustry/machines/replicator/TileReplicator.scala
index f443fc7..0437e5c 100644
--- a/src/net/bdew/gendustry/machines/replicator/TileReplicator.scala
+++ b/src/net/bdew/gendustry/machines/replicator/TileReplicator.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.replicator
@@ -50,8 +50,8 @@ class TileReplicator extends TileItemProcessor with TileWorker with TilePowered
} else return false
}
- override def isItemValidForSlot(slot: Int, itemstack: ItemStack) =
- slot == slots.inTemplate && itemstack.getItem == GeneTemplate && GeneTemplate.isComplete(itemstack)
+ override def isItemValidForSlot(slot: Int, stack: ItemStack) =
+ slot == slots.inTemplate && stack.getItem == GeneTemplate && GeneTemplate.isComplete(stack)
allowSided = true
override def canExtractItem(slot: Int, item: ItemStack, side: Int) = slot == slots.outIndividual
diff --git a/src/net/bdew/gendustry/machines/sampler/BlockSampler.scala b/src/net/bdew/gendustry/machines/sampler/BlockSampler.scala
index 1ddd734..db1bdba 100644
--- a/src/net/bdew/gendustry/machines/sampler/BlockSampler.scala
+++ b/src/net/bdew/gendustry/machines/sampler/BlockSampler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.sampler
diff --git a/src/net/bdew/gendustry/machines/sampler/ContainerSampler.scala b/src/net/bdew/gendustry/machines/sampler/ContainerSampler.scala
index 3083486..5a52d81 100644
--- a/src/net/bdew/gendustry/machines/sampler/ContainerSampler.scala
+++ b/src/net/bdew/gendustry/machines/sampler/ContainerSampler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.sampler
@@ -21,8 +21,4 @@ class ContainerSampler(val te: TileSampler, player: EntityPlayer) extends BaseCo
addSlotToContainer(new SlotValidating(te, 2, 41, 49))
addSlotToContainer(new SlotValidating(te, 3, 137, 49))
bindPlayerInventory(player.inventory, 8, 84, 142)
-
- def canInteractWith(entityplayer: EntityPlayer): Boolean = {
- return te.isUseableByPlayer(entityplayer)
- }
}
\ No newline at end of file
diff --git a/src/net/bdew/gendustry/machines/sampler/GuiSampler.scala b/src/net/bdew/gendustry/machines/sampler/GuiSampler.scala
index f474f1a..d2e8378 100644
--- a/src/net/bdew/gendustry/machines/sampler/GuiSampler.scala
+++ b/src/net/bdew/gendustry/machines/sampler/GuiSampler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.sampler
@@ -23,7 +23,7 @@ class GuiSampler(val te: TileSampler, player: EntityPlayer) extends BaseScreen(n
super.initGui()
widgets.add(new WidgetProgressBarNEI(new Rect(63, 49, 66, 15), Textures.whiteProgress(66), te.progress, "Sampler"))
widgets.add(new WidgetPowerCustom(new Rect(8, 19, 16, 58), Textures.powerFill, te.power))
- widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.sampler.name"), 8, 6, Color.darkgray))
+ widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.sampler.name"), 8, 6, Color.darkGray))
inventorySlots.getSlotFromInventory(te, te.slots.inSampleBlank).setBackgroundIcon(HintIcons.blankSample)
inventorySlots.getSlotFromInventory(te, te.slots.inLabware).setBackgroundIcon(HintIcons.labware)
diff --git a/src/net/bdew/gendustry/machines/sampler/MachineSampler.scala b/src/net/bdew/gendustry/machines/sampler/MachineSampler.scala
index b59a487..6278b6d 100644
--- a/src/net/bdew/gendustry/machines/sampler/MachineSampler.scala
+++ b/src/net/bdew/gendustry/machines/sampler/MachineSampler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.sampler
diff --git a/src/net/bdew/gendustry/machines/sampler/TileSampler.scala b/src/net/bdew/gendustry/machines/sampler/TileSampler.scala
index bd4fc27..590a275 100644
--- a/src/net/bdew/gendustry/machines/sampler/TileSampler.scala
+++ b/src/net/bdew/gendustry/machines/sampler/TileSampler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.sampler
@@ -67,15 +67,15 @@ class TileSampler extends TileItemProcessor with TileWorker with TilePowered wit
} else return false
}
- override def isItemValidForSlot(slot: Int, itemstack: ItemStack): Boolean = {
- if (itemstack == null || itemstack.getItem == null) return false
+ override def isItemValidForSlot(slot: Int, stack: ItemStack): Boolean = {
+ if (stack == null || stack.getItem == null) return false
slot match {
case slots.inSampleBlank =>
- return itemstack.getItem == Items.geneSampleBlank
+ return stack.getItem == Items.geneSampleBlank
case slots.inLabware =>
- return itemstack.getItem == Items.labware
+ return stack.getItem == Items.labware
case slots.inIndividual =>
- return AlleleManager.alleleRegistry.getIndividual(itemstack) != null
+ return AlleleManager.alleleRegistry.getIndividual(stack) != null
case _ =>
return false
}
diff --git a/src/net/bdew/gendustry/machines/transposer/BlockTransposer.scala b/src/net/bdew/gendustry/machines/transposer/BlockTransposer.scala
index 5030f96..145734c 100644
--- a/src/net/bdew/gendustry/machines/transposer/BlockTransposer.scala
+++ b/src/net/bdew/gendustry/machines/transposer/BlockTransposer.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.transposer
diff --git a/src/net/bdew/gendustry/machines/transposer/ContainerTransposer.scala b/src/net/bdew/gendustry/machines/transposer/ContainerTransposer.scala
index e078564..ae5a5ad 100644
--- a/src/net/bdew/gendustry/machines/transposer/ContainerTransposer.scala
+++ b/src/net/bdew/gendustry/machines/transposer/ContainerTransposer.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.transposer
@@ -21,8 +21,4 @@ class ContainerTransposer(val te: TileTransposer, player: EntityPlayer) extends
addSlotToContainer(new SlotValidating(te, te.slots.inBlank, 41, 49))
addSlotToContainer(new SlotValidating(te, te.slots.outCopy, 137, 49))
bindPlayerInventory(player.inventory, 8, 84, 142)
-
- def canInteractWith(entityplayer: EntityPlayer): Boolean = {
- return te.isUseableByPlayer(entityplayer)
- }
}
\ No newline at end of file
diff --git a/src/net/bdew/gendustry/machines/transposer/GuiTransposer.scala b/src/net/bdew/gendustry/machines/transposer/GuiTransposer.scala
index 79fd76c..0545fd2 100644
--- a/src/net/bdew/gendustry/machines/transposer/GuiTransposer.scala
+++ b/src/net/bdew/gendustry/machines/transposer/GuiTransposer.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.transposer
@@ -23,7 +23,7 @@ class GuiTransposer(val te: TileTransposer, player: EntityPlayer) extends BaseSc
super.initGui()
widgets.add(new WidgetProgressBarNEI(new Rect(63, 49, 66, 15), Textures.whiteProgress(66), te.progress, "Transposer"))
widgets.add(new WidgetPowerCustom(new Rect(8, 19, 16, 58), Textures.powerFill, te.power))
- widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.transposer.name"), 8, 6, Color.darkgray))
+ widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.transposer.name"), 8, 6, Color.darkGray))
inventorySlots.getSlotFromInventory(te, te.slots.inBlank).setBackgroundIcon(HintIcons.sampleOrTemplateBlank)
inventorySlots.getSlotFromInventory(te, te.slots.inLabware).setBackgroundIcon(HintIcons.labware)
diff --git a/src/net/bdew/gendustry/machines/transposer/MachineTransposer.scala b/src/net/bdew/gendustry/machines/transposer/MachineTransposer.scala
index 74cad42..7781307 100644
--- a/src/net/bdew/gendustry/machines/transposer/MachineTransposer.scala
+++ b/src/net/bdew/gendustry/machines/transposer/MachineTransposer.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.transposer
diff --git a/src/net/bdew/gendustry/machines/transposer/TileTransposer.scala b/src/net/bdew/gendustry/machines/transposer/TileTransposer.scala
index f3dbc73..404b9a1 100644
--- a/src/net/bdew/gendustry/machines/transposer/TileTransposer.scala
+++ b/src/net/bdew/gendustry/machines/transposer/TileTransposer.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.machines.transposer
@@ -69,12 +69,12 @@ class TileTransposer extends TileItemProcessor with TileWorker with TilePowered
case _ => false
}
- override def isItemValidForSlot(slot: Int, itemstack: ItemStack): Boolean = {
- if (itemstack == null || itemstack.getItem == null) return false
+ override def isItemValidForSlot(slot: Int, stack: ItemStack): Boolean = {
+ if (stack == null || stack.getItem == null) return false
slot match {
- case slots.inLabware => itemstack.getItem == Items.labware
- case slots.inBlank => isValidInputs(itemstack, getStackInSlot(slots.inTemplate))
- case slots.inTemplate => isValidInputs(getStackInSlot(slots.inBlank), itemstack)
+ case slots.inLabware => stack.getItem == Items.labware
+ case slots.inBlank => isValidInputs(stack, getStackInSlot(slots.inTemplate))
+ case slots.inTemplate => isValidInputs(getStackInSlot(slots.inBlank), stack)
case _ => return false
}
}
diff --git a/src/net/bdew/gendustry/misc/CommandDumpAlleles.scala b/src/net/bdew/gendustry/misc/CommandDumpAlleles.scala
index 97869e7..22d4834 100644
--- a/src/net/bdew/gendustry/misc/CommandDumpAlleles.scala
+++ b/src/net/bdew/gendustry/misc/CommandDumpAlleles.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.misc
@@ -19,7 +19,7 @@ import net.minecraft.command.{CommandBase, ICommandSender}
class CommandDumpAlleles extends CommandBase {
def getCommandName = "dumpalleles"
override def getRequiredPermissionLevel = 2
- def getCommandUsage(icommandsender: ICommandSender) = "dumpalleles"
+ def getCommandUsage(c: ICommandSender) = "dumpalleles"
def processCommand(sender: ICommandSender, params: Array[String]) {
val mcHome = FMLInjectionData.data()(6).asInstanceOf[File] //is there a better way to get this?
diff --git a/src/net/bdew/gendustry/misc/CommandGiveSample.scala b/src/net/bdew/gendustry/misc/CommandGiveSample.scala
index 9eabe75..74ba69c 100644
--- a/src/net/bdew/gendustry/misc/CommandGiveSample.scala
+++ b/src/net/bdew/gendustry/misc/CommandGiveSample.scala
@@ -4,11 +4,12 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.misc
+import java.util
import java.util.List
import _root_.forestry.api.genetics.{AlleleManager, IAllele, ISpeciesRoot}
@@ -19,7 +20,7 @@ import net.minecraft.command.{CommandBase, CommandException, ICommandSender, Wro
class CommandGiveSample extends CommandBase {
def getCommandName = "givesample"
override def getRequiredPermissionLevel = 2
- def getCommandUsage(icommandsender: ICommandSender) = "gendustry.givesample.usage"
+ def getCommandUsage(c: ICommandSender) = "gendustry.givesample.usage"
import scala.collection.JavaConversions._
@@ -53,13 +54,13 @@ class CommandGiveSample extends CommandBase {
if (!isValidAllele(root, chromosome, allele)) throw new CommandException("gendustry.givesample.error.invalid")
val sample = GeneSample.newStack(GeneSampleInfo(root, chromosome, allele))
- val entityitem = player.entityDropItem(sample, 0)
- entityitem.delayBeforeCanPickup = 0
+ val entity = player.entityDropItem(sample, 0)
+ entity.delayBeforeCanPickup = 0
CommandBase.func_152373_a(sender, this, "gendustry.givesample.success", rootUid, chromosomeName, alleleUid, player.getDisplayName)
}
- override def addTabCompletionOptions(sender: ICommandSender, params: Array[String]): List[_] = {
+ override def addTabCompletionOptions(sender: ICommandSender, params: Array[String]): util.List[_] = {
params.toSeq match {
case Seq(rootUid) => CommandBase.getListOfStringsMatchingLastWord(params, validRoots: _*)
case Seq(rootUid, chromosomeName) =>
diff --git a/src/net/bdew/gendustry/misc/CommandGiveTemplate.scala b/src/net/bdew/gendustry/misc/CommandGiveTemplate.scala
index fb1a76c..04ca1a0 100644
--- a/src/net/bdew/gendustry/misc/CommandGiveTemplate.scala
+++ b/src/net/bdew/gendustry/misc/CommandGiveTemplate.scala
@@ -4,11 +4,12 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.misc
+import java.util
import java.util.List
import _root_.forestry.api.genetics.{AlleleManager, IAlleleSpecies}
@@ -18,7 +19,7 @@ import net.minecraft.command.{CommandBase, ICommandSender, WrongUsageException}
class CommandGiveTemplate extends CommandBase {
def getCommandName = "givetemplate"
override def getRequiredPermissionLevel = 2
- def getCommandUsage(icommandsender: ICommandSender) = "gendustry.givetemplate.usage"
+ def getCommandUsage(c: ICommandSender) = "gendustry.givetemplate.usage"
import scala.collection.JavaConversions._
@@ -38,13 +39,13 @@ class CommandGiveTemplate extends CommandBase {
if (!validSpecies.contains(uid))
throw new WrongUsageException("gendustry.givetemplate.usage")
- val entityitem = player.entityDropItem(GeneticsHelper.templateFromSpeciesUID(uid), 0)
- entityitem.delayBeforeCanPickup = 0
+ val entity = player.entityDropItem(GeneticsHelper.templateFromSpeciesUID(uid), 0)
+ entity.delayBeforeCanPickup = 0
CommandBase.func_152373_a(sender, this, "gendustry.givetemplate.success", uid, player.getDisplayName)
}
- override def addTabCompletionOptions(sender: ICommandSender, params: Array[String]): List[_] = {
+ override def addTabCompletionOptions(sender: ICommandSender, params: Array[String]): util.List[_] = {
if (params.length == 1)
return CommandBase.getListOfStringsMatchingLastWord(params, validSpecies: _*)
return null
diff --git a/src/net/bdew/gendustry/misc/GendustryCreativeTabs.scala b/src/net/bdew/gendustry/misc/GendustryCreativeTabs.scala
index 983ad9c..6259998 100644
--- a/src/net/bdew/gendustry/misc/GendustryCreativeTabs.scala
+++ b/src/net/bdew/gendustry/misc/GendustryCreativeTabs.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.misc
diff --git a/src/net/bdew/gendustry/misc/GeneticsCache.scala b/src/net/bdew/gendustry/misc/GeneticsCache.scala
index 6a9d661..5984060 100644
--- a/src/net/bdew/gendustry/misc/GeneticsCache.scala
+++ b/src/net/bdew/gendustry/misc/GeneticsCache.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.misc
diff --git a/src/net/bdew/gendustry/misc/ResourceListener.scala b/src/net/bdew/gendustry/misc/ResourceListener.scala
index 677b852..c88c87d 100644
--- a/src/net/bdew/gendustry/misc/ResourceListener.scala
+++ b/src/net/bdew/gendustry/misc/ResourceListener.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.misc
@@ -24,9 +24,9 @@ object ResourceListener extends IResourceManagerReloadListener {
}
def loadLangFile(fileName: String) {
- val langfile = new File(Gendustry.configDir, fileName)
- Gendustry.logInfo("Loading language file %s", langfile.getCanonicalPath)
- val stream = new FileInputStream(langfile)
+ val langFile = new File(Gendustry.configDir, fileName)
+ Gendustry.logInfo("Loading language file %s", langFile.getCanonicalPath)
+ val stream = new FileInputStream(langFile)
try {
StringTranslate.inject(stream)
} finally {
@@ -34,7 +34,7 @@ object ResourceListener extends IResourceManagerReloadListener {
}
}
- override def onResourceManagerReload(resourcemanager: IResourceManager) {
+ override def onResourceManagerReload(rm: IResourceManager) {
val newLang = FMLClientHandler.instance().getCurrentLanguage
Gendustry.logInfo("Resource manager reload, new language: %s", newLang)
val configFiles = Gendustry.configDir.list().sorted
diff --git a/src/net/bdew/gendustry/nei/BaseRecipeHandler.scala b/src/net/bdew/gendustry/nei/BaseRecipeHandler.scala
index 23cfc14..4faf6ff 100644
--- a/src/net/bdew/gendustry/nei/BaseRecipeHandler.scala
+++ b/src/net/bdew/gendustry/nei/BaseRecipeHandler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei
@@ -40,18 +40,18 @@ abstract class BaseRecipeHandler(val offX: Int, val offY: Int) extends TemplateR
}
override def mouseClicked(gui: GuiRecipe, button: Int, recipe: Int): Boolean = {
- val mrel = getMousePosition - gui.getRecipePosition(recipe) +(offX, offY) -(gui.guiLeft, gui.guiTop)
+ val relative = getMousePosition - gui.getRecipePosition(recipe) +(offX, offY) -(gui.guiLeft, gui.guiTop)
for (component <- arecipes.get(recipe).asInstanceOf[CachedRecipeWithComponents].components)
- if (component.rect.contains(mrel) && component.mouseClick(button)) return true
+ if (component.rect.contains(relative) && component.mouseClick(button)) return true
super.mouseClicked(gui, button, recipe)
}
- override def handleTooltip(gui: GuiRecipe, currenttip: util.List[String], recipe: Int) = {
+ override def handleTooltip(gui: GuiRecipe, tip: util.List[String], recipe: Int) = {
import scala.collection.JavaConversions._
- val mrel = getMousePosition - gui.getRecipePosition(recipe) +(offX, offY) -(gui.guiLeft, gui.guiTop)
+ val relative = getMousePosition - gui.getRecipePosition(recipe) +(offX, offY) -(gui.guiLeft, gui.guiTop)
for (component <- arecipes.get(recipe).asInstanceOf[CachedRecipeWithComponents].components)
- if (component.rect.contains(mrel)) currenttip.addAll(component.getTooltip)
- super.handleTooltip(gui, currenttip, recipe)
+ if (component.rect.contains(relative)) tip.addAll(component.getTooltip)
+ super.handleTooltip(gui, tip, recipe)
}
override def drawBackground(recipe: Int) {
diff --git a/src/net/bdew/gendustry/nei/ExtractorHandler.scala b/src/net/bdew/gendustry/nei/ExtractorHandler.scala
index fb9325e..9b7ce8a 100644
--- a/src/net/bdew/gendustry/nei/ExtractorHandler.scala
+++ b/src/net/bdew/gendustry/nei/ExtractorHandler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei
@@ -53,25 +53,25 @@ class ExtractorHandler extends BaseRecipeHandler(5, 13) {
def getRecipeIndividuals(sp: IAlleleSpecies) = {
val root = sp.getRoot
- val indiv = root.templateAsIndividual(root.getTemplate(sp.getUID))
- indiv.analyze()
+ val individual = root.templateAsIndividual(root.getTemplate(sp.getUID))
+ individual.analyze()
root match {
case bees: IBeeRoot =>
List(
- bees.getMemberStack(indiv, EnumBeeType.PRINCESS.ordinal()),
- bees.getMemberStack(indiv, EnumBeeType.QUEEN.ordinal()),
- bees.getMemberStack(indiv, EnumBeeType.DRONE.ordinal())
+ bees.getMemberStack(individual, EnumBeeType.PRINCESS.ordinal()),
+ bees.getMemberStack(individual, EnumBeeType.QUEEN.ordinal()),
+ bees.getMemberStack(individual, EnumBeeType.DRONE.ordinal())
)
case trees: ITreeRoot =>
List(
- trees.getMemberStack(indiv, EnumGermlingType.POLLEN.ordinal()),
- trees.getMemberStack(indiv, EnumGermlingType.SAPLING.ordinal())
+ trees.getMemberStack(individual, EnumGermlingType.POLLEN.ordinal()),
+ trees.getMemberStack(individual, EnumGermlingType.SAPLING.ordinal())
)
case butterflies: IButterflyRoot =>
List(
- butterflies.getMemberStack(indiv, EnumFlutterType.BUTTERFLY.ordinal()),
- butterflies.getMemberStack(indiv, EnumFlutterType.SERUM.ordinal()),
- butterflies.getMemberStack(indiv, EnumFlutterType.CATERPILLAR.ordinal())
+ butterflies.getMemberStack(individual, EnumFlutterType.BUTTERFLY.ordinal()),
+ butterflies.getMemberStack(individual, EnumFlutterType.SERUM.ordinal()),
+ butterflies.getMemberStack(individual, EnumFlutterType.CATERPILLAR.ordinal())
)
}
}
@@ -97,10 +97,10 @@ class ExtractorHandler extends BaseRecipeHandler(5, 13) {
}
}
- override def handleItemTooltip(gui: GuiRecipe, stack: ItemStack, currenttip: util.List[String], recipe: Int): util.List[String] = {
+ override def handleItemTooltip(gui: GuiRecipe, stack: ItemStack, tip: util.List[String], recipe: Int): util.List[String] = {
if (stack == getRecipe(recipe).labware.item)
- currenttip.add(Misc.toLocalF("gendustry.label.consume", MachineExtractor.labwareConsumeChance.toInt))
- super.handleItemTooltip(gui, stack, currenttip, recipe)
+ tip.add(Misc.toLocalF("gendustry.label.consume", MachineExtractor.labwareConsumeChance.toInt))
+ super.handleItemTooltip(gui, stack, tip, recipe)
}
def getGuiTexture = Gendustry.modId + ":textures/gui/extractor.png"
diff --git a/src/net/bdew/gendustry/nei/ImprinterHandler.scala b/src/net/bdew/gendustry/nei/ImprinterHandler.scala
index e3d2af0..909a1e5 100644
--- a/src/net/bdew/gendustry/nei/ImprinterHandler.scala
+++ b/src/net/bdew/gendustry/nei/ImprinterHandler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei
@@ -58,13 +58,13 @@ class ImprinterHandler extends BaseRecipeHandler(5, 13) {
tpl(sample.chromosome) = sample.allele
}
- val indiv = root.templateAsIndividual(tpl)
- indiv.analyze()
+ val individual = root.templateAsIndividual(tpl)
+ individual.analyze()
root match {
- case bees: IBeeRoot => bees.getMemberStack(indiv, EnumBeeType.PRINCESS.ordinal())
- case trees: ITreeRoot => trees.getMemberStack(indiv, EnumGermlingType.SAPLING.ordinal())
- case flies: IButterflyRoot => flies.getMemberStack(indiv, 0)
+ case bees: IBeeRoot => bees.getMemberStack(individual, EnumBeeType.PRINCESS.ordinal())
+ case trees: ITreeRoot => trees.getMemberStack(individual, EnumGermlingType.SAPLING.ordinal())
+ case flies: IButterflyRoot => flies.getMemberStack(individual, 0)
}
}
@@ -100,10 +100,10 @@ class ImprinterHandler extends BaseRecipeHandler(5, 13) {
}
}
- override def handleItemTooltip(gui: GuiRecipe, stack: ItemStack, currenttip: util.List[String], recipe: Int): util.List[String] = {
+ override def handleItemTooltip(gui: GuiRecipe, stack: ItemStack, tip: util.List[String], recipe: Int): util.List[String] = {
if (stack == getRecipe(recipe).labware.item)
- currenttip += Misc.toLocalF("gendustry.label.consume", MachineImprinter.labwareConsumeChance.toInt)
- super.handleItemTooltip(gui, stack, currenttip, recipe)
+ tip += Misc.toLocalF("gendustry.label.consume", MachineImprinter.labwareConsumeChance.toInt)
+ super.handleItemTooltip(gui, stack, tip, recipe)
}
def getGuiTexture = Gendustry.modId + ":textures/gui/imprinter.png"
diff --git a/src/net/bdew/gendustry/nei/LiquifierHandler.scala b/src/net/bdew/gendustry/nei/LiquifierHandler.scala
index 9915ae2..0b1c054 100644
--- a/src/net/bdew/gendustry/nei/LiquifierHandler.scala
+++ b/src/net/bdew/gendustry/nei/LiquifierHandler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei
diff --git a/src/net/bdew/gendustry/nei/MutagenProducerHandler.scala b/src/net/bdew/gendustry/nei/MutagenProducerHandler.scala
index 9a19358..bcb9162 100644
--- a/src/net/bdew/gendustry/nei/MutagenProducerHandler.scala
+++ b/src/net/bdew/gendustry/nei/MutagenProducerHandler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei
diff --git a/src/net/bdew/gendustry/nei/MutatronHandler.scala b/src/net/bdew/gendustry/nei/MutatronHandler.scala
index 9c1eaba..89143b1 100644
--- a/src/net/bdew/gendustry/nei/MutatronHandler.scala
+++ b/src/net/bdew/gendustry/nei/MutatronHandler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei
@@ -102,14 +102,14 @@ class MutatronHandler extends BaseRecipeHandler(5, 13) {
}
}
- override def handleItemTooltip(gui: GuiRecipe, stack: ItemStack, currenttip: util.List[String], recipe: Int): util.List[String] = {
+ override def handleItemTooltip(gui: GuiRecipe, stack: ItemStack, tip: util.List[String], recipe: Int): util.List[String] = {
if (stack == getRecipe(recipe).labware.item)
- currenttip += Misc.toLocalF("gendustry.label.consume", MachineMutatron.labwareConsumeChance.toInt)
+ tip += Misc.toLocalF("gendustry.label.consume", MachineMutatron.labwareConsumeChance.toInt)
if (stack == getRecipe(recipe).getResult.item) {
- currenttip += Misc.toLocalF("gendustry.label.mutatron.degrade", MachineMutatron.degradeChanceNatural.toInt)
- currenttip += Misc.toLocalF("gendustry.label.mutatron.death", MachineMutatron.deathChanceArtificial.toInt)
+ tip += Misc.toLocalF("gendustry.label.mutatron.degrade", MachineMutatron.degradeChanceNatural.toInt)
+ tip += Misc.toLocalF("gendustry.label.mutatron.death", MachineMutatron.deathChanceArtificial.toInt)
}
- super.handleItemTooltip(gui, stack, currenttip, recipe)
+ super.handleItemTooltip(gui, stack, tip, recipe)
}
def getGuiTexture = Gendustry.modId + ":textures/gui/mutatron.png"
diff --git a/src/net/bdew/gendustry/nei/NEIDrawTarget.scala b/src/net/bdew/gendustry/nei/NEIDrawTarget.scala
index f5d55ce..1ed224c 100644
--- a/src/net/bdew/gendustry/nei/NEIDrawTarget.scala
+++ b/src/net/bdew/gendustry/nei/NEIDrawTarget.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei
diff --git a/src/net/bdew/gendustry/nei/NEIGendustryConfig.scala b/src/net/bdew/gendustry/nei/NEIGendustryConfig.scala
index 4f75d85..8639cca 100644
--- a/src/net/bdew/gendustry/nei/NEIGendustryConfig.scala
+++ b/src/net/bdew/gendustry/nei/NEIGendustryConfig.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei
diff --git a/src/net/bdew/gendustry/nei/NEIRecipeProxy.scala b/src/net/bdew/gendustry/nei/NEIRecipeProxy.scala
index d85277e..2d0e3b1 100644
--- a/src/net/bdew/gendustry/nei/NEIRecipeProxy.scala
+++ b/src/net/bdew/gendustry/nei/NEIRecipeProxy.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei
diff --git a/src/net/bdew/gendustry/nei/ReplicatorHandler.scala b/src/net/bdew/gendustry/nei/ReplicatorHandler.scala
index f7c6f4b..bb9b367 100644
--- a/src/net/bdew/gendustry/nei/ReplicatorHandler.scala
+++ b/src/net/bdew/gendustry/nei/ReplicatorHandler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei
diff --git a/src/net/bdew/gendustry/nei/SamplerHandler.scala b/src/net/bdew/gendustry/nei/SamplerHandler.scala
index 5ac031c..eadffc7 100644
--- a/src/net/bdew/gendustry/nei/SamplerHandler.scala
+++ b/src/net/bdew/gendustry/nei/SamplerHandler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei
@@ -105,10 +105,10 @@ import scala.collection.JavaConversions._
}
}
- override def handleItemTooltip(gui: GuiRecipe, stack: ItemStack, currenttip: util.List[String], recipe: Int): util.List[String] = {
+ override def handleItemTooltip(gui: GuiRecipe, stack: ItemStack, tip: util.List[String], recipe: Int): util.List[String] = {
if (stack == getRecipe(recipe).labware.item)
- currenttip += Misc.toLocalF("gendustry.label.consume", MachineSampler.labwareConsumeChance.toInt)
- super.handleItemTooltip(gui, stack, currenttip, recipe)
+ tip += Misc.toLocalF("gendustry.label.consume", MachineSampler.labwareConsumeChance.toInt)
+ super.handleItemTooltip(gui, stack, tip, recipe)
}
def getGuiTexture = Gendustry.modId + ":textures/gui/sampler.png"
diff --git a/src/net/bdew/gendustry/nei/SmeltingTooltipHandler.scala b/src/net/bdew/gendustry/nei/SmeltingTooltipHandler.scala
index 58463ae..832a14d 100644
--- a/src/net/bdew/gendustry/nei/SmeltingTooltipHandler.scala
+++ b/src/net/bdew/gendustry/nei/SmeltingTooltipHandler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei
@@ -19,19 +19,19 @@ import net.minecraft.client.gui.inventory.GuiContainer
import net.minecraft.item.ItemStack
class SmeltingTooltipHandler extends IContainerTooltipHandler {
- override def handleItemDisplayName(gui: GuiContainer, itemstack: ItemStack, currenttip: util.List[String]) = currenttip
- override def handleTooltip(gui: GuiContainer, mousex: Int, mousey: Int, currenttip: util.List[String]) = currenttip
- override def handleItemTooltip(gui: GuiContainer, itemstack: ItemStack, mousex: Int, mousey: Int, currenttip: util.List[String]) = {
- if (gui.isInstanceOf[GuiRecipe] && itemstack != null) {
+ override def handleItemDisplayName(gui: GuiContainer, stack: ItemStack, tip: util.List[String]) = tip
+ override def handleTooltip(gui: GuiContainer, mouseX: Int, mouseY: Int, tip: util.List[String]) = tip
+ override def handleItemTooltip(gui: GuiContainer, itemStack: ItemStack, mouseX: Int, mouseY: Int, tip: util.List[String]) = {
+ if (gui.isInstanceOf[GuiRecipe] && itemStack != null) {
val gr = gui.asInstanceOf[GuiRecipe]
val handler = gr.currenthandlers.get(gr.recipetype)
if (handler.isInstanceOf[FurnaceRecipeHandler]) {
- if (itemstack.getItem == GeneSample)
- currenttip.add(Misc.toLocal("gendustry.label.erase"))
- if (itemstack.getItem == GeneTemplate)
- currenttip.add(Misc.toLocal("gendustry.label.erase"))
+ if (itemStack.getItem == GeneSample)
+ tip.add(Misc.toLocal("gendustry.label.erase"))
+ if (itemStack.getItem == GeneTemplate)
+ tip.add(Misc.toLocal("gendustry.label.erase"))
}
}
- currenttip
+ tip
}
}
diff --git a/src/net/bdew/gendustry/nei/TemplateCraftingHandler.scala b/src/net/bdew/gendustry/nei/TemplateCraftingHandler.scala
index 01a2772..cf0189f 100644
--- a/src/net/bdew/gendustry/nei/TemplateCraftingHandler.scala
+++ b/src/net/bdew/gendustry/nei/TemplateCraftingHandler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei
diff --git a/src/net/bdew/gendustry/nei/TransposerHandler.scala b/src/net/bdew/gendustry/nei/TransposerHandler.scala
index 1999e90..59abd45 100644
--- a/src/net/bdew/gendustry/nei/TransposerHandler.scala
+++ b/src/net/bdew/gendustry/nei/TransposerHandler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei
@@ -108,10 +108,10 @@ class TransposerHandler extends BaseRecipeHandler(5, 13) {
}
}
- override def handleItemTooltip(gui: GuiRecipe, stack: ItemStack, currenttip: util.List[String], recipe: Int): util.List[String] = {
+ override def handleItemTooltip(gui: GuiRecipe, stack: ItemStack, tip: util.List[String], recipe: Int): util.List[String] = {
if (stack == getRecipe(recipe).labware.item)
- currenttip += Misc.toLocalF("gendustry.label.consume", MachineTransposer.labwareConsumeChance.toInt)
- super.handleItemTooltip(gui, stack, currenttip, recipe)
+ tip += Misc.toLocalF("gendustry.label.consume", MachineTransposer.labwareConsumeChance.toInt)
+ super.handleItemTooltip(gui, stack, tip, recipe)
}
def getGuiTexture = Gendustry.modId + ":textures/gui/transposer.png"
diff --git a/src/net/bdew/gendustry/nei/helpers/FluidComponent.scala b/src/net/bdew/gendustry/nei/helpers/FluidComponent.scala
index 02a45b4..f62bc12 100644
--- a/src/net/bdew/gendustry/nei/helpers/FluidComponent.scala
+++ b/src/net/bdew/gendustry/nei/helpers/FluidComponent.scala
@@ -4,48 +4,45 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei.helpers
-import java.text.DecimalFormat
-
import codechicken.nei.recipe.{GuiCraftingRecipe, GuiUsageRecipe}
import net.bdew.gendustry.gui.Textures
import net.bdew.gendustry.nei.NEIDrawTarget
+import net.bdew.lib.DecFormat
import net.bdew.lib.gui.{Point, Rect, Texture}
import net.minecraftforge.fluids.FluidStack
import org.lwjgl.opengl.GL11
-class FluidComponent(rect: Rect, fstack: FluidStack, capacity: Int) extends RecipeComponent(rect) {
- val formater = new DecimalFormat("#,###")
-
- def getTooltip = List(fstack.getFluid.getLocalizedName(fstack), "%s mB".format(formater.format(fstack.amount)))
+class FluidComponent(rect: Rect, fStack: FluidStack, capacity: Int) extends RecipeComponent(rect) {
+ def getTooltip = List(fStack.getFluid.getLocalizedName(fStack), "%s mB".format(DecFormat.round(fStack.amount)))
def mouseClick(button: Int) = button match {
- case 0 => GuiCraftingRecipe.openRecipeGui("liquid", fstack)
- case 1 => GuiUsageRecipe.openRecipeGui("liquid", fstack)
+ case 0 => GuiCraftingRecipe.openRecipeGui("liquid", fStack)
+ case 1 => GuiUsageRecipe.openRecipeGui("liquid", fStack)
case _ => false
}
def render(offset: Point) {
- val orect = rect - offset
+ val oRect = rect - offset
GL11.glEnable(GL11.GL_BLEND)
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA)
- if (fstack.getFluid.getStillIcon != null) {
- val icon = Texture(Texture.BLOCKS, fstack.getFluid.getStillIcon)
- var fillHeight = orect.h * fstack.amount / capacity
+ if (fStack.getFluid.getStillIcon != null) {
+ val icon = Texture(Texture.BLOCKS, fStack.getFluid.getStillIcon)
+ var fillHeight = oRect.h * fStack.amount / capacity
var yStart = 0
while (fillHeight > 0) {
if (fillHeight > 16) {
- NEIDrawTarget.drawTexture(new Rect(orect.x, orect.y2 - 16 - yStart, orect.w, 16), icon)
+ NEIDrawTarget.drawTexture(new Rect(oRect.x, oRect.y2 - 16 - yStart, oRect.w, 16), icon)
fillHeight -= 16
} else {
- NEIDrawTarget.drawTextureInterpolate(new Rect(orect.x, orect.y2 - 16 - yStart, orect.w, 16), icon, 0, 1 - fillHeight / 16, 1, 1)
+ NEIDrawTarget.drawTextureInterpolate(new Rect(oRect.x, oRect.y2 - 16 - yStart, oRect.w, 16), icon, 0, 1 - fillHeight / 16, 1, 1)
fillHeight = 0
}
yStart = yStart + 16
@@ -53,6 +50,6 @@ class FluidComponent(rect: Rect, fstack: FluidStack, capacity: Int) extends Reci
}
GL11.glDisable(GL11.GL_BLEND)
- NEIDrawTarget.drawTexture(orect, Textures.tankOverlay)
+ NEIDrawTarget.drawTexture(oRect, Textures.tankOverlay)
}
}
\ No newline at end of file
diff --git a/src/net/bdew/gendustry/nei/helpers/PowerComponent.scala b/src/net/bdew/gendustry/nei/helpers/PowerComponent.scala
index 85e4a77..b6370bf 100644
--- a/src/net/bdew/gendustry/nei/helpers/PowerComponent.scala
+++ b/src/net/bdew/gendustry/nei/helpers/PowerComponent.scala
@@ -4,21 +4,19 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei.helpers
-import java.text.DecimalFormat
-
import net.bdew.gendustry.config.Config
import net.bdew.gendustry.gui.Textures
import net.bdew.gendustry.nei.NEIDrawTarget
+import net.bdew.lib.DecFormat
import net.bdew.lib.gui.{Point, Rect}
class PowerComponent(rect: Rect, power: Float, capacity: Float) extends RecipeComponent(rect) {
- val formater = new DecimalFormat("#,###")
- def getTooltip = List("%s %s".format(formater.format(power * Config.powerShowMultiplier), Config.powerShowUnits))
+ def getTooltip = List("%s %s".format(DecFormat.round(power * Config.powerShowMultiplier), Config.powerShowUnits))
def mouseClick(button: Int) = false
def render(offset: Point) {
NEIDrawTarget.drawTextureInterpolate(rect - offset, Textures.powerFill, 0, 1 - (power / capacity), 1, 1)
diff --git a/src/net/bdew/gendustry/nei/helpers/RecipeComponent.scala b/src/net/bdew/gendustry/nei/helpers/RecipeComponent.scala
index 54363c0..2208c99 100644
--- a/src/net/bdew/gendustry/nei/helpers/RecipeComponent.scala
+++ b/src/net/bdew/gendustry/nei/helpers/RecipeComponent.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.nei.helpers
diff --git a/src/net/bdew/gendustry/power/ItemPowered.scala b/src/net/bdew/gendustry/power/ItemPowered.scala
index 11905d5..6fcb6e2 100644
--- a/src/net/bdew/gendustry/power/ItemPowered.scala
+++ b/src/net/bdew/gendustry/power/ItemPowered.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.power
diff --git a/src/net/bdew/gendustry/power/ItemPoweredEU.scala b/src/net/bdew/gendustry/power/ItemPoweredEU.scala
index b833cba..e53b751 100644
--- a/src/net/bdew/gendustry/power/ItemPoweredEU.scala
+++ b/src/net/bdew/gendustry/power/ItemPoweredEU.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.power
diff --git a/src/net/bdew/gendustry/power/ItemPoweredEUManager.scala b/src/net/bdew/gendustry/power/ItemPoweredEUManager.scala
index 46f61e2..30c4351 100644
--- a/src/net/bdew/gendustry/power/ItemPoweredEUManager.scala
+++ b/src/net/bdew/gendustry/power/ItemPoweredEUManager.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.power
diff --git a/src/net/bdew/gendustry/power/ItemPoweredRF.scala b/src/net/bdew/gendustry/power/ItemPoweredRF.scala
index 9838af8..994cd18 100644
--- a/src/net/bdew/gendustry/power/ItemPoweredRF.scala
+++ b/src/net/bdew/gendustry/power/ItemPoweredRF.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.power
diff --git a/src/net/bdew/gendustry/power/TilePowered.scala b/src/net/bdew/gendustry/power/TilePowered.scala
index 95307cc..518145b 100644
--- a/src/net/bdew/gendustry/power/TilePowered.scala
+++ b/src/net/bdew/gendustry/power/TilePowered.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.power
diff --git a/src/net/bdew/gendustry/power/TilePoweredEU.scala b/src/net/bdew/gendustry/power/TilePoweredEU.scala
index 0989019..23eabc5 100644
--- a/src/net/bdew/gendustry/power/TilePoweredEU.scala
+++ b/src/net/bdew/gendustry/power/TilePoweredEU.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.power
diff --git a/src/net/bdew/gendustry/power/TilePoweredRF.scala b/src/net/bdew/gendustry/power/TilePoweredRF.scala
index fadbed5..e27ebac 100644
--- a/src/net/bdew/gendustry/power/TilePoweredRF.scala
+++ b/src/net/bdew/gendustry/power/TilePoweredRF.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.power
diff --git a/src/net/bdew/gendustry/waila/BaseDataProvider.scala b/src/net/bdew/gendustry/waila/BaseDataProvider.scala
index baaf642..bfa4d66 100644
--- a/src/net/bdew/gendustry/waila/BaseDataProvider.scala
+++ b/src/net/bdew/gendustry/waila/BaseDataProvider.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.waila
@@ -20,58 +20,57 @@ import net.minecraft.util.EnumChatFormatting
import net.minecraft.world.World
class BaseDataProvider[T](cls: Class[T]) extends IWailaDataProvider {
-
- override def getNBTData(te: TileEntity, tag: NBTTagCompound, world: World, x: Int, y: Int, z: Int) = null
-
def getTailStrings(target: T, stack: ItemStack, acc: IWailaDataAccessor, cfg: IWailaConfigHandler): Iterable[String] = None
def getHeadStrings(target: T, stack: ItemStack, acc: IWailaDataAccessor, cfg: IWailaConfigHandler): Iterable[String] = None
def getBodyStrings(target: T, stack: ItemStack, acc: IWailaDataAccessor, cfg: IWailaConfigHandler): Iterable[String] = None
+ override def getNBTData(te: TileEntity, tag: NBTTagCompound, world: World, x: Int, y: Int, z: Int) = null
+
import scala.collection.JavaConversions._
- final override def getWailaTail(itemStack: ItemStack, currenttip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) = {
+ final override def getWailaTail(itemStack: ItemStack, tip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) = {
try {
if (cls.isInstance(accessor.getTileEntity))
- currenttip.addAll(getTailStrings(accessor.getTileEntity.asInstanceOf[T], itemStack, accessor, config))
+ tip.addAll(getTailStrings(accessor.getTileEntity.asInstanceOf[T], itemStack, accessor, config))
else if (cls.isInstance(accessor.getBlock))
- currenttip.addAll(getTailStrings(accessor.getBlock.asInstanceOf[T], itemStack, accessor, config))
+ tip.addAll(getTailStrings(accessor.getBlock.asInstanceOf[T], itemStack, accessor, config))
} catch {
case e: Throwable =>
Gendustry.logWarn("Error in waila handler: %s", e.toString)
e.printStackTrace()
- currenttip.add("[%s%s%s]".format(EnumChatFormatting.RED, e.toString, EnumChatFormatting.RESET))
+ tip.add("[%s%s%s]".format(EnumChatFormatting.RED, e.toString, EnumChatFormatting.RESET))
}
- currenttip
+ tip
}
- final override def getWailaHead(itemStack: ItemStack, currenttip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) = {
+ final override def getWailaHead(itemStack: ItemStack, tip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) = {
try {
if (cls.isInstance(accessor.getTileEntity))
- currenttip.addAll(getHeadStrings(accessor.getTileEntity.asInstanceOf[T], itemStack, accessor, config))
+ tip.addAll(getHeadStrings(accessor.getTileEntity.asInstanceOf[T], itemStack, accessor, config))
else if (cls.isInstance(accessor.getBlock))
- currenttip.addAll(getHeadStrings(accessor.getBlock.asInstanceOf[T], itemStack, accessor, config))
+ tip.addAll(getHeadStrings(accessor.getBlock.asInstanceOf[T], itemStack, accessor, config))
} catch {
case e: Throwable =>
Gendustry.logWarn("Error in waila handler: %s", e.toString)
e.printStackTrace()
- currenttip.add("[%s%s%s]".format(EnumChatFormatting.RED, e.toString, EnumChatFormatting.RESET))
+ tip.add("[%s%s%s]".format(EnumChatFormatting.RED, e.toString, EnumChatFormatting.RESET))
}
- currenttip
+ tip
}
- final override def getWailaBody(itemStack: ItemStack, currenttip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) = {
+ final override def getWailaBody(itemStack: ItemStack, tip: util.List[String], accessor: IWailaDataAccessor, config: IWailaConfigHandler) = {
try {
if (cls.isInstance(accessor.getTileEntity))
- currenttip.addAll(getBodyStrings(accessor.getTileEntity.asInstanceOf[T], itemStack, accessor, config))
+ tip.addAll(getBodyStrings(accessor.getTileEntity.asInstanceOf[T], itemStack, accessor, config))
else if (cls.isInstance(accessor.getBlock))
- currenttip.addAll(getBodyStrings(accessor.getBlock.asInstanceOf[T], itemStack, accessor, config))
+ tip.addAll(getBodyStrings(accessor.getBlock.asInstanceOf[T], itemStack, accessor, config))
} catch {
case e: Throwable =>
Gendustry.logWarn("Error in waila handler: %s", e.toString)
e.printStackTrace()
- currenttip.add("[%s%s%s]".format(EnumChatFormatting.RED, e.toString, EnumChatFormatting.RESET))
+ tip.add("[%s%s%s]".format(EnumChatFormatting.RED, e.toString, EnumChatFormatting.RESET))
}
- currenttip
+ tip
}
override def getWailaStack(accessor: IWailaDataAccessor, config: IWailaConfigHandler) = null
diff --git a/src/net/bdew/gendustry/waila/WailaApiaryDataProvider.scala b/src/net/bdew/gendustry/waila/WailaApiaryDataProvider.scala
index 6be596e..3368840 100644
--- a/src/net/bdew/gendustry/waila/WailaApiaryDataProvider.scala
+++ b/src/net/bdew/gendustry/waila/WailaApiaryDataProvider.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.waila
@@ -17,7 +17,7 @@ import net.minecraft.item.ItemStack
object WailaApiaryDataProvider extends BaseDataProvider(classOf[TileApiary]) {
override def getBodyStrings(target: TileApiary, stack: ItemStack, acc: IWailaDataAccessor, cfg: IWailaConfigHandler) = {
- val err = target.errorState.cval
+ val err = target.errorState.value
val state = if (err == -1) {
Misc.toLocal(Gendustry.modId + ".error.power")
} else if (err == -2) {
@@ -30,7 +30,7 @@ object WailaApiaryDataProvider extends BaseDataProvider(classOf[TileApiary]) {
List(
Misc.toLocalF("gendustry.label.status", state),
- Misc.toLocalF("gendustry.label.control", Misc.toLocal("gendustry.rsmode." + target.rsmode.cval.toString.toLowerCase))
+ Misc.toLocalF("gendustry.label.control", Misc.toLocal("gendustry.rsmode." + target.rsmode.value.toString.toLowerCase))
) ++ target.getStats
}
}
diff --git a/src/net/bdew/gendustry/waila/WailaDataslotsDataProvider.scala b/src/net/bdew/gendustry/waila/WailaDataslotsDataProvider.scala
index 23fb2ed..3e76478 100644
--- a/src/net/bdew/gendustry/waila/WailaDataslotsDataProvider.scala
+++ b/src/net/bdew/gendustry/waila/WailaDataslotsDataProvider.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.waila
@@ -19,7 +19,7 @@ import net.bdew.lib.power.DataSlotPower
import net.minecraft.item.ItemStack
import net.minecraftforge.fluids.{FluidRegistry, FluidStack}
-object WailaDataslotsDataProvider extends BaseDataProvider(classOf[TileDataSlots]) {
+object WailaDataSlotsDataProvider extends BaseDataProvider(classOf[TileDataSlots]) {
val dec = new DecimalFormat("#,##0")
override def getBodyStrings(target: TileDataSlots, stack: ItemStack, acc: IWailaDataAccessor, cfg: IWailaConfigHandler) = {
@@ -31,18 +31,18 @@ object WailaDataslotsDataProvider extends BaseDataProvider(classOf[TileDataSlots
List("%s / %s %s".format(dec.format(stored), dec.format(capacity), Config.powerShowUnits))
case (name, slot: DataSlotTankRestricted) =>
- val fstack = FluidStack.loadFluidStackFromNBT(nbt.getCompoundTag(name))
- if (fstack != null && fstack.getFluid != null) {
- List("%s / %s mB %s".format(dec.format(fstack.amount), dec.format(slot.size), fstack.getFluid.getLocalizedName(fstack)))
+ val fStack = FluidStack.loadFluidStackFromNBT(nbt.getCompoundTag(name))
+ if (fStack != null && fStack.getFluid != null) {
+ List("%s / %s mB %s".format(dec.format(fStack.amount), dec.format(slot.size), fStack.getFluid.getLocalizedName(fStack)))
} else {
val fluid = FluidRegistry.getFluid(slot.fluidID)
- List("0 / %s mB %s".format(dec.format(slot.size), fluid.getLocalizedName(fstack)))
+ List("0 / %s mB %s".format(dec.format(slot.size), fluid.getLocalizedName(fStack)))
}
case (name, slot: DataSlotTank) =>
- val fstack = FluidStack.loadFluidStackFromNBT(nbt.getCompoundTag(name))
- if (fstack != null && fstack.getFluid != null) {
- List("[V] %s / %s mB %s".format(dec.format(fstack.amount), dec.format(slot.size), fstack.getFluid.getLocalizedName(fstack)))
+ val fStack = FluidStack.loadFluidStackFromNBT(nbt.getCompoundTag(name))
+ if (fStack != null && fStack.getFluid != null) {
+ List("[V] %s / %s mB %s".format(dec.format(fStack.amount), dec.format(slot.size), fStack.getFluid.getLocalizedName(fStack)))
} else {
None
}
diff --git a/src/net/bdew/gendustry/waila/WailaHandler.scala b/src/net/bdew/gendustry/waila/WailaHandler.scala
index 4a4c4fd..caf9260 100644
--- a/src/net/bdew/gendustry/waila/WailaHandler.scala
+++ b/src/net/bdew/gendustry/waila/WailaHandler.scala
@@ -4,7 +4,7 @@
*
* This mod is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
- * https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt
+ * http://bdew.net/minecraft-mod-public-license/
*/
package net.bdew.gendustry.waila
@@ -15,9 +15,9 @@ import net.bdew.gendustry.machines.apiary.TileApiary
import net.bdew.gendustry.power.TilePowered
object WailaHandler {
- def loadCallabck(reg: IWailaRegistrar) {
- Gendustry.logInfo("Waila callback recieved, loading...")
- reg.registerBodyProvider(WailaDataslotsDataProvider, classOf[TilePowered])
+ def loadCallback(reg: IWailaRegistrar) {
+ Gendustry.logInfo("WAILA callback received, loading...")
+ reg.registerBodyProvider(WailaDataSlotsDataProvider, classOf[TilePowered])
reg.registerBodyProvider(WailaApiaryDataProvider, classOf[TileApiary])
reg.registerSyncedNBTKey("*", classOf[TilePowered])
}