aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/GT_Client.java11
-rw-r--r--src/main/java/gregtech/common/GT_Pollution.java7
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java41
-rw-r--r--src/main/java/gregtech/common/GT_RecipeAdder.java25
-rw-r--r--src/main/java/gregtech/common/GT_UndergroundOil.java4
-rw-r--r--src/main/java/gregtech/common/GT_Worldgenerator.java69
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Machines.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java11
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Arm.java5
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java6
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java24
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java8
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Drain.java12
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java24
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java6
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java4
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java12
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java6
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java4
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java24
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java6
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Pump.java24
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java14
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java6
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java6
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Shutter.java8
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Vent.java2
-rw-r--r--src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java12
-rw-r--r--src/main/java/gregtech/common/gui/GT_Container_Filter.java20
-rw-r--r--src/main/java/gregtech/common/gui/GT_Container_Regulator.java5
-rw-r--r--src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java12
-rw-r--r--src/main/java/gregtech/common/gui/GT_Container_TypeFilter.java20
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java6
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java31
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_None.java5
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java114
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java3
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java12
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java33
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java65
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java1
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java10
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java18
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java32
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java41
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool.java6
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Axe.java16
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java21
59 files changed, 509 insertions, 399 deletions
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java
index d26e899264..839dcd2367 100644
--- a/src/main/java/gregtech/common/GT_Client.java
+++ b/src/main/java/gregtech/common/GT_Client.java
@@ -81,7 +81,7 @@ public class GT_Client extends GT_Proxy
private boolean isFirstClientPlayerTick;
private String mMessage;
public GT_Client() {
- mCapeRenderer = new GT_CapeRenderer(mCapeList);
+ mCapeRenderer = new GT_CapeRenderer(mCapeList);
mAnimationTick = 0L;
mAnimationDirection = false;
isFirstClientPlayerTick = true;
@@ -231,7 +231,6 @@ public class GT_Client extends GT_Proxy
String tName = arr$[i$];
mCapeList.add(tName.toLowerCase());
}
-
(new Thread(this)).start();
}
@@ -256,9 +255,7 @@ public class GT_Client extends GT_Proxy
GregTech_API.METATILEENTITIES[i].getStackForm(1L).getTooltip(null, true);
i++;
} while (true);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
// super.onPostLoad();
@@ -305,7 +302,7 @@ public class GT_Client extends GT_Proxy
}
} catch (Throwable e) {
}
- try {
+ /**try {
GT_Log.out.println("GT_Mod: Downloading News.");
@SuppressWarnings("resource")
Scanner tScanner = new Scanner(new URL("http://files.minecraftforge.net/maven/com/gregoriust/gregtech/message.txt").openStream());
@@ -313,7 +310,7 @@ public class GT_Client extends GT_Proxy
this.mMessage = (this.mMessage + tScanner.nextLine() + " ");
}
} catch (Throwable e) {
- }
+ }**/
}
@SubscribeEvent
diff --git a/src/main/java/gregtech/common/GT_Pollution.java b/src/main/java/gregtech/common/GT_Pollution.java
index 20ffd10acd..6669bf861a 100644
--- a/src/main/java/gregtech/common/GT_Pollution.java
+++ b/src/main/java/gregtech/common/GT_Pollution.java
@@ -16,10 +16,9 @@ import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.ChunkPosition;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
+import net.minecraftforge.event.world.WorldEvent;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
+import java.util.*;
import static gregtech.common.GT_Proxy.*;
@@ -274,7 +273,7 @@ public class GT_Pollution {
@Deprecated /*Don't use it... too weird way of passing position*/
public static void addPollution(World aWorld, ChunkPosition aPos, int aPollution){
//The abuse of ChunkPosition to store block position and dim...
- //is just bad especially when that is both used to store ChunkPos and BlockPos depending on context
+ //is just bad expacially when that is both used to store ChunkPos and BlockPos depeending on context
addPollution(aWorld.getChunkFromBlockCoords(aPos.chunkPosX,aPos.chunkPosZ),aPollution);
}
}
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index 08afbbaf26..82cbfc375e 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -1,7 +1,13 @@
package gregtech.common;
-import cpw.mods.fml.common.*;
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.IFuelHandler;
+import cpw.mods.fml.common.Loader;
+import cpw.mods.fml.common.ModContainer;
+import cpw.mods.fml.common.ProgressManager;
import cpw.mods.fml.common.eventhandler.Event.Result;
+import cpw.mods.fml.common.eventhandler.EventBus;
+import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.network.FMLNetworkEvent;
@@ -27,8 +33,13 @@ import gregtech.api.objects.MaterialStack;
import gregtech.api.util.*;
import gregtech.common.entities.GT_Entity_Arrow;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import gregtech.common.items.armor.ModularArmor_Item;
-import gregtech.common.items.armor.gui.*;
+import gregtech.common.items.armor.*;
+import gregtech.common.items.armor.gui.ContainerBasicArmor;
+import gregtech.common.items.armor.gui.ContainerElectricArmor1;
+import gregtech.common.items.armor.gui.GuiElectricArmor1;
+import gregtech.common.items.armor.gui.GuiModularArmor;
+import gregtech.common.items.armor.gui.InventoryArmor;
+import gregtech.common.tools.GT_Tool;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
@@ -50,19 +61,23 @@ import net.minecraft.potion.Potion;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.DamageSource;
import net.minecraft.world.ChunkCoordIntPair;
+import net.minecraft.world.ChunkPosition;
import net.minecraft.world.World;
import net.minecraft.world.WorldSettings.GameType;
import net.minecraft.world.gen.feature.WorldGenMinable;
+import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
import net.minecraftforge.event.entity.player.ArrowNockEvent;
+import net.minecraftforge.event.entity.player.PlayerEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.terraingen.OreGenEvent;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.event.world.ChunkDataEvent;
+import net.minecraftforge.event.world.WorldEvent;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
@@ -193,7 +208,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
public boolean mCropNeedBlock = true;
public boolean mReenableSimplifiedChemicalRecipes = false;
public boolean mAMHInteraction = true;
+ public boolean mForceFreeFace = false;
+
public GT_Proxy() {
GameRegistry.registerFuelHandler(this);
MinecraftForge.EVENT_BUS.register(this);
@@ -493,6 +510,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
break;
}
}
+ GT_LanguageManager.writePlaceholderStrings();
}
public static long tBits = GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.ONLY_ADD_IF_RESULT_IS_NOT_NULL | GT_ModHandler.RecipeBits.NOT_REMOVABLE;
@@ -802,7 +820,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
aEvent.Ore.stackSize = 1;
if (this.mIgnoreTcon || aEvent.Ore.getUnlocalizedName().startsWith("item.oreberry")) {
if ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("xycraft")) || (aOriginalMod.toLowerCase(Locale.ENGLISH).contains("tconstruct"))
- && (!aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natural"))) {
+ || ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natura")) && (!aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natural")))) {
if (GT_Values.D1) {
GT_Log.ore.println(aMod + " -> " + aEvent.Name + " is getting ignored, because of racism. :P");
}
@@ -1862,6 +1880,21 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
////DO NOTHING - this chunk data was already loaded and stored in hash map
//}
}
+
+ @SubscribeEvent
+ public void onBlockBreakSpeedEvent(PlayerEvent.BreakSpeed aEvent)
+ {
+ if (aEvent.newSpeed > 0.0F)
+ {
+ if (aEvent.entityPlayer != null)
+ {
+ ItemStack aStack = aEvent.entityPlayer.getCurrentEquippedItem();
+ if ((aStack != null) && ((aStack.getItem() instanceof GT_MetaGenerated_Tool))) {
+ aEvent.newSpeed = ((GT_MetaGenerated_Tool)aStack.getItem()).onBlockBreakSpeedEvent(aEvent.newSpeed, aStack, aEvent.entityPlayer, aEvent.block, aEvent.x, aEvent.y, aEvent.z, (byte)aEvent.metadata, aEvent);
+ }
+ }
+ }
+ }
public static class OreDictEventContainer {
public final OreDictionary.OreRegisterEvent mEvent;
diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java
index 69c04e83f4..05eb72dcf5 100644
--- a/src/main/java/gregtech/common/GT_RecipeAdder.java
+++ b/src/main/java/gregtech/common/GT_RecipeAdder.java
@@ -128,15 +128,16 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
}
public boolean addMultiblockChemicalRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUtick){
- if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs)) {
- return false;
- }
- if (aEUtick <= 0) {
- return false;
- }
- GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe(false, aInputs, aOutputs, null, null, aFluidInputs, aFluidOutputs, aDuration, aEUtick, 0);
- return true;
- }
+ if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs)) {
+ return false;
+ }
+ if (aEUtick <= 0) {
+ return false;
+ }
+ GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes.addRecipe(false, aInputs, aOutputs, null, null, aFluidInputs, aFluidOutputs, aDuration, aEUtick, 0);
+ return true;
+ }
+
@Override
public void addDefaultPolymerizationRecipes(Fluid aBasicMaterial, Fluid aPolymer){
//Oxygen/Rutile -> +50% Output each
@@ -176,7 +177,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
new GT_Recipe(aInput1, aEUt, aInput2, aDuration, aOutput1, aOutput2);
return true;
}
-
+
@Override
public boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt) {
return addAlloySmelterRecipe(aInput1, aInput2, aOutput1, aDuration, aEUt, false);
@@ -295,8 +296,6 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return true;
}
-
-
public boolean addAssemblerRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack aOutput1, int aDuration, int aEUt, boolean aCleanroom) {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
@@ -383,7 +382,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
}
int tExplosives = aInput2 > 0 ? aInput2 < 64 ? aInput2 : 64 : 1;
int tGunpowder = tExplosives * 2;
- int tDynamite = tExplosives /2;
+ int tDynamite = tExplosives;//TODO check this values for mutliplication (if want to do divide use that Math.min()
int tTNT = Math.max(1, tExplosives/2);
int tITNT = Math.max(1, tExplosives/4);
//new GT_Recipe(aInput1, aInput2, aOutput1, aOutput2);
diff --git a/src/main/java/gregtech/common/GT_UndergroundOil.java b/src/main/java/gregtech/common/GT_UndergroundOil.java
index 83262716ae..a3e0962100 100644
--- a/src/main/java/gregtech/common/GT_UndergroundOil.java
+++ b/src/main/java/gregtech/common/GT_UndergroundOil.java
@@ -4,14 +4,18 @@ import gregtech.GT_Mod;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_UO_Fluid;
import gregtech.api.objects.XSTR;
+import gregtech.common.GT_Proxy;
import net.minecraft.world.ChunkCoordIntPair;
+import net.minecraft.world.ChunkPosition;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
+import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import java.util.HashMap;
+import static gregtech.api.util.GT_Utility.getScaleCoordinates;
import static gregtech.common.GT_Proxy.*;
/**
diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java
index 334097c729..792cec6e5e 100644
--- a/src/main/java/gregtech/common/GT_Worldgenerator.java
+++ b/src/main/java/gregtech/common/GT_Worldgenerator.java
@@ -3,12 +3,14 @@ package gregtech.common;
import cpw.mods.fml.common.IWorldGenerator;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
+import gregtech.api.enums.GT_Values;
import gregtech.api.objects.XSTR;
import gregtech.api.util.GT_Log;
import gregtech.api.world.GT_Worldgen;
import gregtech.common.blocks.GT_TileEntity_Ores;
import net.minecraft.init.Blocks;
import net.minecraft.util.MathHelper;
+import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.Chunk;
@@ -16,13 +18,12 @@ import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.ChunkProviderEnd;
import net.minecraft.world.gen.ChunkProviderHell;
+import java.util.HashSet;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
-public class GT_Worldgenerator
- implements IWorldGenerator {
- //public static boolean sAsteroids = true;
+public class GT_Worldgenerator implements IWorldGenerator {
private static int mEndAsteroidProbability = 300;
//private static int mGCAsteroidProbability = 50;
private static int mSize = 100;
@@ -60,14 +61,15 @@ public class GT_Worldgenerator
this.mIsGenerating = false;
}
}
-
- //public synchronized void generate(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {//TODO CHECK???
- // int tempDimensionId = aWorld.provider.dimensionId;
- // if (tempDimensionId != -1 && tempDimensionId != 1 && !aChunkGenerator.getClass().getName().contains("galacticraft")) {
- // tempDimensionId = 0;
- // }
- // new WorldGenContainer(new XSTR(aRandom.nextInt()), aX * 16, aZ * 16, tempDimensionId, aWorld, aChunkGenerator, aChunkProvider, aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName).run();
- //}
+ /*//TODO CHECK
+ public synchronized void generate(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {//TODO CHECK???
+ int tempDimensionId = aWorld.provider.dimensionId;
+ if (tempDimensionId != -1 && tempDimensionId != 1 && !aChunkGenerator.getClass().getName().contains("galacticraft")) {
+ tempDimensionId = 0;
+ }
+ new WorldGenContainer(new XSTR(aRandom.nextInt()), aX * 16, aZ * 16, tempDimensionId, aWorld, aChunkGenerator, aChunkProvider, aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName).run();
+ }
+ */
public static class WorldGenContainer
implements Runnable {
@@ -79,6 +81,7 @@ public class GT_Worldgenerator
public final IChunkProvider mChunkGenerator;
public final IChunkProvider mChunkProvider;
public final String mBiome;
+ public static HashSet<ChunkCoordIntPair> mGenerated = new HashSet<>(2000);
public WorldGenContainer(Random aRandom, int aX, int aZ, int aDimensionType, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider, String aBiome) {
this.mRandom = aRandom;
@@ -91,8 +94,22 @@ public class GT_Worldgenerator
this.mBiome = aBiome;
}
+ //returns a coordinate of a center chunk of 3x3 square; the argument belongs to this square
+ public int getVeinCenterCoordinate(int c) {
+ c += c < 0 ? 1 : 3;
+ return c - c % 3 - 2;
+ }
+
+ public boolean surroundingChunksLoaded(int xCenter, int zCenter) {
+ return mWorld.checkChunksExist(xCenter - 16, 0, zCenter - 16, xCenter + 16, 0, zCenter + 16);
+ }
+
public void run() {
- if (((this.mX / 16 - 1) % 3 == 0) && ((this.mZ / 16 - 1) % 3 == 0)) {
+ int xCenter = getVeinCenterCoordinate(mX >> 4) << 4;
+ int zCenter = getVeinCenterCoordinate(mZ >> 4) << 4;
+ ChunkCoordIntPair centerChunk = new ChunkCoordIntPair(xCenter, zCenter);
+ if (surroundingChunksLoaded(xCenter, zCenter) && !mGenerated.contains(centerChunk)) {
+ mGenerated.add(centerChunk);
if ((GT_Worldgen_GT_Ore_Layer.sWeight > 0) && (GT_Worldgen_GT_Ore_Layer.sList.size() > 0)) {
boolean temp = true;
int tRandomWeight;
@@ -102,7 +119,7 @@ public class GT_Worldgenerator
tRandomWeight -= ((GT_Worldgen_GT_Ore_Layer) tWorldGen).mWeight;
if (tRandomWeight <= 0) {
try {
- if (tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, this.mX, this.mZ, this.mChunkGenerator, this.mChunkProvider)) {
+ if (tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, xCenter, zCenter, this.mChunkGenerator, this.mChunkProvider)) {
temp = false;
}
break;
@@ -114,13 +131,9 @@ public class GT_Worldgenerator
}
}
int i = 0;
- for (int tX = this.mX - 16; i < 3; tX += 16) {
+ for (int tX = xCenter - 16; i < 3; tX += 16) {
int j = 0;
- for (int tZ = this.mZ - 16; j < 3; tZ += 16) {
- String tBiome = this.mWorld.getBiomeGenForCoords(tX + 8, tZ + 8).biomeName;
- //if (tBiome == null) {//TODO NEEDED?
- // tBiome = BiomeGenBase.plains.biomeName;
- //}
+ for (int tZ = zCenter - 16; j < 3; tZ += 16) {
try {
for (GT_Worldgen tWorldGen : GregTech_API.sWorldgenList) {
tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, tX, tZ, this.mChunkGenerator, this.mChunkProvider);
@@ -168,7 +181,7 @@ public class GT_Worldgenerator
}
}
}
- //if(GT_Values.D1)System.out.println("do asteroid gen: "+this.mX+" "+this.mZ);
+ //if(GT_Values.D1)System.out.println("do asteroid gen: " + this.mX + " " + this.mZ);
int tX = mX + aRandom.nextInt(16);
int tY = 50 + aRandom.nextInt(200 - 50);
int tZ = mZ + aRandom.nextInt(16);
@@ -217,16 +230,11 @@ public class GT_Worldgenerator
} else if (ranOre < 10) {
GT_TileEntity_Ores.setOreBlock(mWorld, eX, eY, eZ, sporadicMeta, false, true);
} else {
- //if (tDimensionType == 1) {//TODO CHECK
- mWorld.setBlock(eX, eY, eZ, Blocks.end_stone, 0, 0);
- //} else if (tDimensionName.equals("Asteroids")) {
- ////int asteroidType = aRandom.nextInt(20);
- ////if (asteroidType == 19) { //Rare Asteroid?
- ////mWorld.setBlock(eX, eY, eZ, GregTech_API.sBlockGranites, 8, 3);
- ////} else {
- //mWorld.setBlock(eX, eY, eZ, GregTech_API.sBlockGranites, 8, 3);
- ////}
- //}
+ if (tDimensionType == 1) {
+ mWorld.setBlock(eX, eY, eZ, Blocks.end_stone, 0, 2);
+ }/* else if (tDimensionName.equals("Asteroids")) {
+ mWorld.setBlock(eX, eY, eZ, GregTech_API.sBlockGranites, 8, 3);
+ }*/
}
}
}
@@ -236,7 +244,6 @@ public class GT_Worldgenerator
}
}
}
-
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
index 9472374a7c..3ada783b1e 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
@@ -209,10 +209,10 @@ public class GT_Block_Machines
@Override //THIS
public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int aX, int aY, int aZ) {
- TileEntity tTileEntity = blockAccess.getTileEntity(aX,aY,aZ);
+ TileEntity tTileEntity = blockAccess.getTileEntity(aX, aY, aZ);
if (((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getMetaTileEntity() != null)) {
AxisAlignedBB bbb=((IGregTechTileEntity)tTileEntity).getCollisionBoundingBoxFromPool(((IGregTechTileEntity)tTileEntity).getWorld(), 0, 0, 0);
- minX=bbb.minX;
+ minX=bbb.minX;//This essentially sets block bounds
minY=bbb.minY;
minZ=bbb.minZ;
maxX=bbb.maxX;
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java
index 4b61da0f3f..ccb4896d68 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java
@@ -36,7 +36,6 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements
public static ThreadLocal<GT_TileEntity_Ores> mTemporaryTileEntity = new ThreadLocal();
public static boolean FUCKING_LOCK = false;
public static boolean tHideOres;
- public static int tOreMetaCount;
private final String aTextName = ".name";
private final String aTextSmall = "Small ";
@@ -46,7 +45,6 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements
setStepSound(soundTypeStone);
setCreativeTab(GregTech_API.TAB_GREGTECH_ORES);
tHideOres = Loader.isModLoaded("NotEnoughItems") && GT_Mod.gregtechproxy.mHideUnusedOres;
- tOreMetaCount = aOreMetaCount;
if(aOreMetaCount > 8 || aOreMetaCount < 0) aOreMetaCount = 8;
for (int i = 0; i < 16; i++) {
@@ -59,12 +57,11 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + aTextName, aTextSmall + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
if ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x8) != 0) {
GT_OreDictUnificator.registerOre(this.getProcessingPrefix()[j] != null ? this.getProcessingPrefix()[j].get(GregTech_API.sGeneratedMaterials[i]) : "", new ItemStack(this, 1, i + (j * 1000)));
- if (tHideOres) {
- if(!(j == 0 && !aHideFirstMeta)){
- codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + (j * 1000)));}
+ if (tHideOres) {
+ if(!(j == 0 && !aHideFirstMeta)){
+ codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + (j * 1000)));}
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, (i + 16000) + (j * 1000)));
- }
- }
+ }}
}
}
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
index 7206bedccc..28719087bc 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java
@@ -3,6 +3,7 @@ package gregtech.common.covers;
import gregtech.api.interfaces.tileentity.ICoverable;
import gregtech.api.interfaces.tileentity.IMachineProgress;
import gregtech.api.util.GT_CoverBehavior;
+import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
@@ -38,7 +39,7 @@ public class GT_Cover_Arm
} else {
aCoverVariable -= 16;
}
- GT_Utility.sendChatToPlayer(aPlayer, (aCoverVariable > 0 ? "Puts out into adjacent Slot #" : "Grabs in for own Slot #") + (Math.abs(aCoverVariable) - 1));
+ GT_Utility.sendChatToPlayer(aPlayer, (aCoverVariable > 0 ? trans("001","Puts out into adjacent Slot #") : trans("002","Grabs in for own Slot #")) + (Math.abs(aCoverVariable) - 1));
return aCoverVariable;
}
@@ -48,7 +49,7 @@ public class GT_Cover_Arm
} else {
aCoverVariable--;
}
- GT_Utility.sendChatToPlayer(aPlayer, (aCoverVariable > 0 ? "Puts out into adjacent Slot #" : "Grabs in for own Slot #") + (Math.abs(aCoverVariable) - 1));
+ GT_Utility.sendChatToPlayer(aPlayer, (aCoverVariable > 0 ? trans("001","Puts out into adjacent Slot #") : trans("002","Grabs in for own Slot #")) + (Math.abs(aCoverVariable) - 1));
aTileEntity.setCoverDataAtSide(aSide, aCoverVariable);
return true;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java
index 65ba326625..96a2d4a2b8 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_ControlsWork.java
@@ -56,13 +56,13 @@ public class GT_Cover_ControlsWork
aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 3;
if(aCoverVariable <0){aCoverVariable = 2;}
if (aCoverVariable == 0) {
- GT_Utility.sendChatToPlayer(aPlayer, "Normal");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("003", "Normal"));
}
if (aCoverVariable == 1) {
- GT_Utility.sendChatToPlayer(aPlayer, "Inverted");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("004", "Inverted"));
}
if (aCoverVariable == 2) {
- GT_Utility.sendChatToPlayer(aPlayer, "No Work at all");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("005", "No Work at all"));
}
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
index a62d08e7fb..47ccde8ba0 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
@@ -38,18 +38,18 @@ public class GT_Cover_Conveyor
aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12;
if(aCoverVariable <0){aCoverVariable = 11;}
switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Export"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Import"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Export (conditional)"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Import (conditional)"); break;
- case 4: GT_Utility.sendChatToPlayer(aPlayer, "Export (invert cond)"); break;
- case 5: GT_Utility.sendChatToPlayer(aPlayer, "Import (invert cond)"); break;
- case 6: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input"); break;
- case 7: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output"); break;
- case 8: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (conditional)"); break;
- case 9: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (conditional)"); break;
- case 10: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (invert cond)"); break;
- case 11: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (invert cond)"); break;
+ case 0: GT_Utility.sendChatToPlayer(aPlayer, trans("006", "Export")); break;
+ case 1: GT_Utility.sendChatToPlayer(aPlayer, trans("007", "Import")); break;
+ case 2: GT_Utility.sendChatToPlayer(aPlayer, trans("008", "Export (conditional)")); break;
+ case 3: GT_Utility.sendChatToPlayer(aPlayer, trans("009", "Import (conditional)")); break;
+ case 4: GT_Utility.sendChatToPlayer(aPlayer, trans("010", "Export (invert cond)")); break;
+ case 5: GT_Utility.sendChatToPlayer(aPlayer, trans("011", "Import (invert cond)")); break;
+ case 6: GT_Utility.sendChatToPlayer(aPlayer, trans("012", "Export allow Input")); break;
+ case 7: GT_Utility.sendChatToPlayer(aPlayer, trans("013", "Import allow Output")); break;
+ case 8: GT_Utility.sendChatToPlayer(aPlayer, trans("014", "Export allow Input (conditional)")); break;
+ case 9: GT_Utility.sendChatToPlayer(aPlayer, trans("015", "Import allow Output (conditional)")); break;
+ case 10: GT_Utility.sendChatToPlayer(aPlayer, trans("016", "Export allow Input (invert cond)")); break;
+ case 11: GT_Utility.sendChatToPlayer(aPlayer, trans("017", "Import allow Output (invert cond)")); break;
}
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java
index 08acc6faa1..963b519f34 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java
@@ -31,10 +31,10 @@ public class GT_Cover_DoesWork
aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 4;
if(aCoverVariable <0){aCoverVariable = 3;}
switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Normal"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Inverted"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Ready to work"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Not ready to work"); break;
+ case 0: GT_Utility.sendChatToPlayer(aPlayer, trans("018", "Normal")); break;
+ case 1: GT_Utility.sendChatToPlayer(aPlayer, trans("019", "Inverted")); break;
+ case 2: GT_Utility.sendChatToPlayer(aPlayer, trans("020", "Ready to work")); break;
+ case 3: GT_Utility.sendChatToPlayer(aPlayer, trans("021", "Not ready to work")); break;
}
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java
index b20d24104e..e26d7bb4a2 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java
@@ -61,12 +61,12 @@ public class GT_Cover_Drain
aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 6;
if(aCoverVariable <0){aCoverVariable = 5;}
switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Import"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Import (conditional)"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Import (invert cond)"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Keep Liquids Away"); break;
- case 4: GT_Utility.sendChatToPlayer(aPlayer, "Keep Liquids Away (conditional)"); break;
- case 5: GT_Utility.sendChatToPlayer(aPlayer, "Keep Liquids Away (invert cond)"); break;
+ case 0: GT_Utility.sendChatToPlayer(aPlayer, trans("022", "Import")); break;
+ case 1: GT_Utility.sendChatToPlayer(aPlayer, trans("023", "Import (conditional)")); break;
+ case 2: GT_Utility.sendChatToPlayer(aPlayer, trans("024", "Import (invert cond)")); break;
+ case 3: GT_Utility.sendChatToPlayer(aPlayer, trans("025", "Keep Liquids Away")); break;
+ case 4: GT_Utility.sendChatToPlayer(aPlayer, trans("026", "Keep Liquids Away (conditional)")); break;
+ case 5: GT_Utility.sendChatToPlayer(aPlayer, trans("027", "Keep Liquids Away (invert cond)")); break;
}
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java
index 41a24767a7..13aafe90df 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java
@@ -94,18 +94,18 @@ public class GT_Cover_EUMeter
aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12;
if(aCoverVariable <0){aCoverVariable = 11;}
switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Normal Universal Storage"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Universal Storage"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Normal Electricity Storage"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Electricity Storage"); break;
- case 4: GT_Utility.sendChatToPlayer(aPlayer, "Normal Steam Storage"); break;
- case 5: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Steam Storage"); break;
- case 6: GT_Utility.sendChatToPlayer(aPlayer, "Normal Average Electric Input"); break;
- case 7: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Average Electric Input"); break;
- case 8: GT_Utility.sendChatToPlayer(aPlayer, "Normal Average Electric Output"); break;
- case 9: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Average Electric Output"); break;
- case 10: GT_Utility.sendChatToPlayer(aPlayer, "Normal Electricity Storage(Including Batteries)"); break;
- case 11: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Electricity Storage(Including Batteries)"); break;
+ case 0: GT_Utility.sendChatToPlayer(aPlayer, trans("031", "Normal Universal Storage")); break;
+ case 1: GT_Utility.sendChatToPlayer(aPlayer, trans("032", "Inverted Universal Storage")); break;
+ case 2: GT_Utility.sendChatToPlayer(aPlayer, trans("033", "Normal Electricity Storage")); break;
+ case 3: GT_Utility.sendChatToPlayer(aPlayer, trans("034", "Inverted Electricity Storage")); break;
+ case 4: GT_Utility.sendChatToPlayer(aPlayer, trans("035", "Normal Steam Storage")); break;
+ case 5: GT_Utility.sendChatToPlayer(aPlayer, trans("036", "Inverted Steam Storage")); break;
+ case 6: GT_Utility.sendChatToPlayer(aPlayer, trans("037", "Normal Average Electric Input")); break;
+ case 7: GT_Utility.sendChatToPlayer(aPlayer, trans("038", "Inverted Average Electric Input")); break;
+ case 8: GT_Utility.sendChatToPlayer(aPlayer, trans("039", "Normal Average Electric Output")); break;
+ case 9: GT_Utility.sendChatToPlayer(aPlayer, trans("040", "Inverted Average Electric Output")); break;
+ case 10: GT_Utility.sendChatToPlayer(aPlayer, trans("041", "Normal Electricity Storage(Including Batteries)")); break;
+ case 11: GT_Utility.sendChatToPlayer(aPlayer, trans("042", "Inverted Electricity Storage(Including Batteries)")); break;
}
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java
index b8a6a70cfd..f5eaca9a74 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java
@@ -12,9 +12,9 @@ public class GT_Cover_EnergyOnly
public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
aCoverVariable = (aCoverVariable + 1) % 3;
switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Allow"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Allow (conditional)"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Disallow (conditional)"); break;
+ case 0: GT_Utility.sendChatToPlayer(aPlayer, trans("028", "Allow")); break;
+ case 1: GT_Utility.sendChatToPlayer(aPlayer, trans("029", "Allow (conditional)")); break;
+ case 2: GT_Utility.sendChatToPlayer(aPlayer, trans("030", "Disallow (conditional)")); break;
}
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java
index 9e63242279..1b0db1db62 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java
@@ -72,7 +72,7 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehavior {
aCoverVariable = (0 - mTransferRate);
}
GT_Utility.sendChatToPlayer(aPlayer,
- "Pump speed: " + aCoverVariable + "L/tick " + aCoverVariable * 20 + "L/sec");
+ trans("048", "Pump speed: ") + aCoverVariable + trans("049", "L/tick ") + aCoverVariable * 20 + trans("050", "L/sec"));
return aCoverVariable;
}
@@ -90,7 +90,7 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehavior {
aCoverVariable = (0 - mTransferRate);
}
GT_Utility.sendChatToPlayer(aPlayer,
- "Pump speed: " + aCoverVariable + "L/tick " + aCoverVariable * 20 + "L/sec");
+ trans("048", "Pump speed: ") + aCoverVariable + trans("049", "L/tick ") + aCoverVariable * 20 + trans("050", "L/sec"));
aTileEntity.setCoverDataAtSide(aSide, aCoverVariable);
return true;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java
index 9b9e426bc3..2d271ffccf 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Fluidfilter.java
@@ -21,10 +21,10 @@ public class GT_Cover_Fluidfilter
aFilterMode = (aFilterMode + (aPlayer.isSneaking()? -1 : 1)) % 4;
if(aFilterMode < 0){aFilterMode = 3;}
switch(aFilterMode) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Allow input, no output"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Deny input, no output"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Allow input, permit any output"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Deny input, permit any output"); break;
+ case 0: GT_Utility.sendChatToPlayer(aPlayer, trans("043", "Allow input, no output")); break;
+ case 1: GT_Utility.sendChatToPlayer(aPlayer, trans("044", "Deny input, no output")); break;
+ case 2: GT_Utility.sendChatToPlayer(aPlayer, trans("045", "Allow input, permit any output")); break;
+ case 3: GT_Utility.sendChatToPlayer(aPlayer, trans("046", "Deny input, permit any output")); break;
}
aCoverVariable|=aFilterMode;
return aCoverVariable;
@@ -42,7 +42,7 @@ public class GT_Cover_Fluidfilter
aCoverVariable = (aCoverVariable & 7) | (aFluid << 3);
aTileEntity.setCoverDataAtSide(aSide, aCoverVariable);
FluidStack sFluid = new FluidStack(FluidRegistry.getFluid(aFluid),1000);
- GT_Utility.sendChatToPlayer(aPlayer, "Filter Fluid: " + sFluid.getLocalizedName());
+ GT_Utility.sendChatToPlayer(aPlayer, trans("047", "Filter Fluid: ") + sFluid.getLocalizedName());
}else if(tStack.getItem() instanceof IFluidContainerItem){
IFluidContainerItem tContainer = (IFluidContainerItem)tStack.getItem();
if(tContainer.getFluid(tStack) != null) {
@@ -50,7 +50,7 @@ public class GT_Cover_Fluidfilter
aCoverVariable = (aCoverVariable & 7) | (aFluid << 3);
aTileEntity.setCoverDataAtSide(aSide, aCoverVariable);
FluidStack sFluid = new FluidStack(FluidRegistry.getFluid(aFluid),1000);
- GT_Utility.sendChatToPlayer(aPlayer, "Filter Fluid: " + sFluid.getLocalizedName());
+ GT_Utility.sendChatToPlayer(aPlayer, trans("047", "Filter Fluid: ") + sFluid.getLocalizedName());
}
}
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
index e723654b0e..83bac2a9ad 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java
@@ -38,9 +38,9 @@ public class GT_Cover_ItemMeter
public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % (2 + aTileEntity.getSizeInventory());
switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Normal"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Inverted"); break;
- default: GT_Utility.sendChatToPlayer(aPlayer, "Slot: " + (aCoverVariable - 2)); break;
+ case 0: GT_Utility.sendChatToPlayer(aPlayer, trans("051", "Normal")); break;
+ case 1: GT_Utility.sendChatToPlayer(aPlayer, trans("052", "Inverted")); break;
+ default: GT_Utility.sendChatToPlayer(aPlayer, trans("053", "Slot: ") + (aCoverVariable - 2)); break;
}
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
index 34e0180e91..5a0bb2e7d2 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
@@ -42,9 +42,9 @@ public class GT_Cover_LiquidMeter
public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
if (aCoverVariable == 0) {
- GT_Utility.sendChatToPlayer(aPlayer, "Inverted");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("054", "Inverted"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Normal");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("055", "Normal"));
}
return aCoverVariable == 0 ? 1 : 0;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java b/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java
index 1f5c5c2fbb..4c0f47751f 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java
@@ -64,18 +64,18 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior {
aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12;
if(aCoverVariable <0){aCoverVariable = 11;}
switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 1 Maintenance Needed"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 1 Maintenance Needed(inverted)"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 2 Maintenance Needed"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 2 Maintenance Needed(inverted)"); break;
- case 4: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 3 Maintenance Needed"); break;
- case 5: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 3 Maintenance Needed(inverted)"); break;
- case 6: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 4 Maintenance Needed"); break;
- case 7: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 4 Maintenance Needed(inverted)"); break;
- case 8: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 5 Maintenance Needed"); break;
- case 9: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 5 Maintenance Needed(inverted)"); break;
- case 10: GT_Utility.sendChatToPlayer(aPlayer, "Emit if rotor needs maintainance"); break;
- case 11: GT_Utility.sendChatToPlayer(aPlayer, "Emit if rotor needs maintainance(inverted)"); break;
+ case 0: GT_Utility.sendChatToPlayer(aPlayer, trans("056", "Emit if 1 Maintenance Needed")); break;
+ case 1: GT_Utility.sendChatToPlayer(aPlayer, trans("057", "Emit if 1 Maintenance Needed(inverted)")); break;
+ case 2: GT_Utility.sendChatToPlayer(aPlayer, trans("058", "Emit if 2 Maintenance Needed")); break;
+ case 3: GT_Utility.sendChatToPlayer(aPlayer, trans("059", "Emit if 2 Maintenance Needed(inverted)")); break;
+ case 4: GT_Utility.sendChatToPlayer(aPlayer, trans("060", "Emit if 3 Maintenance Needed")); break;
+ case 5: GT_Utility.sendChatToPlayer(aPlayer, trans("061", "Emit if 3 Maintenance Needed(inverted)")); break;
+ case 6: GT_Utility.sendChatToPlayer(aPlayer, trans("062", "Emit if 4 Maintenance Needed")); break;
+ case 7: GT_Utility.sendChatToPlayer(aPlayer, trans("063", "Emit if 4 Maintenance Needed(inverted)")); break;
+ case 8: GT_Utility.sendChatToPlayer(aPlayer, trans("064", "Emit if 5 Maintenance Needed")); break;
+ case 9: GT_Utility.sendChatToPlayer(aPlayer, trans("065", "Emit if 5 Maintenance Needed(inverted)")); break;
+ case 10: GT_Utility.sendChatToPlayer(aPlayer, trans("066", "Emit if rotor needs maintainance")); break;
+ case 11: GT_Utility.sendChatToPlayer(aPlayer, trans("067", "Emit if rotor needs maintainance(inverted)")); break;
}
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java
index d76a05117b..9e6c764170 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java
@@ -56,9 +56,9 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior {
aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 3;
if(aCoverVariable <0){aCoverVariable = 2;}
switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Emit if any Player is close"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Emit if other player is close"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Emit if you are close"); break;
+ case 0: GT_Utility.sendChatToPlayer(aPlayer, trans("068", "Emit if any Player is close")); break;
+ case 1: GT_Utility.sendChatToPlayer(aPlayer, trans("069", "Emit if other Player is close")); break;
+ case 2: GT_Utility.sendChatToPlayer(aPlayer, trans("070", "Emit if you are close")); break;
}
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
index 60a2e17dcd..466f6566c0 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
@@ -71,18 +71,18 @@ public class GT_Cover_Pump
aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12;
if(aCoverVariable <0){aCoverVariable = 11;}
switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Export"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Import"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Export (conditional)"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Import (conditional)"); break;
- case 4: GT_Utility.sendChatToPlayer(aPlayer, "Export (invert cond)"); break;
- case 5: GT_Utility.sendChatToPlayer(aPlayer, "Import (invert cond)"); break;
- case 6: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input"); break;
- case 7: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output"); break;
- case 8: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (conditional)"); break;
- case 9: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (conditional)"); break;
- case 10: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (invert cond)"); break;
- case 11: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (invert cond)"); break;
+ case 0: GT_Utility.sendChatToPlayer(aPlayer, trans("006", "Export")); break;
+ case 1: GT_Utility.sendChatToPlayer(aPlayer, trans("007", "Import")); break;
+ case 2: GT_Utility.sendChatToPlayer(aPlayer, trans("008", "Export (conditional)")); break;
+ case 3: GT_Utility.sendChatToPlayer(aPlayer, trans("009", "Import (conditional)")); break;
+ case 4: GT_Utility.sendChatToPlayer(aPlayer, trans("010", "Export (invert cond)")); break;
+ case 5: GT_Utility.sendChatToPlayer(aPlayer, trans("011", "Import (invert cond)")); break;
+ case 6: GT_Utility.sendChatToPlayer(aPlayer, trans("012", "Export allow Input")); break;
+ case 7: GT_Utility.sendChatToPlayer(aPlayer, trans("013", "Import allow Output")); break;
+ case 8: GT_Utility.sendChatToPlayer(aPlayer, trans("014", "Export allow Input (conditional)")); break;
+ case 9: GT_Utility.sendChatToPlayer(aPlayer, trans("015", "Import allow Output (conditional)")); break;
+ case 10: GT_Utility.sendChatToPlayer(aPlayer, trans("016", "Export allow Input (invert cond)")); break;
+ case 11: GT_Utility.sendChatToPlayer(aPlayer, trans("017", "Import allow Output (invert cond)")); break;
}
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java
index 5e5a5579a6..d942c944aa 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java
@@ -21,13 +21,13 @@ public class GT_Cover_RedstoneConductor
aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 7;
if(aCoverVariable <0){aCoverVariable = 6;}
switch (aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Conducts strongest Input"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from bottom Input"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from top Input"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from north Input"); break;
- case 4: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from south Input"); break;
- case 5: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from west Input"); break;
- case 6: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from east Input"); break;
+ case 0: GT_Utility.sendChatToPlayer(aPlayer, trans("071", "Conducts strongest Input")); break;
+ case 1: GT_Utility.sendChatToPlayer(aPlayer, trans("072", "Conducts from bottom Input")); break;
+ case 2: GT_Utility.sendChatToPlayer(aPlayer, trans("073", "Conducts from top Input")); break;
+ case 3: GT_Utility.sendChatToPlayer(aPlayer, trans("074", "Conducts from north Input")); break;
+ case 4: GT_Utility.sendChatToPlayer(aPlayer, trans("075", "Conducts from south Input")); break;
+ case 5: GT_Utility.sendChatToPlayer(aPlayer, trans("076", "Conducts from west Input")); break;
+ case 6: GT_Utility.sendChatToPlayer(aPlayer, trans("077", "Conducts from east Input")); break;
}
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java
index e87043ac23..114fd8b3dc 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java
@@ -12,9 +12,9 @@ public class GT_Cover_RedstoneSignalizer
public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
aCoverVariable = (aCoverVariable + 1) % 48;
switch(aCoverVariable / 16) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Signal = " + (aCoverVariable & 0xF)); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Conditional Signal = " + (aCoverVariable & 0xF)); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Conditional Signal = " + (aCoverVariable & 0xF)); break;
+ case 0: GT_Utility.sendChatToPlayer(aPlayer, trans("078", "Signal = ") + (aCoverVariable & 0xF)); break;
+ case 1: GT_Utility.sendChatToPlayer(aPlayer, trans("079", "Conditional Signal = ") + (aCoverVariable & 0xF)); break;
+ case 2: GT_Utility.sendChatToPlayer(aPlayer, trans("080", "Inverted Conditional Signal = ") + (aCoverVariable & 0xF)); break;
}
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
index 7b11138f03..a359d20aa9 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
@@ -19,7 +19,7 @@ public abstract class GT_Cover_RedstoneWirelessBase
GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0));
aCoverVariable = GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem());
aTileEntity.setCoverDataAtSide(aSide, aCoverVariable);
- GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + aCoverVariable);
+ GT_Utility.sendChatToPlayer(aPlayer, trans("081", "Frequency: ") + aCoverVariable);
return true;
}
return false;
@@ -43,7 +43,7 @@ public abstract class GT_Cover_RedstoneWirelessBase
aCoverVariable += 1024;
}
}
- GT_Utility.sendChatToPlayer(aPlayer, "Frequency: " + aCoverVariable);
+ GT_Utility.sendChatToPlayer(aPlayer, trans("081", "Frequency: ") + aCoverVariable);
return aCoverVariable;
}
@@ -72,7 +72,7 @@ public abstract class GT_Cover_RedstoneWirelessBase
}
public String getDescription(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return "Frequency: " + aCoverVariable;
+ return trans("081", "Frequency: ") + aCoverVariable;
}
public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
index d4fa9ba1d5..6599284995 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java
@@ -17,10 +17,10 @@ public class GT_Cover_Shutter
aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 4;
if(aCoverVariable <0){aCoverVariable = 3;}
switch(aCoverVariable) {
- case 0: GT_Utility.sendChatToPlayer(aPlayer, "Open if work enabled"); break;
- case 1: GT_Utility.sendChatToPlayer(aPlayer, "Open if work disabled"); break;
- case 2: GT_Utility.sendChatToPlayer(aPlayer, "Only Output allowed"); break;
- case 3: GT_Utility.sendChatToPlayer(aPlayer, "Only Input allowed"); break;
+ case 0: GT_Utility.sendChatToPlayer(aPlayer, trans("082", "Open if work enabled")); break;
+ case 1: GT_Utility.sendChatToPlayer(aPlayer, trans("083", "Open if work disabled")); break;
+ case 2: GT_Utility.sendChatToPlayer(aPlayer, trans("084", "Only Output allowed")); break;
+ case 3: GT_Utility.sendChatToPlayer(aPlayer, trans("085", "Only Intput allowed")); break;
}
return aCoverVariable;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Vent.java b/src/main/java/gregtech/common/covers/GT_Cover_Vent.java
index 39754b98f2..598188138f 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Vent.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Vent.java
@@ -29,6 +29,6 @@ public class GT_Cover_Vent
}
public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 60;
+ return 100;
}
}
diff --git a/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java b/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java
index 12ee893de4..4ea3fed295 100644
--- a/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java
+++ b/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java
@@ -39,27 +39,27 @@ public class GT_Container_ChestBuffer
if (aSlotIndex == 27) {
((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput);
if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("116","Emit Energy to Outputside"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("117","Don't emit Energy"));
}
return null;
}
if (aSlotIndex == 28) {
((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull);
if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if no Slot is free");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("118","Emit Redstone if no Slot is free"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("119","Don't emit Redstone"));
}
return null;
}
if (aSlotIndex == 29) {
((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert);
if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert) {
- GT_Utility.sendChatToPlayer(aPlayer, "Invert Redstone");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("120","Invert Redstone"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Redstone");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("121","Don't invert Redstone"));
}
return null;
}
diff --git a/src/main/java/gregtech/common/gui/GT_Container_Filter.java b/src/main/java/gregtech/common/gui/GT_Container_Filter.java
index 0355aa1753..bfe8578623 100644
--- a/src/main/java/gregtech/common/gui/GT_Container_Filter.java
+++ b/src/main/java/gregtech/common/gui/GT_Container_Filter.java
@@ -71,45 +71,45 @@ public class GT_Container_Filter
if (aSlotIndex == 18) {
((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput);
if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("116","Emit Energy to Outputside"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("117","Don't emit Energy"));
}
return null;
}
if (aSlotIndex == 19) {
((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull);
if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if slots contain something");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("122","Emit Redstone if slots contain something"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("123","Don't emit Redstone"));
}
return null;
}
if (aSlotIndex == 20) {
((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert);
if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert) {
- GT_Utility.sendChatToPlayer(aPlayer, "Invert Redstone");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("120","Invert Redstone"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Redstone");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("121","Don't invert Redstone"));
}
return null;
}
if (aSlotIndex == 21) {
((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter);
if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter) {
- GT_Utility.sendChatToPlayer(aPlayer, "Invert Filter");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("124","Invert Filter"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Filter");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("125","Don't invert Filter"));
}
return null;
}
if (aSlotIndex == 22) {
((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT);
if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT) {
- GT_Utility.sendChatToPlayer(aPlayer, "Ignore NBT");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("126","Ignore NBT"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "NBT has to match");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("127","NBT has to match"));
}
return null;
}
diff --git a/src/main/java/gregtech/common/gui/GT_Container_Regulator.java b/src/main/java/gregtech/common/gui/GT_Container_Regulator.java
index c9e51ecb81..b4e8e7aebb 100644
--- a/src/main/java/gregtech/common/gui/GT_Container_Regulator.java
+++ b/src/main/java/gregtech/common/gui/GT_Container_Regulator.java
@@ -5,6 +5,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.gui.GT_ContainerMetaTile_Machine;
import gregtech.api.gui.GT_Slot_Holo;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Utility;
import gregtech.common.tileentities.automation.GT_MetaTileEntity_Regulator;
import net.minecraft.entity.player.EntityPlayer;
@@ -73,9 +74,9 @@ public class GT_Container_Regulator
if (aSlotIndex == 28) {
((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).bOutput);
if (((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).bOutput) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("116", "Emit Energy to Outputside"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("117", "Don't emit Energy"));
}
return null;
}
diff --git a/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java b/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java
index 8380baacf0..3a0bd80bf3 100644
--- a/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java
+++ b/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java
@@ -34,27 +34,27 @@ public class GT_Container_SuperBuffer
if (aSlotIndex == 0) {
((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput);
if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("116","Emit Energy to Outputside"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("117","Don't emit Energy"));
}
return null;
}
if (aSlotIndex == 1) {
((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull);
if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if no Slot is free");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("118","Emit Redstone if no Slot is free"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("119","Don't emit Redstone"));
}
return null;
}
if (aSlotIndex == 2) {
((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert);
if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert) {
- GT_Utility.sendChatToPlayer(aPlayer, "Invert Redstone");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("120","Invert Redstone"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Redstone");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("121","Don't invert Redstone"));
}
return null;
}
diff --git a/src/main/java/gregtech/common/gui/GT_Container_TypeFilter.java b/src/main/java/gregtech/common/gui/GT_Container_TypeFilter.java
index 2f21b7b98a..59c6edfeea 100644
--- a/src/main/java/gregtech/common/gui/GT_Container_TypeFilter.java
+++ b/src/main/java/gregtech/common/gui/GT_Container_TypeFilter.java
@@ -53,45 +53,45 @@ public class GT_Container_TypeFilter
if (aSlotIndex == 10) {
((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bOutput);
if (((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bOutput) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("116","Emit Energy to Outputside"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("117","Don't emit Energy"));
}
return null;
}
if (aSlotIndex == 11) {
((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull);
if (((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if slots contain something");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("122","Emit Redstone if slots contain something"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("123","Don't emit Redstone"));
}
return null;
}
if (aSlotIndex == 12) {
((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvert);
if (((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvert) {
- GT_Utility.sendChatToPlayer(aPlayer, "Invert Redstone");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("120","Invert Redstone"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Redstone");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("121","Don't invert Redstone"));
}
return null;
}
if (aSlotIndex == 13) {
((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvertFilter = (!((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvertFilter);
if (((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bInvertFilter) {
- GT_Utility.sendChatToPlayer(aPlayer, "Invert Filter");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("124","Invert Filter"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Filter");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("125","Don't invert Filter"));
}
return null;
}
if (aSlotIndex == 14) {
((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bNBTAllowed = (!((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bNBTAllowed);
if (((GT_MetaTileEntity_TypeFilter) this.mTileEntity.getMetaTileEntity()).bNBTAllowed) {
- GT_Utility.sendChatToPlayer(aPlayer, "Allow Items with NBT");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("126","Ignore NBT"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't allow Items with NBT");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("127","NBT has to match"));
}
return null;
}
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
index 814c7669a0..3ba91a05c0 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
@@ -672,13 +672,13 @@ public class GT_MetaGenerated_Item_01 extends GT_MetaGenerated_Item_X32 {
ItemList.Circuit_Data.set(addItem(tLastID = 704, "Workstation", "A extreme Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION}));
ItemList.Circuit_Elite.set(addItem(tLastID = 705, "Mainframe", "A elite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION}));
ItemList.Circuit_Master.set(addItem(tLastID = 706, "Nanoprocessor Mainframe", "A master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION}));
- ItemList.Tool_DataOrb.set(addItem(tLastID = 707, "Data Orb", "A High Capacity Data Storage", new Object[]{SubTag.NO_UNIFICATION, new Behaviour_DataOrb()}));
+ ItemList.Tool_DataOrb.set(addItem(tLastID = 707, "Data Orb", "Master Circuit with High Capacity Data Storage", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION, new Behaviour_DataOrb()}));//TODO check normally has no unification to circuit!!!
//ItemList.Circuit_Ultimate.set(ItemList.Tool_DataOrb.get(1L, new Object[0]));
GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataOrb.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataOrb.get(1L, new Object[0])});
- ItemList.Tool_DataStick.set(addItem(tLastID = 708, "Data Stick", "A Low Capacity Data Storage", new Object[]{SubTag.NO_UNIFICATION, new Behaviour_DataStick()}));
+ ItemList.Tool_DataStick.set(addItem(tLastID = 708, "Data Stick", "Circuit with Low Capacity Data Storage", new Object[]{OrePrefixes.circuit.get(Materials.Data), SubTag.NO_UNIFICATION, new Behaviour_DataStick()}));//TODO check normally has no unification to circuit!!!
GT_ModHandler.addShapelessCraftingRecipe(ItemList.Tool_DataStick.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Tool_DataStick.get(1L, new Object[0])});
- ItemList.Circuit_Board_Basic.set(addItem(tLastID = 710, "Coated Circuit Board", "Wooden Board", new Object[0])); ItemList.Circuit_Board_Coated.set(ItemList.Circuit_Board_Basic.get(1,new Object[0]));
+ ItemList.Circuit_Board_Basic.set(addItem(tLastID = 710, "Coated Circuit Board", "Basic Wooden Board", new Object[0])); ItemList.Circuit_Board_Coated.set(ItemList.Circuit_Board_Basic.get(1,new Object[0]));
ItemList.Circuit_Board_Advanced.set(addItem(tLastID = 711, "Epoxy Circuit Board", "An advanced Board", new Object[0])); ItemList.Circuit_Board_Epoxy.set(ItemList.Circuit_Board_Advanced.get(1,new Object[0]));
ItemList.Circuit_Board_Elite.set(addItem(tLastID = 712, "Multilayer Fiberglass Circuit Board", "A elite Board", new Object[0])); ItemList.Circuit_Board_Multifiberglass.set(ItemList.Circuit_Board_Elite.get(1,new Object[0]));
ItemList.Circuit_Parts_Crystal_Chip_Elite.set(addItem(tLastID = 713, "Engraved Crystal Chip", "Needed for Circuits", new Object[0]));
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java
index a8fcb74351..deaeaa93ae 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_03.java
@@ -1,10 +1,20 @@
package gregtech.common.items;
+import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.SubTag;
import gregtech.api.items.GT_MetaGenerated_Item_X32;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
+import ic2.core.IC2;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
public class GT_MetaGenerated_Item_03
extends GT_MetaGenerated_Item_X32 {
@@ -136,8 +146,8 @@ public class GT_MetaGenerated_Item_03
//Advanced Circuit IC2
ItemList.Circuit_Processor.set(addItem(tLastID = 80, "Integrated Processor", "Good Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Good), SubTag.NO_UNIFICATION}));
- //ItemList.Circuit_Computer.set(addItem(tLastID = 81, "Processor Assembly", "Advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION}));
- //Workstation/ Item01 Datacircuit
+// ItemList.Circuit_Computer.set(addItem(tLastID = 81, "Processor Assembly", "Advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION}));
+ //Workstation Item01 Datacircuit
//Mainframe Item01 DataProcessor
ItemList.Circuit_Nanoprocessor.set(addItem(tLastID = 82, "Nanoprocessor", "Advanced Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Advanced), SubTag.NO_UNIFICATION}));
@@ -151,16 +161,25 @@ public class GT_MetaGenerated_Item_03
ItemList.Circuit_Quantummainframe.set(addItem(tLastID = 88, "Quantumprocessor Mainframe", "Ultimate Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION}));
ItemList.Circuit_Crystalprocessor.set(addItem(tLastID = 89, "Crystalprocessor", "Elite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Elite), SubTag.NO_UNIFICATION}));
- ItemList.Circuit_Crystalcomputer.set(addItem(tLastID = 96, "Crystalprocessor Assembly", "Master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION}));
- ItemList.Circuit_Ultimatecrystalcomputer.set(addItem(tLastID = 90, "Ultimate Crystalcomputer", "Ultimate Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION}));
- ItemList.Circuit_Crystalmainframe.set(addItem(tLastID = 91, "Crystalprocessor Mainframe", "Super Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION}));
+ //TODO check - might be broken section starts here
+ //Dataorb Dataorb
+ ItemList.Circuit_Crystalcomputer.set(addItem(tLastID = 90, "Crystalprocessor Assembly", "Ultimate Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION}));//TODO check might be broken
+ //TODO check this 2 recipes are from gt5u
+ //ItemList.Circuit_Crystalcomputer.set(addItem(tLastID = 96, "Crystalprocessor Assembly", "Master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION}));
+ //ItemList.Circuit_Ultimatecrystalcomputer.set(addItem(tLastID = 90, "Ultimate Crystalcomputer", "Ultimate Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION}));
+ ItemList.Circuit_Crystalmainframe.set(addItem(tLastID = 91, "Crystalprocessor Mainframe", "Super Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION}));
ItemList.Circuit_Neuroprocessor.set(addItem(tLastID = 92, "Wetwareprocessor", "Master Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Master), SubTag.NO_UNIFICATION}));
ItemList.Circuit_Wetwarecomputer.set(addItem(tLastID = 93, "Wetwareprocessor Assembly", "Ultimate Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Ultimate), SubTag.NO_UNIFICATION}));
ItemList.Circuit_Wetwaresupercomputer.set(addItem(tLastID = 94, "Wetware Supercomputer", "Super Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Superconductor), SubTag.NO_UNIFICATION}));
ItemList.Circuit_Wetwaremainframe.set(addItem(tLastID = 95, "Wetware Mainframe", "Infinite Circuit", new Object[]{OrePrefixes.circuit.get(Materials.Infinite), SubTag.NO_UNIFICATION}));
- ItemList.Circuit_Ultimate.set(ItemList.Circuit_Ultimatecrystalcomputer.get(1L, new Object[0]));//maybe should be removed
+ ItemList.Circuit_Ultimate.set(ItemList.Circuit_Crystalcomputer.get(1L, new Object[0]));//TODO check replaced with line below?
+ //ItemList.Circuit_Ultimate.set(ItemList.Circuit_Ultimatecrystalcomputer.get(1L, new Object[0]));//maybe should be removed
+
+
+ //TODO check might be broken section ends here
+ //TODO CHECK recipes below are removed in gt5u??
ItemList.Circuit_Board_Coated_Basic.set(addItem(tLastID = 100, "Circuit Board", "A basic Circuit Board", o));
ItemList.Circuit_Board_Phenolic_Good.set(addItem(tLastID = 101, "Good Circuit Board", "A good Circuit Board", o));
ItemList.Circuit_Board_Epoxy_Advanced.set(addItem(tLastID = 102, "Advanced Circuit Board", "A advanced Circuit Board", o));
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java
index 6e046217b0..a55cbff4ca 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java
@@ -3,6 +3,7 @@ package gregtech.common.items.behaviors;
import gregtech.api.enums.SubTag;
import gregtech.api.interfaces.IItemBehaviour;
import gregtech.api.items.GT_MetaBase_Item;
+import gregtech.api.util.GT_LanguageManager;
import net.minecraft.block.BlockDispenser;
import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
import net.minecraft.dispenser.IBlockSource;
@@ -68,5 +69,9 @@ public class Behaviour_None
public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) {
return null;
+ }
+
+ public String trans(String aKey, String aEnglish){
+ return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_"+aKey, aEnglish, false);
}
}
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java
index 4dcdf2696b..f232fa8043 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java
@@ -13,6 +13,7 @@ import gregtech.api.util.GT_Utility;
import gregtech.common.blocks.GT_Block_Ores_Abstract;
import gregtech.common.blocks.GT_TileEntity_Ores;
import net.minecraft.block.Block;
+import net.minecraft.block.BlockLiquid;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
@@ -47,60 +48,63 @@ public class Behaviour_Prospecting
ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta));
- if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
- GT_Utility.sendChatToPlayer(aPlayer, "This is " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ);
- return true;
- }
- if ((aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) || (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone))) {
- if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) {
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ);
- int tX = aX;
- int tY = aY;
- int tZ = aZ;
- int tMetaID = 0;
- int tQuality = (aItem instanceof GT_MetaGenerated_Tool) ? ((GT_MetaGenerated_Tool) aItem).getHarvestLevel(aStack, "") : 0;
-
- int i = 0;
- for (int j = 6 + tQuality; i < j; i++) {
- tX -= ForgeDirection.getOrientation(aSide).offsetX;
- tY -= ForgeDirection.getOrientation(aSide).offsetY;
- tZ -= ForgeDirection.getOrientation(aSide).offsetZ;
-
- Block tBlock = aWorld.getBlock(tX, tY, tZ);
- if ((tBlock == Blocks.lava) || (tBlock == Blocks.flowing_lava)) {
- GT_Utility.sendChatToPlayer(aPlayer, "There is Lava behind this Rock.");
- break;
- }
- if ((tBlock == Blocks.water) || (tBlock == Blocks.flowing_water) || ((tBlock instanceof IFluidBlock))) {
- GT_Utility.sendChatToPlayer(aPlayer, "There is a Liquid behind this Rock.");
- break;
- }
- if ((tBlock == Blocks.monster_egg) || (!GT_Utility.hasBlockHitBox(aWorld, tX, tY, tZ))) {
- GT_Utility.sendChatToPlayer(aPlayer, "There is an Air Pocket behind this Rock.");
- break;
- }
- if (tBlock != aBlock) {
- if (i >= 4) {
- break;
- }
- GT_Utility.sendChatToPlayer(aPlayer, "Material is changing behind this Rock.");
- break;
- }
- }
- Random tRandom = new XSTR(aX ^ aY ^ aZ ^ aSide);
- i = 0;
- for (int j = 9 + 2 * tQuality; i < j; i++) {
- tX = aX - 4 - tQuality + tRandom.nextInt(j);
- tY = aY - 4 - tQuality + tRandom.nextInt(j);
- tZ = aZ - 4 - tQuality + tRandom.nextInt(j);
- Block tBlock = aWorld.getBlock(tX, tY, tZ);
+ if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))){
+ GT_Utility.sendChatToPlayer(aPlayer, trans("100","This is ") + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + trans("101"," Ore."));
+ GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ);
+ return true;
+ }
+
+ if (aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone) ||
+ aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack) ||
+ aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone) ||
+ aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockStones) ||
+ aBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites) ||
+ (aBlock == GregTech_API.sBlockOresUb1) ||
+ (aBlock == GregTech_API.sBlockOresUb2) ||
+ (aBlock == GregTech_API.sBlockOresUb3) ||
+ (aBlock == GregTech_API.sBlockOres1)){
+ if (GT_ModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) {
+ GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(1)), 1.0F, -1.0F, aX, aY, aZ);
+ int tMetaID = 0;
+ int tQuality = (aItem instanceof GT_MetaGenerated_Tool) ? ((GT_MetaGenerated_Tool) aItem).getHarvestLevel(aStack, "") : 0;
+ int tX = aX, tY = aY, tZ = aZ;
+ Block tBlock;
+ for (int i = 0, j = (int)(6 + tQuality); i < j; i++) {
+ tX -= ForgeDirection.getOrientation(aSide).offsetX;
+ tY -= ForgeDirection.getOrientation(aSide).offsetY;
+ tZ -= ForgeDirection.getOrientation(aSide).offsetZ;
+
+ tBlock = aWorld.getBlock(tX, tY, tZ);
+ if (tBlock == Blocks.lava || tBlock == Blocks.flowing_lava) {
+ GT_Utility.sendChatToPlayer(aPlayer, trans("102","There is Lava behind this Rock."));
+ break;
+ }
+ if (tBlock instanceof BlockLiquid || tBlock instanceof IFluidBlock) {
+ GT_Utility.sendChatToPlayer(aPlayer, trans("103","There is a Liquid behind this Rock."));
+ break;
+ }
+ if (tBlock == Blocks.monster_egg || !GT_Utility.hasBlockHitBox(aWorld, tX, tY, tZ)) {
+ GT_Utility.sendChatToPlayer(aPlayer, trans("104","There is an Air Pocket behind this Rock."));
+ break;
+ }
+ if (tBlock != aBlock) {
+ if (i < 4) GT_Utility.sendChatToPlayer(aPlayer, trans("105","Material is changing behind this Rock."));
+ break;
+ }
+ }
+
+ Random tRandom = new XSTR(aX^aY^aZ^aSide);
+ for (int i = 0, j = (int)(9+2*tQuality); i < j; i++) {
+ tX = aX-4-tQuality+tRandom.nextInt(j);
+ tY = aY-4-tQuality+tRandom.nextInt(j);
+ tZ = aZ-4-tQuality+tRandom.nextInt(j);
+ tBlock = aWorld.getBlock(tX, tY, tZ);
if ((tBlock instanceof GT_Block_Ores_Abstract)) {
TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ);
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)];
if ((tMaterial != null) && (tMaterial != Materials._NULL)) {
- GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tMaterial.mDefaultLocalName + " Ore.");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("106","Found traces of ") + tMaterial.mDefaultLocalName + trans("101"," Ore."));
return true;
}
}
@@ -108,16 +112,16 @@ public class Behaviour_Prospecting
tMetaID = aWorld.getBlockMetadata(tX, tY, tZ);
tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID));
if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
- GT_Utility.sendChatToPlayer(aPlayer, "Found traces of " + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + " Ore.");
+ GT_Utility.sendChatToPlayer(aPlayer, trans("106","Found traces of ") + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + trans("101"," Ore."));
return true;
}
}
- }
- GT_Utility.sendChatToPlayer(aPlayer, "No Ores found.");
- }
- return true;
+ }
+ GT_Utility.sendChatToPlayer(aPlayer, trans("107","No Ores found."));
+ return true;
+ }
}
- return false;
+ return false;
}
public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
index 71827cc4e2..b4b2097d86 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
@@ -23,7 +23,8 @@ public class GT_MetaTileEntity_Boiler_Steel
public GT_MetaTileEntity_Boiler_Steel(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, new String[]{
"Faster than the Bronze Boiler",
- "Produces 300L of Steam per second"});
+ "Produces 300L of Steam per second",
+ "Causes 30 Pollution per second"});
}
public GT_MetaTileEntity_Boiler_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java
index 3ac9cfd467..2efe67384d 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_LightningRod.java
@@ -137,4 +137,4 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
@Override
public void loadNBTData(NBTTagCompound aNBT) {
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
index 3a549ee46c..b0f36ae7e5 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
@@ -188,16 +188,12 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
}
}
- private void prospectHole(
- int i, int k, Map<String, Integer> aOres) {
-
- String tFoundOre = null;
+ private void prospectHole(int i, int k, Map<String, Integer> aOres) {
+ String tFoundOre;
for (int j = this.getBaseMetaTileEntity().getYCoord(); j > 0; j--) {
tFoundOre = checkForOre(i, j, k);
- if (tFoundOre == null)
- continue;
-
- countOre(aOres, tFoundOre);
+ if (tFoundOre != null)
+ countOre(aOres, tFoundOre);
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
index 4d98998c3f..60d4a1f3bd 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
@@ -8,6 +8,9 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IEnergyConnected;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.BaseMetaTileEntity;
+import gregtech.api.metatileentity.BaseTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Config;
@@ -16,6 +19,7 @@ import gregtech.common.gui.GT_Container_MicrowaveEnergyTransmitter;
import gregtech.common.gui.GT_GUIContainer_MicrowaveEnergyTransmitter;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
@@ -190,18 +194,25 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
}
}
int tDistance = distanceCalculation();
- if (tTile != null && tTile instanceof IEnergyConnected) {
- int tLoss = 1;
- if (mMaxLossDistance != 0) {
- tLoss = GT_Utility.safeInt(10L + (tDistance * Math.max(mMaxLoss - 10L,0) / mMaxLossDistance));
- }
- if(getBaseMetaTileEntity().isUniversalEnergyStored(V[mTier] + ((V[mTier] * tLoss) / 100))){
- //TODO:check tier before sending to disable remote detonation
- //if(((IEnergyConnected) tTile).)
- if (((IEnergyConnected) tTile).injectEnergyUnits((byte) 6, V[mTier], 1) > 0) {
- getBaseMetaTileEntity().decreaseStoredEnergyUnits(V[mTier] + ((V[mTier] * tLoss) / 100), false);
+ if(tTile!=null) {
+ if (tTile instanceof IEnergyConnected) {
+ long packetSize=V[mTier];
+ if(tTile instanceof IGregTechTileEntity){
+ IMetaTileEntity mte=((IGregTechTileEntity) tTile).getMetaTileEntity();
+ if(mte instanceof BaseMetaTileEntity) {
+ packetSize=((BaseMetaTileEntity) mte).getMaxSafeInput();
}
- //}
+ }
+ long energyUse = 1;
+ if (mMaxLossDistance != 0) {
+ energyUse = GT_Utility.safeInt(10L + (tDistance * Math.max(mMaxLoss - 10L, 0) / mMaxLossDistance));
+ }
+ energyUse=packetSize + ((V[mTier] * energyUse) / 100);
+ if (getBaseMetaTileEntity().isUniversalEnergyStored(energyUse)) {
+ if (((IEnergyConnected) tTile).injectEnergyUnits((byte) 6, packetSize, 1) > 0) {
+ getBaseMetaTileEntity().decreaseStoredEnergyUnits(energyUse, false);
+ }
+ }
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
index 8b74e6c2fa..f24cfb64eb 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
@@ -1,12 +1,14 @@
package gregtech.common.tileentities.machines.basic;
import gregtech.api.enums.ConfigCategories;
+import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.objects.XSTR;
import gregtech.api.util.GT_Config;
import gregtech.api.util.GT_Utility;
import gregtech.common.gui.GT_Container_Teleporter;
@@ -20,11 +22,13 @@ import net.minecraft.entity.boss.EntityDragonPart;
import net.minecraft.entity.effect.EntityWeatherEffect;
import net.minecraft.entity.item.*;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.entity.projectile.EntityFireball;
import net.minecraft.entity.projectile.EntityFishHook;
import net.minecraft.entity.projectile.EntityThrowable;
+import net.minecraft.init.Blocks;
import net.minecraft.inventory.IInventory;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
@@ -33,7 +37,6 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.fluids.FluidStack;
-
import static gregtech.api.enums.GT_Values.V;
public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
@@ -45,8 +48,9 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
public int mTargetX = 0;
public int mTargetY = 0;
public int mTargetZ = 0;
- public int mTargetD = Integer.MIN_VALUE;
+ public int mTargetD = Integer.MIN_VALUE;//0
public boolean mDebug = false;
+ //public boolean hasEgg = false;
public GT_MetaTileEntity_Teleporter(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 3, "Teleport long distances with this little device.");
@@ -142,6 +146,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
@Override
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
if (aBaseMetaTileEntity.isClientSide()) return true;
+ //this.hasEgg = checkForEgg();
aBaseMetaTileEntity.openGUI(aPlayer);
return true;
}
@@ -211,15 +216,34 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
@Override
public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
- if (aBaseMetaTileEntity.isServerSide() && (this.mTargetX == 0) && (this.mTargetY == 0) && (this.mTargetZ == 0) && (this.mTargetD == Integer.MIN_VALUE)) {
- this.mTargetX = aBaseMetaTileEntity.getXCoord();
- this.mTargetY = aBaseMetaTileEntity.getYCoord();
- this.mTargetZ = aBaseMetaTileEntity.getZCoord();
- this.mTargetD = aBaseMetaTileEntity.getWorld().provider.dimensionId;
+ if (getBaseMetaTileEntity().isServerSide()) {
+ if ((this.mTargetX == 0) && (this.mTargetY == 0) && (this.mTargetZ == 0) && (this.mTargetD == Integer.MIN_VALUE)) {
+ this.mTargetX = aBaseMetaTileEntity.getXCoord();
+ this.mTargetY = aBaseMetaTileEntity.getYCoord();
+ this.mTargetZ = aBaseMetaTileEntity.getZCoord();
+ this.mTargetD = aBaseMetaTileEntity.getWorld().provider.dimensionId;
+ }
+ //this.hasEgg = checkForEgg();
}
}
- public boolean hasDimensionalTeleportCapability() {return true;}
+ //public boolean checkForEgg() {
+ // for (byte i = -5; i <= 5; i = (byte) (i + 1)) {
+ // for (byte j = -5; j <= 5; j = (byte) (j + 1)) {
+ // for (byte k = -5; k <= 5; k = (byte) (k + 1)) {
+ // if (getBaseMetaTileEntity().getBlockOffset(i, j, k) == Blocks.dragon_egg) {
+ // return true;
+ // }
+ // }
+ // }
+ // }
+ // return false;
+ //}
+
+ public boolean hasDimensionalTeleportCapability() {
+ //return (this.mDebug) || (this.hasEgg) || (mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 10);
+ return true;
+ }
public boolean isDimensionalTeleportAvailable() {
return (this.mDebug) || ((GT_Utility.isRealDimension(this.mTargetD)) && (GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId)));
@@ -227,11 +251,22 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if (mFluid != null) mFluid=null;
+ if (mFluid != null) {//Was if null -> Materials.Nitrogen.getPlasma(0);
+ mFluid = null;
+ }
super.onPostTick(aBaseMetaTileEntity, aTick);
if (getBaseMetaTileEntity().isServerSide()) {
+ //if (getBaseMetaTileEntity().getTimer() % 100L == 50L) {
+ // this.hasEgg = checkForEgg();
+ //}
if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().getRedstone())) {
if (getBaseMetaTileEntity().decreaseStoredEnergyUnits(sPassiveEnergyDrain, false)) {
+ //if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && (hasEgg || mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)))&& new XSTR().nextInt(10)==0) {
+ // mFluid.amount--;
+ // if (mFluid.amount < 1) {
+ // mFluid = null;
+ // }
+ //}
int tDistance = distanceCalculation();
if (mInventory[0] != null) {
TileEntity tTile = null;
@@ -247,7 +282,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
int tStacksize = mInventory[0].stackSize;
GT_Utility.moveOneItemStack(this, tTile, (byte) 0, (byte) 0, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1);
if (mInventory[0] == null || mInventory[0].stackSize < tStacksize) {
- getBaseMetaTileEntity().decreaseStoredEnergyUnits((long) (Math.pow(tDistance, 1.5) * (tStacksize - (mInventory[0] == null ? 0 : mInventory[0].stackSize)) * sFPowerMultiplyer), false);
+ getBaseMetaTileEntity().decreaseStoredEnergyUnits((long) (Math.pow(tDistance, 1.5) * tDistance * (tStacksize - (mInventory[0] == null ? 0 : mInventory[0].stackSize)) * sFPowerMultiplyer), false);
}
}
@@ -255,8 +290,14 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
for (Object tObject : getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) + 2, getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) + 2, getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) + 2))) {
if (((tObject instanceof Entity)) && (!((Entity) tObject).isDead)) {
Entity tEntity = (Entity) tObject;
- //System.out.println("teleport"+(Math.pow(tDistance, 1.5)));
- if (getBaseMetaTileEntity().decreaseStoredEnergyUnits((long) ((long)Math.pow(tDistance, 1.5) * weightCalculation(tEntity) * sFPowerMultiplyer), false)) {
+// System.out.println("teleport"+(Math.pow(tDistance, 1.5)));
+ if (getBaseMetaTileEntity().decreaseStoredEnergyUnits((long) (Math.pow(tDistance, 1.5) * weightCalculation(tEntity) * sFPowerMultiplyer), false)) {
+ //if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && (hasEgg || mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)))) {
+ // mFluid.amount = mFluid.amount - ((int) Math.min(10, (Math.pow(tDistance, 1.5) * weightCalculation(tEntity) / 8192)));
+ // if (mFluid.amount < 1) {
+ // mFluid = null;
+ // }
+ //}
if (tEntity.ridingEntity != null) {
tEntity.mountEntity(null);
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
index 6583134e6c..098fb6af1c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
@@ -22,6 +22,7 @@ import net.minecraftforge.oredict.OreDictionary;
import java.util.ArrayList;
public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlockBase {
+
private boolean running = false;
private boolean p1, p2, p3, p4, p5, p6;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
index e70ecba9de..214628f39a 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
@@ -37,11 +37,11 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas
"Controller Block for the Cleanroom",
"Min(WxHxD): 3x4x3 (Hollow), Max(WxHxD): 15x15x15 (Hollow)",
"Controller (Top center)",
- "Top besides contoller and edges filter casings",
- "1 Reinforced Door(keep closed for 100% efficency",
+ "Top besides contoller and edges: Filter Casings",
+ "1 Reinforced Door (keep closed for 100% efficency)",
"1x Energy Hatch, 1x Maintainance Hatch",
- "up to 10 Machine Hull Item & Energy transfer through walls",
- "Remaining Blocks Plascrete"};
+ "Up to 10 Machine Hull Item & Energy transfer through walls",
+ "Remaining Blocks: Plascrete, 20 min"};
}
@Override
@@ -158,7 +158,7 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas
aBaseMetaTileEntity.setInternalOutputRedstoneSignal(i, t);
}
- return true;
+ return mPlascreteCount>=20;
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
index 7daad70716..fa7d32726c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
@@ -41,17 +41,21 @@ public abstract class GT_MetaTileEntity_LargeBoiler
"Produces " + (getEUt() * 40) * (runtimeBoost(20) / 20f) + "L of Steam with 1 Coal at " + getEUt() * 40 + "L/s",
"A programmed circuit in the main block throttles the boiler (-1000L/s per config)",
"Size(WxHxD): 3x5x3, Controller (Front middle in Fireboxes)",
- "3x1x3 of Firebox Casings (Bottom layer, Min 3)",
- "3x4x3 of Machine Casings/Plated Bricks (Above Fireboxes, hollow, Min 24!)",
- "1x3x1 of Pipe Casings (Inside the Hollow Machine Casings/Plated Bricks)",
- "1x Fuel Input Hatch/Bus (Any Firebox)",
- "1x Water Input Hatch (Any Firebox)",
- "1x Steam Output Hatch (Any Casing)",
+ "3x1x3 of "+getCasingMaterial()+" Fire Boxes (Bottom layer, Min 3)",
+ "3x4x3 of "+getCasingMaterial()+" Casings (Above Fireboxes, hollow, Min 24!)",
+ "3 "+getCasingMaterial()+" Pipe Casing Blocks (Inside the Hollow Casing)",
+ "1x Input Fuel Hatch/Bus (Any Firebox)",
+ "1x Input Water Hatch (Any Firebox)",
+ "1x Output Hatch (Any Casing)",
"1x Maintenance Hatch (Any Firebox)",
"1x Muffler Hatch (Any Firebox)",
"Diesel fuels have 1/4 efficiency",
- String.format("Takes %.2f seconds to heat up", 500.0 / getEfficiencyIncrease())};
+ String.format("Takes %.2f seconds to heat up", 500.0 / getEfficiencyIncrease()),
+ //"Causes up to " + 20 * getPollutionPerTick(null) + " Pollution per second"
+};
}
+
+ public abstract String getCasingMaterial();
public abstract Block getCasingBlock();
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java
index 5c949b6108..5ecd45508c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java
@@ -18,6 +18,10 @@ public class GT_MetaTileEntity_LargeBoiler_Bronze
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_LargeBoiler_Bronze(this.mName);
}
+
+ public String getCasingMaterial(){
+ return "Bronze";
+ }
public Block getCasingBlock() {
return GregTech_API.sBlockCasings1;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java
index 0f663dc9a8..f7d7ad4b55 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java
@@ -18,6 +18,10 @@ public class GT_MetaTileEntity_LargeBoiler_Steel
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_LargeBoiler_Steel(this.mName);
}
+
+ public String getCasingMaterial(){
+ return "Steel";
+ }
public Block getCasingBlock() {
return GregTech_API.sBlockCasings2;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java
index 6fc32f8c34..144c44aeed 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java
@@ -18,6 +18,10 @@ public class GT_MetaTileEntity_LargeBoiler_Titanium
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_LargeBoiler_Titanium(this.mName);
}
+
+ public String getCasingMaterial(){
+ return "Titanium";
+ }
public Block getCasingBlock() {
return GregTech_API.sBlockCasings4;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java
index f6609307a7..126da571c5 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java
@@ -18,6 +18,10 @@ public class GT_MetaTileEntity_LargeBoiler_TungstenSteel
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_LargeBoiler_TungstenSteel(this.mName);
}
+
+ public String getCasingMaterial(){
+ return "TungstenSteel";
+ }
public Block getCasingBlock() {
return GregTech_API.sBlockCasings4;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java
index 1045ddb029..e3e0c8524d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java
@@ -123,7 +123,7 @@ public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase
int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX;
int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ;
int yHead = getYOfPumpHead();
- if (yHead <= 0) {
+ if (yHead < 1) {
return false;
}
if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir) == Blocks.bedrock) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
index 301adf4b42..d0bbe97632 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
@@ -20,6 +20,8 @@ import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
import org.apache.commons.lang3.ArrayUtils;
+import static gregtech.api.enums.GT_Values.V;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -160,12 +162,12 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
return GT_Recipe.GT_Recipe_Map.sUnboxinatorRecipes;
} else if (tmp.startsWith("polarizer")) {
return GT_Recipe.GT_Recipe_Map.sPolarizerRecipes;
+ } else if(tmp.startsWith("press")){
+ return GT_Recipe.GT_Recipe_Map.sPressRecipes;
} else if (tmp.startsWith("plasmaarcfurnace")) {
return GT_Recipe.GT_Recipe_Map.sPlasmaArcFurnaceRecipes;
} else if (tmp.startsWith("printer")) {
return GT_Recipe.GT_Recipe_Map.sPrinterRecipes;
- } else if (tmp.startsWith("press")) {
- return GT_Recipe.GT_Recipe_Map.sPressRecipes;
} else if (tmp.startsWith("fluidcanner")) {
return GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes;
} else if (tmp.startsWith("fluidheater")) {
@@ -179,6 +181,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
} else if (tmp.startsWith("circuitassembler")) {
return GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes;
}
+
return null;
}
@@ -290,10 +293,9 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
}
ItemStack[] tOut = new ItemStack[tRecipe.mOutputs.length];
for (int h = 0; h < tRecipe.mOutputs.length; h++) {
- if(tRecipe.getOutput(h)!=null){
- tOut[h] = tRecipe.getOutput(h).copy();
- tOut[h].stackSize = 0;
- }
+ if(tRecipe.getOutput(h)!=null){
+ tOut[h] = tRecipe.getOutput(h).copy();
+ tOut[h].stackSize = 0;}
}
FluidStack tFOut = null;
if (tRecipe.getFluidOutput(0) != null) tFOut = tRecipe.getFluidOutput(0).copy();
@@ -309,18 +311,16 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
int tSize = tFOut.amount;
tFOut.amount = tSize * i;
}
-
- tOut= clean(tOut);
+ tOut = clean(tOut);
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
List<ItemStack> overStacks = new ArrayList<ItemStack>();
for (int f = 0; f < tOut.length; f++) {
while (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
- if(tOut[f]!=null) {
- ItemStack tmp = tOut[f].copy();
- tmp.stackSize = tmp.getMaxStackSize();
- tOut[f].stackSize = tOut[f].stackSize - tOut[f].getMaxStackSize();
- overStacks.add(tmp);
- }
+ if(tOut[f]!=null){
+ ItemStack tmp = tOut[f].copy();
+ tmp.stackSize = tmp.getMaxStackSize();
+ tOut[f].stackSize = tOut[f].stackSize - tOut[f].getMaxStackSize();
+ overStacks.add(tmp);}
}
}
if (overStacks.size() > 0) {
@@ -343,8 +343,8 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
}
return false;
}
-
- public static ItemStack[] clean(final ItemStack[] v){
+
+ public static ItemStack[] clean(final ItemStack[] v) {
List<ItemStack> list = new ArrayList<ItemStack>(Arrays.asList(v));
list.removeAll(Collections.singleton(null));
return list.toArray(new ItemStack[list.size()]);
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java
index ee2937bd26..67bde86f16 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Bronze.java
@@ -45,13 +45,6 @@ public class GT_MetaTileEntity_Compressor_Bronze
return 0;
}
- //public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {//GOT DISABLED?
- // if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
- // return false;
- // }
- // return GT_ModHandler.getCompressorOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null;
- //}
-
public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
super.startSoundLoop(aIndex, aX, aY, aZ);
if (aIndex == 1) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java
index 6773499b3c..10d1f71d0d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Compressor_Steel.java
@@ -44,13 +44,6 @@ public class GT_MetaTileEntity_Compressor_Steel
}
return 0;
}
- //TODO CHECK IF CAN BE RE ENABLED
- //public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- // if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
- // return false;
- // }
- // return GT_ModHandler.getCompressorOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null;
- //}
public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
super.startSoundLoop(aIndex, aX, aY, aZ);
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java
index 396dc7857b..f1d4ae1b86 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Bronze.java
@@ -44,13 +44,6 @@ public class GT_MetaTileEntity_Extractor_Bronze
}
return 0;
}
- //TODO RE ENABLE?
- //public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- // if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
- // return false;
- // }
- // return GT_ModHandler.getExtractorOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null;
- //}
public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
super.startSoundLoop(aIndex, aX, aY, aZ);
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java
index 0d737be386..9aa892a4fc 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Extractor_Steel.java
@@ -44,13 +44,6 @@ public class GT_MetaTileEntity_Extractor_Steel
}
return 0;
}
- //TODO CHECK???
- //public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- // if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
- // return false;
- // }
- // return GT_ModHandler.getExtractorOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null;
- //}
public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
super.startSoundLoop(aIndex, aX, aY, aZ);
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java
index 3ac197ee4d..65e05c898d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java
@@ -19,7 +19,7 @@ import java.util.Random;
import static gregtech.api.enums.GT_Values.V;
public class GT_MetaTileEntity_Macerator_Steel
- extends GT_MetaTileEntity_BasicMachine_Steel {//TODO CHECK ALL STEAM POWERED MACHINES
+ extends GT_MetaTileEntity_BasicMachine_Steel {
public GT_MetaTileEntity_Macerator_Steel(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional, "Macerating your Ores", 1, 1, false);
}
@@ -64,7 +64,7 @@ public class GT_MetaTileEntity_Macerator_Steel
getInputAt(0).stackSize -= tRecipe.mInputs[0].stackSize;
return FOUND_AND_SUCCESSFULLY_USED_RECIPE;
}
- //TODO THIS MIGHT WORK???
+
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
return false;
diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java
index 860658cda9..5ab451bb03 100644
--- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java
+++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java
@@ -62,44 +62,6 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMach
return true;
}
-// public void onRightclick(EntityPlayer aPlayer)
-// {
-// ItemStack tPlayerItem = aPlayer.inventory.getCurrentItem();
-// if (tPlayerItem == null)
-// {
-// if (this.mItemID > 0)
-// {
-// for (int i = 0; (this.mItemCount < getMaxItemCount()) && (i < aPlayer.field_71071_by.func_70302_i_()); i++)
-// {
-// if ((aPlayer.field_71071_by.func_70301_a(i) != null) && (aPlayer.field_71071_by.func_70301_a(i).field_77993_c == this.mItemID) && (aPlayer.field_71071_by.func_70301_a(i).func_77960_j() == this.mItemMeta) && (!aPlayer.field_71071_by.func_70301_a(i).func_77942_o()))
-// {
-// this.mItemCount += aPlayer.field_71071_by.func_70301_a(i).field_77994_a;
-// if (aPlayer.field_71071_by.func_70301_a(i).field_77994_a == 111)
-// {
-// this.mItemCount = (getMaxItemCount() + 192 - (this.mItemCount + (this.mInventory[0] == null ? 0 : this.mInventory[0].field_77994_a) + (this.mInventory[1] == null ? 0 : this.mInventory[1].field_77994_a) + (this.mInventory[2] == null ? 0 : this.mInventory[2].field_77994_a)));
-// }
-// else if (this.mItemCount > getMaxItemCount())
-// {
-// aPlayer.field_71071_by.func_70301_a(i).field_77994_a = (this.mItemCount - getMaxItemCount());
-// this.mItemCount = getMaxItemCount();
-// }
-// else
-// {
-// aPlayer.field_71071_by.func_70301_a(i).field_77994_a = 0;
-// }
-// }
-// if ((aPlayer.field_71071_by.func_70301_a(i) != null) && (aPlayer.field_71071_by.func_70301_a(i).field_77994_a <= 0)) {
-// aPlayer.field_71071_by.func_70299_a(i, null);
-// }
-// }
-// GT_Utility.sendChatToPlayer(aPlayer, this.mItemCount + (this.mInventory[0] == null ? 0 : this.mInventory[0].field_77994_a) + (this.mInventory[1] == null ? 0 : this.mInventory[1].field_77994_a) + (this.mInventory[2] == null ? 0 : this.mInventory[2].field_77994_a) + " of " + new ItemStack(this.mItemID, 1, this.mItemMeta).func_82833_r());
-// }
-// }
-// if (aPlayer.field_71069_bz != null) {
-// aPlayer.field_71069_bz.func_75142_b();
-// }
-// }
-
@Override
public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
return new GT_Container_QuantumChest(aPlayerInventory, aBaseMetaTileEntity);
@@ -114,9 +76,6 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMach
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
if (getBaseMetaTileEntity().isServerSide() && getBaseMetaTileEntity().isAllowedToWork()) {
-// if(mInventory[0]!=null)System.out.println("input: "+mInventory[0].stackSize);
-// System.out.println("store: "+mItemCount);
-// if(mInventory[0]!=null)System.out.println("output: "+mInventory[2].stackSize);
if ((getItemCount() <= 0)) {
this.mItemStack = null;
this.mItemCount = 0;
diff --git a/src/main/java/gregtech/common/tools/GT_Tool.java b/src/main/java/gregtech/common/tools/GT_Tool.java
index 8ce02c2d01..d8ca77a388 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool.java
@@ -14,6 +14,7 @@ import net.minecraft.stats.AchievementList;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntityDamageSource;
import net.minecraft.util.IChatComponent;
+import net.minecraft.world.World;
import net.minecraftforge.event.world.BlockEvent;
import java.util.List;
@@ -145,4 +146,9 @@ public abstract class GT_Tool
public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
return aOriginalDamage;
}
+
+ @Override
+ public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj, int aX, int aY, int aZ) {
+ return aDefault;
+ }
}
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Axe.java b/src/main/java/gregtech/common/tools/GT_Tool_Axe.java
index f681554ea7..6ae55532e4 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Axe.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Axe.java
@@ -12,6 +12,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
+import net.minecraft.world.World;
import net.minecraftforge.event.world.BlockEvent;
import java.util.List;
@@ -96,6 +97,21 @@ public class GT_Tool_Axe
}
return rAmount;
}
+
+ public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ)
+ {
+ if (aBlock.isWood(aPlayer.worldObj, aX, aY, aZ) && OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData))){
+ float rAmount = 1.0F;float tIncrement = 1.0F;
+ if ((GregTech_API.sTimber) && !aPlayer.isSneaking()){
+ int tY = aY + 1;
+ for (int tH = aPlayer.worldObj.getHeight(); (tY < tH) && (aPlayer.worldObj.getBlock(aX, tY, aZ) == aBlock); tY++){
+ tIncrement += 0.1F;rAmount += tIncrement;
+ }
+ }
+ return 2.0F * aDefault / rAmount;
+ }
+ return (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.gourd) ? aDefault / 4.0F : aDefault;
+ }
public ItemStack getBrokenItem(ItemStack aStack) {
return null;
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java
index 0572218257..4db12ab694 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Chainsaw_LV.java
@@ -1,5 +1,9 @@
package gregtech.common.tools;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.OrePrefixes;
@@ -9,12 +13,14 @@ import gregtech.api.items.GT_MetaGenerated_Tool;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
+import net.minecraft.world.World;
import net.minecraftforge.common.IShearable;
import net.minecraftforge.event.world.BlockEvent;
@@ -133,6 +139,21 @@ public class GT_Tool_Chainsaw_LV
}
return rAmount;
}
+
+ public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ)
+ {
+ if (aBlock.isWood(aPlayer.worldObj, aX, aY, aZ) && OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData))){
+ float rAmount = 1.0F;float tIncrement = 1.0F;
+ if ((GregTech_API.sTimber) && !aPlayer.isSneaking()){
+ int tY = aY + 1;
+ for (int tH = aPlayer.worldObj.getHeight(); (tY < tH) && (aPlayer.worldObj.getBlock(aX, tY, aZ) == aBlock); tY++){
+ tIncrement += 0.1F;rAmount += tIncrement;
+ }
+ }
+ return 2.0F * aDefault / rAmount;
+ }
+ return (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.gourd) ? aDefault / 4.0F : aDefault;
+ }
public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
return aIsToolHead ? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mIconSet.mTextures[gregtech.api.enums.OrePrefixes.toolHeadChainsaw.mTextureIndex] : Textures.ItemIcons.POWER_UNIT_LV;