aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--build.gradle98
-rw-r--r--build.properties2
-rw-r--r--src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java7
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java38
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java49
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java2
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java2
-rw-r--r--src/main/java/gregtech/api/util/GT_Recipe.java4
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java8
-rw-r--r--src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java14
-rw-r--r--src/main/java/gregtech/common/bees/GT_AlleleHelper.java11
-rw-r--r--src/main/java/gregtech/common/bees/GT_Bee_Mutation.java5
-rw-r--r--src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java9
-rw-r--r--src/main/java/gregtech/common/items/GT_VolumetricFlask.java11
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java88
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java53
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java17
-rw-r--r--src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java6010
-rw-r--r--src/main/java/gregtech/loaders/misc/GT_BranchDefinition.java289
-rw-r--r--src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java101
-rw-r--r--src/main/java/gregtech/nei/NEI_GT_Config.java7
23 files changed, 3063 insertions, 3765 deletions
diff --git a/.gitignore b/.gitignore
index 1b20644f81..c24815789e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -94,3 +94,4 @@ libs/
*.jar
*.errored
/build/
+/run \ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 2f28009a4c..4ed676b8c4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -17,6 +17,7 @@ buildscript {
apply plugin: 'forge'
apply plugin: 'idea'
+apply plugin: 'java'
apply plugin: 'signing'
file "build.properties" withReader {
@@ -29,30 +30,21 @@ version = "${config.gt.version}"
group= "gregtech"
archivesBaseName = "gregtech"
-
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
-sourceCompatibility = 1.8
-targetCompatibility = 1.8
+compileJava.options.encoding("UTF-8")
minecraft {
version = "${config.minecraft.version}-${config.forge.version}"
- runDir = "eclipse"
-
+ runDir = "run"
}
-idea { module { inheritOutputDirs = true } }
-
-configurations {
- provided
- embedded
- compile.extendsFrom provided, embedded
-}
+idea.module.inheritOutputDirs = true
repositories {
maven {
- name 'Forge'
- url 'http://files.minecraftforge.net/maven'
+ name = 'Forge'
+ url = 'http://files.minecraftforge.net/maven'
}
maven {
name = "chickenbones"
@@ -63,58 +55,58 @@ repositories {
url = "http://maven.ic2.player.to/"
}
maven { // EnderIO & EnderCore
- name 'tterrag Repo'
- url "http://maven.tterrag.com"
+ name = 'tterrag Repo'
+ url = "http://maven.tterrag.com"
}
maven { // TConstruct
- name 'DVS1 Maven FS'
- url 'http://dvs1.progwml6.com/files/maven'
+ name = 'DVS1 Maven FS'
+ url = 'http://dvs1.progwml6.com/files/maven'
}
maven { // AppleCore
- url "http://www.ryanliptak.com/maven/"
+ url = "http://www.ryanliptak.com/maven/"
}
maven { // GalacticGreg, YAMCore,..
- name 'UsrvDE'
- url "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/"
+ name = 'UsrvDE'
+ url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/"
}
ivy {
- name 'gtnh_download_source_stupid_underscore_typo'
- artifactPattern "http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]_[revision].[ext]"
+ name = 'gtnh_download_source_stupid_underscore_typo'
+ artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]_[revision].[ext]")
}
ivy {
- name 'gtnh_download_source'
- artifactPattern "http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]"
+ name = 'gtnh_download_source'
+ artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]")
}
}
dependencies {
- compile "eu.usrv:YAMCore:${config.minecraft.version}-${config.yamcore.version}:deobf"
- compile "tconstruct:TConstruct:${config.minecraft.version}-${config.tconstruct.version}:deobf"
- compile "mantle:Mantle:${config.minecraft.version}-${config.mantle.version}:deobf"
- provided ("appeng:appliedenergistics2:${config.ae2.version}:dev") {
+ compileOnly "eu.usrv:YAMCore:${config.minecraft.version}-${config.yamcore.version}:deobf"
+ compileOnly "tconstruct:TConstruct:${config.minecraft.version}-${config.tconstruct.version}:deobf"
+ //compile "mantle:Mantle:${config.minecraft.version}-${config.mantle.version}:deobf"
+ compileOnly ("appeng:appliedenergistics2:${config.ae2.version}:dev") {
exclude module: '*'
}
- provided "codechicken:CodeChickenLib:${config.minecraft.version}-${config.codechickenlib.version}:dev"
- provided "codechicken:CodeChickenCore:${config.minecraft.version}-${config.codechickencore.version}:dev"
- provided "codechicken:NotEnoughItems:${config.minecraft.version}-${config.nei.version}:dev"
- provided "codechicken:Translocator:${config.minecraft.version}-${config.translocators.version}:dev"
- provided "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev"
- provided "net.sengir.forestry:forestry_${config.minecraft.version}:${config.forestry.version}:dev"
- provided "applecore:AppleCore:${config.applecore.version}:api"
- provided "com.enderio.core:EnderCore:${config.enderiocore.version}:dev"
- provided ("com.enderio:EnderIO:${config.enderio.version}:dev") {
+ compileOnly "codechicken:CodeChickenLib:${config.minecraft.version}-${config.codechickenlib.version}:dev"
+ compileOnly "codechicken:CodeChickenCore:${config.minecraft.version}-${config.codechickencore.version}:dev"
+ compileOnly "codechicken:NotEnoughItems:${config.minecraft.version}-${config.nei.version}:dev"
+ compileOnly "codechicken:Translocator:${config.minecraft.version}-${config.translocators.version}:dev"
+ compile "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev"
+ compileOnly "net.sengir.forestry:forestry_${config.minecraft.version}:${config.forestry.version}:dev"
+ compileOnly "applecore:AppleCore:${config.applecore.version}:api"
+ compileOnly "com.enderio.core:EnderCore:${config.enderiocore.version}:dev"
+ compileOnly ("com.enderio:EnderIO:${config.enderio.version}:dev") {
transitive = false
}
- compile files("libs/Galacticraft-API-1.7-${config.gc.version}.jar")
- compile files("libs/GalacticraftCore-Dev-${config.gc.version}.jar")
- provided name: "Galacticraft-API", version: config.gc.version, ext: 'jar'
- provided name: "GalacticraftCore-Dev", version: config.gc.version, ext: 'jar'
- provided name: 'CoFHLib', version: config.cofhlib.version, ext: 'jar'
- provided name: 'CoFHCore', version: config.cofhcore.version, ext: 'jar'
- provided name: 'Railcraft', version: config.railcraft.version, ext: 'jar'
- provided name: 'IC2NuclearControl', version: config.nc.version, ext: 'jar'
+ compileOnly files("libs/Galacticraft-API-1.7-${config.gc.version}.jar")
+ compileOnly files("libs/GalacticraftCore-Dev-${config.gc.version}.jar")
+ compileOnly name: "Galacticraft-API", version: config.gc.version, ext: 'jar'
+ compileOnly name: "GalacticraftCore-Dev", version: config.gc.version, ext: 'jar'
+ compileOnly name: 'CoFHLib', version: config.cofhlib.version, ext: 'jar'
+ //compileOnly name: 'CoFHCore', version: config.cofhcore.version, ext: 'jar'
+ compileOnly name: 'Railcraft', version: config.railcraft.version, ext: 'jar'
+ compileOnly name: 'IC2NuclearControl', version: config.nc.version, ext: 'jar'
//provided name: 'ImmersiveEngineering', version: config.immeng.version, ext: 'jar'
//provided name: 'magneticraft', version: config.magneticraft.version, ext: 'jar'
@@ -149,14 +141,18 @@ task sourceJar(type: Jar) {
task devJar(type: Jar) {
from sourceSets.main.output
classifier = 'dev'
- manifest {
- //attributes 'FMLCorePlugin': 'WhateverLoaderClass'
- //attributes 'FMLCorePluginContainsFMLMod': 'true'
- }
+}
+
+task apiJar(type: Jar) {
+ from sourceSets.main.allSource
+ include("gregtech/api/**")
+ classifier = 'api'
}
artifacts {
- archives devJar
+ archives(devJar)
+ archives(sourceJar)
+ archives(apiJar)
}
task signJar(dependsOn: 'reobf'){
diff --git a/build.properties b/build.properties
index 633a84e787..85d8779c47 100644
--- a/build.properties
+++ b/build.properties
@@ -1,6 +1,6 @@
minecraft.version=1.7.10
forge.version=10.13.4.1614-1.7.10
-gt.version=5.09.33.54
+gt.version=5.09.33.56
ae2.version=rv3-beta-22
applecore.version=1.7.10-1.2.1+107.59407
diff --git a/src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java b/src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java
new file mode 100644
index 0000000000..9306ef28f3
--- /dev/null
+++ b/src/main/java/gregtech/api/interfaces/metatileentity/IMachineCallback.java
@@ -0,0 +1,7 @@
+package gregtech.api.interfaces.metatileentity;
+
+public interface IMachineCallback<Machinetype extends IMetaTileEntity> {
+ Machinetype getCallbackBase();
+ void setCallbackBase(Machinetype callback);
+ Class<Machinetype> getType();
+} \ No newline at end of file
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
index 23afaa84f7..8a28301fdf 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
@@ -1,8 +1,12 @@
package gregtech.api.metatileentity.implementations;
+import cpw.mods.fml.common.Optional;
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.*;
+import gregtech.api.enums.Dyes;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.ICoverable;
@@ -389,36 +393,46 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
@Override
public boolean canConnect(byte aSide, TileEntity tTileEntity) {
- if (tTileEntity == null) return false;
+ if (tTileEntity == null)
+ return false;
final byte tSide = (byte)ForgeDirection.getOrientation(aSide).getOpposite().ordinal();
final IGregTechTileEntity baseMetaTile = getBaseMetaTileEntity();
- if (baseMetaTile == null) return false;
+ if (baseMetaTile == null)
+ return false;
final GT_CoverBehavior coverBehavior = baseMetaTile.getCoverBehaviorAtSide(aSide);
final IGregTechTileEntity gTileEntity = (tTileEntity instanceof IGregTechTileEntity) ? (IGregTechTileEntity) tTileEntity : null;
- if (coverBehavior instanceof GT_Cover_Drain) return true;
-
- // Tinker Construct Faucets return a null tank info, so check the class
- if (GregTech_API.mTConstruct && tTileEntity instanceof tconstruct.smeltery.logic.FaucetLogic) return true;
+ if (coverBehavior instanceof GT_Cover_Drain || (GregTech_API.mTConstruct && isTConstructFaucet(tTileEntity)))
+ return true;
final IFluidHandler fTileEntity = (tTileEntity instanceof IFluidHandler) ? (IFluidHandler) tTileEntity : null;
if (fTileEntity != null) {
FluidTankInfo[] tInfo = fTileEntity.getTankInfo(ForgeDirection.getOrientation(tSide));
if (tInfo != null) {
- if (tInfo.length > 0) return true;
-
- // Translocators return a TankInfo, but it's of 0 length - so check the class if we see this pattern
- if (GregTech_API.mTranslocator && tTileEntity instanceof codechicken.translocator.TileLiquidTranslocator) return true;
- if (gTileEntity != null && gTileEntity.getCoverBehaviorAtSide(tSide) instanceof GT_Cover_FluidRegulator) return true;
+ return tInfo.length > 0
+ || (GregTech_API.mTranslocator && isTranslocator(tTileEntity))
+ || gTileEntity != null && gTileEntity.getCoverBehaviorAtSide(tSide) instanceof GT_Cover_FluidRegulator;
}
}
return false;
}
+ @Optional.Method(modid = "TConstruct")
+ private boolean isTConstructFaucet(TileEntity tTileEntity){
+ // Tinker Construct Faucets return a null tank info, so check the class
+ return tTileEntity instanceof tconstruct.smeltery.logic.FaucetLogic;
+ }
+
+ @Optional.Method(modid = "Translocator")
+ private boolean isTranslocator(TileEntity tTileEntity){
+ // Translocators return a TankInfo, but it's of 0 length - so check the class if we see this pattern
+ return tTileEntity instanceof codechicken.translocator.TileLiquidTranslocator;
+ }
+
@Override
public boolean getGT6StyleConnection() {
// Yes if GT6 pipes are enabled
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java
index 1c5b90f7db..97daa6fc71 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine.java
@@ -7,6 +7,7 @@ import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_Container_BasicMachine;
import gregtech.api.gui.GT_GUIContainer_BasicMachine;
import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMachineCallback;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.GT_RenderedTexture;
@@ -15,6 +16,7 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
+import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_Cleanroom;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
@@ -37,7 +39,8 @@ import static gregtech.api.enums.GT_Values.debugCleanroom;
* This is the main construct for my Basic Machines such as the Automatic Extractor
* Extend this class to make a simple Machine
*/
-public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_BasicTank {
+public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_BasicTank implements IMachineCallback<GT_MetaTileEntity_Cleanroom> {
+
/**
* return values for checkRecipe()
*/
@@ -51,8 +54,11 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
public boolean mAllowInputFromOutputSide = false, mFluidTransfer = false, mItemTransfer = false, mHasBeenUpdated = false, mStuttering = false, mCharge = false, mDecharge = false;
public int mMainFacing = -1, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mOutputBlocked = 0;
public FluidStack mOutputFluid;
- public String mGUIName = "", mNEIName = "";
- public GT_MetaTileEntity_MultiBlockBase mCleanroom;
+ public String mGUIName, mNEIName;
+
+
+ @Deprecated
+ public GT_MetaTileEntity_Cleanroom mCleanroom;
/**
* Contains the Recipe which has been previously used, or null if there was no previous Recipe, which could have been buffered
*/
@@ -126,6 +132,21 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
}
@Override
+ public GT_MetaTileEntity_Cleanroom getCallbackBase() {
+ return this.mCleanroom;
+ }
+
+ @Override
+ public void setCallbackBase(GT_MetaTileEntity_Cleanroom callback) {
+ this.mCleanroom = callback;
+ }
+
+ @Override
+ public Class<GT_MetaTileEntity_Cleanroom> getType() {
+ return GT_MetaTileEntity_Cleanroom.class;
+ }
+
+ @Override
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
ITexture[][][] rTextures = new ITexture[14][17][];
aTextures = Arrays.copyOf(aTextures, 14);
@@ -449,7 +470,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
if (getDrainableStack() == null) setDrainableStack(mOutputFluid.copy());
else if (mOutputFluid.isFluidEqual(getDrainableStack()))
getDrainableStack().amount += mOutputFluid.amount;
- for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = null;
+ Arrays.fill(mOutputItems, null);
mOutputFluid = null;
mEUt = 0;
mProgresstime = 0;
@@ -518,7 +539,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
startProcess();
} else {
mMaxProgresstime = 0;
- for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = null;
+ Arrays.fill(mOutputItems, null);
mOutputFluid = null;
}
}
@@ -584,7 +605,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
//Long EUt calculation
long xEUt=aEUt;
//Isnt too low EUt check?
- long tempEUt = xEUt<V[1] ? V[1] : xEUt;
+ long tempEUt = Math.max(xEUt, V[1]);
mMaxProgresstime = aDuration;
@@ -652,7 +673,11 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
protected boolean isOutputEmpty() {
boolean rIsEmpty = true;
- for (ItemStack tOutputSlotContent : getAllOutputs()) if (tOutputSlotContent != null) rIsEmpty = false;
+ for (ItemStack tOutputSlotContent : getAllOutputs())
+ if (tOutputSlotContent != null) {
+ rIsEmpty = false;
+ break;
+ }
return rIsEmpty;
}
@@ -816,7 +841,9 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
/**
*
* @param skipOC disables OverclockedNess calculation and check - if you do you must implement your own method...
- * @return
+ * @return DID_NOT_FIND_RECIPE = 0,
+ * FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS = 1,
+ * FOUND_AND_SUCCESSFULLY_USED_RECIPE = 2;
*/
public int checkRecipe(boolean skipOC){
GT_Recipe_Map tMap = getRecipeList();
@@ -832,7 +859,7 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
mOutputBlocked++;
return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
}
- if (tRecipe.mSpecialValue == -200 && (mCleanroom == null || mCleanroom.mEfficiency == 0))
+ if (tRecipe.mSpecialValue == -200 && (getCallbackBase() == null || getCallbackBase().mEfficiency == 0))
return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
if (!tRecipe.isRecipeInputEqual(true, new FluidStack[]{getFillableStack()}, getAllInputs()))
return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
@@ -841,12 +868,12 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
mOutputItems[i] = tRecipe.getOutput(i);
if (tRecipe.mSpecialValue == -200 || tRecipe.mSpecialValue == -300)
for (int i = 0; i < mOutputItems.length; i++)
- if (mOutputItems[i] != null && getBaseMetaTileEntity().getRandomNumber(10000) > mCleanroom.mEfficiency)
+ if (mOutputItems[i] != null && getBaseMetaTileEntity().getRandomNumber(10000) > getCallbackBase().mEfficiency)
{
if (debugCleanroom) {
GT_Log.out.println(
"BasicMachine: Voiding output due to efficiency failure. mEfficiency = " +
- mCleanroom.mEfficiency
+ getCallbackBase().mEfficiency
);
}
mOutputItems[i] = null;
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java
index 8c36c2af65..dfac210915 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBus.java
@@ -160,7 +160,7 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch {
@Override
public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
+ return aSide == getBaseMetaTileEntity().getFrontFacing();
}
@Override
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
index 6d2110baee..202e542c88 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
@@ -628,7 +628,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
}
else
{
- xEUt <<= ocTimeShift;
+ xEUt <<= 2;
}
}
if(xEUt > Integer.MAX_VALUE - 1) {
diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java
index a9a001a0d4..bf091695c7 100644
--- a/src/main/java/gregtech/api/util/GT_Recipe.java
+++ b/src/main/java/gregtech/api/util/GT_Recipe.java
@@ -617,10 +617,10 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
public static final GT_Recipe_Map_Fuel sDieselFuels = new GT_Recipe_Map_Fuel(new HashSet<>(20), "gt.recipe.dieselgeneratorfuel", "Combustion Generator Fuels", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
public static final GT_Recipe_Map_Fuel sExtremeDieselFuels = new GT_Recipe_Map_Fuel(new HashSet<>(20), "gt.recipe.extremedieselgeneratorfuel", "Extreme Diesel Engine Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
public static final GT_Recipe_Map_Fuel sTurbineFuels = new GT_Recipe_Map_Fuel(new HashSet<>(25), "gt.recipe.gasturbinefuel", "Gas Turbine Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
- public static final GT_Recipe_Map_Fuel sHotFuels = new GT_Recipe_Map_Fuel(new HashSet<>(10), "gt.recipe.thermalgeneratorfuel", "Thermal Generator Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, false);
+ public static final GT_Recipe_Map_Fuel sHotFuels = new GT_Recipe_Map_Fuel(new HashSet<>(10), "gt.recipe.thermalgeneratorfuel", "Thermal Generator Fuels", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, false);
public static final GT_Recipe_Map_Fuel sDenseLiquidFuels = new GT_Recipe_Map_Fuel(new HashSet<>(15), "gt.recipe.semifluidboilerfuels", "Semifluid Boiler Fuels", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
public static final GT_Recipe_Map_Fuel sPlasmaFuels = new GT_Recipe_Map_Fuel(new HashSet<>(100), "gt.recipe.plasmageneratorfuels", "Plasma Generator Fuels", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
- public static final GT_Recipe_Map_Fuel sMagicFuels = new GT_Recipe_Map_Fuel(new HashSet<>(100), "gt.recipe.magicfuels", "Magic Energy Absorber", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
+ public static final GT_Recipe_Map_Fuel sMagicFuels = new GT_Recipe_Map_Fuel(new HashSet<>(100), "gt.recipe.magicfuels", "Magic Energy Absorber Fuels", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
public static final GT_Recipe_Map_Fuel sSmallNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet<>(1), "gt.recipe.smallnaquadahreactor", "Naquadah Reactor MkI", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
public static final GT_Recipe_Map_Fuel sLargeNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet<>(1), "gt.recipe.largenaquadahreactor", "Naquadah Reactor MkII", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
public static final GT_Recipe_Map_Fuel sHugeNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet<>(1), "gt.recipe.fluidnaquadahreactor", "Naquadah Reactor MkIII", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java
index a65ed00aed..cf7b86fe94 100644
--- a/src/main/java/gregtech/api/util/GT_Utility.java
+++ b/src/main/java/gregtech/api/util/GT_Utility.java
@@ -65,6 +65,7 @@ import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.fluids.*;
import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData;
+import net.minecraftforge.oredict.OreDictionary;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
@@ -2489,5 +2490,12 @@ public class GT_Utility {
public static boolean isPartOfOrePrefix(ItemStack aStack, OrePrefixes aPrefix){
return GT_OreDictUnificator.getAssociation(aStack) != null ? GT_OreDictUnificator.getAssociation(aStack).mPrefix.equals(aPrefix) : false;
}
+ public static boolean isOre(ItemStack aStack) {
+ for (int id: OreDictionary.getOreIDs(aStack)) {
+ if (OreDictionary.getOreName(id).startsWith("ore"))
+ return true;
+ }
+ return false;
+ }
}
diff --git a/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java b/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java
index 83dc82e6f9..41726b4fc5 100644
--- a/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java
+++ b/src/main/java/gregtech/common/bees/GT_AlleleBeeSpecies.java
@@ -8,9 +8,19 @@ import forestry.apiculture.genetics.alleles.AlleleBeeSpecies;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
+import java.awt.*;
+
public class GT_AlleleBeeSpecies extends AlleleBeeSpecies {
- public GT_AlleleBeeSpecies(String uid, boolean dominant, String unlocalizedName, String authority, String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor) {
- super(uid, unlocalizedName, authority, unlocalizedDescription, dominant, branch, binomial, primaryColor, secondaryColor);
+ public GT_AlleleBeeSpecies(String uid,
+ boolean dominant,
+ String unlocalizedName,
+ String authority,
+ String unlocalizedDescription,
+ IClassification branch,
+ String binomial,
+ Color primaryColor,
+ Color secondaryColor) {
+ super(uid, unlocalizedName, authority, unlocalizedDescription, dominant, branch, binomial, primaryColor.getRGB(), secondaryColor.getRGB());
AlleleManager.alleleRegistry.registerAllele(this, EnumBeeChromosome.SPECIES);
}
diff --git a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java
index cb54f5d4a1..e1db4c2ac0 100644
--- a/src/main/java/gregtech/common/bees/GT_AlleleHelper.java
+++ b/src/main/java/gregtech/common/bees/GT_AlleleHelper.java
@@ -21,7 +21,7 @@ public class GT_AlleleHelper extends AlleleHelper {
private static final String modId = Constants.ID;
- private Map<Class, Map<?, ? extends IAllele>> alleleMaps = new HashMap<>();
+ private Map<Class<?>, Map<?, ? extends IAllele>> alleleMaps = new HashMap<>();
public void init() {
if (PluginManager.Module.APICULTURE.isEnabled()) {
@@ -114,12 +114,17 @@ public class GT_AlleleHelper extends AlleleHelper {
}
alleleMaps.put(Boolean.class, booleans);
}
-
+ @SuppressWarnings("unchecked")
public static void initialisation(){
GT_AlleleHelper helper = new GT_AlleleHelper();
try {
- helper.alleleMaps = (Map<Class, Map<?, ? extends IAllele>>) FieldUtils.readField(FieldUtils.getField(AlleleHelper.class,"alleleMaps",true),AlleleHelper.instance,true);
+ helper.alleleMaps = (Map<Class<?>, Map<?, ? extends IAllele>>)
+ FieldUtils.readField(
+ FieldUtils.getField(AlleleHelper.class,"alleleMaps",true),
+ AlleleHelper.instance,
+ true
+ );
} catch (IllegalAccessException e) {
e.printStackTrace();
}
diff --git a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java
index 7b61505fc7..ca919e7cf2 100644
--- a/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java
+++ b/src/main/java/gregtech/common/bees/GT_Bee_Mutation.java
@@ -16,7 +16,7 @@ import java.util.List;
public class GT_Bee_Mutation extends BeeMutation {
- private float split = 1;
+ private final float split;
public GT_Bee_Mutation(IAlleleBeeSpecies bee0, IAlleleBeeSpecies bee1, IAllele[] result, int chance, float split) {
super(bee0, bee1, result, chance);
@@ -52,6 +52,7 @@ public class GT_Bee_Mutation extends BeeMutation {
return processedChance;
}
+ @SuppressWarnings("unchecked")
private float getBasicChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) {
float mutationChance = this.getBaseChance();
List<IMutationCondition> mutationConditions = null;
@@ -61,7 +62,7 @@ public class GT_Bee_Mutation extends BeeMutation {
if (f == null)
return mutationChance;
try {
- mutationConditions = f.get(this) instanceof List ? (List) f.get(this) : null;
+ mutationConditions = f.get(this) instanceof List ? (List<IMutationCondition>) f.get(this) : null;
} catch (IllegalAccessException e) {
e.printStackTrace();
}
diff --git a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
index 6c4a03420d..2eb100599b 100644
--- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
+++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
@@ -132,7 +132,14 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
public Packet getDescriptionPacket() {
if (!this.worldObj.isRemote) {
- if ((this.mBlocked == (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord + 1, this.yCoord, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord - 1, this.yCoord, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord - 1, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord + 1)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord - 1)) ? 1 : 0) == 0) {
+ if (!(this.mBlocked = (
+ GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord + 1, this.yCoord, this.zCoord) &&
+ GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord - 1, this.yCoord, this.zCoord) &&
+ GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord) &&
+ GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord - 1, this.zCoord) &&
+ GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord + 1) &&
+ GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord - 1)
+ ))) {
GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord);
}
}
diff --git a/src/main/java/gregtech/common/items/GT_VolumetricFlask.java b/src/main/java/gregtech/common/items/GT_VolumetricFlask.java
index d0132b1fdd..5ab6b3395e 100644
--- a/src/main/java/gregtech/common/items/GT_VolumetricFlask.java
+++ b/src/main/java/gregtech/common/items/GT_VolumetricFlask.java
@@ -1,7 +1,6 @@
package gregtech.common.items;
-import cpw.mods.fml.common.Loader;