Merge pull request #576 from Muramasa-/UBCSupport
UBC Support / Ore System Restructure
This commit is contained in:
commit
bd51aba156
33 changed files with 713 additions and 342 deletions
|
@ -1,11 +1,5 @@
|
||||||
package gregtech;
|
package gregtech;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.PrintStream;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.*;
|
import cpw.mods.fml.common.*;
|
||||||
import cpw.mods.fml.common.event.*;
|
import cpw.mods.fml.common.event.*;
|
||||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||||
|
@ -56,6 +50,12 @@ import net.minecraftforge.fluids.FluidRegistry;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.PrintStream;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
//import forestry.factory.recipes.ISqueezerRecipe;
|
//import forestry.factory.recipes.ISqueezerRecipe;
|
||||||
//import forestry.factory.tiles.TileCentrifuge;
|
//import forestry.factory.tiles.TileCentrifuge;
|
||||||
//import forestry.factory.tiles.TileSqueezer;
|
//import forestry.factory.tiles.TileSqueezer;
|
||||||
|
@ -612,31 +612,31 @@ public class GT_Mod
|
||||||
}
|
}
|
||||||
GT_Log.out.println("GT_Mod: Adding Fake Recipes for NEI");
|
GT_Log.out.println("GT_Mod: Adding Fake Recipes for NEI");
|
||||||
if (ItemList.FR_Bee_Drone.get(1L, new Object[0]) != null) {
|
if (ItemList.FR_Bee_Drone.get(1L, new Object[0]) != null) {
|
||||||
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Drone.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Bee_Drone.getWithName(1L, "Scanned Drone", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(50L)}, null, 500, 2, 0);
|
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Drone.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Bee_Drone.getWithName(1L, "Scanned Drone", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
|
||||||
}
|
}
|
||||||
if (ItemList.FR_Bee_Princess.get(1L, new Object[0]) != null) {
|
if (ItemList.FR_Bee_Princess.get(1L, new Object[0]) != null) {
|
||||||
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Princess.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Bee_Princess.getWithName(1L, "Scanned Princess", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(50L)}, null, 500, 2, 0);
|
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Princess.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Bee_Princess.getWithName(1L, "Scanned Princess", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
|
||||||
}
|
}
|
||||||
if (ItemList.FR_Bee_Queen.get(1L, new Object[0]) != null) {
|
if (ItemList.FR_Bee_Queen.get(1L, new Object[0]) != null) {
|
||||||
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Queen.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Bee_Queen.getWithName(1L, "Scanned Queen", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(50L)}, null, 500, 2, 0);
|
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Queen.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Bee_Queen.getWithName(1L, "Scanned Queen", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
|
||||||
}
|
}
|
||||||
if (ItemList.FR_Tree_Sapling.get(1L, new Object[0]) != null) {
|
if (ItemList.FR_Tree_Sapling.get(1L, new Object[0]) != null) {
|
||||||
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Tree_Sapling.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Tree_Sapling.getWithName(1L, "Scanned Sapling", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(50L)}, null, 500, 2, 0);
|
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Tree_Sapling.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Tree_Sapling.getWithName(1L, "Scanned Sapling", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
|
||||||
}
|
}
|
||||||
if (ItemList.FR_Butterfly.get(1L, new Object[0]) != null) {
|
if (ItemList.FR_Butterfly.get(1L, new Object[0]) != null) {
|
||||||
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Butterfly.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Butterfly.getWithName(1L, "Scanned Butterfly", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(50L)}, null, 500, 2, 0);
|
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Butterfly.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Butterfly.getWithName(1L, "Scanned Butterfly", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
|
||||||
}
|
}
|
||||||
if (ItemList.FR_Larvae.get(1L, new Object[0]) != null) {
|
if (ItemList.FR_Larvae.get(1L, new Object[0]) != null) {
|
||||||
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Larvae.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Larvae.getWithName(1L, "Scanned Larvae", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(50L)}, null, 500, 2, 0);
|
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Larvae.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Larvae.getWithName(1L, "Scanned Larvae", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
|
||||||
}
|
}
|
||||||
if (ItemList.FR_Serum.get(1L, new Object[0]) != null) {
|
if (ItemList.FR_Serum.get(1L, new Object[0]) != null) {
|
||||||
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Serum.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Serum.getWithName(1L, "Scanned Serum", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(50L)}, null, 500, 2, 0);
|
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Serum.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Serum.getWithName(1L, "Scanned Serum", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
|
||||||
}
|
}
|
||||||
if (ItemList.FR_Caterpillar.get(1L, new Object[0]) != null) {
|
if (ItemList.FR_Caterpillar.get(1L, new Object[0]) != null) {
|
||||||
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Caterpillar.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Caterpillar.getWithName(1L, "Scanned Caterpillar", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(50L)}, null, 500, 2, 0);
|
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Caterpillar.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Caterpillar.getWithName(1L, "Scanned Caterpillar", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
|
||||||
}
|
}
|
||||||
if (ItemList.FR_PollenFertile.get(1L, new Object[0]) != null) {
|
if (ItemList.FR_PollenFertile.get(1L, new Object[0]) != null) {
|
||||||
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_PollenFertile.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_PollenFertile.getWithName(1L, "Scanned Pollen", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(50L)}, null, 500, 2, 0);
|
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_PollenFertile.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_PollenFertile.getWithName(1L, "Scanned Pollen", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
|
||||||
}
|
}
|
||||||
if (ItemList.IC2_Crop_Seeds.get(1L, new Object[0]) != null) {
|
if (ItemList.IC2_Crop_Seeds.get(1L, new Object[0]) != null) {
|
||||||
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.IC2_Crop_Seeds.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.IC2_Crop_Seeds.getWithName(1L, "Scanned Seeds", new Object[0])}, null, null, null, 160, 8, 0);
|
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.IC2_Crop_Seeds.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.IC2_Crop_Seeds.getWithName(1L, "Scanned Seeds", new Object[0])}, null, null, null, 160, 8, 0);
|
||||||
|
|
|
@ -175,8 +175,8 @@ public class GregTech_API {
|
||||||
* Initialized by the Block creation.
|
* Initialized by the Block creation.
|
||||||
*/
|
*/
|
||||||
public static Block sBlockMachines;
|
public static Block sBlockMachines;
|
||||||
public static Block sBlockOres1, sBlockGem, sBlockMetal1, sBlockMetal2, sBlockMetal3, sBlockMetal4, sBlockMetal5, sBlockMetal6, sBlockMetal7, sBlockMetal8, sBlockGem1, sBlockGem2, sBlockGem3, sBlockReinforced;
|
public static Block sBlockOres1, sBlockOresUb1, sBlockOresUb2, sBlockOresUb3, sBlockGem, sBlockMetal1, sBlockMetal2, sBlockMetal3, sBlockMetal4, sBlockMetal5, sBlockMetal6, sBlockMetal7, sBlockMetal8, sBlockGem1, sBlockGem2, sBlockGem3, sBlockReinforced;
|
||||||
public static Block sBlockGranites, sBlockConcretes;
|
public static Block sBlockGranites, sBlockConcretes, sBlockStones;
|
||||||
public static Block sBlockCasings1, sBlockCasings2, sBlockCasings3, sBlockCasings4;
|
public static Block sBlockCasings1, sBlockCasings2, sBlockCasings3, sBlockCasings4;
|
||||||
/**
|
/**
|
||||||
* Getting assigned by the Config
|
* Getting assigned by the Config
|
||||||
|
|
|
@ -24,6 +24,8 @@ public enum OrePrefixes {
|
||||||
@Deprecated itemDust("Dusts", "", "", false, false, false, false, false, false, false, false, false, false, B[0] | B[1] | B[2] | B[3], -1, 64, -1),
|
@Deprecated itemDust("Dusts", "", "", false, false, false, false, false, false, false, false, false, false, B[0] | B[1] | B[2] | B[3], -1, 64, -1),
|
||||||
oreBlackgranite("Black Granite Ores", "Granite ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation!
|
oreBlackgranite("Black Granite Ores", "Granite ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation!
|
||||||
oreRedgranite("Red Granite Ores", "Granite ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation!
|
oreRedgranite("Red Granite Ores", "Granite ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation!
|
||||||
|
oreMarble("Marble Ores", "Marble ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation!
|
||||||
|
oreBasalt("Basalt Ores", "Basalt ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // In case of an End-Ores Mod. Ore -> Material is a Oneway Operation!
|
||||||
oreNetherrack("Netherrack Ores", "Nether ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // Prefix of the Nether-Ores Mod. Causes Ores to double. Ore -> Material is a Oneway Operation!
|
oreNetherrack("Netherrack Ores", "Nether ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // Prefix of the Nether-Ores Mod. Causes Ores to double. Ore -> Material is a Oneway Operation!
|
||||||
oreNether("Nether Ores", "Nether ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // Prefix of the Nether-Ores Mod. Causes Ores to double. Ore -> Material is a Oneway Operation!
|
oreNether("Nether Ores", "Nether ", " Ore", true, true, false, false, false, true, false, false, false, true, B[3], -1, 64, -1), // Prefix of the Nether-Ores Mod. Causes Ores to double. Ore -> Material is a Oneway Operation!
|
||||||
@Deprecated denseore("Dense Ores", "", "", false, false, false, false, false, true, false, false, false, true, B[3], -1, 64, -1),
|
@Deprecated denseore("Dense Ores", "", "", false, false, false, false, false, true, false, false, false, true, B[3], -1, 64, -1),
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,10 +1,11 @@
|
||||||
package gregtech.api.interfaces.tileentity;
|
package gregtech.api.interfaces.tileentity;
|
||||||
|
|
||||||
import gregtech.api.interfaces.ITexture;
|
import gregtech.api.interfaces.ITexture;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
|
||||||
public interface ITexturedTileEntity {
|
public interface ITexturedTileEntity {
|
||||||
/**
|
/**
|
||||||
* @return the Textures rendered by the GT Rendering
|
* @return the Textures rendered by the GT Rendering
|
||||||
*/
|
*/
|
||||||
public ITexture[] getTexture(byte aSide);
|
public ITexture[] getTexture(Block aBlock, byte aSide);
|
||||||
}
|
}
|
|
@ -9,6 +9,7 @@ import gregtech.api.interfaces.tileentity.IPipeRenderedTileEntity;
|
||||||
import gregtech.api.net.GT_Packet_TileEntity;
|
import gregtech.api.net.GT_Packet_TileEntity;
|
||||||
import gregtech.api.objects.GT_ItemStack;
|
import gregtech.api.objects.GT_ItemStack;
|
||||||
import gregtech.api.util.*;
|
import gregtech.api.util.*;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
@ -705,7 +706,7 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ITexture[] getTexture(byte aSide) {
|
public ITexture[] getTexture(Block aBlock, byte aSide) {
|
||||||
ITexture rIcon = getCoverTexture(aSide);
|
ITexture rIcon = getCoverTexture(aSide);
|
||||||
if (rIcon != null) return new ITexture[]{rIcon};
|
if (rIcon != null) return new ITexture[]{rIcon};
|
||||||
return getTextureUncovered(aSide);
|
return getTextureUncovered(aSide);
|
||||||
|
|
|
@ -1001,7 +1001,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ITexture[] getTexture(byte aSide) {
|
public ITexture[] getTexture(Block aBlock, byte aSide) {
|
||||||
ITexture rIcon = getCoverTexture(aSide);
|
ITexture rIcon = getCoverTexture(aSide);
|
||||||
if (rIcon != null) return new ITexture[]{rIcon};
|
if (rIcon != null) return new ITexture[]{rIcon};
|
||||||
if (hasValidMetaTileEntity())
|
if (hasValidMetaTileEntity())
|
||||||
|
|
|
@ -7,7 +7,7 @@ import gregtech.api.enums.ConfigCategories;
|
||||||
import gregtech.api.enums.Materials;
|
import gregtech.api.enums.Materials;
|
||||||
import gregtech.api.enums.OrePrefixes;
|
import gregtech.api.enums.OrePrefixes;
|
||||||
import gregtech.api.objects.ItemData;
|
import gregtech.api.objects.ItemData;
|
||||||
import gregtech.common.blocks.GT_Block_Ores;
|
import gregtech.common.blocks.GT_Block_Ores_Abstract;
|
||||||
import gregtech.common.blocks.GT_TileEntity_Ores;
|
import gregtech.common.blocks.GT_TileEntity_Ores;
|
||||||
import ic2.api.crops.CropCard;
|
import ic2.api.crops.CropCard;
|
||||||
import ic2.api.crops.Crops;
|
import ic2.api.crops.Crops;
|
||||||
|
@ -200,7 +200,7 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo {
|
||||||
}
|
}
|
||||||
for (int i = 1; i < this.getrootslength(aCrop); i++) {
|
for (int i = 1; i < this.getrootslength(aCrop); i++) {
|
||||||
Block tBlock = aCrop.getWorld().getBlock(aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ);
|
Block tBlock = aCrop.getWorld().getBlock(aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ);
|
||||||
if ((tBlock instanceof GT_Block_Ores)) {
|
if ((tBlock instanceof GT_Block_Ores_Abstract)) {
|
||||||
TileEntity tTileEntity = aCrop.getWorld().getTileEntity(aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ);
|
TileEntity tTileEntity = aCrop.getWorld().getTileEntity(aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ);
|
||||||
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
||||||
Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)];
|
Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)];
|
||||||
|
|
|
@ -80,6 +80,18 @@ public class GT_Config implements Runnable {
|
||||||
return rResult;
|
return rResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String get(Object aCategory, ItemStack aStack, String aDefault) {
|
||||||
|
return get(aCategory, getStackConfigName(aStack), aDefault);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String get(Object aCategory, String aName, String aDefault) {
|
||||||
|
if (GT_Utility.isStringInvalid(aName)) return aDefault;
|
||||||
|
Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault);
|
||||||
|
String rResult = tProperty.getString();
|
||||||
|
if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save();
|
||||||
|
return rResult;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
mConfig.save();
|
mConfig.save();
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
package gregtech.common;
|
package gregtech.common;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.text.DateFormat;
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
import cpw.mods.fml.common.IFuelHandler;
|
import cpw.mods.fml.common.IFuelHandler;
|
||||||
import cpw.mods.fml.common.Loader;
|
import cpw.mods.fml.common.Loader;
|
||||||
|
@ -75,6 +71,10 @@ import net.minecraftforge.oredict.RecipeSorter;
|
||||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
private static final EnumSet<OreGenEvent.GenerateMinable.EventType> PREVENTED_ORES = EnumSet.of(OreGenEvent.GenerateMinable.EventType.COAL,
|
private static final EnumSet<OreGenEvent.GenerateMinable.EventType> PREVENTED_ORES = EnumSet.of(OreGenEvent.GenerateMinable.EventType.COAL,
|
||||||
new OreGenEvent.GenerateMinable.EventType[]{OreGenEvent.GenerateMinable.EventType.IRON, OreGenEvent.GenerateMinable.EventType.GOLD,
|
new OreGenEvent.GenerateMinable.EventType[]{OreGenEvent.GenerateMinable.EventType.IRON, OreGenEvent.GenerateMinable.EventType.GOLD,
|
||||||
|
@ -1747,12 +1747,13 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.wooden_door, 1))) {
|
if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.wooden_door, 1))) {
|
||||||
rFuelValue = (short) Math.max(rFuelValue, 600);
|
rFuelValue = (short) Math.max(rFuelValue, 600);
|
||||||
}
|
}
|
||||||
if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1, new Object[0]))) {
|
|
||||||
rFuelValue = Math.max(rFuelValue, 100000);
|
|
||||||
}
|
|
||||||
if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1, new Object[0]))) {
|
if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1, new Object[0]))) {
|
||||||
rFuelValue = Math.max(rFuelValue, 150000);
|
rFuelValue = (short) Math.max(rFuelValue, 150000);
|
||||||
}
|
}
|
||||||
|
if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1, new Object[0]))) {
|
||||||
|
rFuelValue = (short) Math.max(rFuelValue, 100000);
|
||||||
|
}
|
||||||
|
|
||||||
return rFuelValue;
|
return rFuelValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ public class GT_Worldgen_GT_Ore_Layer
|
||||||
public final short mSecondaryMeta;
|
public final short mSecondaryMeta;
|
||||||
public final short mBetweenMeta;
|
public final short mBetweenMeta;
|
||||||
public final short mSporadicMeta;
|
public final short mSporadicMeta;
|
||||||
|
public final String mBiome;
|
||||||
public final boolean mOverworld;
|
public final boolean mOverworld;
|
||||||
public final boolean mNether;
|
public final boolean mNether;
|
||||||
public final boolean mEnd;
|
public final boolean mEnd;
|
||||||
|
@ -45,6 +46,7 @@ public class GT_Worldgen_GT_Ore_Layer
|
||||||
this.mSecondaryMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSecondaryLayer", aSecondary.mMetaItemSubID));
|
this.mSecondaryMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSecondaryLayer", aSecondary.mMetaItemSubID));
|
||||||
this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSporadiclyInbetween", aBetween.mMetaItemSubID));
|
this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSporadiclyInbetween", aBetween.mMetaItemSubID));
|
||||||
this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSporaticlyAround", aSporadic.mMetaItemSubID));
|
this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSporaticlyAround", aSporadic.mMetaItemSubID));
|
||||||
|
this.mBiome = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "BiomeName", "None");
|
||||||
if (this.mEnabled) {
|
if (this.mEnabled) {
|
||||||
GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
|
GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
|
||||||
GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
|
GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
|
||||||
|
@ -55,6 +57,9 @@ public class GT_Worldgen_GT_Ore_Layer
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
|
public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
|
||||||
|
if (!this.mBiome.equals("None") && !(this.mBiome.equals(aBiome))) {
|
||||||
|
return false; //Not the correct biome for ore mix
|
||||||
|
}
|
||||||
if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) {
|
if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -69,22 +74,22 @@ public class GT_Worldgen_GT_Ore_Layer
|
||||||
if (this.mSecondaryMeta > 0) {
|
if (this.mSecondaryMeta > 0) {
|
||||||
for (int i = tMinY - 1; i < tMinY + 2; i++) {
|
for (int i = tMinY - 1; i < tMinY + 2; i++) {
|
||||||
if ((aRandom.nextInt(Math.max(1, Math.max(Math.abs(cZ - tZ), Math.abs(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(Math.abs(cX - tX), Math.abs(eX - tX)) / this.mDensity)) == 0)) {
|
if ((aRandom.nextInt(Math.max(1, Math.max(Math.abs(cZ - tZ), Math.abs(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(Math.abs(cX - tX), Math.abs(eX - tX)) / this.mDensity)) == 0)) {
|
||||||
GT_TileEntity_Ores.setOreBlock(aWorld, tX, i, tZ, this.mSecondaryMeta);
|
GT_TileEntity_Ores.setOreBlock(aWorld, tX, i, tZ, this.mSecondaryMeta, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((this.mBetweenMeta > 0) && ((aRandom.nextInt(Math.max(1, Math.max(Math.abs(cZ - tZ), Math.abs(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(Math.abs(cX - tX), Math.abs(eX - tX)) / this.mDensity)) == 0))) {
|
if ((this.mBetweenMeta > 0) && ((aRandom.nextInt(Math.max(1, Math.max(Math.abs(cZ - tZ), Math.abs(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(Math.abs(cX - tX), Math.abs(eX - tX)) / this.mDensity)) == 0))) {
|
||||||
GT_TileEntity_Ores.setOreBlock(aWorld, tX, tMinY + 2 + aRandom.nextInt(2), tZ, this.mBetweenMeta);
|
GT_TileEntity_Ores.setOreBlock(aWorld, tX, tMinY + 2 + aRandom.nextInt(2), tZ, this.mBetweenMeta, false);
|
||||||
}
|
}
|
||||||
if (this.mPrimaryMeta > 0) {
|
if (this.mPrimaryMeta > 0) {
|
||||||
for (int i = tMinY + 3; i < tMinY + 6; i++) {
|
for (int i = tMinY + 3; i < tMinY + 6; i++) {
|
||||||
if ((aRandom.nextInt(Math.max(1, Math.max(Math.abs(cZ - tZ), Math.abs(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(Math.abs(cX - tX), Math.abs(eX - tX)) / this.mDensity)) == 0)) {
|
if ((aRandom.nextInt(Math.max(1, Math.max(Math.abs(cZ - tZ), Math.abs(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(Math.abs(cX - tX), Math.abs(eX - tX)) / this.mDensity)) == 0)) {
|
||||||
GT_TileEntity_Ores.setOreBlock(aWorld, tX, i, tZ, this.mPrimaryMeta);
|
GT_TileEntity_Ores.setOreBlock(aWorld, tX, i, tZ, this.mPrimaryMeta, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((this.mSporadicMeta > 0) && ((aRandom.nextInt(Math.max(1, Math.max(Math.abs(cZ - tZ), Math.abs(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(Math.abs(cX - tX), Math.abs(eX - tX)) / this.mDensity)) == 0))) {
|
if ((this.mSporadicMeta > 0) && ((aRandom.nextInt(Math.max(1, Math.max(Math.abs(cZ - tZ), Math.abs(eZ - tZ)) / this.mDensity)) == 0) || (aRandom.nextInt(Math.max(1, Math.max(Math.abs(cX - tX), Math.abs(eX - tX)) / this.mDensity)) == 0))) {
|
||||||
GT_TileEntity_Ores.setOreBlock(aWorld, tX, tMinY - 1 + aRandom.nextInt(7), tZ, this.mSporadicMeta);
|
GT_TileEntity_Ores.setOreBlock(aWorld, tX, tMinY - 1 + aRandom.nextInt(7), tZ, this.mSporadicMeta, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ public class GT_Worldgen_GT_Ore_SmallPieces
|
||||||
public final boolean mOverworld;
|
public final boolean mOverworld;
|
||||||
public final boolean mNether;
|
public final boolean mNether;
|
||||||
public final boolean mEnd;
|
public final boolean mEnd;
|
||||||
|
public final String mBiome;
|
||||||
|
|
||||||
public GT_Worldgen_GT_Ore_SmallPieces(String aName, boolean aDefault, int aMinY, int aMaxY, int aAmount, boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary) {
|
public GT_Worldgen_GT_Ore_SmallPieces(String aName, boolean aDefault, int aMinY, int aMaxY, int aAmount, boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary) {
|
||||||
super(aName, GregTech_API.sWorldgenList, aDefault);
|
super(aName, GregTech_API.sWorldgenList, aDefault);
|
||||||
|
@ -28,16 +29,20 @@ public class GT_Worldgen_GT_Ore_SmallPieces
|
||||||
this.mMaxY = ((short) Math.max(this.mMinY + 1, GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "MaxHeight", aMaxY)));
|
this.mMaxY = ((short) Math.max(this.mMinY + 1, GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "MaxHeight", aMaxY)));
|
||||||
this.mAmount = ((short) Math.max(1, GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "Amount", aAmount)));
|
this.mAmount = ((short) Math.max(1, GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "Amount", aAmount)));
|
||||||
this.mMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "Ore", aPrimary.mMetaItemSubID));
|
this.mMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "Ore", aPrimary.mMetaItemSubID));
|
||||||
|
this.mBiome = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "BiomeName", "None");
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
|
public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
|
||||||
|
if (!this.mBiome.equals("None") && !(this.mBiome.equals(aBiome))) {
|
||||||
|
return false; //Not the correct biome for ore mix
|
||||||
|
}
|
||||||
if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) {
|
if (!isGenerationAllowed(aWorld, aDimensionType, ((aDimensionType == -1) && (this.mNether)) || ((aDimensionType == 0) && (this.mOverworld)) || ((aDimensionType == 1) && (this.mEnd)) ? aDimensionType : aDimensionType ^ 0xFFFFFFFF)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.mMeta > 0) {
|
if (this.mMeta > 0) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (int j = Math.max(1, this.mAmount / 2 + aRandom.nextInt(this.mAmount) / 2); i < j; i++) {
|
for (int j = Math.max(1, this.mAmount / 2 + aRandom.nextInt(this.mAmount) / 2); i < j; i++) {
|
||||||
GT_TileEntity_Ores.setOreBlock(aWorld, aChunkX + aRandom.nextInt(16), this.mMinY + aRandom.nextInt(Math.max(1, this.mMaxY - this.mMinY)), aChunkZ + aRandom.nextInt(16), this.mMeta + 16000);
|
GT_TileEntity_Ores.setOreBlock(aWorld, aChunkX + aRandom.nextInt(16), this.mMinY + aRandom.nextInt(Math.max(1, this.mMaxY - this.mMinY)), aChunkZ + aRandom.nextInt(16), this.mMeta, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -2,6 +2,7 @@ package gregtech.common;
|
||||||
|
|
||||||
import gregtech.api.GregTech_API;
|
import gregtech.api.GregTech_API;
|
||||||
import gregtech.api.world.GT_Worldgen_Ore;
|
import gregtech.api.world.GT_Worldgen_Ore;
|
||||||
|
import gregtech.common.blocks.GT_Block_Ores_Abstract;
|
||||||
import gregtech.common.blocks.GT_TileEntity_Ores;
|
import gregtech.common.blocks.GT_TileEntity_Ores;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
|
@ -56,12 +57,16 @@ public class GT_Worldgen_Stone
|
||||||
double var45 = (eZ + 0.5D - var24) / (var28 / 2.0D);
|
double var45 = (eZ + 0.5D - var24) / (var28 / 2.0D);
|
||||||
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D) {
|
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D) {
|
||||||
Block tTargetedBlock = aWorld.getBlock(eX, eY, eZ);
|
Block tTargetedBlock = aWorld.getBlock(eX, eY, eZ);
|
||||||
if (tTargetedBlock == GregTech_API.sBlockOres1) {
|
if (tTargetedBlock instanceof GT_Block_Ores_Abstract) {
|
||||||
TileEntity tTileEntity = aWorld.getTileEntity(eX, eY, eZ);
|
TileEntity tTileEntity = aWorld.getTileEntity(eX, eY, eZ);
|
||||||
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
||||||
((GT_TileEntity_Ores) tTileEntity).overrideOreBlockMaterial(this.mBlock, (byte) this.mBlockMeta);
|
short aMeta = ((GT_TileEntity_Ores) tTileEntity).mMetaData;
|
||||||
|
if (tTargetedBlock != GregTech_API.sBlockOres1) {
|
||||||
|
((GT_TileEntity_Ores) tTileEntity).convertOreBlock(aWorld, eX, eY, eZ);
|
||||||
}
|
}
|
||||||
} else if (((this.mAllowToGenerateinVoid) && (aWorld.getBlock(eX, eY, eZ).isAir(aWorld, eX, eY, eZ))) || ((tTargetedBlock != null) && ((tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.stone)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.end_stone)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.netherrack))))) {
|
((GT_TileEntity_Ores)tTileEntity).overrideOreBlockMaterial(this.mBlock, (byte) this.mBlockMeta);
|
||||||
|
}
|
||||||
|
} else if (((this.mAllowToGenerateinVoid) && (aWorld.getBlock(eX, eY, eZ).isAir(aWorld, eX, eY, eZ))) || ((tTargetedBlock != null) && ((tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.stone)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.end_stone)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.netherrack)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, GregTech_API.sBlockGranites)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, GregTech_API.sBlockStones))))) {
|
||||||
aWorld.setBlock(eX, eY, eZ, this.mBlock, this.mBlockMeta, 0);
|
aWorld.setBlock(eX, eY, eZ, this.mBlock, this.mBlockMeta, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,262 +1,48 @@
|
||||||
package gregtech.common.blocks;
|
package gregtech.common.blocks;
|
||||||
|
|
||||||
import cpw.mods.fml.common.Loader;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import gregtech.GT_Mod;
|
|
||||||
import gregtech.api.GregTech_API;
|
import gregtech.api.GregTech_API;
|
||||||
import gregtech.api.enums.Materials;
|
import gregtech.api.enums.Materials;
|
||||||
import gregtech.api.enums.OrePrefixes;
|
import gregtech.api.enums.OrePrefixes;
|
||||||
import gregtech.api.items.GT_Generic_Block;
|
import gregtech.api.enums.Textures;
|
||||||
import gregtech.api.util.GT_LanguageManager;
|
import gregtech.api.interfaces.ITexture;
|
||||||
import gregtech.api.util.GT_ModHandler;
|
import gregtech.api.objects.GT_CopiedBlockTexture;
|
||||||
import gregtech.api.util.GT_OreDictUnificator;
|
import gregtech.api.objects.GT_RenderedTexture;
|
||||||
import gregtech.common.render.GT_Renderer_Block;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.ITileEntityProvider;
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.boss.EntityDragon;
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.IBlockAccess;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class GT_Block_Ores
|
|
||||||
extends GT_Generic_Block
|
|
||||||
implements ITileEntityProvider {
|
|
||||||
public static ThreadLocal<GT_TileEntity_Ores> mTemporaryTileEntity = new ThreadLocal();
|
|
||||||
public static boolean FUCKING_LOCK = false;
|
|
||||||
|
|
||||||
|
public class GT_Block_Ores extends GT_Block_Ores_Abstract {
|
||||||
public GT_Block_Ores() {
|
public GT_Block_Ores() {
|
||||||
super(GT_Item_Ores.class, "gt.blockores", Material.rock);
|
super("gt.blockores", false, Material.rock);
|
||||||
this.isBlockContainer = true;
|
|
||||||
setStepSound(soundTypeStone);
|
|
||||||
setCreativeTab(GregTech_API.TAB_GREGTECH_ORES);
|
|
||||||
boolean tHideOres = Loader.isModLoaded("NotEnoughItems") && GT_Mod.gregtechproxy.mHideUnusedOres;
|
|
||||||
for (int i = 0; i < 16; i++) {
|
|
||||||
GT_ModHandler.addValuableOre(this, i, 1);
|
|
||||||
}
|
|
||||||
for (int i = 1; i < GregTech_API.sGeneratedMaterials.length; i++) {
|
|
||||||
if (GregTech_API.sGeneratedMaterials[i] != null) {
|
|
||||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + i + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
|
||||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 1000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
|
||||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 2000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
|
||||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 3000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
|
||||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 4000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
|
||||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 16000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
|
||||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 17000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
|
||||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 18000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
|
||||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 19000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
|
||||||
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 20000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
|
||||||
if ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x8) != 0) {
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.ore.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i));
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.oreNetherrack.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 1000));
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.oreEndstone.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 2000));
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.oreBlackgranite.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 3000));
|
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.oreRedgranite.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 4000));
|
|
||||||
if (tHideOres) {
|
|
||||||
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 1000));
|
|
||||||
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 2000));
|
|
||||||
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 3000));
|
|
||||||
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 4000));
|
|
||||||
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 16000));
|
|
||||||
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 17000));
|
|
||||||
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 18000));
|
|
||||||
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 19000));
|
|
||||||
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 20000));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onNeighborChange(IBlockAccess aWorld, int aX, int aY, int aZ, int aTileX, int aTileY, int aTileZ) {
|
|
||||||
if (!FUCKING_LOCK) {
|
|
||||||
FUCKING_LOCK = true;
|
|
||||||
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
|
||||||
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
|
||||||
((GT_TileEntity_Ores) tTileEntity).onUpdated();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FUCKING_LOCK = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onNeighborBlockChange(World aWorld, int aX, int aY, int aZ, Block aBlock) {
|
|
||||||
if (!FUCKING_LOCK) {
|
|
||||||
FUCKING_LOCK = true;
|
|
||||||
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
|
||||||
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
|
||||||
((GT_TileEntity_Ores) tTileEntity).onUpdated();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FUCKING_LOCK = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLocalizedName(Materials aMaterial) {
|
|
||||||
switch (aMaterial) {
|
|
||||||
case InfusedAir:
|
|
||||||
case InfusedDull:
|
|
||||||
case InfusedEarth:
|
|
||||||
case InfusedEntropy:
|
|
||||||
case InfusedFire:
|
|
||||||
case InfusedOrder:
|
|
||||||
case InfusedVis:
|
|
||||||
case InfusedWater:
|
|
||||||
return aMaterial.mDefaultLocalName + " Infused Stone";
|
|
||||||
case Vermiculite:
|
|
||||||
case Bentonite:
|
|
||||||
case Kaolinite:
|
|
||||||
case Talc:
|
|
||||||
case BasalticMineralSand:
|
|
||||||
case GraniticMineralSand:
|
|
||||||
case GlauconiteSand:
|
|
||||||
case CassiteriteSand:
|
|
||||||
case GarnetSand:
|
|
||||||
case QuartzSand:
|
|
||||||
case Pitchblende:
|
|
||||||
case FullersEarth:
|
|
||||||
return aMaterial.mDefaultLocalName;
|
|
||||||
default:
|
|
||||||
return aMaterial.mDefaultLocalName + OrePrefixes.ore.mLocalizedMaterialPost;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean onBlockEventReceived(World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, int p_149696_5_, int p_149696_6_) {
|
|
||||||
super.onBlockEventReceived(p_149696_1_, p_149696_2_, p_149696_3_, p_149696_4_, p_149696_5_, p_149696_6_);
|
|
||||||
TileEntity tileentity = p_149696_1_.getTileEntity(p_149696_2_, p_149696_3_, p_149696_4_);
|
|
||||||
return tileentity != null ? tileentity.receiveClientEvent(p_149696_5_, p_149696_6_) : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
|
|
||||||
return (!(entity instanceof EntityDragon)) && (super.canEntityDestroy(world, x, y, z, entity));
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getHarvestTool(int aMeta) {
|
|
||||||
return aMeta < 8 ? "pickaxe" : "shovel";
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getHarvestLevel(int aMeta) {
|
|
||||||
return aMeta % 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getBlockHardness(World aWorld, int aX, int aY, int aZ) {
|
|
||||||
return 1.0F + getHarvestLevel(aWorld.getBlockMetadata(aX, aY, aZ)) * 1.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getExplosionResistance(Entity par1Entity, World aWorld, int aX, int aY, int aZ, double explosionX, double explosionY, double explosionZ) {
|
|
||||||
return 1.0F + getHarvestLevel(aWorld.getBlockMetadata(aX, aY, aZ)) * 1.0F;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected boolean canSilkHarvest() {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getUnlocalizedName() {
|
public String getUnlocalizedName() {
|
||||||
return "gt.blockores";
|
return "gt.blockores";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLocalizedName() {
|
@Override
|
||||||
return StatCollector.translateToLocal(getUnlocalizedName() + ".name");
|
public OrePrefixes[] getProcessingPrefix() { //Must have 8 entries; an entry can be null to disable automatic recipes.
|
||||||
|
return new OrePrefixes[]{OrePrefixes.ore, OrePrefixes.oreNetherrack, OrePrefixes.oreEndstone, OrePrefixes.oreBlackgranite, OrePrefixes.oreRedgranite, OrePrefixes.oreMarble, OrePrefixes.oreBasalt, null};
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRenderType() {
|
@Override
|
||||||
if (GT_Renderer_Block.INSTANCE == null) {
|
public Block getDroppedBlock() {
|
||||||
return super.getRenderType();
|
return GregTech_API.sBlockOres1;
|
||||||
}
|
|
||||||
return GT_Renderer_Block.INSTANCE.mRenderID;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) {
|
@Override
|
||||||
return false;
|
public Materials[] getDroppedDusts() { //Must have 8 entries; can be null.
|
||||||
|
return new Materials[]{Materials.Stone, Materials.Netherrack, Materials.Endstone, Materials.GraniteBlack, Materials.GraniteRed, Materials.Marble, Materials.Basalt, Materials.Stone};
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) {
|
@Override
|
||||||
return true;
|
public int getHarvestLevel(int aMeta) {
|
||||||
|
return aMeta == 5 || aMeta == 6 ? 2 : aMeta % 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasTileEntity(int aMeta) {
|
@Override
|
||||||
return true;
|
public ITexture[] getTextureSet() { //Must have 16 entries.
|
||||||
}
|
return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), new GT_RenderedTexture(Textures.BlockIcons.MARBLE_STONE), new GT_RenderedTexture(Textures.BlockIcons.BASALT_STONE), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0)};
|
||||||
|
|
||||||
public boolean renderAsNormalBlock() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isOpaqueCube() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public TileEntity createNewTileEntity(World aWorld, int aMeta) {
|
|
||||||
return createTileEntity(aWorld, aMeta);
|
|
||||||
}
|
|
||||||
|
|
||||||
public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) {
|
|
||||||
return Blocks.stone.getIcon(0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public IIcon getIcon(int aSide, int aMeta) {
|
|
||||||
return Blocks.stone.getIcon(0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void registerBlockIcons(IIconRegister aIconRegister) {
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getDamageValue(World aWorld, int aX, int aY, int aZ) {
|
|
||||||
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
|
||||||
if ((tTileEntity != null) && ((tTileEntity instanceof GT_TileEntity_Ores))) {
|
|
||||||
return ((GT_TileEntity_Ores) tTileEntity).getMetaData();
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void breakBlock(World aWorld, int aX, int aY, int aZ, Block par5, int par6) {
|
|
||||||
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
|
||||||
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
|
||||||
mTemporaryTileEntity.set((GT_TileEntity_Ores) tTileEntity);
|
|
||||||
}
|
|
||||||
super.breakBlock(aWorld, aX, aY, aZ, par5, par6);
|
|
||||||
aWorld.removeTileEntity(aX, aY, aZ);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ArrayList<ItemStack> getDrops(World aWorld, int aX, int aY, int aZ, int aMeta, int aFortune) {
|
|
||||||
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
|
||||||
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
|
||||||
return ((GT_TileEntity_Ores) tTileEntity).getDrops(aFortune);
|
|
||||||
}
|
|
||||||
return mTemporaryTileEntity.get() == null ? new ArrayList() : ((GT_TileEntity_Ores) mTemporaryTileEntity.get()).getDrops(aFortune);
|
|
||||||
}
|
|
||||||
|
|
||||||
public TileEntity createTileEntity(World aWorld, int aMeta) {
|
|
||||||
return new GT_TileEntity_Ores();
|
|
||||||
}
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) {
|
|
||||||
for (int i = 0; i < GregTech_API.sGeneratedMaterials.length; i++) {
|
|
||||||
Materials tMaterial = GregTech_API.sGeneratedMaterials[i];
|
|
||||||
if ((tMaterial != null) && ((tMaterial.mTypes & 0x8) != 0)) {
|
|
||||||
aList.add(new ItemStack(aItem, 1, i));
|
|
||||||
aList.add(new ItemStack(aItem, 1, i + 1000));
|
|
||||||
aList.add(new ItemStack(aItem, 1, i + 2000));
|
|
||||||
aList.add(new ItemStack(aItem, 1, i + 3000));
|
|
||||||
aList.add(new ItemStack(aItem, 1, i + 4000));
|
|
||||||
aList.add(new ItemStack(aItem, 1, i + 16000));
|
|
||||||
aList.add(new ItemStack(aItem, 1, i + 17000));
|
|
||||||
aList.add(new ItemStack(aItem, 1, i + 18000));
|
|
||||||
aList.add(new ItemStack(aItem, 1, i + 19000));
|
|
||||||
aList.add(new ItemStack(aItem, 1, i + 20000));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
290
src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java
Normal file
290
src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java
Normal file
|
@ -0,0 +1,290 @@
|
||||||
|
package gregtech.common.blocks;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.Loader;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import gregtech.GT_Mod;
|
||||||
|
import gregtech.api.GregTech_API;
|
||||||
|
import gregtech.api.enums.Materials;
|
||||||
|
import gregtech.api.enums.OrePrefixes;
|
||||||
|
import gregtech.api.interfaces.ITexture;
|
||||||
|
import gregtech.api.items.GT_Generic_Block;
|
||||||
|
import gregtech.api.util.GT_LanguageManager;
|
||||||
|
import gregtech.api.util.GT_ModHandler;
|
||||||
|
import gregtech.api.util.GT_OreDictUnificator;
|
||||||
|
import gregtech.common.render.GT_Renderer_Block;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.ITileEntityProvider;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.boss.EntityDragon;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements ITileEntityProvider {
|
||||||
|
public static ThreadLocal<GT_TileEntity_Ores> mTemporaryTileEntity = new ThreadLocal();
|
||||||
|
public static boolean FUCKING_LOCK = false;
|
||||||
|
public static boolean tHideOres;
|
||||||
|
|
||||||
|
protected GT_Block_Ores_Abstract(String aUnlocalizedName, boolean aHideFirstMeta, Material aMaterial) {
|
||||||
|
super(GT_Item_Ores.class, aUnlocalizedName, aMaterial);
|
||||||
|
this.isBlockContainer = true;
|
||||||
|
setStepSound(soundTypeStone);
|
||||||
|
setCreativeTab(GregTech_API.TAB_GREGTECH_ORES);
|
||||||
|
tHideOres = Loader.isModLoaded("NotEnoughItems") && GT_Mod.gregtechproxy.mHideUnusedOres;
|
||||||
|
for (int i = 0; i < 16; i++) {
|
||||||
|
GT_ModHandler.addValuableOre(this, i, 1);
|
||||||
|
}
|
||||||
|
for (int i = 1; i < GregTech_API.sGeneratedMaterials.length; i++) {
|
||||||
|
if (GregTech_API.sGeneratedMaterials[i] != null) {
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + i + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 1000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 2000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 3000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 4000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 5000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 6000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 7000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 16000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 17000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 18000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 19000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 20000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 21000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 22000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 23000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
|
||||||
|
if ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x8) != 0) {
|
||||||
|
GT_OreDictUnificator.registerOre(this.getProcessingPrefix()[0] != null ? this.getProcessingPrefix()[0].get(GregTech_API.sGeneratedMaterials[i]) : "", new ItemStack(this, 1, i));
|
||||||
|
GT_OreDictUnificator.registerOre(this.getProcessingPrefix()[1] != null ? this.getProcessingPrefix()[1].get(GregTech_API.sGeneratedMaterials[i]) : "", new ItemStack(this, 1, i + 1000));
|
||||||
|
GT_OreDictUnificator.registerOre(this.getProcessingPrefix()[2] != null ? this.getProcessingPrefix()[2].get(GregTech_API.sGeneratedMaterials[i]) : "", new ItemStack(this, 1, i + 2000));
|
||||||
|
GT_OreDictUnificator.registerOre(this.getProcessingPrefix()[3] != null ? this.getProcessingPrefix()[3].get(GregTech_API.sGeneratedMaterials[i]) : "", new ItemStack(this, 1, i + 3000));
|
||||||
|
GT_OreDictUnificator.registerOre(this.getProcessingPrefix()[4] != null ? this.getProcessingPrefix()[4].get(GregTech_API.sGeneratedMaterials[i]) : "", new ItemStack(this, 1, i + 4000));
|
||||||
|
GT_OreDictUnificator.registerOre(this.getProcessingPrefix()[5] != null ? this.getProcessingPrefix()[5].get(GregTech_API.sGeneratedMaterials[i]) : "", new ItemStack(this, 1, i + 5000));
|
||||||
|
GT_OreDictUnificator.registerOre(this.getProcessingPrefix()[6] != null ? this.getProcessingPrefix()[6].get(GregTech_API.sGeneratedMaterials[i]) : "", new ItemStack(this, 1, i + 6000));
|
||||||
|
GT_OreDictUnificator.registerOre(this.getProcessingPrefix()[7] != null ? this.getProcessingPrefix()[7].get(GregTech_API.sGeneratedMaterials[i]) : "", new ItemStack(this, 1, i + 7000));
|
||||||
|
if (tHideOres) {
|
||||||
|
if (aHideFirstMeta) codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 1000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 2000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 3000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 4000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 5000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 6000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 7000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 16000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 17000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 18000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 19000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 20000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 21000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 22000));
|
||||||
|
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 23000));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onNeighborChange(IBlockAccess aWorld, int aX, int aY, int aZ, int aTileX, int aTileY, int aTileZ) {
|
||||||
|
if (!FUCKING_LOCK) {
|
||||||
|
FUCKING_LOCK = true;
|
||||||
|
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
||||||
|
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
||||||
|
((GT_TileEntity_Ores) tTileEntity).onUpdated();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FUCKING_LOCK = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onNeighborBlockChange(World aWorld, int aX, int aY, int aZ, Block aBlock) {
|
||||||
|
if (!FUCKING_LOCK) {
|
||||||
|
FUCKING_LOCK = true;
|
||||||
|
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
||||||
|
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
||||||
|
((GT_TileEntity_Ores) tTileEntity).onUpdated();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FUCKING_LOCK = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocalizedName(Materials aMaterial) {
|
||||||
|
switch (aMaterial) {
|
||||||
|
case InfusedAir:
|
||||||
|
case InfusedDull:
|
||||||
|
case InfusedEarth:
|
||||||
|
case InfusedEntropy:
|
||||||
|
case InfusedFire:
|
||||||
|
case InfusedOrder:
|
||||||
|
case InfusedVis:
|
||||||
|
case InfusedWater:
|
||||||
|
return aMaterial.mDefaultLocalName + " Infused Stone";
|
||||||
|
case Vermiculite:
|
||||||
|
case Bentonite:
|
||||||
|
case Kaolinite:
|
||||||
|
case Talc:
|
||||||
|
case BasalticMineralSand:
|
||||||
|
case GraniticMineralSand:
|
||||||
|
case GlauconiteSand:
|
||||||
|
case CassiteriteSand:
|
||||||
|
case GarnetSand:
|
||||||
|
case QuartzSand:
|
||||||
|
case Pitchblende:
|
||||||
|
case FullersEarth:
|
||||||
|
return aMaterial.mDefaultLocalName;
|
||||||
|
default:
|
||||||
|
return aMaterial.mDefaultLocalName + OrePrefixes.ore.mLocalizedMaterialPost;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean onBlockEventReceived(World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, int p_149696_5_, int p_149696_6_) {
|
||||||
|
super.onBlockEventReceived(p_149696_1_, p_149696_2_, p_149696_3_, p_149696_4_, p_149696_5_, p_149696_6_);
|
||||||
|
TileEntity tileentity = p_149696_1_.getTileEntity(p_149696_2_, p_149696_3_, p_149696_4_);
|
||||||
|
return tileentity != null ? tileentity.receiveClientEvent(p_149696_5_, p_149696_6_) : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
|
||||||
|
return (!(entity instanceof EntityDragon)) && (super.canEntityDestroy(world, x, y, z, entity));
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHarvestTool(int aMeta) {
|
||||||
|
return aMeta < 8 ? "pickaxe" : "shovel";
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHarvestLevel(int aMeta) {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getBlockHardness(World aWorld, int aX, int aY, int aZ) {
|
||||||
|
return 1.0F + getHarvestLevel(aWorld.getBlockMetadata(aX, aY, aZ)) * 1.0F;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getExplosionResistance(Entity par1Entity, World aWorld, int aX, int aY, int aZ, double explosionX, double explosionY, double explosionZ) {
|
||||||
|
return 1.0F + getHarvestLevel(aWorld.getBlockMetadata(aX, aY, aZ)) * 1.0F;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean canSilkHarvest() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract String getUnlocalizedName();
|
||||||
|
|
||||||
|
public String getLocalizedName() {
|
||||||
|
return StatCollector.translateToLocal(getUnlocalizedName() + ".name");
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRenderType() {
|
||||||
|
if (GT_Renderer_Block.INSTANCE == null) {
|
||||||
|
return super.getRenderType();
|
||||||
|
}
|
||||||
|
return GT_Renderer_Block.INSTANCE.mRenderID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasTileEntity(int aMeta) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean renderAsNormalBlock() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOpaqueCube() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TileEntity createNewTileEntity(World aWorld, int aMeta) {
|
||||||
|
return createTileEntity(aWorld, aMeta);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) {
|
||||||
|
return Blocks.stone.getIcon(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IIcon getIcon(int aSide, int aMeta) {
|
||||||
|
return Blocks.stone.getIcon(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(IIconRegister aIconRegister) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDamageValue(World aWorld, int aX, int aY, int aZ) {
|
||||||
|
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
||||||
|
if ((tTileEntity != null) && ((tTileEntity instanceof GT_TileEntity_Ores))) {
|
||||||
|
return ((GT_TileEntity_Ores) tTileEntity).getMetaData();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void breakBlock(World aWorld, int aX, int aY, int aZ, Block par5, int par6) {
|
||||||
|
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
||||||
|
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
||||||
|
mTemporaryTileEntity.set((GT_TileEntity_Ores) tTileEntity);
|
||||||
|
}
|
||||||
|
super.breakBlock(aWorld, aX, aY, aZ, par5, par6);
|
||||||
|
aWorld.removeTileEntity(aX, aY, aZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract OrePrefixes[] getProcessingPrefix(); //Must have 8 entries; an entry can be null to disable automatic recipes.
|
||||||
|
|
||||||
|
public abstract Block getDroppedBlock();
|
||||||
|
|
||||||
|
public abstract Materials[] getDroppedDusts(); //Must have 8 entries; can be null.
|
||||||
|
|
||||||
|
public ArrayList<ItemStack> getDrops(World aWorld, int aX, int aY, int aZ, int aMeta, int aFortune) {
|
||||||
|
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
||||||
|
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
||||||
|
return ((GT_TileEntity_Ores) tTileEntity).getDrops(getDroppedBlock(), aFortune);
|
||||||
|
}
|
||||||
|
return mTemporaryTileEntity.get() == null ? new ArrayList() : ((GT_TileEntity_Ores) mTemporaryTileEntity.get()).getDrops(getDroppedBlock(), aFortune);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TileEntity createTileEntity(World aWorld, int aMeta) {
|
||||||
|
return new GT_TileEntity_Ores();
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract ITexture[] getTextureSet(); //Must have 16 entries.
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) {
|
||||||
|
for (int i = 0; i < GregTech_API.sGeneratedMaterials.length; i++) {
|
||||||
|
Materials tMaterial = GregTech_API.sGeneratedMaterials[i];
|
||||||
|
if ((tMaterial != null) && ((tMaterial.mTypes & 0x8) != 0)) {
|
||||||
|
aList.add(new ItemStack(aItem, 1, i));
|
||||||
|
aList.add(new ItemStack(aItem, 1, i + 1000));
|
||||||
|
aList.add(new ItemStack(aItem, 1, i + 2000));
|
||||||
|
aList.add(new ItemStack(aItem, 1, i + 3000));
|
||||||
|
aList.add(new ItemStack(aItem, 1, i + 4000));
|
||||||
|
aList.add(new ItemStack(aItem, 1, i + 5000));
|
||||||
|
aList.add(new ItemStack(aItem, 1, i + 6000));
|
||||||
|
aList.add(new ItemStack(aItem, 1, i + 7000));
|
||||||
|
aList.add(new ItemStack(aItem, 1, i + 16000));
|
||||||
|
aList.add(new ItemStack(aItem, 1, i + 17000));
|
||||||
|
aList.add(new ItemStack(aItem, 1, i + 18000));
|
||||||
|
aList.add(new ItemStack(aItem, 1, i + 19000));
|
||||||
|
aList.add(new ItemStack(aItem, 1, i + 20000));
|
||||||
|
aList.add(new ItemStack(aItem, 1, i + 21000));
|
||||||
|
aList.add(new ItemStack(aItem, 1, i + 22000));
|
||||||
|
aList.add(new ItemStack(aItem, 1, i + 23000));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
41
src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java
Normal file
41
src/main/java/gregtech/common/blocks/GT_Block_Ores_UB1.java
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
package gregtech.common.blocks;
|
||||||
|
|
||||||
|
import exterminatorJeff.undergroundBiomes.common.UndergroundBiomes;
|
||||||
|
import gregtech.api.GregTech_API;
|
||||||
|
import gregtech.api.enums.Materials;
|
||||||
|
import gregtech.api.enums.OrePrefixes;
|
||||||
|
import gregtech.api.interfaces.ITexture;
|
||||||
|
import gregtech.api.objects.GT_CopiedBlockTexture;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
|
||||||
|
public class GT_Block_Ores_UB1 extends GT_Block_Ores_Abstract {
|
||||||
|
public GT_Block_Ores_UB1() {
|
||||||
|
super("gt.blockores.ub1", true, Material.rock);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUnlocalizedName() {
|
||||||
|
return "gt.blockores.ub1";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrePrefixes[] getProcessingPrefix() { //Must have 8 entries.
|
||||||
|
return new OrePrefixes[]{OrePrefixes.oreRedgranite, OrePrefixes.oreBlackgranite, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.oreBasalt, OrePrefixes.ore, OrePrefixes.ore};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Block getDroppedBlock() {
|
||||||
|
return GregTech_API.sBlockOresUb1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Materials[] getDroppedDusts() { //Must have 8 entries; can be null.
|
||||||
|
return new Materials[]{Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ITexture[] getTextureSet() { //Must have 16 entries.
|
||||||
|
return new ITexture[]{new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 0), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 1), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 2), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 3), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 4), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 5), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 6), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 7), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 0), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 1), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 2), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 3), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 4), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 5), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 6), new GT_CopiedBlockTexture(UndergroundBiomes.igneousStone, 0, 7)};
|
||||||
|
}
|
||||||
|
}
|
41
src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java
Normal file
41
src/main/java/gregtech/common/blocks/GT_Block_Ores_UB2.java
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
package gregtech.common.blocks;
|
||||||
|
|
||||||
|
import exterminatorJeff.undergroundBiomes.common.UndergroundBiomes;
|
||||||
|
import gregtech.api.GregTech_API;
|
||||||
|
import gregtech.api.enums.Materials;
|
||||||
|
import gregtech.api.enums.OrePrefixes;
|
||||||
|
import gregtech.api.interfaces.ITexture;
|
||||||
|
import gregtech.api.objects.GT_CopiedBlockTexture;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
|
||||||
|
public class GT_Block_Ores_UB2 extends GT_Block_Ores_Abstract {
|
||||||
|
public GT_Block_Ores_UB2() {
|
||||||
|
super("gt.blockores.ub2", true, Material.rock);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUnlocalizedName() {
|
||||||
|
return "gt.blockores.ub2";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrePrefixes[] getProcessingPrefix() { //Must have 8 entries; an entry can be null to disable automatic recipes.
|
||||||
|
return new OrePrefixes[]{OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.oreMarble, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Block getDroppedBlock() {
|
||||||
|
return GregTech_API.sBlockOresUb2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Materials[] getDroppedDusts() { //Must have 8 entries; can be null.
|
||||||
|
return new Materials[]{Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ITexture[] getTextureSet() { //Must have 16 entries.
|
||||||
|
return new ITexture[]{new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 0), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 1), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 2), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 3), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 4), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 5), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 6), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 7), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 0), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 1), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 2), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 3), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 4), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 5), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 6), new GT_CopiedBlockTexture(UndergroundBiomes.metamorphicStone, 0, 7)};
|
||||||
|
}
|
||||||
|
}
|
41
src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java
Normal file
41
src/main/java/gregtech/common/blocks/GT_Block_Ores_UB3.java
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
package gregtech.common.blocks;
|
||||||
|
|
||||||
|
import exterminatorJeff.undergroundBiomes.common.UndergroundBiomes;
|
||||||
|
import gregtech.api.GregTech_API;
|
||||||
|
import gregtech.api.enums.Materials;
|
||||||
|
import gregtech.api.enums.OrePrefixes;
|
||||||
|
import gregtech.api.interfaces.ITexture;
|
||||||
|
import gregtech.api.objects.GT_CopiedBlockTexture;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
|
||||||
|
public class GT_Block_Ores_UB3 extends GT_Block_Ores_Abstract {
|
||||||
|
public GT_Block_Ores_UB3() {
|
||||||
|
super("gt.blockores.ub3", true, Material.rock);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUnlocalizedName() {
|
||||||
|
return "gt.blockores.ub3";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrePrefixes[] getProcessingPrefix() { //Must have 8 entries; an entry can be null to disable automatic recipes.
|
||||||
|
return new OrePrefixes[]{OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore, OrePrefixes.ore};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Block getDroppedBlock() {
|
||||||
|
return GregTech_API.sBlockOresUb3;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Materials[] getDroppedDusts() { //Must have 8 entries; can be null.
|
||||||
|
return new Materials[]{Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone, Materials.Stone};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ITexture[] getTextureSet() { //Must have 16 entries.
|
||||||
|
return new ITexture[]{new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 0), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 1), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 2), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 3), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 4), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 5), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 6), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 7), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 0), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 1), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 2), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 3), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 4), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 5), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 6), new GT_CopiedBlockTexture(UndergroundBiomes.sedimentaryStone, 0, 7)};
|
||||||
|
}
|
||||||
|
}
|
64
src/main/java/gregtech/common/blocks/GT_Block_Stones.java
Normal file
64
src/main/java/gregtech/common/blocks/GT_Block_Stones.java
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
package gregtech.common.blocks;
|
||||||
|
|
||||||
|
import gregtech.api.enums.Materials;
|
||||||
|
import gregtech.api.enums.OrePrefixes;
|
||||||
|
import gregtech.api.util.GT_LanguageManager;
|
||||||
|
import gregtech.api.util.GT_OreDictUnificator;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class GT_Block_Stones extends GT_Block_Stones_Abstract {
|
||||||
|
public GT_Block_Stones() {
|
||||||
|
super(GT_Item_Granites.class, "gt.blockstones");
|
||||||
|
setResistance(60.0F);
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Marble");
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Marble Cobblestone");
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Mossy Marble Cobblestone");
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Marble Bricks");
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Cracked Marble Bricks");
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Mossy Marble Bricks");
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Chiseled Marble");
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Smooth Marble");
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Basalt");
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Basalt Cobblestone");
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Mossy Basalt Cobblestone");
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Basalt Bricks");
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Cracked Basalt Bricks");
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "Mossy Basalt Bricks");
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "Chiseled Basalt");
|
||||||
|
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".15.name", "Smooth Basalt");
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(this, 1, 0));
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(this, 1, 1));
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(this, 1, 2));
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(this, 1, 3));
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(this, 1, 4));
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(this, 1, 5));
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(this, 1, 6));
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Marble, new ItemStack(this, 1, 7));
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(this, 1, 8));
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(this, 1, 9));
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(this, 1, 10));
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(this, 1, 11));
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(this, 1, 12));
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(this, 1, 13));
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(this, 1, 14));
|
||||||
|
GT_OreDictUnificator.registerOre(OrePrefixes.stone, Materials.Basalt, new ItemStack(this, 1, 15));
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHarvestLevel(int aMeta) {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getBlockHardness(World aWorld, int aX, int aY, int aZ) {
|
||||||
|
return this.blockHardness = Blocks.stone.getBlockHardness(aWorld, aX, aY, aZ) * 3.0F;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IIcon getIcon(int aSide, int aMeta) {
|
||||||
|
if ((aMeta >= 0) && (aMeta < 16)) {
|
||||||
|
return gregtech.api.enums.Textures.BlockIcons.STONES[aMeta].getIcon();
|
||||||
|
}
|
||||||
|
return gregtech.api.enums.Textures.BlockIcons.STONES[0].getIcon();
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,7 +5,6 @@ import gregtech.api.GregTech_API;
|
||||||
import gregtech.api.enums.GT_Values;
|
import gregtech.api.enums.GT_Values;
|
||||||
import gregtech.api.enums.Materials;
|
import gregtech.api.enums.Materials;
|
||||||
import gregtech.api.enums.OrePrefixes;
|
import gregtech.api.enums.OrePrefixes;
|
||||||
import gregtech.api.enums.Textures;
|
|
||||||
import gregtech.api.interfaces.ITexture;
|
import gregtech.api.interfaces.ITexture;
|
||||||
import gregtech.api.interfaces.tileentity.ITexturedTileEntity;
|
import gregtech.api.interfaces.tileentity.ITexturedTileEntity;
|
||||||
import gregtech.api.objects.GT_CopiedBlockTexture;
|
import gregtech.api.objects.GT_CopiedBlockTexture;
|
||||||
|
@ -23,10 +22,7 @@ import net.minecraft.world.World;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
public class GT_TileEntity_Ores
|
public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntity {
|
||||||
extends TileEntity
|
|
||||||
implements ITexturedTileEntity {
|
|
||||||
private static final ITexture[] mStoneTextures = {new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0)};
|
|
||||||
public short mMetaData = 0;
|
public short mMetaData = 0;
|
||||||
public boolean mNatural = false;
|
public boolean mNatural = false;
|
||||||
public boolean mBlocked = true;
|
public boolean mBlocked = true;
|
||||||
|
@ -40,17 +36,30 @@ public class GT_TileEntity_Ores
|
||||||
return tByte;
|
return tByte;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData) {
|
public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean isSmallOre) {
|
||||||
return setOreBlock(aWorld, aX, aY, aZ, aMetaData, false);
|
return setOreBlock(aWorld, aX, aY, aZ, aMetaData, isSmallOre, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean air) {
|
public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean isSmallOre, boolean air) {
|
||||||
if (!air) {
|
if (!air) {
|
||||||
aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1));
|
aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1));
|
||||||
}
|
}
|
||||||
Block tBlock = aWorld.getBlock(aX, aY, aZ);
|
Block tBlock = aWorld.getBlock(aX, aY, aZ);
|
||||||
|
Block tOreBlock = GregTech_API.sBlockOres1;
|
||||||
|
int BlockMeta = aWorld.getBlockMetadata(aX, aY, aZ);
|
||||||
|
String BlockName = tBlock.getUnlocalizedName();
|
||||||
|
aMetaData += isSmallOre ? 16000 : 0;
|
||||||
if ((aMetaData > 0) && ((tBlock != Blocks.air) || air)) {
|
if ((aMetaData > 0) && ((tBlock != Blocks.air) || air)) {
|
||||||
if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) {
|
if (BlockName.equals("tile.igneousStone")) {
|
||||||
|
tOreBlock = GregTech_API.sBlockOresUb1;
|
||||||
|
aMetaData += (BlockMeta * 1000);
|
||||||
|
} else if (BlockName.equals("tile.metamorphicStone")) {
|
||||||
|
tOreBlock = GregTech_API.sBlockOresUb2;
|
||||||
|
aMetaData += (BlockMeta * 1000);
|
||||||
|
} else if (BlockName.equals("tile.sedimentaryStone")) {
|
||||||
|
tOreBlock = GregTech_API.sBlockOresUb3;
|
||||||
|
aMetaData += (BlockMeta * 1000);
|
||||||
|
} else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) {
|
||||||
aMetaData += 1000;
|
aMetaData += 1000;
|
||||||
} else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) {
|
} else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) {
|
||||||
aMetaData += 2000;
|
aMetaData += 2000;
|
||||||
|
@ -64,10 +73,20 @@ public class GT_TileEntity_Ores
|
||||||
} else {
|
} else {
|
||||||
aMetaData += 3000;
|
aMetaData += 3000;
|
||||||
}
|
}
|
||||||
|
} else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockStones)) {
|
||||||
|
if (tBlock == GregTech_API.sBlockStones) {
|
||||||
|
if (aWorld.getBlockMetadata(aX, aY, aZ) < 8) {
|
||||||
|
aMetaData += 5000;
|
||||||
|
} else {
|
||||||
|
aMetaData += 6000;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
aMetaData += 5000;
|
||||||
|
}
|
||||||
} else if (!tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) {
|
} else if (!tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
aWorld.setBlock(aX, aY, aZ, GregTech_API.sBlockOres1, getHarvestData((short) aMetaData), 0);
|
aWorld.setBlock(aX, aY, aZ, tOreBlock, getHarvestData((short) aMetaData), 0);
|
||||||
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
||||||
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
||||||
((GT_TileEntity_Ores) tTileEntity).mMetaData = ((short) aMetaData);
|
((GT_TileEntity_Ores) tTileEntity).mMetaData = ((short) aMetaData);
|
||||||
|
@ -122,10 +141,30 @@ public class GT_TileEntity_Ores
|
||||||
} else {
|
} else {
|
||||||
this.mMetaData = ((short) (this.mMetaData + 3000));
|
this.mMetaData = ((short) (this.mMetaData + 3000));
|
||||||
}
|
}
|
||||||
|
} else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockStones)) {
|
||||||
|
if (aOverridingStoneBlock == GregTech_API.sBlockStones) {
|
||||||
|
if (aOverridingStoneMeta < 8) {
|
||||||
|
this.mMetaData = ((short) (this.mMetaData + 5000));
|
||||||
|
} else {
|
||||||
|
this.mMetaData = ((short) (this.mMetaData + 6000));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.mMetaData = ((short) (this.mMetaData + 5000));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(this.mMetaData), 0);
|
this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(this.mMetaData), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void convertOreBlock(World aWorld, int aX, int aY, int aZ) {
|
||||||
|
short aMeta = ((short) (int) (this.mMetaData % 1000 + (this.mMetaData / 16000 * 16000)));
|
||||||
|
aWorld.setBlock(aX, aY, aZ, GregTech_API.sBlockOres1);
|
||||||
|
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
||||||
|
if (tTileEntity instanceof GT_TileEntity_Ores) {
|
||||||
|
((GT_TileEntity_Ores) tTileEntity).mMetaData = aMeta;
|
||||||
|
this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(aMeta), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public short getMetaData() {
|
public short getMetaData() {
|
||||||
return this.mMetaData;
|
return this.mMetaData;
|
||||||
}
|
}
|
||||||
|
@ -134,14 +173,14 @@ public class GT_TileEntity_Ores
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<ItemStack> getDrops(int aFortune) {
|
public ArrayList<ItemStack> getDrops(Block aDroppedOre, int aFortune) {
|
||||||
ArrayList<ItemStack> rList = new ArrayList();
|
ArrayList<ItemStack> rList = new ArrayList();
|
||||||
if (this.mMetaData <= 0) {
|
if (this.mMetaData <= 0) {
|
||||||
rList.add(new ItemStack(Blocks.cobblestone, 1, 0));
|
rList.add(new ItemStack(Blocks.cobblestone, 1, 0));
|
||||||
return rList;
|
return rList;
|
||||||
}
|
}
|
||||||
if (this.mMetaData < 16000) {
|
if (this.mMetaData < 16000) {
|
||||||
rList.add(new ItemStack(GregTech_API.sBlockOres1, 1, this.mMetaData));
|
rList.add(new ItemStack(aDroppedOre, 1, this.mMetaData));
|
||||||
return rList;
|
return rList;
|
||||||
}
|
}
|
||||||
Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)];
|
Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)];
|
||||||
|
@ -202,32 +241,21 @@ public class GT_TileEntity_Ores
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tRandom.nextInt(3 + aFortune) > 1) {
|
if (tRandom.nextInt(3 + aFortune) > 1) {
|
||||||
switch (this.mMetaData / 1000 % 16) {
|
Materials dustMat = ((GT_Block_Ores_Abstract) aDroppedOre).getDroppedDusts()[this.mMetaData / 1000 % 16];
|
||||||
case 0:
|
if (dustMat != null) rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, dustMat, 1L));
|
||||||
rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Stone, 1L));
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Netherrack, 1L));
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Endstone, 1L));
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteBlack, 1L));
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteRed, 1L));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rList;
|
return rList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITexture[] getTexture(byte aSide) {
|
public ITexture[] getTexture(Block aBlock, byte aSide) {
|
||||||
Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)];
|
Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)];
|
||||||
if ((aMaterial != null) && (this.mMetaData < 32000)) {
|
if ((aMaterial != null) && (this.mMetaData < 32000)) {
|
||||||
return new ITexture[]{mStoneTextures[(this.mMetaData / 1000 % 16)], new GT_RenderedTexture(aMaterial.mIconSet.mTextures[this.mMetaData / 16000 == 0 ? OrePrefixes.ore.mTextureIndex : OrePrefixes.oreSmall.mTextureIndex], aMaterial.mRGBa)};
|
GT_RenderedTexture aIconSet = new GT_RenderedTexture(aMaterial.mIconSet.mTextures[this.mMetaData / 16000 == 0 ? OrePrefixes.ore.mTextureIndex : OrePrefixes.oreSmall.mTextureIndex], aMaterial.mRGBa);
|
||||||
|
if (aBlock instanceof GT_Block_Ores_Abstract) {
|
||||||
|
return new ITexture[]{((GT_Block_Ores_Abstract) aBlock).getTextureSet()[((this.mMetaData / 1000) % 16)], aIconSet};
|
||||||
}
|
}
|
||||||
return new ITexture[]{mStoneTextures[0], new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex])};
|
}
|
||||||
|
return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex])};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ import gregtech.api.util.GT_LanguageManager;
|
||||||
import gregtech.api.util.GT_ModHandler;
|
import gregtech.api.util.GT_ModHandler;
|
||||||
import gregtech.api.util.GT_OreDictUnificator;
|
import gregtech.api.util.GT_OreDictUnificator;
|
||||||
import gregtech.api.util.GT_Utility;
|
import gregtech.api.util.GT_Utility;
|
||||||
import gregtech.common.blocks.GT_Block_Ores;
|
import gregtech.common.blocks.GT_Block_Ores_Abstract;
|
||||||
import gregtech.common.blocks.GT_TileEntity_Ores;
|
import gregtech.common.blocks.GT_TileEntity_Ores;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
@ -94,7 +94,7 @@ public class Behaviour_Prospecting
|
||||||
tY = aY - 4 - tQuality + tRandom.nextInt(j);
|
tY = aY - 4 - tQuality + tRandom.nextInt(j);
|
||||||
tZ = aZ - 4 - tQuality + tRandom.nextInt(j);
|
tZ = aZ - 4 - tQuality + tRandom.nextInt(j);
|
||||||
Block tBlock = aWorld.getBlock(tX, tY, tZ);
|
Block tBlock = aWorld.getBlock(tX, tY, tZ);
|
||||||
if ((tBlock instanceof GT_Block_Ores)) {
|
if ((tBlock instanceof GT_Block_Ores_Abstract)) {
|
||||||
TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ);
|
TileEntity tTileEntity = aWorld.getTileEntity(tX, tY, tZ);
|
||||||
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
||||||
Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)];
|
Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)];
|
||||||
|
|
|
@ -9,7 +9,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||||
import gregtech.api.interfaces.tileentity.IPipeRenderedTileEntity;
|
import gregtech.api.interfaces.tileentity.IPipeRenderedTileEntity;
|
||||||
import gregtech.api.interfaces.tileentity.ITexturedTileEntity;
|
import gregtech.api.interfaces.tileentity.ITexturedTileEntity;
|
||||||
import gregtech.common.blocks.GT_Block_Machines;
|
import gregtech.common.blocks.GT_Block_Machines;
|
||||||
import gregtech.common.blocks.GT_Block_Ores;
|
import gregtech.common.blocks.GT_Block_Ores_Abstract;
|
||||||
import gregtech.common.blocks.GT_TileEntity_Ores;
|
import gregtech.common.blocks.GT_TileEntity_Ores;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
|
@ -117,7 +117,7 @@ public class GT_Renderer_Block
|
||||||
public static boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) {
|
public static boolean renderStandardBlock(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) {
|
||||||
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
||||||
if ((tTileEntity instanceof ITexturedTileEntity)) {
|
if ((tTileEntity instanceof ITexturedTileEntity)) {
|
||||||
return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, new ITexture[][]{((ITexturedTileEntity) tTileEntity).getTexture((byte) 0), ((ITexturedTileEntity) tTileEntity).getTexture((byte) 1), ((ITexturedTileEntity) tTileEntity).getTexture((byte) 2), ((ITexturedTileEntity) tTileEntity).getTexture((byte) 3), ((ITexturedTileEntity) tTileEntity).getTexture((byte) 4), ((ITexturedTileEntity) tTileEntity).getTexture((byte) 5)});
|
return renderStandardBlock(aWorld, aX, aY, aZ, aBlock, aRenderer, new ITexture[][]{((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) 0), ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) 1), ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) 2), ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) 3), ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) 4), ((ITexturedTileEntity) tTileEntity).getTexture(aBlock, (byte) 5)});
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ public class GT_Renderer_Block
|
||||||
ITexture[][] tIcons = new ITexture[6][];
|
ITexture[][] tIcons = new ITexture[6][];
|
||||||
ITexture[][] tCovers = new ITexture[6][];
|
ITexture[][] tCovers = new ITexture[6][];
|
||||||
for (byte i = 0; i < 6; i = (byte) (i + 1)) {
|
for (byte i = 0; i < 6; i = (byte) (i + 1)) {
|
||||||
tCovers[i] = aTileEntity.getTexture(i);
|
tCovers[i] = aTileEntity.getTexture(aBlock, i);
|
||||||
tIcons[i] = aTileEntity.getTextureUncovered(i);
|
tIcons[i] = aTileEntity.getTextureUncovered(i);
|
||||||
}
|
}
|
||||||
if (tConnections == 0) {
|
if (tConnections == 0) {
|
||||||
|
@ -529,7 +529,7 @@ public class GT_Renderer_Block
|
||||||
(!GregTech_API.METATILEENTITIES[aMeta].renderInInventory(aBlock, aMeta, aRenderer))) {
|
(!GregTech_API.METATILEENTITIES[aMeta].renderInInventory(aBlock, aMeta, aRenderer))) {
|
||||||
renderNormalInventoryMetaTileEntity(aBlock, aMeta, aRenderer);
|
renderNormalInventoryMetaTileEntity(aBlock, aMeta, aRenderer);
|
||||||
}
|
}
|
||||||
} else if ((aBlock instanceof GT_Block_Ores)) {
|
} else if ((aBlock instanceof GT_Block_Ores_Abstract)) {
|
||||||
GT_TileEntity_Ores tTileEntity = new GT_TileEntity_Ores();
|
GT_TileEntity_Ores tTileEntity = new GT_TileEntity_Ores();
|
||||||
tTileEntity.mMetaData = ((short) aMeta);
|
tTileEntity.mMetaData = ((short) aMeta);
|
||||||
|
|
||||||
|
@ -541,32 +541,32 @@ public class GT_Renderer_Block
|
||||||
|
|
||||||
Tessellator.instance.startDrawingQuads();
|
Tessellator.instance.startDrawingQuads();
|
||||||
Tessellator.instance.setNormal(0.0F, -1.0F, 0.0F);
|
Tessellator.instance.setNormal(0.0F, -1.0F, 0.0F);
|
||||||
renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture((byte) 0), true);
|
renderNegativeYFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) 0), true);
|
||||||
Tessellator.instance.draw();
|
Tessellator.instance.draw();
|
||||||
|
|
||||||
Tessellator.instance.startDrawingQuads();
|
Tessellator.instance.startDrawingQuads();
|
||||||
Tessellator.instance.setNormal(0.0F, 1.0F, 0.0F);
|
Tessellator.instance.setNormal(0.0F, 1.0F, 0.0F);
|
||||||
renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture((byte) 1), true);
|
renderPositiveYFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) 1), true);
|
||||||
Tessellator.instance.draw();
|
Tessellator.instance.draw();
|
||||||
|
|
||||||
Tessellator.instance.startDrawingQuads();
|
Tessellator.instance.startDrawingQuads();
|
||||||
Tessellator.instance.setNormal(0.0F, 0.0F, -1.0F);
|
Tessellator.instance.setNormal(0.0F, 0.0F, -1.0F);
|
||||||
renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture((byte) 2), true);
|
renderNegativeZFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) 2), true);
|
||||||
Tessellator.instance.draw();
|
Tessellator.instance.draw();
|
||||||
|
|
||||||
Tessellator.instance.startDrawingQuads();
|
Tessellator.instance.startDrawingQuads();
|
||||||
Tessellator.instance.setNormal(0.0F, 0.0F, 1.0F);
|
Tessellator.instance.setNormal(0.0F, 0.0F, 1.0F);
|
||||||
renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture((byte) 3), true);
|
renderPositiveZFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) 3), true);
|
||||||
Tessellator.instance.draw();
|
Tessellator.instance.draw();
|
||||||
|
|
||||||
Tessellator.instance.startDrawingQuads();
|
Tessellator.instance.startDrawingQuads();
|
||||||
Tessellator.instance.setNormal(-1.0F, 0.0F, 0.0F);
|
Tessellator.instance.setNormal(-1.0F, 0.0F, 0.0F);
|
||||||
renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture((byte) 4), true);
|
renderNegativeXFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) 4), true);
|
||||||
Tessellator.instance.draw();
|
Tessellator.instance.draw();
|
||||||
|
|
||||||
Tessellator.instance.startDrawingQuads();
|
Tessellator.instance.startDrawingQuads();
|
||||||
Tessellator.instance.setNormal(1.0F, 0.0F, 0.0F);
|
Tessellator.instance.setNormal(1.0F, 0.0F, 0.0F);
|
||||||
renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture((byte) 5), true);
|
renderPositiveXFacing(null, aRenderer, aBlock, 0, 0, 0, tTileEntity.getTexture(aBlock, (byte) 5), true);
|
||||||
Tessellator.instance.draw();
|
Tessellator.instance.draw();
|
||||||
}
|
}
|
||||||
aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
aBlock.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
|
|
@ -10,10 +10,9 @@ import gregtech.api.metatileentity.MetaTileEntity;
|
||||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
|
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
|
||||||
import gregtech.api.objects.GT_RenderedTexture;
|
import gregtech.api.objects.GT_RenderedTexture;
|
||||||
import gregtech.api.objects.ItemData;
|
import gregtech.api.objects.ItemData;
|
||||||
import gregtech.api.objects.MaterialStack;
|
|
||||||
import gregtech.api.util.GT_OreDictUnificator;
|
import gregtech.api.util.GT_OreDictUnificator;
|
||||||
import gregtech.api.util.GT_Utility;
|
import gregtech.api.util.GT_Utility;
|
||||||
import gregtech.common.blocks.GT_Block_Ores;
|
import gregtech.common.blocks.GT_Block_Ores_Abstract;
|
||||||
import gregtech.common.blocks.GT_TileEntity_Ores;
|
import gregtech.common.blocks.GT_TileEntity_Ores;
|
||||||
import ic2.core.Ic2Items;
|
import ic2.core.Ic2Items;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
@ -74,7 +73,7 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
|
||||||
for (int f = -2; f < 3; f++) {
|
for (int f = -2; f < 3; f++) {
|
||||||
for (int g = -2; g < 3; g++) {
|
for (int g = -2; g < 3; g++) {
|
||||||
Block tBlock = this.getBaseMetaTileEntity().getBlockOffset(f, -i, g);
|
Block tBlock = this.getBaseMetaTileEntity().getBlockOffset(f, -i, g);
|
||||||
if ((tBlock instanceof GT_Block_Ores)) {
|
if ((tBlock instanceof GT_Block_Ores_Abstract)) {
|
||||||
TileEntity tTileEntity = getBaseMetaTileEntity().getWorld().getTileEntity(getBaseMetaTileEntity().getXCoord() + f, getBaseMetaTileEntity().getYCoord() + (-i), getBaseMetaTileEntity().getZCoord() + g);
|
TileEntity tTileEntity = getBaseMetaTileEntity().getWorld().getTileEntity(getBaseMetaTileEntity().getXCoord() + f, getBaseMetaTileEntity().getYCoord() + (-i), getBaseMetaTileEntity().getZCoord() + g);
|
||||||
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
|
||||||
if(((GT_TileEntity_Ores) tTileEntity).mMetaData < 16000){
|
if(((GT_TileEntity_Ores) tTileEntity).mMetaData < 16000){
|
||||||
|
|
|
@ -16,6 +16,7 @@ import gregtech.api.util.GT_ModHandler;
|
||||||
import gregtech.api.util.GT_OreDictUnificator;
|
import gregtech.api.util.GT_OreDictUnificator;
|
||||||
import gregtech.api.util.GT_Recipe;
|
import gregtech.api.util.GT_Recipe;
|
||||||
import gregtech.api.util.GT_Utility;
|
import gregtech.api.util.GT_Utility;
|
||||||
|
import gregtech.common.blocks.GT_Block_Ores_Abstract;
|
||||||
import gregtech.common.blocks.GT_TileEntity_Ores;
|
import gregtech.common.blocks.GT_TileEntity_Ores;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
@ -104,7 +105,7 @@ public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBas
|
||||||
for (int f = -48; f < 49; f++) {
|
for (int f = -48; f < 49; f++) {
|
||||||
Block tBlock = getBaseMetaTileEntity().getBlockOffset(i, yLevel - getBaseMetaTileEntity().getYCoord(), f);
|
Block tBlock = getBaseMetaTileEntity().getBlockOffset(i, yLevel - getBaseMetaTileEntity().getYCoord(), f);
|
||||||
int tMetaID = getBaseMetaTileEntity().getMetaIDOffset(i, yLevel - getBaseMetaTileEntity().getYCoord(), f);
|
int tMetaID = getBaseMetaTileEntity().getMetaIDOffset(i, yLevel - getBaseMetaTileEntity().getYCoord(), f);
|
||||||
if (tBlock == GregTech_API.sBlockOres1) {
|
if (tBlock instanceof GT_Block_Ores_Abstract) {
|
||||||
TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityOffset(i, yLevel - getBaseMetaTileEntity().getYCoord(), f);
|
TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityOffset(i, yLevel - getBaseMetaTileEntity().getYCoord(), f);
|
||||||
if ((tTileEntity!=null) && (tTileEntity instanceof GT_TileEntity_Ores) && ((GT_TileEntity_Ores) tTileEntity).mNatural == true && !mMineList.contains(new ChunkPosition(i, yLevel - getBaseMetaTileEntity().getYCoord(), f))) {
|
if ((tTileEntity!=null) && (tTileEntity instanceof GT_TileEntity_Ores) && ((GT_TileEntity_Ores) tTileEntity).mNatural == true && !mMineList.contains(new ChunkPosition(i, yLevel - getBaseMetaTileEntity().getYCoord(), f))) {
|
||||||
mMineList.add(new ChunkPosition(i, yLevel - getBaseMetaTileEntity().getYCoord(), f));
|
mMineList.add(new ChunkPosition(i, yLevel - getBaseMetaTileEntity().getYCoord(), f));
|
||||||
|
|
|
@ -39,8 +39,8 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
|
||||||
"Controller Block for the Blast Furnace",
|
"Controller Block for the Blast Furnace",
|
||||||
"Size(WxHxD): 3x4x3 (Hollow), Controller (Front middle bottom)",
|
"Size(WxHxD): 3x4x3 (Hollow), Controller (Front middle bottom)",
|
||||||
"16x Heating Coils (Two middle Layers, hollow)",
|
"16x Heating Coils (Two middle Layers, hollow)",
|
||||||
"1x Input (Any bottom layer casing)",
|
"1x Input Hatch/Bus (Any bottom layer casing)",
|
||||||
"1x Output (Any bottom layer casing)",
|
"1x Output Hatch/Bus (Any bottom layer casing)",
|
||||||
"1x Energy Hatch (Any bottom layer casing)",
|
"1x Energy Hatch (Any bottom layer casing)",
|
||||||
"1x Maintenance Hatch (Any bottom layer casing)",
|
"1x Maintenance Hatch (Any bottom layer casing)",
|
||||||
"1x Muffler Hatch (Top middle)",
|
"1x Muffler Hatch (Top middle)",
|
||||||
|
|
|
@ -37,10 +37,11 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
||||||
"Produces "+(getEUt()*40)*(runtimeBoost(20)/20f)+"L of Steam/sec for 1 Coal",
|
"Produces "+(getEUt()*40)*(runtimeBoost(20)/20f)+"L of Steam/sec for 1 Coal",
|
||||||
"Size(WxHxD): 3x5x3, Controller (Front middle in Fireboxes)",
|
"Size(WxHxD): 3x5x3, Controller (Front middle in Fireboxes)",
|
||||||
"3x1x3 of Fire Boxes (Bottom layer, Min 3)",
|
"3x1x3 of Fire Boxes (Bottom layer, Min 3)",
|
||||||
"3x4x3 of Casing (Above Fireboxes, hollow, Min 24!)",
|
"3x4x3 of Casings (Above Fireboxes, hollow, Min 24!)",
|
||||||
"3 Pipe Casing Blocks (Inside the Hollow Casing)",
|
"3 Pipe Casing Blocks (Inside the Hollow Casing)",
|
||||||
"1x Input Hatch/Bus (Any Firebox)",
|
"1x Input Fuel Hatch/Bus (Any Firebox)",
|
||||||
"1x Output Hatch (Any Firebox)",
|
"1x Input Water Hatch (Any Firebox)",
|
||||||
|
"1x Output Hatch (Any Casing)",
|
||||||
"1x Maintenance Hatch (Any Firebox)",
|
"1x Maintenance Hatch (Any Firebox)",
|
||||||
"1x Muffler Hatch (Any Firebox)",
|
"1x Muffler Hatch (Any Firebox)",
|
||||||
"Refined liquid fuels have 1/4 efficiency"};
|
"Refined liquid fuels have 1/4 efficiency"};
|
||||||
|
|
|
@ -38,6 +38,28 @@ public class GT_Worldgenloader
|
||||||
new GT_Worldgen_Stone("nether.stone.redgranite.large", false, GregTech_API.sBlockGranites, 8, -1, 1, 300, 192, 0, 120, null, false);
|
new GT_Worldgen_Stone("nether.stone.redgranite.large", false, GregTech_API.sBlockGranites, 8, -1, 1, 300, 192, 0, 120, null, false);
|
||||||
new GT_Worldgen_Stone("nether.stone.redgranite.huge", false, GregTech_API.sBlockGranites, 8, -1, 1, 400, 240, 0, 120, null, false);
|
new GT_Worldgen_Stone("nether.stone.redgranite.huge", false, GregTech_API.sBlockGranites, 8, -1, 1, 400, 240, 0, 120, null, false);
|
||||||
|
|
||||||
|
new GT_Worldgen_Stone("overworld.stone.marble.tiny", true, GregTech_API.sBlockStones, 0, 0, 1, 50, 48, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("overworld.stone.marble.small", true, GregTech_API.sBlockStones, 0, 0, 1, 100, 96, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("overworld.stone.marble.medium", true, GregTech_API.sBlockStones, 0, 0, 1, 200, 144, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("overworld.stone.marble.large", true, GregTech_API.sBlockStones, 0, 0, 1, 300, 192, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("overworld.stone.marble.huge", true, GregTech_API.sBlockStones, 0, 0, 1, 400, 240, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("overworld.stone.basalt.tiny", true, GregTech_API.sBlockStones, 8, 0, 1, 50, 48, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("overworld.stone.basalt.small", true, GregTech_API.sBlockStones, 8, 0, 1, 100, 96, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("overworld.stone.basalt.medium", true, GregTech_API.sBlockStones, 8, 0, 1, 200, 144, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("overworld.stone.basalt.large", true, GregTech_API.sBlockStones, 8, 0, 1, 300, 192, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("overworld.stone.basalt.huge", true, GregTech_API.sBlockStones, 8, 0, 1, 400, 240, 0, 120, null, false);
|
||||||
|
|
||||||
|
new GT_Worldgen_Stone("nether.stone.marble.tiny", true, GregTech_API.sBlockStones, 0, 0, 1, 50, 48, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("nether.stone.marble.small", true, GregTech_API.sBlockStones, 0, 0, 1, 100, 96, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("nether.stone.marble.medium", true, GregTech_API.sBlockStones, 0, 0, 1, 200, 144, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("nether.stone.marble.large", true, GregTech_API.sBlockStones, 0, 0, 1, 300, 192, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("nether.stone.marble.huge", true, GregTech_API.sBlockStones, 0, 0, 1, 400, 240, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("nether.stone.basalt.tiny", true, GregTech_API.sBlockStones, 8, 0, 1, 50, 48, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("nether.stone.basalt.small", true, GregTech_API.sBlockStones, 8, 0, 1, 100, 96, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("nether.stone.basalt.medium", true, GregTech_API.sBlockStones, 8, 0, 1, 200, 144, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("nether.stone.basalt.large", true, GregTech_API.sBlockStones, 8, 0, 1, 300, 192, 0, 120, null, false);
|
||||||
|
new GT_Worldgen_Stone("nether.stone.basalt.huge", true, GregTech_API.sBlockStones, 8, 0, 1, 400, 240, 0, 120, null, false);
|
||||||
|
|
||||||
new GT_Worldgen_GT_Ore_SmallPieces("ore.small.copper", true, 60, 120, 32, !tPFAA, true, true, Materials.Copper);
|
new GT_Worldgen_GT_Ore_SmallPieces("ore.small.copper", true, 60, 120, 32, !tPFAA, true, true, Materials.Copper);
|
||||||
new GT_Worldgen_GT_Ore_SmallPieces("ore.small.tin", true, 60, 120, 32, !tPFAA, true, true, Materials.Tin);
|
new GT_Worldgen_GT_Ore_SmallPieces("ore.small.tin", true, 60, 120, 32, !tPFAA, true, true, Materials.Tin);
|
||||||
new GT_Worldgen_GT_Ore_SmallPieces("ore.small.bismuth", true, 80, 120, 8, !tPFAA, true, false, Materials.Bismuth);
|
new GT_Worldgen_GT_Ore_SmallPieces("ore.small.bismuth", true, 80, 120, 8, !tPFAA, true, false, Materials.Bismuth);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package gregtech.loaders.preload;
|
package gregtech.loaders.preload;
|
||||||
|
|
||||||
import codechicken.nei.api.API;
|
import codechicken.nei.api.API;
|
||||||
|
import cpw.mods.fml.common.Loader;
|
||||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import gregtech.GT_Mod;
|
import gregtech.GT_Mod;
|
||||||
|
@ -135,7 +136,13 @@ public class GT_Loader_Item_Block_And_Fluid
|
||||||
GregTech_API.sBlockCasings4 = new GT_Block_Casings4();
|
GregTech_API.sBlockCasings4 = new GT_Block_Casings4();
|
||||||
GregTech_API.sBlockGranites = new GT_Block_Granites();
|
GregTech_API.sBlockGranites = new GT_Block_Granites();
|
||||||
GregTech_API.sBlockConcretes = new GT_Block_Concretes();
|
GregTech_API.sBlockConcretes = new GT_Block_Concretes();
|
||||||
|
GregTech_API.sBlockStones = new GT_Block_Stones();
|
||||||
GregTech_API.sBlockOres1 = new GT_Block_Ores();
|
GregTech_API.sBlockOres1 = new GT_Block_Ores();
|
||||||
|
if(Loader.isModLoaded("UndergroundBiomes")) {
|
||||||
|
GregTech_API.sBlockOresUb1 = new GT_Block_Ores_UB1();
|
||||||
|
GregTech_API.sBlockOresUb2 = new GT_Block_Ores_UB2();
|
||||||
|
GregTech_API.sBlockOresUb3 = new GT_Block_Ores_UB3();
|
||||||
|
}
|
||||||
GregTech_API.sBlockMetal1 = new GT_Block_Metal("gt.blockmetal1", new Materials[]{
|
GregTech_API.sBlockMetal1 = new GT_Block_Metal("gt.blockmetal1", new Materials[]{
|
||||||
Materials.Adamantium,
|
Materials.Adamantium,
|
||||||
Materials.Aluminium,
|
Materials.Aluminium,
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 350 B |
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 143 B |
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 143 B |
Loading…
Reference in a new issue