aboutsummaryrefslogtreecommitdiff
path: root/src/Java
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-12-27 18:44:16 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-12-27 18:44:16 +1000
commita21133dd24f52a91df52bd2f520e3e0bdf6d87bd (patch)
tree13c58861dba7590424368da55f1dd88207d189ce /src/Java
parent3cc9e9a347b320374858ee7cf4df89138d7d0941 (diff)
downloadGT5-Unofficial-a21133dd24f52a91df52bd2f520e3e0bdf6d87bd.tar.gz
GT5-Unofficial-a21133dd24f52a91df52bd2f520e3e0bdf6d87bd.tar.bz2
GT5-Unofficial-a21133dd24f52a91df52bd2f520e3e0bdf6d87bd.zip
+ Added Fluorite to FLUORIDES.java.
+ Added Macerator recipe for Fluorite Ore to Fluorite Dust. $ Rewrote large portions of the multitool mining logic. % Made Fluorite ore drop 50% more often. % Changed ore textures back to being single layer, for now. % Changed logging for multi picks to debug mode.
Diffstat (limited to 'src/Java')
-rw-r--r--src/Java/gtPlusPlus/core/block/base/BasicBlock.java2
-rw-r--r--src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java2
-rw-r--r--src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java27
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java4
-rw-r--r--src/Java/gtPlusPlus/core/item/ModItems.java1
-rw-r--r--src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java15
-rw-r--r--src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java61
-rw-r--r--src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java7
-rw-r--r--src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java14
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java5
-rw-r--r--src/Java/gtPlusPlus/core/util/player/UtilsMining.java21
11 files changed, 108 insertions, 51 deletions
diff --git a/src/Java/gtPlusPlus/core/block/base/BasicBlock.java b/src/Java/gtPlusPlus/core/block/base/BasicBlock.java
index 0083380bcb..2823fcc5b7 100644
--- a/src/Java/gtPlusPlus/core/block/base/BasicBlock.java
+++ b/src/Java/gtPlusPlus/core/block/base/BasicBlock.java
@@ -30,7 +30,7 @@ public class BasicBlock extends BlockContainer {
public static enum BlockTypes {
STANDARD("blockBlock", "pickaxe", soundTypeMetal),
FRAME("blockFrameGt", "wrench", soundTypeMetal),
- ORE("blockOre", "pickaxe", soundTypeStone);
+ ORE("blockStone", "pickaxe", soundTypeStone);
private String TEXTURE_NAME;
private String HARVEST_TOOL;
diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java
index 325d83f67d..9e71370197 100644
--- a/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java
+++ b/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java
@@ -26,7 +26,7 @@ public class BlockBaseModular extends BasicBlock{
}
public BlockBaseModular(String unlocalizedName, String blockMaterial, Material vanillaMaterial, BlockTypes blockType, int colour, int miningLevel) {
- super(blockType.getTexture()+unlocalizedName, vanillaMaterial);
+ super(unlocalizedName, vanillaMaterial);
this.setHarvestLevel(blockType.getHarvestTool(), miningLevel);
this.setBlockTextureName(CORE.MODID+":"+blockType.getTexture());
this.blockColour = colour;
diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
index dca12e0272..c57aa248b4 100644
--- a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
+++ b/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
@@ -16,42 +16,43 @@ public class BlockBaseOre extends BlockBaseModular{
@SuppressWarnings("unused")
private IIcon overlay;
- @Override
+ /*@Override
public boolean renderAsNormalBlock() {
- return false;
- }
+ return true;
+ }*/
public BlockBaseOre(String unlocalizedName, String blockMaterial, BlockTypes blockType, int colour) {
this(unlocalizedName, blockMaterial, Material.iron, blockType, colour, 2);
}
public BlockBaseOre(String unlocalizedName, String blockMaterial, Material vanillaMaterial, BlockTypes blockType, int colour, int miningLevel) {
- super(blockType.getTexture()+unlocalizedName, blockMaterial, vanillaMaterial, blockType, colour, miningLevel);
+ super(unlocalizedName, blockMaterial, vanillaMaterial, blockType, colour, miningLevel);
}
/**
* Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
*/
- @Override
+
+ /*@Override
@SideOnly(Side.CLIENT)
public int getRenderBlockPass()
{
- return 1;
- }
+ return 0;
+ } */
- @Override
+ /*@Override
public boolean isOpaqueCube()
{
- return false;
- }
+ return true;
+ }*/
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iIcon)
{
- //this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + thisBlock.getTexture());
- this.base = iIcon.registerIcon(CORE.MODID + ":" + "blockStone");
- this.overlay = iIcon.registerIcon(CORE.MODID + ":" + "blockOre_Overlay");
+ this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + thisBlock.getTexture());
+ //this.base = iIcon.registerIcon(CORE.MODID + ":" + "blockStone");
+ //this.overlay = iIcon.registerIcon(CORE.MODID + ":" + "blockOre_Overlay");
}
@Override
diff --git a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java
index 796d9fca77..817cb8828c 100644
--- a/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java
+++ b/src/Java/gtPlusPlus/core/handler/events/BlockEventHandler.java
@@ -110,7 +110,7 @@ public class BlockEventHandler {
if (!oreLimestone.isEmpty())
for (ItemStack temp : oreLimestone){
if (ItemUtils.getSimpleStack(Item.getItemFromBlock(event.block)) == temp) {
- if (MathUtils.randInt(1, 64) == 1){
+ if (MathUtils.randInt(1, 32) == 1){
event.drops.add(fluoriteOre.copy());
}
}
@@ -118,7 +118,7 @@ public class BlockEventHandler {
if (!oreLimestone.isEmpty())
for (ItemStack temp : blockLimestone){
if (ItemUtils.getSimpleStack(Item.getItemFromBlock(event.block)) == temp) {
- if (MathUtils.randInt(1, 64) == 1){
+ if (MathUtils.randInt(1, 32) == 1){
event.drops.add(fluoriteOre.copy());
}
}
diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java
index f488a48424..97fcf1b51f 100644
--- a/src/Java/gtPlusPlus/core/item/ModItems.java
+++ b/src/Java/gtPlusPlus/core/item/ModItems.java
@@ -279,6 +279,7 @@ public final class ModItems {
//Generate Fluorides
+ MaterialGenerator.generateNuclearMaterial(FLUORIDES.FLUORITE);
MaterialGenerator.generateNuclearMaterial(FLUORIDES.BERYLLIUM_FLUORIDE);
MaterialGenerator.generateNuclearMaterial(FLUORIDES.LITHIUM_FLUORIDE);
MaterialGenerator.generateNuclearMaterial(FLUORIDES.THORIUM_TETRAFLUORIDE);
diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java
index 99ee699dcf..dad3cf320b 100644
--- a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java
+++ b/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java
@@ -5,11 +5,9 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.player.UtilsMining;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@@ -49,6 +47,7 @@ public class MultiPickaxeBase extends StaballoyPickaxe{
this.colour = colour;
this.materialName = material.name();
this.setCreativeTab(AddToCreativeTab.tabTools);
+ miningLevel = material.getHarvestLevel();
try {isValid = addRecipe();} catch (Throwable e){}
if (colour != 0 && isValid){
GameRegistry.registerItem(this, Utils.sanitizeString(unlocalizedName));
@@ -139,12 +138,12 @@ public class MultiPickaxeBase extends StaballoyPickaxe{
//Utils.LOG_WARNING(removalist.toString());
bHardness = removalist.getBlockHardness(world, X, Y, Z)*100;
- Utils.LOG_WARNING("Hardness: "+bHardness);
+ Utils.LOG_INFO("Hardness: "+bHardness);
bDurabilityLoss = 100;
//Utils.LOG_WARNING("Durability Loss: "+bDurabilityLoss);
- correctTool = canPickaxeBlock(removalist, world);
+ correctTool = canPickaxeBlock(removalist, world, new int[]{X,Y,Z});
Utils.LOG_WARNING(""+correctTool);
if (!correctTool){
@@ -159,7 +158,7 @@ public class MultiPickaxeBase extends StaballoyPickaxe{
}
//Should clear up blocks quicker if I chain it.
- @Override
+ /*@Override
public void removeBlockAndDropAsItem(World world, int X, int Y, int Z, ItemStack heldItem){
localWorld = world;
try {
@@ -169,8 +168,8 @@ public class MultiPickaxeBase extends StaballoyPickaxe{
String removalTool = "";
removalTool = block.getHarvestTool(1);
- if (removalTool.equals("pickaxe") || UtilsMining.getBlockType(block)){
- if (canPickaxeBlock(block, world)){
+ if (removalTool.equals("pickaxe") || UtilsMining.getBlockType(block, world, new int[]{X,Y,Z}, miningLevel)){
+ if (canPickaxeBlock(block, world, new int[]{X,Y,Z})){
if((block != Blocks.bedrock) && (block.getBlockHardness(world, X, Y, Z) != -1) && (block.getBlockHardness(world, X, Y, Z) <= 100) && (block != Blocks.water) && (block != Blocks.lava)){
if (heldItem.getItemDamage() <= (heldItem.getMaxDamage()-dur)){
@@ -192,7 +191,7 @@ public class MultiPickaxeBase extends StaballoyPickaxe{
} catch (NullPointerException e){
}
- }
+ }*/
public void damageItem(ItemStack item, int damage, EntityPlayer localPlayer){
item.damageItem(damage, localPlayer);
diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java
index cc8434aace..81943536ae 100644
--- a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java
+++ b/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoyPickaxe.java
@@ -34,6 +34,7 @@ public class StaballoyPickaxe extends ItemPickaxe{
protected String lookingDirection;
protected World localWorld;
public ItemStack thisPickaxe = null;
+ protected int miningLevel;
/*
*
@@ -62,7 +63,7 @@ public class StaballoyPickaxe extends ItemPickaxe{
thisPickaxe = stack;
//checkFacing(world);
if (!world.isRemote){
- GetDestroyOrientation(lookingDirection, world, X, Y, Z, stack);
+ GetDestroyOrientation(block, lookingDirection, world, X, Y, Z, stack);
}
return super.onBlockDestroyed(stack, world, block, X, Y, Z, entity);
@@ -84,7 +85,7 @@ public class StaballoyPickaxe extends ItemPickaxe{
bDurabilityLoss = (bDurabilityLoss + bHardness);
//Utils.LOG_WARNING("Durability Loss: "+bDurabilityLoss);
- correctTool = canPickaxeBlock(removalist, world);
+ correctTool = canPickaxeBlock(removalist, world, new int[]{X,Y,Z});
Utils.LOG_WARNING(""+correctTool);
if (!correctTool){
@@ -98,13 +99,13 @@ public class StaballoyPickaxe extends ItemPickaxe{
return 100;
}
- public Boolean canPickaxeBlock(Block currentBlock, World currentWorld){
+ public Boolean canPickaxeBlock(Block currentBlock, World currentWorld, int[] xyz){
String correctTool = "";
if (!currentWorld.isRemote){
try {
correctTool = currentBlock.getHarvestTool(0);
+ if (UtilsMining.getBlockType(currentBlock, currentWorld, xyz, miningLevel) || correctTool.equals("pickaxe") || correctTool.equals("null")){
//Utils.LOG_WARNING(correctTool);
- if (UtilsMining.getBlockType(currentBlock) || correctTool.equals("pickaxe")){
return true;}
} catch (NullPointerException e){
return false;}
@@ -112,11 +113,12 @@ public class StaballoyPickaxe extends ItemPickaxe{
return false;
}
- private void GetDestroyOrientation(String FACING, World world, int X, int Y, int Z, ItemStack heldItem){
+ private void GetDestroyOrientation(Block block, String FACING, World world, int X, int Y, int Z, ItemStack heldItem){
localWorld = world;
float DURABILITY_LOSS = 0;
if (!world.isRemote){
+ Utils.LOG_WARNING("hardness:"+block.getBlockHardness(world, X, Y, Z));
if (FACING.equals("below") || FACING.equals("above")){
DURABILITY_LOSS = 0;
for(int i = -1; i < 2; i++) {
@@ -154,18 +156,18 @@ public class StaballoyPickaxe extends ItemPickaxe{
}
//int heldItemDurability = heldItem.getDamage(1);
- Utils.LOG_INFO("Total Loss: "+(int)DURABILITY_LOSS);
+ Utils.LOG_WARNING("Total Loss: "+(int)DURABILITY_LOSS);
//heldItem.setDamage(heldStack, DURABILITY_LOSS);
//Utils.LOG_WARNING("|GID|Durability: "+heldItem.getItemDamage());
//Utils.LOG_WARNING("Durability: "+heldStack.getDamage(heldStack));
- Utils.LOG_INFO("1x: "+(heldItem.getItemDamage()));
+ Utils.LOG_WARNING("1x: "+(heldItem.getItemDamage()));
int itemdmg = heldItem.getItemDamage();
int maxdmg = heldItem.getMaxDamage();
int dodmg = (int)DURABILITY_LOSS;
int durNow = (int) maxdmg-itemdmg;
int durLeft = (int) ((maxdmg-itemdmg)-DURABILITY_LOSS);
- Utils.LOG_INFO(
+ Utils.LOG_WARNING(
"Current Damage: " + itemdmg
+ " Max Damage: " + maxdmg
+ " Durability to be lost: " + dodmg
@@ -177,23 +179,23 @@ public class StaballoyPickaxe extends ItemPickaxe{
//Break Tool
if ((durNow-dodmg) <= (99) && itemdmg != 0){
//TODO break tool
- Utils.LOG_INFO("Breaking Tool");
+ Utils.LOG_WARNING("Breaking Tool");
heldItem.stackSize = 0;
}
//Do Damage
else {
//setItemDamage(heldItem, durLeft);
- Utils.LOG_INFO(""+(durNow-durLeft));
+ Utils.LOG_WARNING(""+(durNow-durLeft));
damageItem(heldItem, (durNow-durLeft)-1, localPlayer);
}
/*if (heldItem.getItemDamage() <= ((heldItem.getMaxDamage()-heldItem.getItemDamage())-DURABILITY_LOSS)){
- Utils.LOG_INFO("2: "+DURABILITY_LOSS+" 3: "+((heldItem.getMaxDamage()-heldItem.getItemDamage())-DURABILITY_LOSS));
+ Utils.LOG_WARNING("2: "+DURABILITY_LOSS+" 3: "+((heldItem.getMaxDamage()-heldItem.getItemDamage())-DURABILITY_LOSS));
setItemDamage(heldItem, (int) (heldItem.getMaxDamage()-(heldItem.getMaxDamage()-heldItem.getItemDamage())-DURABILITY_LOSS));
}
else {
- Utils.LOG_INFO("3: "+( heldItem.getMaxDamage()-(heldItem.getMaxDamage()-heldItem.getItemDamage())));
+ Utils.LOG_WARNING("3: "+( heldItem.getMaxDamage()-(heldItem.getMaxDamage()-heldItem.getItemDamage())));
setItemDamage(heldItem, heldItem.getMaxDamage()-(heldItem.getMaxDamage()-heldItem.getItemDamage()));
}*/
//Utils.LOG_WARNING("|GID|Durability: "+heldItem.getItemDamage());
@@ -211,7 +213,7 @@ public class StaballoyPickaxe extends ItemPickaxe{
}
//Should clear up blocks quicker if I chain it.
- public void removeBlockAndDropAsItem(World world, int X, int Y, int Z, ItemStack heldItem){
+ public final void removeBlockAndDropAsItem(World world, int X, int Y, int Z, ItemStack heldItem){
localWorld = world;
try {
Block block = world.getBlock(X, Y, Z);
@@ -219,11 +221,22 @@ public class StaballoyPickaxe extends ItemPickaxe{
Utils.LOG_WARNING(block.toString());
String removalTool = "";
removalTool = block.getHarvestTool(1);
-
- if (removalTool.equals("pickaxe") || UtilsMining.getBlockType(block)){
- if (canPickaxeBlock(block, world)){
- if((block != Blocks.bedrock) && (block.getBlockHardness(world, X, Y, Z) != -1) && (block.getBlockHardness(world, X, Y, Z) <= 100) && (block != Blocks.water) && (block != Blocks.lava)){
-
+
+ Utils.LOG_WARNING("Removing.1 "+removalTool);
+ /*if ((removalTool.equalsIgnoreCase("pickaxe") || removalTool.equalsIgnoreCase("null") || removalTool == null)){
+ Utils.LOG_WARNING("Removing.2");
+ if (UtilsMining.getBlockType(block, world, new int[]{X,Y,Z}, miningLevel)) {
+ Utils.LOG_WARNING("Removing.3"); */
+ if (canPickaxeBlock(block, world, new int[]{X,Y,Z})){
+ Utils.LOG_WARNING("Removing.4");
+
+ if (block == Blocks.air){
+ return;
+ }
+
+ if((block != Blocks.bedrock) && (block.getBlockHardness(world, X, Y, Z) >= 0) && (block.getBlockHardness(world, X, Y, Z) <= 100) && (block != Blocks.water) && (block != Blocks.lava)){
+
+ Utils.LOG_WARNING("Removing.5");
if (heldItem.getItemDamage() <= (heldItem.getMaxDamage()-dur)){
block.dropBlockAsItem(world, X, Y, Z, world.getBlockMetadata(X, Y, Z), 0);
@@ -232,10 +245,12 @@ public class StaballoyPickaxe extends ItemPickaxe{
}
}
- }
- else {
- Utils.LOG_WARNING("Incorrect Tool for mining this block.");
- }
+ /*}
+
+ }*/
+ }
+ else {
+ Utils.LOG_WARNING("Incorrect Tool for mining this block.");
}
} catch (NullPointerException e){
@@ -335,6 +350,7 @@ public class StaballoyPickaxe extends ItemPickaxe{
checkFacing(localPlayer.worldObj);
return super.onBlockStartBreak(itemstack, X, Y, Z, aPlayer);
}
+
public StaballoyPickaxe(String unlocalizedName, ToolMaterial material) {
super(material);
this.setUnlocalizedName(unlocalizedName);
@@ -342,5 +358,6 @@ public class StaballoyPickaxe extends ItemPickaxe{
this.FACING_HORIZONTAL=true;
this.setMaxStackSize(1);
this.setMaxDamage(3200);
+ this.miningLevel = 5;
}
}
diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java
index 1033a96161..e5c3c92ced 100644
--- a/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java
+++ b/src/Java/gtPlusPlus/core/item/tool/staballoy/StaballoySpade.java
@@ -34,6 +34,7 @@ public class StaballoySpade extends ItemSpade{
protected String lookingDirection;
protected World localWorld;
public ItemStack thisPickaxe = null;
+ private int miningLevel;
/*
*
@@ -68,7 +69,7 @@ public class StaballoySpade extends ItemSpade{
return super.onBlockDestroyed(stack, world, block, X, Y, Z, entity);
}
- public Boolean canPickaxeBlock(Block currentBlock, World currentWorld){
+ public Boolean canPickaxeBlock(Block currentBlock, World currentWorld, int[] xyz){
String correctTool = "";
if (!currentWorld.isRemote){
try {
@@ -76,7 +77,7 @@ public class StaballoySpade extends ItemSpade{
//Utils.LOG_WARNING(correctTool);
Utils.LOG_INFO("Tool for Block: "+correctTool+" | Current block: "+currentBlock.getLocalizedName());
- if (UtilsMining.getBlockType(currentBlock) || correctTool.equals("shovel")){
+ if (UtilsMining.getBlockType(currentBlock, currentWorld, xyz, miningLevel) || correctTool.equals("shovel")){
return true;}
} catch (NullPointerException e){
return false;}
@@ -173,7 +174,7 @@ public class StaballoySpade extends ItemSpade{
removalTool = block.getHarvestTool(0);
if (removalTool != null){
if (removalTool.equals("shovel")){
- if (canPickaxeBlock(block, world)){
+ if (canPickaxeBlock(block, world, new int[]{X,Y,Z})){
if((block != Blocks.bedrock) && (block.getBlockHardness(world, X, Y, Z) != -1) && (block.getBlockHardness(world, X, Y, Z) <= 100) && (block != Blocks.water) && (block != Blocks.lava)){
int itemdmg = heldItem.getItemDamage();
diff --git a/src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java b/src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java
index 15e5578d48..9b98e1885b 100644
--- a/src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java
+++ b/src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java
@@ -8,6 +8,20 @@ public class FLUORIDES {
private static final FLUORIDES thisClass = new FLUORIDES();
public FLUORIDES(){}
public static FLUORIDES getInstance(){return thisClass;}
+
+ public static final Material FLUORITE = new Material(
+ "Fluorite", //Material Name
+ new short[]{75, 70, 25, 0}, //Material Colour
+ Materials.Fluorine.mMeltingPoint, //Melting Point in C
+ Materials.Fluorine.mBlastFurnaceTemp, //Boiling Point in C
+ ((ELEMENT.getInstance().CALCIUM.getProtons()+(ELEMENT.getInstance().FLUORINE.getProtons()*2))/3), //Protons
+ ((ELEMENT.getInstance().CALCIUM.getNeutrons()+(ELEMENT.getInstance().FLUORINE.getNeutrons()*2))/3), //Neutrons
+ false, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.getInstance().CALCIUM, 1),
+ new MaterialStack(ELEMENT.getInstance().FLUORINE, 2)
+ });
public static final Material THORIUM_TETRAFLUORIDE = new Material(
"Thorium Tetrafluoride", //Material Name
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
index d50cb04cd0..73bd5538a4 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
@@ -3,6 +3,7 @@ package gtPlusPlus.core.recipe;
import gregtech.api.GregTech_API;
import gregtech.api.enums.*;
import gregtech.api.util.*;
+import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
@@ -12,6 +13,7 @@ import gtPlusPlus.core.util.fluid.FluidUtils;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import net.minecraft.init.Items;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
@@ -531,6 +533,9 @@ public class RECIPES_GREGTECH {
GT_ModHandler.addPulverisationRecipe(
ItemUtils.getItemStackOfAmountFromOreDict("pelletZirconium", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustZrCl4", 1));
+ GT_ModHandler.addPulverisationRecipe(
+ ItemUtils.getSimpleStack(Item.getItemFromBlock(ModBlocks.blockOreFluorite)),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustFluorite", 4));
}
public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3) {
diff --git a/src/Java/gtPlusPlus/core/util/player/UtilsMining.java b/src/Java/gtPlusPlus/core/util/player/UtilsMining.java
index 1b6b957b32..9147f4195c 100644
--- a/src/Java/gtPlusPlus/core/util/player/UtilsMining.java
+++ b/src/Java/gtPlusPlus/core/util/player/UtilsMining.java
@@ -140,13 +140,28 @@ public class UtilsMining {
}
- public static boolean getBlockType(Block block){
+ public static boolean getBlockType(Block block, World world, int[] xyz, int miningLevel){
final String LIQUID = "liquid";
final String BLOCK = "block";
final String ORE = "ore";
final String AIR = "air";
String blockClass = "";
+ if (world.isRemote){
+ return false;
+ }
+
+ if (block == Blocks.end_stone) return true;
+ if (block == Blocks.stone) return true;
+ if (block == Blocks.sandstone) return true;
+ if (block == Blocks.netherrack) return true;
+ if (block == Blocks.nether_brick) return true;
+ if (block == Blocks.nether_brick_stairs) return true;
+ if (block == Blocks.nether_brick_fence) return true;
+ if (block == Blocks.glowstone) return true;
+
+
+
try {
blockClass = block.getClass().toString().toLowerCase();
Utils.LOG_WARNING(blockClass);
@@ -158,6 +173,10 @@ public class UtilsMining {
Utils.LOG_WARNING(block.toString()+" is an Ore.");
return true;
}
+ else if (block.getHarvestLevel(world.getBlockMetadata(xyz[0], xyz[1], xyz[2])) >= miningLevel){
+ Utils.LOG_WARNING(block.toString()+" is minable.");
+ return true;
+ }
else if (blockClass.toLowerCase().contains(AIR)){
Utils.LOG_WARNING(block.toString()+" is Air.");
return false;