diff options
Diffstat (limited to 'src/Java')
14 files changed, 864 insertions, 428 deletions
diff --git a/src/Java/gtPlusPlus/GTplusplus_Secondary.java b/src/Java/gtPlusPlus/GTplusplus_Secondary.java index 329d3fdb1d..f69a5f2881 100644 --- a/src/Java/gtPlusPlus/GTplusplus_Secondary.java +++ b/src/Java/gtPlusPlus/GTplusplus_Secondary.java @@ -11,6 +11,8 @@ import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.material.ORES; import gtPlusPlus.core.world.darkworld.Dimension_DarkWorld; import gtPlusPlus.core.world.darkworld.biome.Biome_DarkWorld; import gtPlusPlus.core.world.darkworld.block.DarkWorldContentLoader; @@ -62,6 +64,9 @@ public class GTplusplus_Secondary { public void load(final FMLInitializationEvent e) { Logger.INFO("Begin resource allocation for " + MODID2 + " V" + VERSION2); + //Run Ore Material Handler + GenerateOreMaterials(); + //Load Dark World and Biome //GameRegistry.registerFuelHandler(this); GameRegistry.registerWorldGenerator(new WorldGen_GT_Base(), 50); @@ -70,6 +75,15 @@ public class GTplusplus_Secondary { } + private void GenerateOreMaterials() { + MaterialGenerator.generate(ORES.CROCROITE); + MaterialGenerator.generate(ORES.GEIKIELITE); + MaterialGenerator.generate(ORES.NICHROMITE); + MaterialGenerator.generate(ORES.TITANITE); + MaterialGenerator.generate(ORES.ZIMBABWEITE); + MaterialGenerator.generate(ORES.ZIRCONILITE); + } + void setVars(){ if (DimensionManager.isDimensionRegistered(Dimension_DarkWorld.DIMID)){ Dimension_DarkWorld.DIMID = DimensionManager.getNextFreeDimId(); diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java index ff2f06d2d2..9c58e1a930 100644 --- a/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java +++ b/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java @@ -8,26 +8,31 @@ import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.core.item.base.itemblock.ItemBlockGtBlock; import gtPlusPlus.core.item.base.itemblock.ItemBlockGtFrameBox; import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.item.ItemUtils; import gtPlusPlus.core.util.math.MathUtils; -import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.world.IBlockAccess; public class BlockBaseModular extends BasicBlock{ + protected Material blockMaterial; + protected int blockColour; protected BlockTypes thisBlock; protected String thisBlockMaterial; protected final String thisBlockType; - + public BlockBaseModular(final Material material, final BlockTypes blockType, final int colour) { + this(material.getUnlocalizedName(), material.getLocalizedName(), net.minecraft.block.material.Material.iron, blockType, colour, 2); + } + public BlockBaseModular(final String unlocalizedName, final String blockMaterial, final BlockTypes blockType, final int colour) { - this(unlocalizedName, blockMaterial, Material.iron, blockType, colour, 2); + this(unlocalizedName, blockMaterial, net.minecraft.block.material.Material.iron, blockType, colour, 2); } - public BlockBaseModular(final String unlocalizedName, final String blockMaterial, final Material vanillaMaterial, final BlockTypes blockType, final int colour, final int miningLevel) { + public BlockBaseModular(final String unlocalizedName, final String blockMaterial, final net.minecraft.block.material.Material vanillaMaterial, final BlockTypes blockType, final int colour, final int miningLevel) { super(unlocalizedName, vanillaMaterial); this.setHarvestLevel(blockType.getHarvestTool(), miningLevel); this.setBlockTextureName(CORE.MODID+":"+blockType.getTexture()); diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseItemCrushedOre.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseItemCrushedOre.java new file mode 100644 index 0000000000..f2ca40334f --- /dev/null +++ b/src/Java/gtPlusPlus/core/item/base/ore/BaseItemCrushedOre.java @@ -0,0 +1,10 @@ +package gtPlusPlus.core.item.base.ore; + +import gtPlusPlus.core.material.Material; + +public class BaseItemCrushedOre extends BaseOreComponent{ + + public BaseItemCrushedOre(final Material material) { + super(material, BaseOreComponent.ComponentTypes.CRUSHED); + } +} diff --git a/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java b/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java new file mode 100644 index 0000000000..d06f1c912a --- /dev/null +++ b/src/Java/gtPlusPlus/core/item/base/ore/BaseOreComponent.java @@ -0,0 +1,153 @@ +package gtPlusPlus.core.item.base.ore; + +import java.util.List; + +import cpw.mods.fml.common.registry.GameRegistry; +import gregtech.api.util.GT_OreDictUnificator; +import gtPlusPlus.core.creative.AddToCreativeTab; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.entity.EntityUtils; +import gtPlusPlus.core.util.item.ItemUtils; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class BaseOreComponent extends Item{ + + public final Material componentMaterial; + public final String materialName; + public final String unlocalName; + public final ComponentTypes componentType; + public final int componentColour; + public Object extraData; + + public BaseOreComponent(final Material material, final ComponentTypes componentType) { + this.componentMaterial = material; + this.unlocalName = "item"+componentType.COMPONENT_NAME+material.getUnlocalizedName(); + this.materialName = material.getLocalizedName(); + this.componentType = componentType; + this.setCreativeTab(AddToCreativeTab.tabMisc); + this.setUnlocalizedName(this.unlocalName); + this.setMaxStackSize(64); + this.setTextureName(this.getCorrectTextures()); + this.componentColour = material.getRgbAsHex(); + GameRegistry.registerItem(this, this.unlocalName); + GT_OreDictUnificator.registerOre(componentType.getOreDictName()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this)); + } + + public String getCorrectTextures(){ + if (!CORE.ConfigSwitches.useGregtechTextures){ + return CORE.MODID + ":" + "item"+this.componentType.COMPONENT_NAME; + } + + /*if (this.componentType == ComponentTypes.GEAR){ + return "gregtech" + ":" + "materialicons/METALLIC/" + "gearGt"; + } + else if (this.componentType == ComponentTypes.SMALLGEAR){ + return "gregtech" + ":" + "materialicons/METALLIC/" + "gearGtSmall"; + }*/ + + return "gregtech" + ":" + "materialicons/METALLIC/" + this.componentType.COMPONENT_NAME.toLowerCase(); + } + + @Override + public String getItemStackDisplayName(final ItemStack p_77653_1_) { + if (this.componentMaterial != null) { + return (this.componentMaterial.getLocalizedName()+this.componentType.DISPLAY_NAME); + } + return this.materialName+" Cell"; + } + + public final String getMaterialName() { + return this.materialName; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public final void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + + if ((this.materialName != null) && (this.materialName != "") && !this.materialName.equals("") && (this.componentMaterial != null)){ + + if (this.componentMaterial != null){ + if (!this.componentMaterial.vChemicalFormula.equals("??") && !this.componentMaterial.vChemicalFormula.equals("?") && this.componentMaterial.getState() != MaterialState.PURE_LIQUID) { + list.add(Utils.sanitizeStringKeepBrackets(this.componentMaterial.vChemicalFormula)); + } + + if (this.componentMaterial.isRadioactive){ + list.add(CORE.GT_Tooltip_Radioactive); + } + } + + } + + super.addInformation(stack, aPlayer, list, bool); + } + + + @Override + public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) { + return this.componentColour; + } + + @Override + public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { + if (this.componentMaterial != null){ + if (entityHolding instanceof EntityPlayer){ + if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ + EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.componentMaterial.vRadiationLevel, world, entityHolding); + } + } + } + } + + + + + + + + + + public static enum ComponentTypes { + DUST("Dust", " Dust", "dust"), + DUSTDIRTY("Ingot", " Ingot", "ingot"), + DUSTIMPURE("Ingot", " Ingot", "ingot"), + DUSTPURE("Ingot", " Ingot", "ingot"), + DUSTREFINED("Ingot", " Ingot", "ingot"), + CRUSHED("Ingot", " Ingot", "ingot"), + CRUSHEDCENTRIFUGED("Ingot", " Ingot", "ingot"), + CRUSHEDPURIFIED("Ingot", " Ingot", "ingot"); + + private String COMPONENT_NAME; + private String DISPLAY_NAME; + private String OREDICT_NAME; + private ComponentTypes (final String LocalName, final String DisplayName, final String OreDictName){ + this.COMPONENT_NAME = LocalName; + this.DISPLAY_NAME = DisplayName; + this.OREDICT_NAME = OreDictName; + // dust + Dirty, Impure, Pure, Refined + // crushed + centrifuged, purified + } + + public String getComponent(){ + return this.COMPONENT_NAME; + } + + public String getName(){ + return this.DISPLAY_NAME; + } + + public String getOreDictName(){ + return this.OREDICT_NAME; + } + + } + +} + + diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java index 390075729a..b04ce3baac 100644 --- a/src/Java/gtPlusPlus/core/material/Material.java +++ b/src/Java/gtPlusPlus/core/material/Material.java @@ -64,6 +64,10 @@ public class Material { public static Map<Integer, Materials> invalidMaterials = new HashMap<Integer, Materials>(); + public Material(String materialName, MaterialState defaultState, short[] rgba, int radiationLevel, MaterialStack[] materialStacks) { + this (materialName, defaultState, 0, rgba, -1, -1, -1, -1, false, "", radiationLevel, false, materialStacks); + } + public Material(final String materialName, final MaterialState defaultState,final short[] rgba, final int meltingPoint, final int boilingPoint, final long protons, final long neutrons, final boolean blastFurnace, final MaterialStack... inputs){ this(materialName, defaultState, 0, rgba, meltingPoint, boilingPoint, protons, neutrons, blastFurnace, "", 0, inputs); } @@ -296,7 +300,7 @@ public class Material { Logger.WARNING("Mass: "+this.vMass+"/units"); Logger.WARNING("Melting Point: "+this.meltingPointC+"C."); Logger.WARNING("Boiling Point: "+this.boilingPointC+"C."); - } + } public final String getLocalizedName(){ if (this.localizedName != null) { @@ -759,9 +763,14 @@ public class Material { final public int calculateMeltingPoint(){ int meltingPoint = 0; for (MaterialStack part : this.vMaterialInput){ - int incrementor = part.getStackMaterial().getMeltingPointC(); - meltingPoint += incrementor; - Logger.WARNING("Melting Point for "+this.getLocalizedName()+" increased to "+ incrementor); + if (part != null){ + int incrementor = part.getStackMaterial().getMeltingPointC(); + meltingPoint += incrementor; + Logger.WARNING("Melting Point for "+this.getLocalizedName()+" increased to "+ incrementor); + } + else { + Logger.MATERIALS(this.getLocalizedName()+" has a really invalid composition."); + } } int divisor = (this.vMaterialInput.size()>0 ? this.vMaterialInput.size() : 1); Logger.WARNING("Dividing "+meltingPoint+" / "+divisor+" to get average melting point."); @@ -772,7 +781,12 @@ public class Material { final public int calculateBoilingPoint(){ int boilingPoint = 0; for (MaterialStack part : this.vMaterialInput){ - boilingPoint += part.getStackMaterial().getBoilingPointC(); + if (part != null){ + boilingPoint += part.getStackMaterial().getBoilingPointC(); + } + else { + Logger.MATERIALS(this.getLocalizedName()+" has a really invalid composition."); + } } int divisor = (this.vMaterialInput.size()>0 ? this.vMaterialInput.size() : 1); boilingPoint = (boilingPoint/divisor); @@ -782,7 +796,12 @@ public class Material { final public long calculateProtons(){ long protonCount = 0; for (MaterialStack part : this.vMaterialInput){ - protonCount += (part.getStackMaterial().getProtons()); + if (part != null){ + protonCount += (part.getStackMaterial().getProtons()); + } + else { + Logger.MATERIALS(this.getLocalizedName()+" has a really invalid composition."); + } } int divisor = (this.vMaterialInput.size()>0 ? this.vMaterialInput.size() : 1); protonCount = (protonCount/divisor); @@ -792,7 +811,12 @@ public class Material { final public long calculateNeutrons(){ long neutronCount = 0; for (MaterialStack part : this.vMaterialInput){ - neutronCount += (part.getStackMaterial().getNeutrons()); + if (part != null){ + neutronCount += (part.getStackMaterial().getNeutrons()); + } + else { + Logger.MATERIALS(this.getLocalizedName()+" has a really invalid composition."); + } } int divisor = (this.vMaterialInput.size()>0 ? this.vMaterialInput.size() : 1); neutronCount = (neutronCount/divisor); diff --git a/src/Java/gtPlusPlus/core/material/MaterialGenerator.java b/src/Java/gtPlusPlus/core/material/MaterialGenerator.java index 9adf7d62a5..727f929036 100644 --- a/src/Java/gtPlusPlus/core/material/MaterialGenerator.java +++ b/src/Java/gtPlusPlus/core/material/MaterialGenerator.java @@ -9,6 +9,7 @@ import gtPlusPlus.core.item.base.gears.BaseItemGear; import gtPlusPlus.core.item.base.ingots.BaseItemIngot; import gtPlusPlus.core.item.base.ingots.BaseItemIngotHot; import gtPlusPlus.core.item.base.nugget.BaseItemNugget; +import gtPlusPlus.core.item.base.ore.BaseItemCrushedOre; import gtPlusPlus.core.item.base.plates.BaseItemPlate; import gtPlusPlus.core.item.base.plates.BaseItemPlateDouble; import gtPlusPlus.core.item.base.rings.BaseItemRing; @@ -125,6 +126,18 @@ public class MaterialGenerator { FluidUtils.generateFluidNoPrefix(unlocalizedName, materialName, matInfo.getMeltingPointK(), C); return true; } + else if (matInfo.getState() == MaterialState.ORE){ + if (sRadiation >= 1){ + Item temp; + Block tempBlock; + tempBlock = new BlockBaseModular(matInfo ,BlockTypes.ORE, Colour); + + temp = new BaseItemDust("itemDust"+unlocalizedName, materialName, matInfo, Colour, "Dust", materialTier, sRadiation); + temp = new BaseItemDust("itemDustTiny"+unlocalizedName, materialName, matInfo, Colour, "Tiny", materialTier, sRadiation); + temp = new BaseItemDust("itemDustSmall"+unlocalizedName, materialName, matInfo, Colour, "Small", materialTier, sRadiation); + temp = new BaseItemCrushedOre(matInfo); + } + } //Add A jillion Recipes - old code RecipeGen_AlloySmelter.generateRecipes(matInfo); @@ -139,7 +152,9 @@ public class MaterialGenerator { RecipeGen_ShapedCrafting.generateRecipes(matInfo); new RecipeGen_Recycling(matInfo); return true; - } catch (final Throwable t) + + } catch (final Throwable t) + { Logger.WARNING(""+matInfo.getLocalizedName()+" failed to generate."); return false; diff --git a/src/Java/gtPlusPlus/core/material/MaterialStack.java b/src/Java/gtPlusPlus/core/material/MaterialStack.java index e18d738b97..ad7af2052f 100644 --- a/src/Java/gtPlusPlus/core/material/MaterialStack.java +++ b/src/Java/gtPlusPlus/core/material/MaterialStack.java @@ -3,7 +3,9 @@ package gtPlusPlus.core.material; import java.math.BigDecimal; import java.math.RoundingMode; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.util.item.ItemUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; import net.minecraft.item.ItemStack; public class MaterialStack { @@ -51,6 +53,14 @@ public class MaterialStack { } public Material getStackMaterial(){ + if (this.stackMaterial == null){ + Logger.MATERIALS("Tried getStackMaterial, got an invalid material."); + Logger.MATERIALS(ReflectionUtils.getMethodName(0)); + Logger.MATERIALS(ReflectionUtils.getMethodName(1)); + Logger.MATERIALS(ReflectionUtils.getMethodName(2)); + Logger.MATERIALS(ReflectionUtils.getMethodName(3)); + return null; + } return this.stackMaterial; } diff --git a/src/Java/gtPlusPlus/core/material/ORES.java b/src/Java/gtPlusPlus/core/material/ORES.java new file mode 100644 index 0000000000..4057092a48 --- /dev/null +++ b/src/Java/gtPlusPlus/core/material/ORES.java @@ -0,0 +1,84 @@ +package gtPlusPlus.core.material; + +import gtPlusPlus.core.material.state.MaterialState; + +public final class ORES { + + public static final Material GEIKIELITE = new Material( + "Geikielite", //Material Name + MaterialState.ORE, //State + new short[]{187, 193, 204, 0}, //Material Colour + 0, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().MAGNESIUM, 1), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 3) + }); + + public static final Material ZIMBABWEITE = new Material( + "Zimbabweite", //Material Name + MaterialState.ORE, //State + new short[]{193, 187, 131, 0}, //Material Colour + 0, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().SODIUM, 2), + new MaterialStack(ELEMENT.getInstance().POTASSIUM, 2), + new MaterialStack(ELEMENT.getInstance().LEAD, 1), + new MaterialStack(ELEMENT.getInstance().ARSENIC, 4), + new MaterialStack(ELEMENT.getInstance().NIOBIUM, 4), + new MaterialStack(ELEMENT.getInstance().TANTALUM, 4), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 4), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 18) + }); + + public static final Material TITANITE = new Material( + "Titanite", //Material Name + MaterialState.ORE, //State + new short[]{184, 198, 105, 0}, //Material Colour + 0, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CALCIUM, 2), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 2), + new MaterialStack(ELEMENT.getInstance().SILICON, 2), + new MaterialStack(ELEMENT.getInstance().THORIUM, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 10) + }); + + public static final Material ZIRCONILITE = new Material( + "Zirconolite", //Material Name + MaterialState.ORE, //State + new short[]{45, 26, 0, 0}, //Material Colour + 0, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().CALCIUM, 2), + new MaterialStack(ELEMENT.getInstance().ZIRCONIUM, 2), + new MaterialStack(ELEMENT.getInstance().TITANIUM, 4), + new MaterialStack(ELEMENT.getInstance().CERIUM, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 14) + }); + + public static final Material CROCROITE = new Material( + "Crocoite", //Material Name + MaterialState.ORE, //State + new short[]{255, 143, 84, 0}, //Material Colour + 0, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().LEAD, 1), + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 1), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 4) + }); + + public static final Material NICHROMITE = new Material( + "Nichromite", //Material Name + MaterialState.ORE, //State + new short[]{22, 19, 19, 0}, //Material Colour + 0, //Radiation + new MaterialStack[]{ + new MaterialStack(ELEMENT.getInstance().NICKEL, 1), + new MaterialStack(ELEMENT.getInstance().COBALT, 1), + new MaterialStack(ELEMENT.getInstance().IRON, 3), + new MaterialStack(ELEMENT.getInstance().ALUMINIUM, 2), + new MaterialStack(ELEMENT.getInstance().CHROMIUM, 2), + new MaterialStack(ELEMENT.getInstance().OXYGEN, 8) + }); +} diff --git a/src/Java/gtPlusPlus/core/material/state/MaterialState.java b/src/Java/gtPlusPlus/core/material/state/MaterialState.java index 88447395db..284e9582f1 100644 --- a/src/Java/gtPlusPlus/core/material/state/MaterialState.java +++ b/src/Java/gtPlusPlus/core/material/state/MaterialState.java @@ -5,7 +5,8 @@ public enum MaterialState { LIQUID(1), GAS(2), PLASMA(3), - PURE_LIQUID(4); + PURE_LIQUID(4), + ORE(5); private int STATE; private MaterialState (final int State){ this.STATE = State; diff --git a/src/Java/gtPlusPlus/core/util/array/Quad.java b/src/Java/gtPlusPlus/core/util/array/Quad.java new file mode 100644 index 0000000000..417c3b6ebc --- /dev/null +++ b/src/Java/gtPlusPlus/core/util/array/Quad.java @@ -0,0 +1,33 @@ +package gtPlusPlus.core.util.array; + +public class Quad<K,V,C,R> { + + private final K key; + private final V value; + private final C value2; + private final R value3; + + public Quad(final K key, final V value, final C value2, final R value3){ + this.key = key; + this.value = value; + this.value2 = value2; + this.value3 = value3; + } + + final public K getKey(){ + return this.key; + } + + final public V getValue_1(){ + return this.value; + } + + final public C getValue_2(){ + return this.value2; + } + + final public R getValue_3(){ + return this.value3; + } + +}
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java b/src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java index e6425ca4cb..0dc84b8aa3 100644 --- a/src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java +++ b/src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java @@ -5,9 +5,11 @@ import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.Ev import java.util.Random; -import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.world.darkworld.gen.WorldGenDeadLilly; import gtPlusPlus.core.world.darkworld.gen.WorldGenMinable_Custom; +import net.minecraft.block.BlockFlower; +import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeDecorator; @@ -17,429 +19,406 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.terraingen.*; public class BiomeGenerator_Custom extends BiomeDecorator { - /** The world the BiomeDecorator is currently decorating */ - public World currentWorld; - /** The Biome Decorator's random number generator. */ - public Random randomGenerator; - /** The X-coordinate of the chunk currently being decorated */ - public int chunk_X; - /** The Z-coordinate of the chunk currently being decorated */ - public int chunk_Z; - /** The clay generator. */ - public WorldGenerator clayGen = new WorldGenClay(4); - /** The sand generator. */ - public WorldGenerator sandGen; - /** The gravel generator. */ - public WorldGenerator gravelAsSandGen; - /** The dirt generator. */ - public WorldGenerator dirtGen; - public WorldGenerator gravelGen; - public WorldGenerator coalGen; - public WorldGenerator ironGen; - /** Field that holds gold WorldGenMinable */ - public WorldGenerator goldGen; - /** Field that holds redstone WorldGenMinable */ - public WorldGenerator redstoneGen; - /** Field that holds diamond WorldGenMinable */ - public WorldGenerator diamondGen; - /** Field that holds Lapis WorldGenMinable */ - public WorldGenerator lapisGen; - public WorldGenFlowers yellowFlowerGen; - /** Field that holds mushroomBrown WorldGenFlowers */ - public WorldGenerator mushroomBrownGen; - /** Field that holds mushroomRed WorldGenFlowers */ - public WorldGenerator mushroomRedGen; - /** Field that holds big mushroom generator */ - public WorldGenerator bigMushroomGen; - /** Field that holds WorldGenReed */ - public WorldGenerator reedGen; - /** Field that holds WorldGenCactus */ - public WorldGenerator cactusGen; - /** The water lily generation! */ - public WorldGenerator waterlilyGen; - /** Amount of waterlilys per chunk. */ - public int waterlilyPerChunk; - /** The number of trees to attempt to generate per chunk. Up to 10 in forests, none in deserts. */ - public int treesPerChunk; - /** - * The number of yellow flower patches to generate per chunk. The game generates much less than this number, since - * it attempts to generate them at a random altitude. - */ - public int flowersPerChunk; - /** The amount of tall grass to generate per chunk. */ - public int grassPerChunk; - /** The number of dead bushes to generate per chunk. Used in deserts and swamps. */ - public int deadBushPerChunk; - /** - * The number of extra mushroom patches per chunk. It generates 1/4 this number in brown mushroom patches, and 1/8 - * this number in red mushroom patches. These mushrooms go beyond the default base number of mushrooms. - */ - public int mushroomsPerChunk; - /** The number of reeds to generate per chunk. Reeds won't generate if the randomly selected placement is unsuitable. */ - public int reedsPerChunk; - /** The number of cactus plants to generate per chunk. Cacti only work on sand. */ - public int cactiPerChunk; - /** The number of sand patches to generate per chunk. Sand patches only generate when part of it is underwater. */ - public int sandPerChunk; - /** - * The number of sand patches to generate per chunk. Sand patches only generate when part of it is underwater. There - * appear to be two separate fields for this. - */ - public int sandPerChunk2; - /** The number of clay patches to generate per chunk. Only generates when part of it is underwater. */ - public int clayPerChunk; - /** Amount of big mushrooms per chunk */ - public int bigMushroomsPerChunk; - /** True if decorator should generate surface lava & water */ - public boolean generateLakes; - - public WorldGenerator fluoriteGen; - - public BiomeGenerator_Custom(){ - //Basic Blocks - this.sandGen = new WorldGenMinable(Blocks.sand, 12); - this.gravelAsSandGen = new WorldGenMinable(Blocks.gravel, 8); - this.dirtGen = new WorldGenMinable(Blocks.dirt, 32); - this.gravelGen = new WorldGenMinable(Blocks.gravel, 12); - - - //Oregen - this.coalGen = new WorldGenMinable_Custom(Blocks.coal_ore, 32); - this.ironGen = new WorldGenMinable_Custom(Blocks.iron_ore, 16); - this.goldGen = new WorldGenMinable_Custom(Blocks.gold_ore, 16); - this.redstoneGen = new WorldGenMinable_Custom(Blocks.redstone_ore, 16); - this.diamondGen = new WorldGenMinable_Custom(Blocks.diamond_ore, 24); - this.lapisGen = new WorldGenMinable_Custom(Blocks.lapis_ore, 24); - this.fluoriteGen = new WorldGenMinable_Custom(ModBlocks.blockOreFluorite, 24); - -/* //Nature - this.yellowFlowerGen = new WorldGenFlowers(Blocks.yellow_flower); - this.mushroomBrownGen = new WorldGenFlowers(Blocks.brown_mushroom); - this.mushroomRedGen = new WorldGenFlowers(Blocks.red_mushroom); - this.bigMushroomGen = new WorldGenBigMushroom(); - this.reedGen = new WorldGenReed(); - this.cactusGen = new WorldGenCactus(); - this.waterlilyGen = new WorldGenDeadLilly(); -*/ - - this.grassPerChunk = 1; - this.sandPerChunk = 6; - this.sandPerChunk2 = 8; - this.clayPerChunk = 4; - this.treesPerChunk = 12; - - this.generateLakes = true; - } - - @Override + /** The world the BiomeDecorator is currently decorating */ + public World currentWorld; + /** The Biome Decorator's random number generator. */ + public Random randomGenerator; + /** The X-coordinate of the chunk currently being decorated */ + public int chunk_X; + /** The Z-coordinate of the chunk currently being decorated */ + public int chunk_Z; + /** The clay generator. */ + public WorldGenerator clayGen = new WorldGenClay(4); + /** The sand generator. */ + public WorldGenerator sandGen; + /** The gravel generator. */ + public WorldGenerator gravelAsSandGen; + /** The dirt generator. */ + public WorldGenerator dirtGen; + public WorldGenerator gravelGen; + public WorldGenerator coalGen; + public WorldGenerator ironGen; + /** Field that holds gold WorldGenMinable */ + public WorldGenerator goldGen; + /** Field that holds redstone WorldGenMinable */ + public WorldGenerator redstoneGen; + /** Field that holds diamond WorldGenMinable */ + public WorldGenerator diamondGen; + /** Field that holds Lapis WorldGenMinable */ + public WorldGenerator lapisGen; + public WorldGenFlowers yellowFlowerGen; + /** Field that holds mushroomBrown WorldGenFlowers */ + public WorldGenerator mushroomBrownGen; + /** Field that holds mushroomRed WorldGenFlowers */ + public WorldGenerator mushroomRedGen; + /** Field that holds big mushroom generator */ + public WorldGenerator bigMushroomGen; + /** Field that holds WorldGenReed */ + public WorldGenerator reedGen; + /** Field that holds WorldGenCactus */ + public WorldGenerator cactusGen; + /** The water lily generation! */ + public WorldGenerator waterlilyGen; + /** Amount of waterlilys per chunk. */ + public int waterlilyPerChunk; + /** The number of trees to attempt to generate per chunk. Up to 10 in forests, none in deserts. */ + public int treesPerChunk; + /** + * The number of yellow flower patches to generate per chunk. The game generates much less than this number, since + * it attempts to generate them at a random altitude. + */ + public int flowersPerChunk; + /** The amount of tall grass to generate per chunk. */ + public int grassPerChunk; + /** The number of dead bushes to generate per chunk. Used in deserts and swamps. */ + public int deadBushPerChunk; + /** + * The number of extra mushroom patches per chunk. It generates 1/4 this number in brown mushroom patches, and 1/8 + * this number in red mushroom patches. These mushrooms go beyond the default base number of mushrooms. + */ + public int mushroomsPerChunk; + /** The number of reeds to generate per chunk. Reeds won't generate if the randomly selected placement is unsuitable. */ + public int reedsPerChunk; + /** The number of cactus plants to generate per chunk. Cacti only work on sand. */ + public int cactiPerChunk; + /** The number of sand patches to generate per chunk. Sand patches only generate when part of it is underwater. */ + public int sandPerChunk; + /** + * The number of sand patches to generate per chunk. Sand patches only generate when part of it is underwater. There + * appear to be two separate fields for this. + */ + public int sandPerChunk2; + /** The number of clay patches to generate per chunk. Only generates when part of it is underwater. */ + public int clayPerChunk; + /** Amount of big mushrooms per chunk */ + public int bigMushroomsPerChunk; + /** True if decorator should generate surface lava & water */ + public boolean generateLakes; + + public WorldGenerator fluoriteGen; + + public BiomeGenerator_Custom(){ + //Basic Blocks + this.sandGen = new WorldGenMinable_Custom(Blocks.sand, 12); + this.gravelAsSandGen = new WorldGenMinable_Custom(Blocks.gravel, 8); + this.dirtGen = new WorldGenMinable_Custom(Blocks.dirt, 32); + this.gravelGen = new WorldGenMinable_Custom(Blocks.gravel, 12); + + + //Oregen + this.coalGen = new WorldGenMinable_Custom(Blocks.coal_ore, 16); + this.ironGen = new WorldGenMinable_Custom(Blocks.iron_ore, 12); + this.goldGen = new WorldGenMinable_Custom(Blocks.gold_ore, 12); + this.redstoneGen = new WorldGenMinable_Custom(Blocks.redstone_ore, 10); + this.diamondGen = new WorldGenMinable_Custom(Blocks.diamond_ore, 12); + this.lapisGen = new WorldGenMinable_Custom(Blocks.lapis_ore, 8); + this.fluoriteGen = new WorldGenMinable_Custom(ModBlocks.blockOreFluorite, 20); + + //Nature + this.yellowFlowerGen = new WorldGenFlowers(Blocks.yellow_flower); + this.mushroomBrownGen = new WorldGenFlowers(Blocks.brown_mushroom); + this.mushroomRedGen = new WorldGenFlowers(Blocks.red_mushroom); + this.bigMushroomGen = new WorldGenBigMushroom(); + this.reedGen = new WorldGenReed(); + this.cactusGen = new WorldGenCactus(); + this.waterlilyGen = new WorldGenDeadLilly(); + + this.flowersPerChunk = 1; + this.grassPerChunk = 5; + this.sandPerChunk = 3; + this.sandPerChunk2 = 5; + this.clayPerChunk = 7; + + this.generateLakes = true; + } + + @Override public void decorateChunk(World p_150512_1_, Random p_150512_2_, BiomeGenBase p_150512_3_, int p_150512_4_, int p_150512_5_) - { - Logger.WORLD("Trying to decorate world, using BBS randomization."); - if (this.currentWorld != null) - { - //throw new RuntimeException("Already decorating!!"); - } - else - { - this.currentWorld = p_150512_1_; - //this.randomGenerator = CSPRNG.generate(); - this.randomGenerator = p_150512_2_; - this.chunk_X = p_150512_4_; - this.chunk_Z = p_150512_5_; - this.genDecorations(p_150512_3_); - this.currentWorld = null; - this.randomGenerator = null; - } - } - - @Override + { + if (this.currentWorld != null) + { + throw new RuntimeException("Already decorating!!"); + } + else + { + this.currentWorld = p_150512_1_; + this.randomGenerator = p_150512_2_; + this.chunk_X = p_150512_4_; + this.chunk_Z = p_150512_5_; + this.genDecorations(p_150512_3_); + this.currentWorld = null; + this.randomGenerator = null; + } + } + + @Override protected void genDecorations(BiomeGenBase p_150513_1_) - { - MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); - this.generateOres(); - Logger.WORLD("Just Tried to generate ores."); - int i; - int j; - int k; - - boolean doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND); - for (i = 0; doGen && i < this.sandPerChunk2; ++i) - { - Logger.WORLD("Sand generation."); - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.sandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CLAY); - for (i = 0; doGen && i < this.clayPerChunk; ++i) - { - Logger.WORLD("Clay generation."); - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.clayGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); - } - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND_PASS2); - for (i = 0; doGen && i < this.sandPerChunk; ++i) - { - Logger.WORLD("Sand generation 2."); - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.gravelAsSandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); - } - - i = this.treesPerChunk; - - if (this.randomGenerator.nextInt(10) == 0) - { - ++i; - } - - int l; - int i1; - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, TREE); - for (j = 0; doGen && j < i; ++j) - { - Logger.WORLD("Tree generation."); - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.currentWorld.getHeightValue(k, l); - WorldGenAbstractTree worldgenabstracttree = p_150513_1_.func_150567_a(this.randomGenerator); - worldgenabstracttree.setScale(1.0D, 1.0D, 1.0D); - - if (worldgenabstracttree.generate(this.currentWorld, this.randomGenerator, k, i1, l)) - { - worldgenabstracttree.func_150524_b(this.currentWorld, this.randomGenerator, k, i1, l); - } - } - - /*doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, BIG_SHROOM); - for (j = 0; doGen && j < this.bigMushroomsPerChunk; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - this.bigMushroomGen.generate(this.currentWorld, this.randomGenerator, k, this.currentWorld.getHeightValue(k, l), l); - }*/ - - /*doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, FLOWERS); - for (j = 0; doGen && j < this.flowersPerChunk; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) + 32); - String s = p_150513_1_.func_150572_a(this.randomGenerator, k, i1, l); - BlockFlower blockflower = BlockFlower.func_149857_e(s); - - if (blockflower.getMaterial() != Material.air) - { - this.yellowFlowerGen.func_150550_a(blockflower, BlockFlower.func_149856_f(s)); - this.yellowFlowerGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - }*/ - - /* doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, GRASS); + { + MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); + this.generateOres(); + int i; + int j; + int k; + + boolean doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND); + for (i = 0; doGen && i < this.sandPerChunk2; ++i) + { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.sandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CLAY); + for (i = 0; doGen && i < this.clayPerChunk; ++i) + { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.clayGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SAND_PASS2); + for (i = 0; doGen && i < this.sandPerChunk; ++i) + { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.gravelAsSandGen.generate(this.currentWorld, this.randomGenerator, j, this.currentWorld.getTopSolidOrLiquidBlock(j, k), k); + } + + i = this.treesPerChunk; + + if (this.randomGenerator.nextInt(10) == 0) + { + ++i; + } + + int l; + int i1; + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, TREE); + for (j = 0; doGen && j < i; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = this.currentWorld.getHeightValue(k, l); + WorldGenAbstractTree worldgenabstracttree = p_150513_1_.func_150567_a(this.randomGenerator); + worldgenabstracttree.setScale(1.0D, 1.0D, 1.0D); + + if (worldgenabstracttree.generate(this.currentWorld, this.randomGenerator, k, i1, l)) + { + worldgenabstracttree.func_150524_b(this.currentWorld, this.randomGenerator, k, i1, l); + } + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, BIG_SHROOM); + for (j = 0; doGen && j < this.bigMushroomsPerChunk; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + this.bigMushroomGen.generate(this.currentWorld, this.randomGenerator, k, this.currentWorld.getHeightValue(k, l), l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, FLOWERS); + for (j = 0; doGen && j < this.flowersPerChunk; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) + 32); + String s = p_150513_1_.func_150572_a(this.randomGenerator, k, i1, l); + BlockFlower blockflower = BlockFlower.func_149857_e(s); + + if (blockflower.getMaterial() != Material.air) + { + this.yellowFlowerGen.func_150550_a(blockflower, BlockFlower.func_149856_f(s)); + this.yellowFlowerGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, GRASS); for (j = 0; doGen && j < this.grassPerChunk; ++j) { - Logger.WORLD("Grass generation."); k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); WorldGenerator worldgenerator = p_150513_1_.getRandomWorldGenForGrass(this.randomGenerator); worldgenerator.generate(this.currentWorld, this.randomGenerator, k, i1, l); - }*/ - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, DEAD_BUSH); - for (j = 0; doGen && j < this.deadBushPerChunk; ++j) - { - Logger.WORLD("Dead Bush generation."); - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - (new WorldGenDeadBush(Blocks.deadbush)).generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - /*doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LILYPAD); - for (j = 0; doGen && j < this.waterlilyPerChunk; ++j) - { - Logger.WORLD("WaterLilly generation."); - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - - for (i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); i1 > 0 && this.currentWorld.isAirBlock(k, i1 - 1, l); --i1) - { - ; - } - - this.waterlilyGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - }*/ - - /*doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SHROOM); - for (j = 0; doGen && j < this.mushroomsPerChunk; ++j) - { - if (this.randomGenerator.nextInt(4) == 0) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = this.currentWorld.getHeightValue(k, l); - this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - if (this.randomGenerator.nextInt(8) == 0) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - }*/ - - /*if (doGen && this.randomGenerator.nextInt(4) == 0) - { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); - this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, j, l, k); - } - - if (doGen && this.randomGenerator.nextInt(8) == 0) - { - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); - this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, j, l, k); - }*/ - - /*doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, REED); - for (j = 0; doGen && j < this.reedsPerChunk; ++j) - { - Logger.WORLD("Reed generation."); - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - } - - for (j = 0; doGen && j < 10; ++j) - { - Logger.WORLD("Reed generation 2."); - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - }*/ - - /*doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, PUMPKIN); - if (doGen && this.randomGenerator.nextInt(32) == 0) - { - Logger.WORLD("Pumpkin generation."); - j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); - (new WorldGenPumpkin()).generate(this.currentWorld, this.randomGenerator, j, l, k); - } -*/ - /*doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CACTUS); - for (j = 0; doGen && j < this.cactiPerChunk; ++j) - { - Logger.WORLD("Cactus generation."); - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); - this.cactusGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); - }*/ - - doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LAKE); - if (doGen && this.generateLakes) - { - Logger.WORLD("Lake generation."); - for (j = 0; j < 50; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(248) + 8); - i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - (new WorldGenLiquids(Blocks.flowing_water)).generate(this.currentWorld, this.randomGenerator, k, l, i1); - } - - for (j = 0; j < 20; ++j) - { - k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; - l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(this.randomGenerator.nextInt(240) + 8) + 8); - i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - (new WorldGenLiquids(Blocks.flowing_lava)).generate(this.currentWorld, this.randomGenerator, k, l, i1); - } - } - - MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); - } + } - /** - * Standard ore generation helper. Generates most ores. - */ - @Override - protected void genStandardOre1(int passes, WorldGenerator p_76795_2_, int p_76795_3_, int p_76795_4_) - { - for (int l = 0; l < passes; ++l) - { - int i1 = this.chunk_X + this.randomGenerator.nextInt(16); - int j1 = this.randomGenerator.nextInt(p_76795_4_ - p_76795_3_) + p_76795_3_; - int k1 = this.chunk_Z + this.randomGenerator.nextInt(16); - p_76795_2_.generate(this.currentWorld, this.randomGenerator, i1, j1, k1); - } - } + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, DEAD_BUSH); + for (j = 0; doGen && j < this.deadBushPerChunk; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + (new WorldGenDeadBush(Blocks.deadbush)).generate(this.currentWorld, this.randomGenerator, k, i1, l); + } - /** - * Standard ore generation helper. Generates Lapis Lazuli. - */ - @Override - protected void genStandardOre2(int p_76793_1_, WorldGenerator p_76793_2_, int p_76793_3_, int p_76793_4_) - { - for (int l = 0; l < p_76793_1_; ++l) - { - int i1 = this.chunk_X + this.randomGenerator.nextInt(16); - int j1 = this.randomGenerator.nextInt(p_76793_4_) + this.randomGenerator.nextInt(p_76793_4_) + (p_76793_3_ - p_76793_4_); - int k1 = this.chunk_Z + this.randomGenerator.nextInt(16); - p_76793_2_.generate(this.currentWorld, this.randomGenerator, i1, j1, k1); - } - } + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LILYPAD); + for (j = 0; doGen && j < this.waterlilyPerChunk; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; - /** - * Generates ores in the current chunk - */ - @Override - protected void generateOres() - { - MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); - if (TerrainGen.generateOre(currentWorld, randomGenerator, dirtGen, chunk_X, chunk_Z, DIRT)) - this.genStandardOre1(20, this.dirtGen, 0, 256); - if (TerrainGen.generateOre(currentWorld, randomGenerator, gravelGen, chunk_X, chunk_Z, GRAVEL)) - this.genStandardOre1(10, this.gravelGen, 0, 256); - if (TerrainGen.generateOre(currentWorld, randomGenerator, coalGen, chunk_X, chunk_Z, COAL)) - this.genStandardOre1(20, this.coalGen, 0, 128); - if (TerrainGen.generateOre(currentWorld, randomGenerator, ironGen, chunk_X, chunk_Z, IRON)) - this.genStandardOre1(20, this.ironGen, 0, 64); - if (TerrainGen.generateOre(currentWorld, randomGenerator, goldGen, chunk_X, chunk_Z, GOLD)) - this.genStandardOre1(2, this.goldGen, 0, 32); - if (TerrainGen.generateOre(currentWorld, randomGenerator, redstoneGen, chunk_X, chunk_Z, REDSTONE)) - this.genStandardOre1(8, this.redstoneGen, 0, 16); - if (TerrainGen.generateOre(currentWorld, randomGenerator, diamondGen, chunk_X, chunk_Z, DIAMOND)) - this.genStandardOre1(1, this.diamondGen, 0, 16); - if (TerrainGen.generateOre(currentWorld, randomGenerator, lapisGen, chunk_X, chunk_Z, LAPIS)) - this.genStandardOre2(1, this.lapisGen, 16, 16); - - //Try generate Fluorite - /*if (TerrainGen.generateOre(currentWorld, randomGenerator, fluoriteGen, chunk_X, chunk_Z, net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.CUSTOM)) - this.genStandardOre1(16, this.fluoriteGen, 0, 128); - if (TerrainGen.generateOre(currentWorld, randomGenerator, fluoriteGen, chunk_X, chunk_Z, net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.CUSTOM)) - this.genStandardOre2(16, this.fluoriteGen, 16, 48);*/ - - MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); - } + for (i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); i1 > 0 && this.currentWorld.isAirBlock(k, i1 - 1, l); --i1) + { + ; + } + + this.waterlilyGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, SHROOM); + for (j = 0; doGen && j < this.mushroomsPerChunk; ++j) + { + if (this.randomGenerator.nextInt(4) == 0) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = this.currentWorld.getHeightValue(k, l); + this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + if (this.randomGenerator.nextInt(8) == 0) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + } + + if (doGen && this.randomGenerator.nextInt(4) == 0) + { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); + this.mushroomBrownGen.generate(this.currentWorld, this.randomGenerator, j, l, k); + } + + if (doGen && this.randomGenerator.nextInt(8) == 0) + { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); + this.mushroomRedGen.generate(this.currentWorld, this.randomGenerator, j, l, k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, REED); + for (j = 0; doGen && j < this.reedsPerChunk; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } - private int nextInt(int i) { - if (i <= 1) - return 0; - return this.randomGenerator.nextInt(i); + for (j = 0; doGen && j < 10; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.reedGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, PUMPKIN); + if (doGen && this.randomGenerator.nextInt(32) == 0) + { + j = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + k = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + l = nextInt(this.currentWorld.getHeightValue(j, k) * 2); + (new WorldGenPumpkin()).generate(this.currentWorld, this.randomGenerator, j, l, k); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, CACTUS); + for (j = 0; doGen && j < this.cactiPerChunk; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + i1 = nextInt(this.currentWorld.getHeightValue(k, l) * 2); + this.cactusGen.generate(this.currentWorld, this.randomGenerator, k, i1, l); + } + + doGen = TerrainGen.decorate(currentWorld, randomGenerator, chunk_X, chunk_Z, LAKE); + if (doGen && this.generateLakes) + { + for (j = 0; j < 50; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(248) + 8); + i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + (new WorldGenLiquids(Blocks.flowing_water)).generate(this.currentWorld, this.randomGenerator, k, l, i1); + } + + for (j = 0; j < 20; ++j) + { + k = this.chunk_X + this.randomGenerator.nextInt(16) + 8; + l = this.randomGenerator.nextInt(this.randomGenerator.nextInt(this.randomGenerator.nextInt(240) + 8) + 8); + i1 = this.chunk_Z + this.randomGenerator.nextInt(16) + 8; + (new WorldGenLiquids(Blocks.flowing_lava)).generate(this.currentWorld, this.randomGenerator, k, l, i1); + } + } + + MinecraftForge.EVENT_BUS.post(new DecorateBiomeEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); + } + + /** + * Standard ore generation helper. Generates most ores. + */ + @Override + protected void genStandardOre1(int p_76795_1_, WorldGenerator p_76795_2_, int p_76795_3_, int p_76795_4_) + { + for (int l = 0; l < p_76795_1_; ++l) + { + int i1 = this.chunk_X + this.randomGenerator.nextInt(16); + int j1 = this.randomGenerator.nextInt(p_76795_4_ - p_76795_3_) + p_76795_3_; + int k1 = this.chunk_Z + this.randomGenerator.nextInt(16); + p_76795_2_.generate(this.currentWorld, this.randomGenerator, i1, j1, k1); + } + } + + /** + * Standard ore generation helper. Generates Lapis Lazuli. + */ + @Override + protected void genStandardOre2(int p_76793_1_, WorldGenerator p_76793_2_, int p_76793_3_, int p_76793_4_) + { + for (int l = 0; l < p_76793_1_; ++l) + { + int i1 = this.chunk_X + this.randomGenerator.nextInt(16); + int j1 = this.randomGenerator.nextInt(p_76793_4_) + this.randomGenerator.nextInt(p_76793_4_) + (p_76793_3_ - p_76793_4_); + int k1 = this.chunk_Z + this.randomGenerator.nextInt(16); + p_76793_2_.generate(this.currentWorld, this.randomGenerator, i1, j1, k1); + } + } + + /** + * Generates ores in the current chunk + */ + @Override + protected void generateOres() + { + MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Pre(currentWorld, randomGenerator, chunk_X, chunk_Z)); + if (TerrainGen.generateOre(currentWorld, randomGenerator, dirtGen, chunk_X, chunk_Z, DIRT)) + this.genStandardOre1(20, this.dirtGen, 0, 256); + if (TerrainGen.generateOre(currentWorld, randomGenerator, gravelGen, chunk_X, chunk_Z, GRAVEL)) + this.genStandardOre1(10, this.gravelGen, 0, 256); + if (TerrainGen.generateOre(currentWorld, randomGenerator, coalGen, chunk_X, chunk_Z, COAL)) + this.genStandardOre1(20, this.coalGen, 0, 128); + if (TerrainGen.generateOre(currentWorld, randomGenerator, ironGen, chunk_X, chunk_Z, IRON)) + this.genStandardOre1(20, this.ironGen, 0, 64); + if (TerrainGen.generateOre(currentWorld, randomGenerator, goldGen, chunk_X, chunk_Z, GOLD)) + this.genStandardOre1(2, this.goldGen, 0, 32); + if (TerrainGen.generateOre(currentWorld, randomGenerator, redstoneGen, chunk_X, chunk_Z, REDSTONE)) + this.genStandardOre1(8, this.redstoneGen, 0, 16); + if (TerrainGen.generateOre(currentWorld, randomGenerator, diamondGen, chunk_X, chunk_Z, DIAMOND)) + this.genStandardOre1(1, this.diamondGen, 0, 16); + if (TerrainGen.generateOre(currentWorld, randomGenerator, lapisGen, chunk_X, chunk_Z, LAPIS)) + this.genStandardOre2(1, this.lapisGen, 16, 16); + MinecraftForge.ORE_GEN_BUS.post(new OreGenEvent.Post(currentWorld, randomGenerator, chunk_X, chunk_Z)); + } + + private int nextInt(int i) { + if (i <= 1) + return 0; + return this.randomGenerator.nextInt(i); } }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Base.java b/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Base.java index 3685c5d96a..f04609dc6f 100644 --- a/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Base.java +++ b/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Base.java @@ -112,7 +112,7 @@ public class WorldGen_GT_Base implements IWorldGenerator{ private void generateDarkWorld(Random aRandom, int aX, int aZ, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider){ synchronized (listLock) { - WorldGen_GT_Base.mList.add(new WorldGenContainer(CSPRNG.generate(Math.abs(aRandom.nextInt()) +1), aX, aZ, ((aChunkGenerator instanceof ChunkProviderEnd)) || (aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8) == BiomeGenBase.sky) ? 1 : ((aChunkGenerator instanceof ChunkProviderHell)) || (aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8) == BiomeGenBase.hell) ? -1 : 0, aWorld, aChunkGenerator, aChunkProvider, aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName)); + WorldGen_GT_Base.mList.add(new WorldGenContainer(new XSTR(Math.abs(aRandom.nextInt()) +1), aX, aZ, ((aChunkGenerator instanceof ChunkProviderEnd)) || (aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8) == BiomeGenBase.sky) ? 1 : ((aChunkGenerator instanceof ChunkProviderHell)) || (aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8) == BiomeGenBase.hell) ? -1 : 0, aWorld, aChunkGenerator, aChunkProvider, aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName)); if (debugWorldGen) GT_Log.out.println( "ADD WorldSeed:"+aWorld.getSeed() + " DimId" + aWorld.provider.dimensionId + @@ -192,7 +192,7 @@ public class WorldGen_GT_Base implements IWorldGenerator{ this.mZ = z; } }; - public static ArrayList<NearbySeeds> seedList = new ArrayList(); + public static ArrayList<NearbySeeds> seedList = new ArrayList<NearbySeeds>(); // aX and aZ are now the by-chunk X and Z for the chunk of interest public WorldGenContainer(Random aRandom, int aX, int aZ, int aDimensionType, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider, String aBiome) { @@ -229,7 +229,7 @@ public class WorldGen_GT_Base implements IWorldGenerator{ ); // Search for a valid orevein for this dimension - if( !validOreveins.containsKey(oreveinSeed) ) { + if(validOreveins.size() > 0 && !validOreveins.containsKey(oreveinSeed) ) { if ( (oreveinPercentageRoll<oreveinPercentage) && (WorldGen_GT_Ore_Layer.sWeight > 0) && (WorldGen_GT_Ore_Layer.sList.size() > 0)) { int placementAttempts = 0; boolean oreveinFound = false; diff --git a/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_Ores.java b/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_Ores.java new file mode 100644 index 0000000000..76ccfdcc80 --- /dev/null +++ b/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_Ores.java @@ -0,0 +1,53 @@ +package gtPlusPlus.core.world.darkworld.gen.gt; + +import gtPlusPlus.core.util.array.Pair; +import gtPlusPlus.core.world.darkworld.object.BoxedQuad; +import net.minecraft.block.Block; + +public class WorldGen_Ores { + + /** + * Set Ore Types on by one. + */ + + public static volatile Pair<Block, Integer> Geikielite; // MgTiO3 + public static volatile Pair<Block, Integer> Zimbabweite; // (Na,K)2PbAs4(Nb,Ta,Ti)4O18 + public static volatile Pair<Block, Integer> Titanite; // CaTiSiO5 + public static volatile Pair<Block, Integer> Zirconolite; // CaZrTi2O7 + public static volatile Pair<Block, Integer> Crocoite; // PbCrO4 + public static volatile Pair<Block, Integer> Nichromite; // (Ni,Co,Fe)(Cr,Fe,Al)2O4 + public static volatile Pair<Block, Integer> Yttriaite; // Y2O3 + public static volatile Pair<Block, Integer> Samarskite_Y; // (YFe3+Fe2+U,Th,Ca)2(Nb,Ta)2O8 + public static volatile Pair<Block, Integer> Samarskite_Yb; // (YbFe3+)2(Nb,Ta)2O8 + public static volatile Pair<Block, Integer> Zircon; // ZrSiO4 + public static volatile Pair<Block, Integer> Gadolinite_Ce; // (Ce2,La,Nd,Y)2FeBe2Si1O14 + public static volatile Pair<Block, Integer> Gadolinite_Y; // (Ce,La,Nd,Y2)2FeBe2Si4O9 + public static volatile Pair<Block, Integer> Lepersonnite; // Ca(Gd,Dy)2(UO2)24(SiO4)4(CO3)8(OH)24·48H2O + public static volatile Pair<Block, Integer> Xenotime; // YPO4 + public static volatile Pair<Block, Integer> Yttrialite; // Y2Th2Si2O7 + public static volatile Pair<Block, Integer> Yttrocerite; // CaF5YCe + public static volatile Pair<Block, Integer> Polycrase; // YCaCeUThTi2Nb2Ta2O6 + public static volatile Pair<Block, Integer> Zircophyllite; // (K,Na)3(Mn,Fe)7(Zr,Ti,Nb)2Si8O24(OH,F)7 + public static volatile Pair<Block, Integer> Zirkelite; // (Ca,Th,Ce)Zr(Ti,Nb)2O7 + public static volatile Pair<Block, Integer> Lanthanite_La; // (La)2(CO3)3·8(H2O). + public static volatile Pair<Block, Integer> Lanthanite_Ce; // (Ce)2(CO3)3·8(H2O). + public static volatile Pair<Block, Integer> Lanthanite_Nd; // (Nd)2(CO3)3·8(H2O). + public static volatile Pair<Block, Integer> Hibonite; // ((Ca,Ce)(Al,Ti,Mg)12O19) + public static volatile Pair<Block, Integer> Cerite; // (Ce,La,Ca)9(Mg,Fe+3)(SiO4)6(SiO3OH)(OH)3 + public static volatile Pair<Block, Integer> Agardite_Y; // (YCa)Cu5(As2O4)3(OH)6·3H2O + public static volatile Pair<Block, Integer> Agardite_Cd; // (CdCa)Cu7(AsO2)4(O2H)5·3H2O + public static volatile Pair<Block, Integer> Agardite_La; // (LaCa)Cu5(AsO6)2(OH)4·3H2O + public static volatile Pair<Block, Integer> Agardite_Nd; // (NdCa)Cu6(As3O3)2(O2H)6·3H2O + public static volatile Pair<Block, Integer> Fluorcaphite; // (Ca,Sr,Ce,Na)5(PO4)3F + public static volatile Pair<Block, Integer> Florencite; // SmAl3(PO4)2(OH)6 + public static volatile Pair<Block, Integer> Cryolite; // Na3AlF6 + //public static volatile Pair<Block, Integer> Pyroxene; // + + + + + + public static volatile BoxedQuad<Integer, Integer, Integer, Integer> OreVein1 = new BoxedQuad(null, null, null, null); + + +} diff --git a/src/Java/gtPlusPlus/core/world/darkworld/object/BoxedQuad.java b/src/Java/gtPlusPlus/core/world/darkworld/object/BoxedQuad.java new file mode 100644 index 0000000000..d3c400896b --- /dev/null +++ b/src/Java/gtPlusPlus/core/world/darkworld/object/BoxedQuad.java @@ -0,0 +1,55 @@ +package gtPlusPlus.core.world.darkworld.object; + +import gtPlusPlus.core.util.array.Pair; +import net.minecraft.block.Block; + +public class BoxedQuad<K,V,C,R> { + + private final Pair<Block, Integer> key; + private final Pair<Block, Integer> value; + private final Pair<Block, Integer> value2; + private final Pair<Block, Integer> value3; + private final Pair<Block, Integer> [] mInternalPairArray; + + + public BoxedQuad(final Pair<Block, Integer> key, final Pair<Block, Integer> value, final Pair<Block, Integer> value2, final Pair<Block, Integer> value3){ + this.key = key; + this.value = value; + this.value2 = value2; + this.value3 = value3; + mInternalPairArray = new Pair[]{key, value, value2, value3}; + } + + final public Pair<Block, Integer> getKey(){ + return this.key; + } + + final public Pair<Block, Integer> getValue_1(){ + return this.value; + } + + final public Pair<Block, Integer> getValue_2(){ + return this.value2; + } + + final public Pair<Block, Integer> getValue_3(){ + return this.value3; + } + + final synchronized Pair<Block, Integer> unbox(int pos){ + return this.mInternalPairArray[pos]; + } + + final synchronized Block getBlock(int pos){ + return this.mInternalPairArray[pos].getKey(); + } + + final synchronized int getMeta(int pos){ + return this.mInternalPairArray[pos].getValue(); + } + + + + + +}
\ No newline at end of file |