aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java14
-rw-r--r--src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java1
-rw-r--r--src/Java/gtPlusPlus/core/item/ModItems.java2
-rw-r--r--src/Java/gtPlusPlus/core/item/general/ItemGenericToken.java6
-rw-r--r--src/Java/gtPlusPlus/core/item/tool/misc/GregtechPump.java94
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_General.java31
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java5
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java88
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Pump.java157
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Pump.java203
-rw-r--r--src/resources/assets/miscutils/textures/items/iconsets/PUMP.pngbin1143 -> 0 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/token/0.pngbin0 -> 3694 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/token/1.pngbin0 -> 3688 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/token/2.pngbin0 -> 3698 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/token/3.pngbin0 -> 3758 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/token/4.pngbin0 -> 3719 bytes
16 files changed, 78 insertions, 523 deletions
diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java b/src/Java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java
index 4be90061a0..1073e63914 100644
--- a/src/Java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java
+++ b/src/Java/gtPlusPlus/api/objects/minecraft/ShapedRecipe.java
@@ -71,11 +71,13 @@ public class ShapedRecipe {
if (aOutput != null && xNull < 9) {
for (ItemStack q : mBlackList) {
- if (q.isItemEqual(aOutput)) {
- Logger.RECIPE("Found recipe Alkalus is Debugging.");
- }
+ if (q != null) {
+ if (q.isItemEqual(aOutput)) {
+ Logger.RECIPE("Found recipe Alkalus is Debugging.");
+ }
+ }
}
-
+
Object[] mVarags2 = null;
Logger.RECIPE("Generating Shaped Crafting Recipe for "+aOutput.getDisplayName());
@@ -188,14 +190,14 @@ public class ShapedRecipe {
for (Pair<Character, Object> r : aRecipePairs) {
char c = r.getKey();
Object o = r.getValue();
-
+
if (o instanceof ItemStack || o instanceof Item) {
if (o instanceof Item) {
o = ItemUtils.getSimpleStack((Item) o);
}
o = ((ItemStack) o).copy();
}
-
+
mVarags2[counter2] = (char) c;
mVarags2[counter2+1] = o;
counter2 += 2;
diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
index 1375c53608..0e7f5b4707 100644
--- a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
+++ b/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
@@ -39,6 +39,7 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock {
this.setCreativeTab(AddToCreativeTab.tabBlock);
this.setStepSound(soundTypeStone);
this.setBlockName("Ore"+Utils.sanitizeString(Utils.sanitizeString(material.getUnlocalizedName())));
+ this.setBlockTextureName("stone");
try {
GameRegistry.registerBlock(this, ItemBlockOre.class, Utils.sanitizeString("ore"+Utils.sanitizeString(this.blockMaterial.getLocalizedName())));
GT_OreDictUnificator.registerOre("ore"+Utils.sanitizeString(this.blockMaterial.getLocalizedName()), ItemUtils.getSimpleStack(this));
diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java
index 176288f261..78cea37735 100644
--- a/src/Java/gtPlusPlus/core/item/ModItems.java
+++ b/src/Java/gtPlusPlus/core/item/ModItems.java
@@ -932,7 +932,7 @@ public final class ModItems {
}
public static void registerCustomTokens() {
- ItemGenericToken.register(0, "Bit-Coin", 16, "Can be used on the dark web");
+ ItemGenericToken.register(0, "BitCoin", 16, "Can be used on the dark web");
ItemGenericToken.register(1, "Hand Pump Trade Token I", 1, "Craft into a Tier I Hand pump");
ItemGenericToken.register(2, "Hand Pump Trade Token II", 1, "Craft into a Tier II Hand pump");
ItemGenericToken.register(3, "Hand Pump Trade Token III", 1, "Craft into a Tier III Hand pump");
diff --git a/src/Java/gtPlusPlus/core/item/general/ItemGenericToken.java b/src/Java/gtPlusPlus/core/item/general/ItemGenericToken.java
index e6c63391cd..dfd5eca203 100644
--- a/src/Java/gtPlusPlus/core/item/general/ItemGenericToken.java
+++ b/src/Java/gtPlusPlus/core/item/general/ItemGenericToken.java
@@ -51,12 +51,13 @@ public class ItemGenericToken extends CoreItem {
public static boolean register(int id, String aLocalName, int aMaxStack, String[] aDescript, EnumRarity aRarity,
EnumChatFormatting aCustomNameColour) {
- int[][] sizes = new int[2][4];
+ int[][] sizes = new int[2][6];
sizes[0][0] = mLocalNames.size();
sizes[0][1] = mMaxStackSizes.size();
sizes[0][2] = mDescriptionArrays.size();
sizes[0][3] = mRarities.size();
sizes[0][4] = mCustomNameColours.size();
+ //sizes[0][5] = mIcons.size();
mLocalNames.put(id, aLocalName);
mMaxStackSizes.put(id, aMaxStack);
mDescriptionArrays.put(id, aDescript);
@@ -67,6 +68,7 @@ public class ItemGenericToken extends CoreItem {
sizes[1][2] = mDescriptionArrays.size();
sizes[1][3] = mRarities.size();
sizes[1][4] = mCustomNameColours.size();
+ //sizes[1][5] = mIcons.size();
boolean b = sizes[0][0] > sizes[1][0] && sizes[0][1] > sizes[1][1] && sizes[0][2] > sizes[1][2]
&& sizes[0][3] > sizes[1][3] && sizes[0][4] > sizes[1][4];
return b;
@@ -152,7 +154,7 @@ public class ItemGenericToken extends CoreItem {
@Override
@SideOnly(Side.CLIENT)
public final void registerIcons(final IIconRegister aIconRegister) {
- for (int i = 0, j = mIcons.size(); i < j; i++) {
+ for (int i = 0, j = mLocalNames.size(); i < j; i++) {
mIcons.put(i, aIconRegister.registerIcon(CORE.MODID + ":" + "token" + "/" + i));
}
}
diff --git a/src/Java/gtPlusPlus/core/item/tool/misc/GregtechPump.java b/src/Java/gtPlusPlus/core/item/tool/misc/GregtechPump.java
index 9b5245a76d..bdddd26255 100644
--- a/src/Java/gtPlusPlus/core/item/tool/misc/GregtechPump.java
+++ b/src/Java/gtPlusPlus/core/item/tool/misc/GregtechPump.java
@@ -782,7 +782,7 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
}
// Handle no stored fluid first
if (aStoredFluid == null) {
- Logger.INFO("Pump is empty, filling with tank fluids.");
+ Logger.WARNING("Pump is empty, filling with tank fluids.");
FluidStack toConsume;
int amountToConsume = 0;
if (resource.amount >= aCapacity) {
@@ -796,32 +796,32 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
return amountToConsume;
}
} else {
- Logger.INFO("Pump is Partially full, filling with tank fluids.");
+ Logger.WARNING("Pump is Partially full, filling with tank fluids.");
if (aStoredFluid.isFluidEqual(resource)) {
- Logger.INFO("Found matching fluids.");
+ Logger.WARNING("Found matching fluids.");
int aSpaceLeft = (aCapacity - aStoredAmount);
- Logger.INFO(
+ Logger.WARNING(
"Capacity: " + aCapacity + " | Stored: " + aStoredAmount + " | Space left: " + aSpaceLeft);
FluidStack toConsume;
int amountToConsume = 0;
if (resource.amount >= aSpaceLeft) {
amountToConsume = aSpaceLeft;
- Logger.INFO("More or equal fluid amount to pump container space.");
+ Logger.WARNING("More or equal fluid amount to pump container space.");
} else {
amountToConsume = resource.amount;
- Logger.INFO("Less fluid than container space");
+ Logger.WARNING("Less fluid than container space");
}
- Logger.INFO("Amount to consume: " + amountToConsume);
+ Logger.WARNING("Amount to consume: " + amountToConsume);
toConsume = FluidUtils.getFluidStack(resource, (aStoredAmount + amountToConsume));
if (toConsume != null && amountToConsume > 0) {
- Logger.INFO("Storing Fluid");
+ Logger.WARNING("Storing Fluid");
storeFluid(container, toConsume);
return amountToConsume;
} else {
- Logger.INFO("Not storing fluid");
+ Logger.WARNING("Not storing fluid");
}
} else {
- Logger.INFO("Fluids did not match.");
+ Logger.WARNING("Fluids did not match.");
}
}
}
@@ -925,7 +925,7 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
}
if (!canUse(aStack, removal) && aTier > 0) {
PlayerUtils.messagePlayer(aPlayer, "Not enough power.");
- Logger.INFO("No Power");
+ Logger.WARNING("No Power");
return false;
}
@@ -972,12 +972,12 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
public boolean drainIFluidTank(TileEntity tTileEntity, ItemStack aStack, World aWorld, EntityPlayer aPlayer, int aX,
int aY, int aZ) {
if (tTileEntity == null) {
- Logger.INFO("Invalid Tile, somehow.");
+ Logger.WARNING("Invalid Tile, somehow.");
return false;
}
if ((tTileEntity instanceof IFluidTank || tTileEntity instanceof IFluidHandler)) {
if (this.getFluid(aStack) == null || (this.getFluid(aStack) != null && this.getFluid(aStack).amount < this.getCapacity(aStack))) {
- Logger.INFO("Trying to find Stored Fluid - Behaviour Class.");
+ Logger.WARNING("Trying to find Stored Fluid - Behaviour Class.");
FluidStack aStored = getStoredFluidOfVanillaTank(tTileEntity);
if (aStored != null) {
int mAmountInserted = fill(aStack, aStored);
@@ -989,22 +989,22 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
newStackRemainingInTank = FluidUtils.getFluidStack(aStored, (aStored.amount - mAmountInserted));
}
boolean b = setStoredFluidOfVanillaTank(tTileEntity, newStackRemainingInTank);
- Logger.INFO("Cleared Tank? " + b + " | mAmountInserted: " + mAmountInserted);
- Logger.INFO("Returning " + b + " - drainTankVanilla.");
+ Logger.WARNING("Cleared Tank? " + b + " | mAmountInserted: " + mAmountInserted);
+ Logger.WARNING("Returning " + b + " - drainTankVanilla.");
if (b) {
PlayerUtils.messagePlayer(aPlayer, "Drained "+mAmountInserted+"L of "+aStored.getLocalizedName()+".");
}
return b;
}
} else {
- Logger.INFO("Found no valid Fluidstack - drainTankVanilla.");
+ Logger.WARNING("Found no valid Fluidstack - drainTankVanilla.");
}
}
else {
- Logger.INFO("Pump is full.");
+ Logger.WARNING("Pump is full.");
}
}
- Logger.INFO("Could not drain vanilla tank.");
+ Logger.WARNING("Could not drain vanilla tank.");
return false;
}
@@ -1018,16 +1018,16 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
return false;
}
if ((tTileEntity instanceof IGregTechTileEntity)) {
- Logger.INFO("Right Clicking on GT Tile - drainTankGT.");
+ Logger.WARNING("Right Clicking on GT Tile - drainTankGT.");
if (((IGregTechTileEntity) tTileEntity).getTimer() < 50L) {
- Logger.INFO("Returning False - Behaviour Class. Timer < 50");
+ Logger.WARNING("Returning False - Behaviour Class. Timer < 50");
return false;
} else if ((!aWorld.isRemote) && (!((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer))) {
- Logger.INFO("Returning True - drainTankGT. NotUsable()");
+ Logger.WARNING("Returning True - drainTankGT. NotUsable()");
return true;
} else {
if (this.getFluid(aStack) == null || (this.getFluid(aStack) != null && this.getFluid(aStack).amount < this.getCapacity(aStack))) {
- Logger.INFO("Trying to find Stored Fluid - drainTankGT.");
+ Logger.WARNING("Trying to find Stored Fluid - drainTankGT.");
FluidStack aStored = getStoredFluidOfGTMachine((IGregTechTileEntity) tTileEntity);
if (aStored != null) {
int mAmountInserted = fill(aStack, aStored);
@@ -1039,23 +1039,23 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
newStackRemainingInTank = FluidUtils.getFluidStack(aStored, (aStored.amount - mAmountInserted));
}
boolean b = setStoredFluidOfGTMachine((IGregTechTileEntity) tTileEntity, newStackRemainingInTank);
- Logger.INFO("Cleared Tank? " + b + " | mAmountInserted: " + mAmountInserted);
- Logger.INFO("Returning " + b + " - drainTankGT.");
+ Logger.WARNING("Cleared Tank? " + b + " | mAmountInserted: " + mAmountInserted);
+ Logger.WARNING("Returning " + b + " - drainTankGT.");
if (b) {
PlayerUtils.messagePlayer(aPlayer, "Drained "+mAmountInserted+"L of "+aStored.getLocalizedName()+".");
}
return b;
}
} else {
- Logger.INFO("Found no valid Fluidstack - drainTankGT.");
+ Logger.WARNING("Found no valid Fluidstack - drainTankGT.");
}
}
else {
- Logger.INFO("Pump is full.");
+ Logger.WARNING("Pump is full.");
}
}
}
- Logger.INFO("Could not drain GT tank.");
+ Logger.WARNING("Could not drain GT tank.");
return false;
}
@@ -1079,7 +1079,7 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
public FluidStack getStoredFluidOfVanillaTank(IFluidTank aTileEntity) {
FluidStack f = aTileEntity.getFluid();
- Logger.INFO("Returning Fluid stack from tile. Found: "
+ Logger.WARNING("Returning Fluid stack from tile. Found: "
+ (f != null ? f.getLocalizedName() + " - " + f.amount + "L" : "Nothing"));
return f.copy();
}
@@ -1101,14 +1101,14 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
}
public boolean setStoredFluidOfVanillaTank(TileEntity aTileEntity, FluidStack aSetFluid) {
- Logger.INFO("Trying to clear Tile's tank. - Behaviour Class. [1]");
+ Logger.WARNING("Trying to clear Tile's tank. - Behaviour Class. [1]");
if (aTileEntity == null) {
return false;
}
else if ((aTileEntity instanceof IFluidTank || aTileEntity instanceof IFluidHandler)) {
if (aTileEntity instanceof IFluidTank) {
- Logger.INFO("Tile Was instanceof IFluidTank.");
+ Logger.WARNING("Tile Was instanceof IFluidTank.");
FluidStack f = ((IFluidTank) aTileEntity).getFluid();
if (aSetFluid == null) {
aSetFluid = f;
@@ -1123,21 +1123,21 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
}
if (newStack.isFluidEqual(aSetFluid) && newStack.amount == aSetFluid.amount) {
- Logger.INFO("Removed fluid from vanilla IFluidTank successfully.");
+ Logger.WARNING("Removed fluid from vanilla IFluidTank successfully.");
return true;
} else {
- Logger.INFO("Failed trying to remove fluid from vanilla IFluidTank.");
+ Logger.WARNING("Failed trying to remove fluid from vanilla IFluidTank.");
return false;
}
}
else {
- Logger.INFO("Tile Was instanceof IFluidHandler.");
+ Logger.WARNING("Tile Was instanceof IFluidHandler.");
FluidStack containedStack = null;
if ((IFluidHandler) aTileEntity != null) {
FluidTankInfo[] a1 = (((IFluidHandler) aTileEntity).getTankInfo(ForgeDirection.UNKNOWN));
if (a1 != null) {
if (a1[0] != null) {
- Logger.INFO("Found Fluid in Tank.");
+ Logger.WARNING("Found Fluid in Tank.");
containedStack = a1[0].fluid;
}
}
@@ -1148,30 +1148,30 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
aSetFluid.amount = 0;
}
int toDrain = (containedStack.amount - aSetFluid.amount);
- Logger.INFO("Found "+containedStack.amount+"L of "+containedStack.getLocalizedName()+". Trying to drain "+toDrain+"L.");
+ Logger.WARNING("Found "+containedStack.amount+"L of "+containedStack.getLocalizedName()+". Trying to drain "+toDrain+"L.");
FluidStack newStack;
if (toDrain <= 0) {
- Logger.INFO("Draining Nothing");
+ Logger.WARNING("Draining Nothing");
newStack = containedStack;
} else {
- Logger.INFO("Draining Something");
+ Logger.WARNING("Draining Something");
newStack = ((IFluidTank) aTileEntity).drain(toDrain, true);
}
if (newStack.isFluidEqual(aSetFluid) && newStack.amount == aSetFluid.amount) {
- Logger.INFO("Removed fluid from vanilla IFluidHandler successfully.");
+ Logger.WARNING("Removed fluid from vanilla IFluidHandler successfully.");
return true;
} else {
- Logger.INFO("Failed trying to remove fluid from vanilla IFluidHandler.");
+ Logger.WARNING("Failed trying to remove fluid from vanilla IFluidHandler.");
return false;
}
} else {
- Logger.INFO("Could not drain vanilla tank, IFluidHandler claims there is no fluid.");
+ Logger.WARNING("Could not drain vanilla tank, IFluidHandler claims there is no fluid.");
return false;
}
}
} else {
- Logger.INFO("Bad Tank Tile to drain.");
+ Logger.WARNING("Bad Tank Tile to drain.");
return false;
}
@@ -1191,7 +1191,7 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
return null;
}
if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicTank) {
- Logger.INFO("Tile Was Instanceof BasicTank.");
+ Logger.WARNING("Tile Was Instanceof BasicTank.");
return getStoredFluidOfGTMachine((GT_MetaTileEntity_BasicTank) aMetaTileEntity);
} else {
return null;
@@ -1200,13 +1200,13 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
public FluidStack getStoredFluidOfGTMachine(GT_MetaTileEntity_BasicTank aTileEntity) {
FluidStack f = aTileEntity.mFluid;
- Logger.INFO("Returning Fluid stack from tile. Found: "
+ Logger.WARNING("Returning Fluid stack from tile. Found: "
+ (f != null ? f.getLocalizedName() + " - " + f.amount + "L" : "Nothing"));
return f.copy();
}
public boolean setStoredFluidOfGTMachine(IGregTechTileEntity aTileEntity, FluidStack aSetFluid) {
- Logger.INFO("Trying to clear Tile's tank. - Behaviour Class. [1]");
+ Logger.WARNING("Trying to clear Tile's tank. - Behaviour Class. [1]");
if (aTileEntity == null) {
return false;
}
@@ -1216,7 +1216,7 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
return false;
}
if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicTank) {
- Logger.INFO("Trying to clear Tile's tank. - Behaviour Class. [2]");
+ Logger.WARNING("Trying to clear Tile's tank. - Behaviour Class. [2]");
return setStoredFluidOfGTMachine((GT_MetaTileEntity_BasicTank) aMetaTileEntity, aSetFluid);
} else {
return false;
@@ -1227,10 +1227,10 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri
try {
aTileEntity.mFluid = aSetFluid;
boolean b = aTileEntity.mFluid == aSetFluid;
- Logger.INFO("Trying to set Tile's tank. - Behaviour Class. [3] " + b);
+ Logger.WARNING("Trying to set Tile's tank. - Behaviour Class. [3] " + b);
return b;
} catch (Throwable t) {
- Logger.INFO("Trying to clear Tile's tank. FAILED - Behaviour Class. [x]");
+ Logger.WARNING("Trying to clear Tile's tank. FAILED - Behaviour Class. [x]");
return false;
}
}
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java
index 3d4a071d82..243e169d48 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java
@@ -284,39 +284,40 @@ public class RECIPES_General {
return true;
}
- private static boolean addHandPumpRecipes() {
- boolean a[] = new boolean[4];
- a[0] = RecipeUtils.recipeBuilder(
+ private static void addHandPumpRecipes() {
+ /*if (RecipeUtils.recipeBuilder(
CI.electricPump_LV, "circuitBasic", null,
"ringBrass", CI.electricMotor_LV, "circuitBasic",
"plateSteel", "plateSteel", "rodBrass",
- ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 1, 1));
- Logger.INFO("Added recipe for Hand Pump I - "+a[0]);
- a[1] = RecipeUtils.recipeBuilder(
+ ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 1, 1)))
+ Logger.INFO("Added recipe for Hand Pump I - true");
+ if (RecipeUtils.recipeBuilder(
CI.electricPump_MV, "circuitAdvanced", null,
"ringMagnalium", CI.electricMotor_MV, "circuitAdvanced",
"plateAluminium", "plateAluminium", "rodMagnalium",
- ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 2, 1));
- Logger.INFO("Added recipe for Hand Pump II - "+a[1]);
- a[2] = RecipeUtils.recipeBuilder(
+ ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 2, 1)))
+ Logger.INFO("Added recipe for Hand Pump II - true");
+ if (RecipeUtils.recipeBuilder(
CI.electricPump_HV, "circuitData", null,
"ringChrome", CI.electricMotor_HV, "circuitData",
"plateStainlessSteel", "plateStainlessSteel", "rodChrome",
- ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 3, 1));
- Logger.INFO("Added recipe for Hand Pump III - "+a[2]);
- a[3] = RecipeUtils.recipeBuilder(
+ ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 3, 1)))
+ Logger.INFO("Added recipe for Hand Pump III - true");
+ if (RecipeUtils.recipeBuilder(
CI.electricPump_EV, "circuitElite", null,
"ringTitanium", CI.electricMotor_EV, "circuitElite",
"plateStungstenSteel", "plateTungstenSteel", "rodTitanium",
- ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 4, 1));
- Logger.INFO("Added recipe for Hand Pump IV - "+a[3]);
+ ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 4, 1)))
+ Logger.INFO("Added recipe for Hand Pump IV - true");*/
+
+
GT_Values.RA.addAssemblerRecipe(ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 1, 1), CI.getNumberedCircuit(20), ItemUtils.simpleMetaStack(ModItems.toolGregtechPump, 1000, 1), 30, 30);
GT_Values.RA.addAssemblerRecipe(ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 2, 1), CI.getNumberedCircuit(20), ItemUtils.simpleMetaStack(ModItems.toolGregtechPump, 1001, 1), 120, 120);
GT_Values.RA.addAssemblerRecipe(ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 3, 1), CI.getNumberedCircuit(20), ItemUtils.simpleMetaStack(ModItems.toolGregtechPump, 1002, 1), 480, 480);
GT_Values.RA.addAssemblerRecipe(ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 4, 1), CI.getNumberedCircuit(20), ItemUtils.simpleMetaStack(ModItems.toolGregtechPump, 1003, 1), 1820, 1820);
- return a[0] && a[1] && a[2] && a[3];
+
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
index 31347e0b22..ca795e40d1 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
@@ -13,11 +13,6 @@ import gtPlusPlus.core.lib.CORE;
public final class TexturesGtTools {
public final static CustomIcon SKOOKUM_CHOOCHER = new CustomIcon("iconsets/SKOOKUMCHOOCHER");
- public final static CustomIcon PUMP = new CustomIcon("iconsets/PUMP");
-
-
-
-
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
index 47c1f35f93..d228fdc04a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
@@ -16,7 +16,6 @@ import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechToolDictNames;
import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_Choocher;
-import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_Pump;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@@ -25,13 +24,11 @@ import net.minecraftforge.fluids.FluidStack;
public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool {
public static final short SKOOKUM_CHOOCHER = 7734;
- public static final short HAND_PUMP = 7736;
public static GT_MetaGenerated_Tool INSTANCE;
public MetaGeneratedGregtechTools() {
super("plusplus.metatool.01");
INSTANCE = this;
-
//Skookum Choocher
GregTech_API.registerTool(
this.addTool(
@@ -45,89 +42,6 @@ public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool {
new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)}),
GregTech_API.sWrenchList);
-
- //Pump
- this.addTool(
- HAND_PUMP,
- "Electric Pump",
- "Holds Fluids from GT Machines.",
- new TOOL_Gregtech_Pump(),
- new Object[]{GregtechToolDictNames.craftingToolHandPump,
- new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L)});
- this.setFluidContainerStats(HAND_PUMP, 16000L, 16L);
- }
-
-
-
- public final ConcurrentHashMap<Short, Long[]> mFluidContainerStats = new ConcurrentHashMap<Short, Long[]>();
-
- public final MetaGeneratedGregtechTools setFluidContainerStats(int aMetaValue, long aCapacity, long aStacksize) {
- if (aMetaValue >= 0) {
- if (aCapacity > 0L) {
- this.mFluidContainerStats.put(Short.valueOf((short) aMetaValue),
- new Long[]{Long.valueOf(aCapacity), Long.valueOf(Math.max(1L, aStacksize))});
- }
- return this;
- } else {
- return this;
- }
- }
-
- @Override
- public final Long[] getFluidContainerStats(ItemStack aStack) {
- return (Long[]) this.mFluidContainerStats.get(Short.valueOf((short) aStack.getItemDamage()));
- }
-
-
- @SuppressWarnings("unchecked")
- private ConcurrentHashMap<Short, ArrayList<IItemBehaviour<GT_MetaBase_Item>>> getItemBehaviours() {
- try {
- ConcurrentHashMap<Short, ArrayList<IItemBehaviour<GT_MetaBase_Item>>> aItemBehaviors;
- aItemBehaviors = (ConcurrentHashMap<Short, ArrayList<IItemBehaviour<GT_MetaBase_Item>>>) ReflectionUtils.getField(getClass(), "mItemBehaviors").get(this);
- return aItemBehaviors != null ? aItemBehaviors : null;
- } catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) {
- return null;
- }
- }
-
- @Override
- public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- Logger.INFO("Item Right Click");
- this.use(aStack, 0.0D, aPlayer);
- this.isItemStackUsable(aStack);
- ArrayList<IItemBehaviour<GT_MetaBase_Item>> tList = (ArrayList<IItemBehaviour<GT_MetaBase_Item>>) this.getItemBehaviours().get(Short.valueOf((short) this.getDamage(aStack)));
- try {
- IItemBehaviour<GT_MetaBase_Item> tBehavior;
- if (tList != null) {
- for (IItemBehaviour<GT_MetaBase_Item> g : tList) {
- if (g != null) {
- if (g instanceof TOOL_Gregtech_Pump) {
- TOOL_Gregtech_Pump t = (TOOL_Gregtech_Pump) g;
- if (t != null) {
- Logger.INFO("Right clicked with Pump tool.");
- aStack = g.onItemRightClick(this, aStack, aWorld, aPlayer);
- FluidStack f = t.getBehaviour().getStoredFluid();
- if (f != null) {
- Logger.INFO("Found Fluid '"+f.getLocalizedName()+"', trying to set fluid contents of tool.");
- this.setFluidContent(aStack, f);
- }
- }
- }
- else {
- aStack = g.onItemRightClick(this, aStack, aWorld, aPlayer);
- }
- }
- }
- }
- } catch (Throwable arg6) {
- if (GT_Values.D1) {
- arg6.printStackTrace(GT_Log.err);
- }
- }
- return aStack;
- }
-
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Pump.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Pump.java
deleted file mode 100644
index 1c48c7401f..0000000000
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Pump.java
+++ /dev/null
@@ -1,157 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.items.behaviours;
-
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-import net.minecraftforge.fluids.FluidStack;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.common.items.behaviors.Behaviour_None;
-import gtPlusPlus.api.objects.Logger;
-
-public class Behaviour_Pump
-extends Behaviour_None {
-
- private final int mCosts;
- private FluidStack mStoredFluid;
- private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.pump", "Sucks in Machine Input Fluid tank contents on Rightclick");
-
- public Behaviour_Pump(final int aCosts) {
- this.mCosts = aCosts;
- }
-
- @Override
- public boolean onItemUseFirst(final GT_MetaBase_Item aItem, final ItemStack aStack, final EntityPlayer aPlayer, final World aWorld, final int aX, final int aY, final int aZ, final int aSide, final float hitX, final float hitY, final float hitZ) {
- if (aWorld.isRemote) {
- return false;
- }
- else {
- final Block aBlock = aWorld.getBlock(aX, aY, aZ);
- if (aBlock == null) {
- return false;
- }
- //final byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ);
- TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if (tTileEntity == null) {
- return false;
- }
- if ((tTileEntity instanceof IGregTechTileEntity)) {
- Logger.INFO("Right Clicking on GT Tile - Behaviour Class.");
- if (((IGregTechTileEntity) tTileEntity).getTimer() < 50L) {
- Logger.INFO("Returning False - Behaviour Class. Timer < 50");
- return false;
- }
- else if ((!aWorld.isRemote) && (!((IGregTechTileEntity) tTileEntity).isUseableByPlayer(aPlayer))) {
- Logger.INFO("Returning True - Behaviour Class. NotUsable()");
- return true;
- }
- else {
- Logger.INFO("Trying to find Stored Fluid - Behaviour Class.");
- FluidStack aStored = getStoredFluidOfGTMachine((IGregTechTileEntity)tTileEntity);
- if (aStored != null) {
- this.mStoredFluid = aStored;
- boolean b = setStoredFluidOfGTMachine((IGregTechTileEntity)tTileEntity);
- Logger.INFO("Cleared Tank? "+b);
- Logger.INFO("Returning True - Behaviour Class.");
- return true;
- }
- else {
- Logger.INFO("Found no valid Fluidstack - Behaviour Class.");
- }
- }
-
- }
- }
- Logger.INFO("Returning False - Behaviour Class.");
- return false;
- }
-
- public List<String> getAdditionalToolTips(final GT_MetaBase_Item aItem, final List<String> aList, final ItemStack aStack) {
- aList.add(this.mTooltip);
- aList.add("Stored Fluid: "+(mStoredFluid != null ? mStoredFluid.getLocalizedName()+" - "+mStoredFluid.amount+"L" : "None"));
- return aList;
- }
-
- @Override
- public ItemStack onItemRightClick(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer) {
- // TODO Auto-generated method stub
- return super.onItemRightClick(aItem, aStack, aWorld, aPlayer);
- }
-
- @Override
- public void onUpdate(GT_MetaBase_Item aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer,
- boolean aIsInHand) {
- // TODO Auto-generated method stub
- super.onUpdate(aItem, aStack, aWorld, aPlayer, aTimer, aIsInHand);
- }
-
- public FluidStack getStoredFluidOfGTMachine(IGregTechTileEntity aTileEntity) {
- if (aTileEntity == null) {
- return null;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();;
- if (aMetaTileEntity == null) {
- return null;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicTank) {
- Logger.INFO("Tile Was Instanceof BasicTank.");
- return getStoredFluidOfGTMachine((GT_MetaTileEntity_BasicTank) aMetaTileEntity);
- }
- else {
- return null;
- }
- }
-
- public FluidStack getStoredFluidOfGTMachine(GT_MetaTileEntity_BasicTank aTileEntity) {
- FluidStack f = aTileEntity.mFluid;
- Logger.INFO("Returning Fluid stack from tile. Found: "+(f != null ? f.getLocalizedName()+" - "+f.amount+"L" : "Nothing"));
- return f.copy();
- }
-
- public boolean setStoredFluidOfGTMachine(IGregTechTileEntity aTileEntity) {
- Logger.INFO("Trying to clear Tile's tank. - Behaviour Class. [1]");
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();;
- if (aMetaTileEntity == null) {
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicTank) {
- Logger.INFO("Trying to clear Tile's tank. - Behaviour Class. [2]");
- return setStoredFluidOfGTMachine((IGregTechTileEntity) aMetaTileEntity);
- }
- else {
- return false;
- }
- }
-
- public boolean setStoredFluidOfGTMachine(GT_MetaTileEntity_BasicTank aTileEntity) {
- try {
- aTileEntity.mFluid = null;
- boolean b = aTileEntity.mFluid == null;
- Logger.INFO("Trying to clear Tile's tank. - Behaviour Class. [3] "+b);
- return aTileEntity.mFluid == null;
- }
- catch (Throwable t) {
- Logger.INFO("Trying to clear Tile's tank. FAILED - Behaviour Class. [x]");
- return false;
- }
- }
-
- public synchronized final FluidStack getStoredFluid() {
- return mStoredFluid;
- }
-
- public synchronized final void setStoredFluid(FluidStack mStoredFluid) {
- this.mStoredFluid = mStoredFluid;
- }
-}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Pump.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Pump.java
deleted file mode 100644
index 731e742f2a..0000000000
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Pump.java
+++ /dev/null
@@ -1,203 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.tools;
-
-import java.util.Arrays;
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.monster.EntityIronGolem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.stats.AchievementList;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-import net.minecraft.world.World;
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.common.tools.GT_Tool;
-
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
-import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Pump;
-import net.minecraftforge.event.world.BlockEvent;
-import net.minecraftforge.fluids.FluidStack;
-
-public class TOOL_Gregtech_Pump
-extends GT_Tool {
-
- public static final List<String> mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"});
- private final Behaviour_Pump mBehaviour;
- private FluidStack mStoredFluid;
-
- public TOOL_Gregtech_Pump() {
- mBehaviour = new Behaviour_Pump(100);
- //this.setFluidContainerStats(32000, 16000L, 16L);
- }
-
- @Override
- public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack, final EntityPlayer aPlayer) {
- String tName = aEntity.getClass().getName();
- tName = tName.substring(tName.lastIndexOf(".") + 1);
- return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage;
- }
-
- public Behaviour_Pump getBehaviour() {
- return this.mBehaviour;
- }
-
- @Override
- public int getToolDamagePerBlockBreak() {
- return 1000;
- }
-
- @Override
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- @Override
- public int getToolDamagePerContainerCraft() {
- return 400;
- }
-
- @Override
- public int getToolDamagePerEntityAttack() {
- return 1000;
- }
-
- @Override
- public int getBaseQuality() {
- return 1;
- }
-
- @Override
- public float getBaseDamage() {
- return 0.0F;
- }
-
- @Override
- public float getSpeedMultiplier() {
- return 1.0F;
- }
-
- @Override
- public float getMaxDurabilityMultiplier() {
- return 1.5F;
- }
-
- @Override
- public String getCraftingSound() {
- return GregTech_API.sSoundList.get(Integer.valueOf(1));
- }
-
- @Override
- public String getEntityHitSound() {
- return GregTech_API.sSoundList.get(Integer.valueOf(2));
- }
-
- @Override
- public String getBreakingSound() {
- return GregTech_API.sSoundList.get(Integer.valueOf(0));
- }
-
- @Override
- public String getMiningSound() {
- return null;
- }
-
- @Override
- public boolean canBlock() {
- return false;
- }
-
- public boolean isWrench(){
- return false;
- }
-
- @Override
- public boolean isCrowbar() {
- return false;
- }
-
- @Override
- public boolean isWeapon() {
- return true;
- }
-
- @Override
- public boolean isMinableBlock(final Block aBlock, final byte aMetaData) {
- return false;
- }
-
- @Override
- public int convertBlockDrops(final List<ItemStack> aDrops, final ItemStack aStack, final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) {
- int rConversions = 0;
- return rConversions;
- }
-
- @Override
- public ItemStack getBrokenItem(final ItemStack aStack) {
- return null;
- }
-
- @Override
- public IIconContainer getIcon(final boolean aIsToolHead, final ItemStack aStack) {
- return TexturesGtTools.PUMP;
- }
-
- @Override
- public short[] getRGBa(final boolean aIsToolHead, final ItemStack aStack) {
- return GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa;
- }
-
- @Override
- public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) {
- super.onToolCrafted(aStack, aPlayer);
- aPlayer.triggerAchievement(AchievementList.buildSword);
- try {
- GT_Mod.achievements.issueAchievement(aPlayer, "tools");
- GT_Mod.achievements.issueAchievement(aPlayer, "unitool");
- } catch (final Exception e) {
- }
- }
-
- @Override
- public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " got pumped by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
- }
-
- @Override
- public void onStatsAddedToTool(final GT_MetaGenerated_Tool aItem, final int aID) {
- aItem.addItemBehavior(aID, mBehaviour);
- }
-
- @Override
- public boolean isGrafter() {
- return false;
- }
-
- @Override
- public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj,
- int aX, int aY, int aZ) {
- return 0f;
- }
-
- @Override
- public boolean isChainsaw() {
- return false;
- }
-
- @Override
- public boolean isMiningTool() {
- return false;
- }
-
- @Override
- public boolean isRangedWeapon() {
- return false;
- }
-
-}
diff --git a/src/resources/assets/miscutils/textures/items/iconsets/PUMP.png b/src/resources/assets/miscutils/textures/items/iconsets/PUMP.png
deleted file mode 100644
index ca0ad43c3b..0000000000
--- a/src/resources/assets/miscutils/textures/items/iconsets/PUMP.png
+++ /dev/null
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/token/0.png b/src/resources/assets/miscutils/textures/items/token/0.png
new file mode 100644
index 0000000000..925fe2f778
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/token/0.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/token/1.png b/src/resources/assets/miscutils/textures/items/token/1.png
new file mode 100644
index 0000000000..850acc3e71
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/token/1.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/token/2.png b/src/resources/assets/miscutils/textures/items/token/2.png
new file mode 100644
index 0000000000..fa619dd1ed
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/token/2.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/token/3.png b/src/resources/assets/miscutils/textures/items/token/3.png
new file mode 100644
index 0000000000..3ba45ed7af
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/token/3.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/token/4.png b/src/resources/assets/miscutils/textures/items/token/4.png
new file mode 100644
index 0000000000..81af6a91c8
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/token/4.png
Binary files differ