Merge remote-tracking branch 'remotes/origin/mc1710' into forestry_unstable

This commit is contained in:
bdew committed 2014-12-24 11:47:49 +02:00
commit 25d32ff9c4
179 files changed
+432 -804

No files matched your search

Generated
-1
View File
@@ -1 +0,0 @@
gendustry
Generated
-3
View File
@@ -1,3 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4" />
-29
View File
@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<ScalaCodeStyleSettings>
<option name="SPACES_IN_ONE_LINE_BLOCKS" value="true" />
</ScalaCodeStyleSettings>
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
<codeStyleSettings language="JAVA">
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
</codeStyleSettings>
<codeStyleSettings language="Scala">
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1" />
<option name="BLANK_LINES_AROUND_METHOD" value="0" />
<option name="BLANK_LINES_AROUND_METHOD_IN_INTERFACE" value="0" />
</codeStyleSettings>
</value>
</option>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</component>
</project>
-23
View File
@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>
-9
View File
@@ -1,9 +0,0 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="Copyright (c) bdew, 2013 - &amp;#36;today.year&#10;https://github.com/bdew/gendustry&#10;&#10;This mod is distributed under the terms of the Minecraft Mod Public&#10;License 1.0, or MMPL. Please check the contents of the license located in&#10;https://raw.github.com/bdew/gendustry/master/MMPL-1.0.txt" />
<option name="keyword" value="Copyright" />
<option name="allowReplaceKeyword" value="" />
<option name="myName" value="MMPL (gendustry)" />
<option name="myLocal" value="true" />
</copyright>
</component>
-9
View File
@@ -1,9 +0,0 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="Copyright (c) bdew, 2013 - &amp;#36;today.year&#10;https://github.com/bdew/bdlib&#10;&#10;This mod is distributed under the terms of the Minecraft Mod Public&#10;License 1.0, or MMPL. Please check the contents of the license located in&#10;https://raw.github.com/bdew/bdlib/master/MMPL-1.0.txt" />
<option name="keyword" value="Copyright" />
<option name="allowReplaceKeyword" value="" />
<option name="myName" value="MMPL (lib)" />
<option name="myLocal" value="true" />
</copyright>
</component>
-8
View File
@@ -1,8 +0,0 @@
<component name="CopyrightManager">
<settings default="">
<module2copyright>
<element module="lib" copyright="MMPL (lib)" />
<element module="main" copyright="MMPL (gendustry)" />
</module2copyright>
</settings>
</component>
-5
View File
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>
-29
View File
@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$/../bdlib" />
<option name="gradleHome" value="$PROJECT_DIR$/../../../gradle" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$/../bdlib" />
</set>
</option>
</GradleProjectSettings>
<GradleProjectSettings>
<option name="disableWrapperSourceDistributionNotification" value="true" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="$PROJECT_DIR$/../../../gradle" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="HighlightingAdvisor">
<option name="SUGGEST_TYPE_AWARE_HIGHLIGHTING" value="false" />
<option name="TYPE_AWARE_HIGHLIGHTING_ENABLED" value="true" />
</component>
</project>
-19
View File
@@ -1,19 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" />
<option name="myLocal" value="false" />
<inspection_tool class="NameBooleanParameters" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="ReferenceMustBePrefixed" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="RemoveRedundantReturn" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="ScalaDocInlinedTag" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SimplifiableIfStatement" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
<inspection_tool class="TypeCheckCanBeMatch" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UnusedProperty" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="XmlUnboundNsPrefix" enabled="false" level="WARNING" enabled_by_default="false" />
</profile>
</component>
-7
View File
@@ -1,7 +0,0 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="Project Default" />
<option name="USE_PROJECT_PROFILE" value="true" />
<version value="1.0" />
</settings>
</component>
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
</project>
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/../bdlib/bdlib.iml" filepath="$PROJECT_DIR$/../bdlib/bdlib.iml" />
<module fileurl="file://$PROJECT_DIR$/gendustry.iml" filepath="$PROJECT_DIR$/gendustry.iml" />
</modules>
</component>
</project>
-12
View File
@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ScalaProjectSettings">
<option name="intInjectionMapping">
<map>
<entry key="xml" value="XML" />
</map>
</option>
<option name="outputLimit" value="500" />
</component>
</project>
-3
View File
@@ -1,3 +0,0 @@
<component name="DependencyValidationManager">
<scope name="lib" pattern="src:net.bdew.lib..*" />
</component>
-3
View File
@@ -1,3 +0,0 @@
<component name="DependencyValidationManager">
<scope name="main" pattern="src:net.bdew.gendustry..*" />
</component>
-3
View File
@@ -1,3 +0,0 @@
<component name="DependencyValidationManager">
<scope name="my files" pattern="file[gendustry]:bdlib//*||file[gendustry]:src//*||file[gendustry]:resources//*" />
</component>
-5
View File
@@ -1,5 +0,0 @@
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>
-125
View File
@@ -1,125 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
Generated
-17
View File
@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$/../bdlib" vcs="Git" />
<mapping directory="$PROJECT_DIR$/../bdlib" vcs="Git" />
<mapping directory="$PROJECT_DIR$/../bdlib" vcs="Git" />
<mapping directory="$PROJECT_DIR$/../bdlib" vcs="Git" />
<mapping directory="$PROJECT_DIR$/../bdlib" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
+4 -4
View File
@@ -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"
+4 -4
View File
@@ -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()
@@ -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;
+1 -1
View File
@@ -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;
@@ -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;
@@ -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);
}
@@ -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<ItemStack> getUpgrades();
}
@@ -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;
@@ -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<String> 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);
@@ -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;
@@ -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);
+1 -1
View File
@@ -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") //
@@ -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
}
@@ -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)
@@ -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
@@ -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
}
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+9 -9
View File
@@ -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)
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
@@ -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
@@ -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
@@ -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()
}
@@ -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
@@ -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
@@ -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
@@ -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
}
@@ -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)
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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)
}
}
@@ -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)
}
@@ -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)) {
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
@@ -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
}
@@ -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]) {
@@ -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)
}
}
@@ -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))
}
@@ -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
@@ -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)
@@ -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) {
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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) {
@@ -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
@@ -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)
}
}
@@ -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)
@@ -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
@@ -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
@@ -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
}
@@ -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)
}
}
@@ -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
@@ -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)
}
@@ -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)
}
}
@@ -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))
@@ -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
@@ -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
Loaded 100 of 179 files, more files were not shown because too many files have changed in this diff. Show more