aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/core')
-rw-r--r--src/Java/gtPlusPlus/core/config/ConfigHandler.java4
-rw-r--r--src/Java/gtPlusPlus/core/item/ModItems.java67
-rw-r--r--src/Java/gtPlusPlus/core/item/base/BaseItemTickable.java167
-rw-r--r--src/Java/gtPlusPlus/core/item/base/CoreItem.java38
-rw-r--r--src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java2
-rw-r--r--src/Java/gtPlusPlus/core/item/general/ItemLavaFilter.java2
-rw-r--r--src/Java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java2
-rw-r--r--src/Java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java2
-rw-r--r--src/Java/gtPlusPlus/core/item/materials/DustDecayable.java18
-rw-r--r--src/Java/gtPlusPlus/core/lib/CORE.java4
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java526
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_General.java41
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java4
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/Dimension_DarkWorld.java30
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java355
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/biome/Biome_DarkWorld.java146
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/biome/GenLayerBiomes.java31
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/biome/GenLayerDarkWorld.java32
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldGround.java25
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldPollutedDirt.java74
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldPortal.java403
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldPortalFrame.java30
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldSludgeFluid.java101
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/block/DarkWorldContentLoader.java71
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/chunk/ChunkProviderModded.java510
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenDeadLilly.java28
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenMinable_Custom.java90
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT.java49
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Base.java471
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Ore_Layer.java514
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_Ores.java327
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/item/ItemBlockToxicEverglades.java42
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/item/ItemDarkWorldPortalTrigger.java101
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/object/BoxedQuad.java56
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/world/CustomWorldType.java59
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/world/DarkWorldPortalPosition.java14
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/world/TeleporterDimensionMod.java471
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/world/WorldChunkManagerCustom.java263
-rw-r--r--src/Java/gtPlusPlus/core/world/darkworld/world/WorldProviderMod.java71
39 files changed, 514 insertions, 4727 deletions
diff --git a/src/Java/gtPlusPlus/core/config/ConfigHandler.java b/src/Java/gtPlusPlus/core/config/ConfigHandler.java
index 200e5a6bf4..cd6f13ffa6 100644
--- a/src/Java/gtPlusPlus/core/config/ConfigHandler.java
+++ b/src/Java/gtPlusPlus/core/config/ConfigHandler.java
@@ -165,8 +165,8 @@ public class ConfigHandler {
"Disables Zombie Reinforcement on hard difficutly.");
//Biomes
- DARKWORLD_ID = config.getInt("darkworld_ID", "worldgen", 227, 1, 254, "The ID of the Dark Dimension.");
- DARKBIOME_ID = config.getInt("darkbiome_ID", "worldgen", 238, 1, 254, "The biome within the Dark Dimension.");
+ EVERGLADES_ID = config.getInt("darkworld_ID", "worldgen", 227, 1, 254, "The ID of the Dark Dimension.");
+ EVERGLADESBIOME_ID = config.getInt("darkbiome_ID", "worldgen", 238, 1, 254, "The biome within the Dark Dimension.");
//Blacklisted Accelerator TileEntities
BlacklistedTileEntiyClassNames = new String[] { "com.rwtema.extrautils.tileentity.enderquarry.TileEntityEnderQuarry" };
diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java
index 35b5f9597c..33215234b9 100644
--- a/src/Java/gtPlusPlus/core/item/ModItems.java
+++ b/src/Java/gtPlusPlus/core/item/ModItems.java
@@ -11,13 +11,10 @@ import net.minecraft.util.EnumChatFormatting;
import gregtech.api.enums.Materials;
import gregtech.api.util.GT_OreDictUnificator;
-import gtPlusPlus.GTplusplus_Secondary;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.common.compat.COMPAT_Baubles;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.item.base.*;
-import gtPlusPlus.core.item.base.dusts.decimal.BaseItemCentidust;
-import gtPlusPlus.core.item.base.dusts.decimal.BaseItemDecidust;
import gtPlusPlus.core.item.base.foil.BaseItemFoil;
import gtPlusPlus.core.item.base.foods.BaseItemFood;
import gtPlusPlus.core.item.base.foods.BaseItemHotFood;
@@ -56,6 +53,7 @@ import gtPlusPlus.core.util.debug.DEBUG_INIT;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.MaterialUtils;
+import gtPlusPlus.everglades.GTplusplus_Everglades;
import gtPlusPlus.xmod.eio.material.MaterialEIO;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fluids.Fluid;
@@ -67,10 +65,10 @@ public final class ModItems {
public static Item ZZZ_Empty;
public static Item AAA_Broken;
+
+
public static Item itemAlkalusDisk;
-
public static Item itemDebugShapeSpawner;
-
public static Item itemBaseSpawnEgg;
//EnderIO
@@ -141,9 +139,6 @@ public final class ModItems {
public static MultiPickaxeBase MP_GTMATERIAL;
public static MultiSpadeBase MS_GTMATERIAL;
- public static BaseItemDecidust itemBaseDecidust;
- public static BaseItemCentidust itemBaseCentidust;
-
public static ItemStack FluidCell;
public static BaseItemBackpack backpack_Red;
@@ -181,8 +176,6 @@ public final class ModItems {
public static Item dustCalciumCarbonate;
public static Item dustLi2CO3CaOH2;
public static Item dustLi2BeF4;
-
- public static Item dustNeptunium238;
public static Item dustAer;
public static Item dustIgnis;
@@ -197,7 +190,7 @@ public final class ModItems {
public static Item shardAqua;
//Tc Compat for energy crystal recipes
- public static BaseItemTCShard shardDull;
+ public static Item shardDull;
//Lighter
public static Item itemBasicFireMaker;
@@ -215,20 +208,20 @@ public final class ModItems {
public static Item dustCalciumSulfate;
- public static BaseItemPlate itemPlateClay;
- public static BaseItemPlateDouble itemDoublePlateClay;
-
public static Item dustFertUN18;
public static Item dustFertUN32;
public static Fluid fluidFLiBeSalt;
-
+
//Possibly missing base items that GT may be missing.
+
public static Item itemSmallWroughtIronGear;
+ public static Item itemPlateClay;
public static Item itemPlateLithium;
public static Item itemPlateEuropium;
public static Item itemPlateVanadium;
+ public static Item itemDoublePlateClay;
public static Item itemDoublePlateEuropium;
public static Item itemFoilUranium235;
@@ -253,13 +246,18 @@ public final class ModItems {
public static Item itemModularBauble;
public static Item itemCustomBook;
-
+
public static Item itemGrindleTablet;
public static Item itemRope;
public static Item itemFiber;
public static Item itemDragonJar;
-
+ //Unstable Elements & Related Content
+ public static Item dustNeptunium238;
+ public static Item dustDecayedRadium226;
+ public static Item dustRadium226;
+
+
static {
Logger.INFO("Items!");
}
@@ -406,7 +404,9 @@ public final class ModItems {
//Plutonium-238 is a very powerful alpha emitter. This makes the plutonium-238 isotope suitable for usage in radioisotope thermoelectric generators (RTGs)
//and radioisotope heater units - one gram of plutonium-238 generates approximately 0.5 W of thermal power.
MaterialGenerator.generateNuclearMaterial(NUCLIDE.getInstance().PLUTONIUM238, false);
- MaterialGenerator.generateNuclearMaterial(NUCLIDE.getInstance().PLUTONIUM239, false);
+ if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustPlutonium239", 1) == null || Utils.getGregtechVersionAsInt() < 50931) {
+ MaterialGenerator.generateNuclearMaterial(NUCLIDE.getInstance().PLUTONIUM239, false);
+ }
//RTG Fuel Materials
MaterialGenerator.generateNuclearMaterial(NUCLIDE.getInstance().STRONTIUM90, false);
@@ -512,10 +512,9 @@ public final class ModItems {
//Must be the final Alloy to Generate
MaterialGenerator.generate(ALLOY.QUANTUM);
-
//Ores
MaterialGenerator.generateOreMaterial(FLUORIDES.FLUORITE);
- GTplusplus_Secondary.GenerateOreMaterials();
+ GTplusplus_Everglades.GenerateOreMaterials();
} catch (final Throwable r){
@@ -574,7 +573,7 @@ public final class ModItems {
fluidFLiBeSalt = FluidUtils.generateFluid("Li2BeF4", "Li2BeF4", 7430, new short[]{255, 255, 255, 100});
//LFTR Control Circuit
- itemCircuitLFTR = new CoreItem("itemCircuitLFTR", ""+EnumChatFormatting.GREEN+"Thorium Reactor Control Circuit", AddToCreativeTab.tabMisc, 1, 0, "Helps your LFTR not explode", EnumRarity.epic, EnumChatFormatting.DARK_GREEN, false, null);
+ itemCircuitLFTR = new CoreItem("itemCircuitLFTR", ""+EnumChatFormatting.GREEN+"Thorium Reactor Control Circuit", AddToCreativeTab.tabMisc, 1, 0, new String[] {"Helps your LFTR not explode"}, EnumRarity.epic, EnumChatFormatting.DARK_GREEN, false, null);
//Zirconium
@@ -659,16 +658,22 @@ public final class ModItems {
if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleClay", 1) == null){
itemDoublePlateClay = new BaseItemPlateDouble(MaterialUtils.generateMaterialFromGtENUM(Materials.Clay));
}
-
+
//Need this for Mutagenic Frames
if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foilUranium235", 1) == null){
itemFoilUranium235 = new BaseItemFoil(ELEMENT.getInstance().URANIUM235);
}
-
+
//A small gear needed for wizardry.
if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("gearGtSmallWroughtIron", 1) == null){
itemSmallWroughtIronGear = new BaseItemSmallGear(MaterialUtils.generateMaterialFromGtENUM(Materials.WroughtIron));
}
+
+
+ // A plate of Vanadium.
+ if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateVanadium", 1) == null){
+ itemPlateVanadium = new BaseItemPlate(ELEMENT.getInstance().VANADIUM);
+ }
//A plate of Lithium.
if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateLithium", 1) == null){
@@ -682,9 +687,11 @@ public final class ModItems {
if ((ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateDoubleEuropium", 1) == null) && CORE.ConfigSwitches.enableCustom_Pipes){
itemDoublePlateEuropium = new BaseItemPlateDouble(MaterialUtils.generateMaterialFromGtENUM(Materials.Europium));
}
-
- dustNeptunium238 = new DustDecayable("dustNeptunium238", Utils.rgbtoHexValue(175, 240, 75), 50640, "Result: Plutonium 238 ("+StringUtils.superscript("238Pu")+")", CORE.GT_Tooltip_Radioactive, NUCLIDE.getInstance().PLUTONIUM238.getDust(1).getItem(), 5);
+ dustNeptunium238 = new DustDecayable("dustNeptunium238", Utils.rgbtoHexValue(175, 240, 75), 50640, new String[] {""+StringUtils.superscript("238Np"), "Result: Plutonium 238 ("+StringUtils.superscript("238Pu")+")"}, NUCLIDE.getInstance().PLUTONIUM238.getDust(1).getItem(), 5);
+ dustDecayedRadium226 = ItemUtils.generateSpecialUseDusts("DecayedRadium226", "Decayed Radium-226", ""+StringUtils.superscript("226Ra"), ELEMENT.getInstance().RADIUM.getRgbAsHex())[0];
+ dustRadium226 = new DustDecayable("dustRadium226", ELEMENT.getInstance().RADIUM.getRgbAsHex(), 90000, new String[] {""+StringUtils.superscript("226Ra"), "Result: Radon 222 ("+StringUtils.superscript("222Rn")+")"}, ItemUtils.getSimpleStack(dustDecayedRadium226).getItem(), 5);
+
itemBoilerChassis = new ItemBoilerChassis();
itemDehydratorCoilWire = new ItemDehydratorCoilWire();
itemDehydratorCoil = new ItemDehydratorCoil();
@@ -693,7 +700,6 @@ public final class ModItems {
itemLavaFilter = new ItemLavaFilter();
itemGrindleTablet = new BaseItemGrindle();
-
itemDragonJar = new ItemEntityCatcher();
//Chemistry
@@ -712,11 +718,6 @@ public final class ModItems {
tI = new BaseItemMisc("Dull", new short[]{64,64,64}, 64, MiscTypes.GEM, null);
tI = new BaseItemMisc("Forest", new short[]{130,164,96}, 64, MiscTypes.MUSHROOM, new String[]{"You Found this on the ground.", "Definitely not sure if it's worth eating."});
- //Vanadium
- if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("plateVanadium", 1) == null){
- itemPlateVanadium = new BaseItemPlate(MaterialUtils.generateMaterialFromGtENUM(Materials.Vanadium));
- }
-
//Baubles
if (LoadedMods.Baubles){
tI = new HealthBoostBauble();
@@ -775,9 +776,7 @@ public final class ModItems {
ItemUtils.getItemForOreDict("Thaumcraft:ItemResource", "ingotVoidMetal", "Void Metal Ingot", 16);
itemPlateVoidMetal = ItemUtils.generateSpecialUsePlate("Void", "Void", new short[]{82, 17, 82}, 0);
GT_OreDictUnificator.registerOre("plateVoidMetal", new ItemStack(ModItems.itemPlateVoidMetal));
- } catch (final NullPointerException e){
- e.getClass();
- }
+ } catch (final NullPointerException e){}
}
else {
diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemTickable.java b/src/Java/gtPlusPlus/core/item/base/BaseItemTickable.java
index 501b881f9f..d5b44db9f5 100644
--- a/src/Java/gtPlusPlus/core/item/base/BaseItemTickable.java
+++ b/src/Java/gtPlusPlus/core/item/base/BaseItemTickable.java
@@ -18,33 +18,32 @@ import net.minecraft.world.World;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.minecraft.NBTUtils;
public class BaseItemTickable extends CoreItem {
- public final String descriptionString;
- public final String descriptionString2;
+ public final String[] descriptionString;
public final int itemColour;
public final int maxTicks;
public final boolean twoRenderPasses;
+ public final boolean ticksInContainers;
public IIcon[] mIcon = new IIcon[2];
public BaseItemTickable(boolean twoPass, final String unlocalName, final int colour, final int maxTicks) {
- this(twoPass, unlocalName, colour, maxTicks, "");
+ this(false, twoPass, unlocalName, colour, maxTicks, new String[] {});
}
-
- public BaseItemTickable(boolean twoPass, final String unlocalName, final int colour, final int maxTicks, final String Description) {
- this(twoPass, unlocalName, colour, maxTicks, "", Description);
+
+ public BaseItemTickable(boolean containerTick, boolean twoPass, final String unlocalName, final int colour, final int maxTicks) {
+ this(containerTick, twoPass, unlocalName, colour, maxTicks, new String[] {});
}
- public BaseItemTickable(boolean twoPass, final String unlocalName, final int colour, final int maxTicks, final String Description, final String Description2) {
+ public BaseItemTickable(boolean containerTick, boolean twoPass, final String unlocalName, final int colour, final int maxTicks, final String[] Description) {
super(unlocalName, AddToCreativeTab.tabMisc, 1, 999999999, Description, EnumRarity.epic, EnumChatFormatting.DARK_RED, true, null);
this.itemColour = colour;
this.descriptionString = Description;
- this.descriptionString2 = Description2;
this.maxTicks = maxTicks;
this.twoRenderPasses = twoPass;
+ this.ticksInContainers = containerTick;
//setGregtechItemList();
}
@@ -53,7 +52,7 @@ public class BaseItemTickable extends CoreItem {
if (world == null || iStack == null) {
return;
}
- tickItemTag(iStack);
+ tickItemTag(world, iStack);
}
/*private final boolean setGregtechItemList() {
@@ -106,18 +105,24 @@ public class BaseItemTickable extends CoreItem {
}
- private boolean createNBT(ItemStack rStack){
+ private boolean createNBT(World world, ItemStack rStack){
final NBTTagCompound tagMain = new NBTTagCompound();
final NBTTagCompound tagNBT = new NBTTagCompound();
tagNBT.setLong("Tick", 0);
tagNBT.setLong("maxTick", this.maxTicks);
tagNBT.setBoolean("isActive", true);
+
+ //Try set world time
+ if (world != null) {
+ tagNBT.setLong("CreationDate", world.getTotalWorldTime());
+ }
+
tagMain.setTag("TickableItem", tagNBT);
rStack.setTagCompound(tagMain);
return true;
}
- public final long getFilterDamage(final ItemStack aStack) {
+ public final long getFilterDamage(World world, final ItemStack aStack) {
NBTTagCompound aNBT = aStack.getTagCompound();
if (aNBT != null) {
aNBT = aNBT.getCompoundTag("TickableItem");
@@ -126,12 +131,12 @@ public class BaseItemTickable extends CoreItem {
}
}
else {
- createNBT(aStack);
+ createNBT(world, aStack);
}
return 0L;
}
- public final boolean setFilterDamage(final ItemStack aStack, final long aDamage) {
+ public final boolean setFilterDamage(World world, final ItemStack aStack, final long aDamage) {
NBTTagCompound aNBT = aStack.getTagCompound();
if (aNBT != null) {
aNBT = aNBT.getCompoundTag("TickableItem");
@@ -141,12 +146,12 @@ public class BaseItemTickable extends CoreItem {
}
}
else {
- createNBT(aStack);
+ createNBT(world, aStack);
}
return false;
}
- public final boolean getIsActive(final ItemStack aStack) {
+ public final boolean getIsActive(World world, final ItemStack aStack) {
NBTTagCompound aNBT = aStack.getTagCompound();
if (aNBT != null) {
aNBT = aNBT.getCompoundTag("TickableItem");
@@ -155,12 +160,12 @@ public class BaseItemTickable extends CoreItem {
}
}
else {
- createNBT(aStack);
+ createNBT(world, aStack);
}
return true;
}
- public final boolean setIsActive(final ItemStack aStack, final boolean active) {
+ public final boolean setIsActive(World world, final ItemStack aStack, final boolean active) {
NBTTagCompound aNBT = aStack.getTagCompound();
if (aNBT != null) {
aNBT = aNBT.getCompoundTag("TickableItem");
@@ -170,28 +175,99 @@ public class BaseItemTickable extends CoreItem {
}
}
else {
- createNBT(aStack);
+ createNBT(world, aStack);
+ }
+ return false;
+ }
+
+ public final boolean getTicksInContainer(World world, final ItemStack aStack) {
+ NBTTagCompound aNBT = aStack.getTagCompound();
+ if (aNBT != null) {
+ aNBT = aNBT.getCompoundTag("TickableItem");
+ if (aNBT != null) {
+ return aNBT.getBoolean("ticksInContainer");
+ }
+ }
+ else {
+ createNBT(world, aStack);
+ }
+ return false;
+ }
+
+ public final boolean setTicksInContainer(World world, final ItemStack aStack, final boolean active) {
+ NBTTagCompound aNBT = aStack.getTagCompound();
+ if (aNBT != null) {
+ aNBT = aNBT.getCompoundTag("TickableItem");
+ if (aNBT != null) {
+ aNBT.setBoolean("ticksInContainer", active);
+ return true;
+ }
+ }
+ else {
+ createNBT(world, aStack);
+ }
+ return false;
+ }
+
+ public final long getDifferenceInWorldTimeToCreationTime(World world, final ItemStack aStack) {
+ NBTTagCompound aNBT = aStack.getTagCompound();
+ if (aNBT != null) {
+ aNBT = aNBT.getCompoundTag("TickableItem");
+ if (aNBT != null) {
+ return (world.getTotalWorldTime() - aNBT.getLong("CreationDate"));
+ }
+ }
+ else {
+ createNBT(world, aStack);
+ }
+ return 0L;
+ }
+
+ public final boolean setItemStackCreationTime(final ItemStack aStack, World world) {
+ NBTTagCompound aNBT = aStack.getTagCompound();
+ if (aNBT != null) {
+ aNBT = aNBT.getCompoundTag("TickableItem");
+ if (aNBT != null) {
+ aNBT.setLong("CreationDate", world.getTotalWorldTime());
+ return true;
+ }
+ }
+ else {
+ createNBT(world, aStack);
}
return false;
}
- public final boolean tickItemTag(ItemStack aStack) {
+ public final boolean tickItemTag(World world, ItemStack aStack) {
NBTTagCompound aNBT = aStack.getTagCompound();
if (aNBT != null) {
- //Done Ticking
- if (maxTicks-getFilterDamage(aStack) <= 0) {
- setIsActive(aStack, false);
- }
- if (getIsActive(aStack)) {
+ if (aNBT.hasKey("TickableItem")) {
aNBT = aNBT.getCompoundTag("TickableItem");
- if (aNBT != null) {
- aNBT.setLong("Tick", getFilterDamage(aStack)+1);
- return true;
+
+ if (!aNBT.hasKey("CreationDate") && world != null) {
+ aNBT.setLong("CreationDate", world.getTotalWorldTime());
}
- }
+
+ //Done Ticking
+ if (maxTicks-getFilterDamage(world, aStack) <= 0) {
+ setIsActive(world, aStack, false);
+ }
+ if (getIsActive(world, aStack)) {
+ if (aNBT != null) {
+
+ //if ((world.getTotalWorldTime()-))
+
+ // Just tick once
+ aNBT.setLong("Tick", getFilterDamage(world, aStack)+1);
+
+
+ return true;
+ }
+ }
+ }
}
else {
- createNBT(aStack);
+ createNBT(world, aStack);
}
return false;
}
@@ -199,9 +275,9 @@ public class BaseItemTickable extends CoreItem {
@Override
public double getDurabilityForDisplay(ItemStack stack) {
if (stack.getTagCompound() == null){
- createNBT(stack);
+ createNBT(null, stack);
}
- double currentDamage = getFilterDamage(stack);
+ double currentDamage = getFilterDamage(null, stack);
double durabilitypercent = currentDamage / maxTicks;
return durabilitypercent;
}
@@ -209,29 +285,32 @@ public class BaseItemTickable extends CoreItem {
@SuppressWarnings("unchecked")
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
+ World world = player.getEntityWorld();
+ if (this.descriptionString.length > 0) {
+ list.add(EnumChatFormatting.GRAY+this.descriptionString[0]);
+ }
EnumChatFormatting durability = EnumChatFormatting.GRAY;
- if (maxTicks-getFilterDamage(stack) > (maxTicks*0.8)){
+ if (maxTicks-getFilterDamage(world, stack) > (maxTicks*0.8)){
durability = EnumChatFormatting.GRAY;
}
- else if (maxTicks-getFilterDamage(stack) > (maxTicks*0.6)){
+ else if (maxTicks-getFilterDamage(world, stack) > (maxTicks*0.6)){
durability = EnumChatFormatting.GREEN;
}
- else if (maxTicks-getFilterDamage(stack) > (maxTicks*0.4)){
+ else if (maxTicks-getFilterDamage(world, stack) > (maxTicks*0.4)){
durability = EnumChatFormatting.YELLOW;
}
- else if (maxTicks-getFilterDamage(stack) > (maxTicks*0.2)){
+ else if (maxTicks-getFilterDamage(world, stack) > (maxTicks*0.2)){
durability = EnumChatFormatting.GOLD;
}
- else if (maxTicks-getFilterDamage(stack) > 0){
+ else if (maxTicks-getFilterDamage(world, stack) > 0){
durability = EnumChatFormatting.RED;
}
- list.add(durability+""+((maxTicks-getFilterDamage(stack))/20)+EnumChatFormatting.GRAY+" seconds until decay");
+ list.add(durability+""+((maxTicks-getFilterDamage(world, stack))/20)+EnumChatFormatting.GRAY+" seconds until decay");
- if ((this.descriptionString != "") || !this.descriptionString.equals("")){
- list.add(EnumChatFormatting.GRAY+this.descriptionString);
- }
- if ((this.descriptionString2 != "") || !this.descriptionString2.equals("")){
- list.add(EnumChatFormatting.GRAY+this.descriptionString2);
+ if (this.descriptionString.length > 1) {
+ for (int h=1;h<this.descriptionString.length;h++) {
+ list.add(EnumChatFormatting.GRAY+this.descriptionString[h]);
+ }
}
//super.addInformation(stack, player, list, bool);
@@ -239,7 +318,7 @@ public class BaseItemTickable extends CoreItem {
@Override
public boolean showDurabilityBar(ItemStack stack) {
- return true;
+ return false;
}
diff --git a/src/Java/gtPlusPlus/core/item/base/CoreItem.java b/src/Java/gtPlusPlus/core/item/base/CoreItem.java
index 8aeab4cbd1..6c7f9cf6db 100644
--- a/src/Java/gtPlusPlus/core/item/base/CoreItem.java
+++ b/src/Java/gtPlusPlus/core/item/base/CoreItem.java
@@ -23,7 +23,7 @@ public class CoreItem extends Item
private final EnumRarity rarity;
private final EnumChatFormatting descColour;
- private final String itemDescription;
+ private final String[] itemDescription;
protected String itemName;
private final boolean hasEffect;
@@ -42,7 +42,7 @@ public class CoreItem extends Item
//0
/*
* Name, Tab - 64 Stack, 0 Dmg
- */
+ */
public CoreItem(final String unlocalizedName, final String displayName, final CreativeTabs creativeTab)
{
this(unlocalizedName, creativeTab, 64, 0); //Calls 3
@@ -55,7 +55,7 @@ public class CoreItem extends Item
*/
public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final ItemStack OverrideItem)
{
- this(unlocalizedName, creativeTab, 64, 0, "This item will be replaced by another when held by a player, it is old and should not be used in recipes.", EnumRarity.uncommon, EnumChatFormatting.UNDERLINE, false, OverrideItem); //Calls 5
+ this(unlocalizedName, creativeTab, 64, 0, new String[] {"This item will be replaced by another when held by a player, it is old and should not be used in recipes."}, EnumRarity.uncommon, EnumChatFormatting.UNDERLINE, false, OverrideItem); //Calls 5
}
//0.1
/*
@@ -63,7 +63,7 @@ public class CoreItem extends Item
*/
public CoreItem(final String unlocalizedName, final String displayName, final CreativeTabs creativeTab, final ItemStack OverrideItem)
{
- this(unlocalizedName, creativeTab, 64, 0, "This item will be replaced by another when held by a player, it is old and should not be used in recipes.", EnumRarity.uncommon, EnumChatFormatting.UNDERLINE, false, OverrideItem); //Calls 5
+ this(unlocalizedName, creativeTab, 64, 0, new String[] {"This item will be replaced by another when held by a player, it is old and should not be used in recipes."}, EnumRarity.uncommon, EnumChatFormatting.UNDERLINE, false, OverrideItem); //Calls 5
this.itemName = displayName;
}
@@ -79,7 +79,7 @@ public class CoreItem extends Item
/*
* Name, Tab, Stack, Description - 0 Dmg
*/
- public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final String description)
+ public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final String[] description)
{
this(unlocalizedName, creativeTab, stackSize, 0, description); //Calls 4
}
@@ -87,15 +87,21 @@ public class CoreItem extends Item
/*
* Name, Tab, Stack, Dmg - Description
*/
+ public CoreItem(String unlocalizedName, CreativeTabs creativeTab, int stackSize, String string) {
+ this(unlocalizedName, creativeTab, stackSize, new String[] {string});
+ }
public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg)
{
- this(unlocalizedName, creativeTab, stackSize, maxDmg, ""); //Calls 4
+ this(unlocalizedName, creativeTab, stackSize, maxDmg, new String[] {}); //Calls 4
}
//4 //Not Rare + basic tooltip
/*
* Name, Tab, Stack, Dmg, Description
*/
- public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String description)
+ public CoreItem(String unlocalizedName, CreativeTabs creativeTab, int stackSize, int maxDmg, String string) {
+ this(unlocalizedName, creativeTab, stackSize, maxDmg, new String[] {string});
+ }
+ public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String[] description)
{
this(unlocalizedName, creativeTab, stackSize, maxDmg, description, EnumRarity.common, EnumChatFormatting.GRAY, false, null); //Calls 4.5
}
@@ -103,7 +109,7 @@ public class CoreItem extends Item
/*
* Name, Tab, Stack, Dmg, Description, Text Colour - Common
*/
- public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String description, final EnumChatFormatting colour)
+ public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String[] description, final EnumChatFormatting colour)
{
this(unlocalizedName, creativeTab, stackSize, maxDmg, description, EnumRarity.common, colour, false, null); //Calls 5
}
@@ -112,7 +118,10 @@ public class CoreItem extends Item
/*
* Name, Tab, Stack, Dmg, Description, Rarity - Gray text
*/
- public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String description, final EnumRarity rarity)
+ public CoreItem(String unlocalizedName, CreativeTabs creativeTab, int stackSize, int maxDmg, String string, EnumRarity uncommon) {
+ this(unlocalizedName, creativeTab, stackSize, maxDmg, new String[] {string}, uncommon);
+ }
+ public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String[] description, final EnumRarity rarity)
{
this(unlocalizedName, creativeTab, stackSize, maxDmg, description, rarity, EnumChatFormatting.GRAY, false, null); //Calls 5
}
@@ -121,7 +130,7 @@ public class CoreItem extends Item
/*
* Name, Tab, Stack, Dmg, Description, Rarity, Text Colour, Effect
*/
- public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, final ItemStack OverrideItem)
+ public CoreItem(final String unlocalizedName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String[] description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, final ItemStack OverrideItem)
{
this.setUnlocalizedName(unlocalizedName);
this.setTextureName(CORE.MODID + ":" + unlocalizedName);
@@ -140,7 +149,7 @@ public class CoreItem extends Item
/*
* Name, Tab, Stack, Dmg, Description, Rarity, Text Colour, Effect
*/
- public CoreItem(final String unlocalizedName, final String displayName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, final ItemStack OverrideItem)
+ public CoreItem(final String unlocalizedName, final String displayName, final CreativeTabs creativeTab, final int stackSize, final int maxDmg, final String[] description, final EnumRarity regRarity, final EnumChatFormatting colour, final boolean Effect, final ItemStack OverrideItem)
{
this.setUnlocalizedName(unlocalizedName);
this.itemName = displayName;
@@ -154,11 +163,16 @@ public class CoreItem extends Item
this.hasEffect = Effect;
this.turnsInto = OverrideItem;
GameRegistry.registerItem(this, unlocalizedName);
- }
+ }
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
+ if (this.itemDescription.length > 0) {
+ for (int u=0;u<this.itemDescription.length;u++) {
+ list.add(this.descColour+this.itemDescription[u]);
+ }
+ }
//list.add(this.descColour+this.itemDescription);
//super.addInformation(stack, aPlayer, list, bool);
}
diff --git a/src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java b/src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java
index 5f03e407f3..23b0144231 100644
--- a/src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java
+++ b/src/Java/gtPlusPlus/core/item/general/ItemAreaClear.java
@@ -28,7 +28,7 @@ public class ItemAreaClear extends CoreItem {
public IIcon[] mIcon = new IIcon[1];
public ItemAreaClear() {
- super("itemDebugClearing", AddToCreativeTab.tabMachines, 1, 100, EnumChatFormatting.OBFUSCATED+"F A M C Y N A M E", EnumRarity.rare,
+ super("itemDebugClearing", AddToCreativeTab.tabMachines, 1, 100, new String[] {EnumChatFormatting.OBFUSCATED+"F A M C Y N A M E"}, EnumRarity.rare,
EnumChatFormatting.BOLD, false, null);
}
diff --git a/src/Java/gtPlusPlus/core/item/general/ItemLavaFilter.java b/src/Java/gtPlusPlus/core/item/general/ItemLavaFilter.java
index a05412f2f7..c34ad9e8d3 100644
--- a/src/Java/gtPlusPlus/core/item/general/ItemLavaFilter.java
+++ b/src/Java/gtPlusPlus/core/item/general/ItemLavaFilter.java
@@ -21,7 +21,7 @@ public class ItemLavaFilter extends CoreItem {
public IIcon[] mIcon = new IIcon[1];
public ItemLavaFilter() {
- super("itemLavaFilter", AddToCreativeTab.tabMachines, 1, 100, "Lava Filter", EnumRarity.common,
+ super("itemLavaFilter", AddToCreativeTab.tabMachines, 1, 100, new String[] {"Lava Filter"}, EnumRarity.common,
EnumChatFormatting.BLACK, false, null);
setGregtechItemList();
}
diff --git a/src/Java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java b/src/Java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java
index a62592c42b..57cf8986fa 100644
--- a/src/Java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java
+++ b/src/Java/gtPlusPlus/core/item/general/throwables/ItemHydrofluoricAcidPotion.java
@@ -13,7 +13,7 @@ import gtPlusPlus.core.item.base.CoreItem;
public class ItemHydrofluoricAcidPotion extends CoreItem {
public ItemHydrofluoricAcidPotion(String unlocalizedName, String displayName, String description) {
- super(unlocalizedName, displayName, AddToCreativeTab.tabMisc, 16, 0, description, EnumRarity.uncommon, EnumChatFormatting.GRAY, false, null);
+ super(unlocalizedName, displayName, AddToCreativeTab.tabMisc, 16, 0, new String[] {description}, EnumRarity.uncommon, EnumChatFormatting.GRAY, false, null);
}
@Override
diff --git a/src/Java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java b/src/Java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java
index 55b3e421e2..27b35e48d1 100644
--- a/src/Java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java
+++ b/src/Java/gtPlusPlus/core/item/general/throwables/ItemSulfuricAcidPotion.java
@@ -13,7 +13,7 @@ import gtPlusPlus.core.item.base.CoreItem;
public class ItemSulfuricAcidPotion extends CoreItem {
public ItemSulfuricAcidPotion(String unlocalizedName, String displayName, String description) {
- super(unlocalizedName, displayName, AddToCreativeTab.tabMisc, 16, 0, description, EnumRarity.common, EnumChatFormatting.GRAY, false, null);
+ super(unlocalizedName, displayName, AddToCreativeTab.tabMisc, 16, 0, new String[] {description}, EnumRarity.common, EnumChatFormatting.GRAY, false, null);
}
@Override
diff --git a/src/Java/gtPlusPlus/core/item/materials/DustDecayable.java b/src/Java/gtPlusPlus/core/item/materials/DustDecayable.java
index 0fad3de66a..8e19896b92 100644
--- a/src/Java/gtPlusPlus/core/item/materials/DustDecayable.java
+++ b/src/Java/gtPlusPlus/core/item/materials/DustDecayable.java
@@ -1,5 +1,7 @@
package gtPlusPlus.core.item.materials;
+import java.util.List;
+
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
@@ -10,6 +12,7 @@ import net.minecraft.world.World;
import gregtech.api.util.GT_OreDictUnificator;
import gtPlusPlus.core.item.base.BaseItemTickable;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.EntityUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
@@ -18,8 +21,8 @@ public class DustDecayable extends BaseItemTickable {
private final Item turnsIntoItem;
private final int radLevel;
- public DustDecayable(String unlocal, int colour, int maxTicks, String desc1, String desc2, Item turnsInto, int radLevel) {
- super(true, unlocal, colour, maxTicks, desc1, desc2);
+ public DustDecayable(String unlocal, int colour, int maxTicks, String[] desc1, Item turnsInto, int radLevel) {
+ super(true, true, unlocal, colour, maxTicks, desc1);
this.turnsIntoItem = turnsInto;
this.radLevel = radLevel;
GT_OreDictUnificator.registerOre(unlocal, ItemUtils.getSimpleStack(this));
@@ -33,6 +36,15 @@ public class DustDecayable extends BaseItemTickable {
this.mIcon[1] = reg.registerIcon(gt2);
}
+ @SuppressWarnings("unchecked")
+ @Override
+ public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
+ super.addInformation(stack, player, list, bool);
+ if (this.radLevel > 0) {
+ list.add(CORE.GT_Tooltip_Radioactive);
+ }
+ }
+
@Override
public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) {
if (world == null || iStack == null) {
@@ -45,7 +57,7 @@ public class DustDecayable extends BaseItemTickable {
}
}
- if (!tickItemTag(iStack)) {
+ if (!tickItemTag(world, iStack)) {
if (entityHolding instanceof EntityPlayer){
ItemStack replacement = ItemUtils.getSimpleStack(turnsIntoItem);
//Logger.INFO("Replacing "+iStack.getDisplayName()+" with "+replacement.getDisplayName()+".");
diff --git a/src/Java/gtPlusPlus/core/lib/CORE.java b/src/Java/gtPlusPlus/core/lib/CORE.java
index de3b7914f1..568d6badcc 100644
--- a/src/Java/gtPlusPlus/core/lib/CORE.java
+++ b/src/Java/gtPlusPlus/core/lib/CORE.java
@@ -54,8 +54,8 @@ public class CORE {
public static boolean isModUpToDate = Utils.isModUpToDate();
//Tweakables
- public static int DARKBIOME_ID = 238;
- public static int DARKWORLD_ID = 227;
+ public static int EVERGLADESBIOME_ID = 238;
+ public static int EVERGLADES_ID = 227;
//GT Vars;
public static final int GREG_FIRST_ID = 760;
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
index 201235cc55..bba7175272 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
@@ -33,6 +33,7 @@ public class RECIPES_GREGTECH {
private static void execute() {
cokeOvenRecipes();
+ electrolyzerRecipes();
// matterFabRecipes();
assemblerRecipes();
fluidcannerRecipes();
@@ -60,6 +61,23 @@ public class RECIPES_GREGTECH {
addFuels();
}
+ private static void electrolyzerRecipes() {
+ GT_Values.RA.addElectrolyzerRecipe(
+ ItemUtils.getSimpleStack(ModItems.dustDecayedRadium226, 1),
+ null,
+ null,
+ FluidUtils.getFluidStack("radon", 500),
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ new int[]{},
+ 20*90,
+ 240);
+ }
+
private static void extruderRecipes() {
// Osmium Credits
if (GT_Values.RA.addExtruderRecipe(ItemUtils.getItemStackOfAmountFromOreDict("blockOsmium", 1),
@@ -231,7 +249,7 @@ public class RECIPES_GREGTECH {
FluidUtils.getFluidStack("molten.tungstencarbide", 2 * 144), 0,
MathUtils.findPercentageOfInt(
(int) Math.max(Materials.get("TungstenCarbide").getMass() / 40L, 1L)
- * Materials.get("TungstenCarbide").mBlastFurnaceTemp,
+ * Materials.get("TungstenCarbide").mBlastFurnaceTemp,
80),
480);
}
@@ -339,7 +357,7 @@ public class RECIPES_GREGTECH {
try {
CORE.RA.addMatterFabricatorRecipe(Materials.UUAmplifier.getFluid(1L), // Fluid
- // Input
+ // Input
Materials.UUMatter.getFluid(1L), // Fluid Output
800, // Time in ticks
32); // EU
@@ -366,23 +384,23 @@ public class RECIPES_GREGTECH {
try {
// Makes Lithium Carbonate
CORE.RA.addDehydratorRecipe(ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricLithium", 1), // Item
- // Input
+ // Input
FluidUtils.getFluidStack("sulfuriclithium", 440), // Fluid
- // input
- // (slot
- // 1)
+ // input
+ // (slot
+ // 1)
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 3),
ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustSodium", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 3) }, // Output
- // Array
- // of
- // Items
- // -
- // Upto
- // 9
+ // Array
+ // of
+ // Items
+ // -
+ // Upto
+ // 9
30 * 20, // Time in ticks
30); // EU
}
@@ -402,19 +420,19 @@ public class RECIPES_GREGTECH {
CORE.RA.addDehydratorRecipe(input, // Item input (Array, up to 2)
FluidUtils.getFluidStack("sulfuricacid", 10000), // Fluid
- // input
- // (slot
- // 1)
+ // input
+ // (slot
+ // 1)
FluidUtils.getFluidStack("sulfuriclithium", 10000), // Fluid
- // output
- // (slot
- // 2)
+ // output
+ // (slot
+ // 2)
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustPotassium", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustAluminium", 4),
ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 10),
ItemUtils.getItemStackOfAmountFromOreDict("cellFluorine", 2),
ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumCarbonate", 3), // LithiumCarbonate
- }, // Output Array of Items - Upto 9,
+ }, // Output Array of Items - Upto 9,
new int[] { 0 }, 75 * 20, // Time in ticks
1000); // EU
@@ -425,24 +443,24 @@ public class RECIPES_GREGTECH {
try {
CORE.RA.addDehydratorRecipe(new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 10) }, // Item
- // input
- // (Array,
- // up
- // to
- // 2)
+ // input
+ // (Array,
+ // up
+ // to
+ // 2)
FluidUtils.getFluidStack("molten.uraniumtetrafluoride", 1440), // Fluid
- // input
- // (slot
- // 1)
+ // input
+ // (slot
+ // 1)
null, // Fluid output (slot 2)
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustUraniumTetrafluoride", 10),
ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellEmpty", 10) }, // Output
- // Array
- // of
- // Items
- // -
- // Upto
- // 9,
+ // Array
+ // of
+ // Items
+ // -
+ // Upto
+ // 9,
new int[] { 0 }, 150 * 20, // Time in ticks
2000); // EU
@@ -453,24 +471,24 @@ public class RECIPES_GREGTECH {
try {
CORE.RA.addDehydratorRecipe(new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 10) }, // Item
- // input
- // (Array,
- // up
- // to
- // 2)
+ // input
+ // (Array,
+ // up
+ // to
+ // 2)
FluidUtils.getFluidStack("molten.uraniumhexafluoride", 1440), // Fluid
- // input
- // (slot
- // 1)
+ // input
+ // (slot
+ // 1)
null, // Fluid output (slot 2)
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustUraniumHexafluoride", 10),
ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellEmpty", 10) }, // Output
- // Array
- // of
- // Items
- // -
- // Upto
- // 9,
+ // Array
+ // of
+ // Items
+ // -
+ // Upto
+ // 9,
new int[] { 0 }, 300 * 20, // Time in ticks
4000); // EU
@@ -483,20 +501,20 @@ public class RECIPES_GREGTECH {
try {
CORE.RA.addDehydratorRecipe(new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cropGrape", 1) }, // Item
- // input
- // (Array,
- // up
- // to
- // 2)
+ // input
+ // (Array,
+ // up
+ // to
+ // 2)
null, // Fluid input (slot 1)
null, // Fluid output (slot 2)
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("foodRaisins", 1) }, // Output
- // Array
- // of
- // Items
- // -
- // Upto
- // 9,
+ // Array
+ // of
+ // Items
+ // -
+ // Upto
+ // 9,
new int[] { 0 }, 10 * 20, // Time in ticks
8); // EU
@@ -512,21 +530,21 @@ public class RECIPES_GREGTECH {
CORE.RA.addDehydratorRecipe(
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 10) }, // Item
- // input
- // (Array,
- // up
- // to
- // 2)
+ // input
+ // (Array,
+ // up
+ // to
+ // 2)
FluidUtils.getFluidStack("water", 10000), // Fluid input
- // (slot 1)
+ // (slot 1)
null, // Fluid output (slot 2)
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumHydroxide", 20) }, // Output
- // Array
- // of
- // Items
- // -
- // Upto
- // 9,
+ // Array
+ // of
+ // Items
+ // -
+ // Upto
+ // 9,
new int[] { 0 }, 120 * 20, // Time in ticks
120); // EU
@@ -540,21 +558,21 @@ public class RECIPES_GREGTECH {
CORE.RA.addDehydratorRecipe(
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustLi2CO3CaOH2", 5) }, // Item
- // input
- // (Array,
- // up
- // to
- // 2)
+ // input
+ // (Array,
+ // up
+ // to
+ // 2)
null, // Fluid input (slot 1)
null, // Fluid output (slot 2)
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 2),
ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumCarbonate", 3) }, // Output
- // Array
- // of
- // Items
- // -
- // Upto
- // 9,
+ // Array
+ // of
+ // Items
+ // -
+ // Upto
+ // 9,
new int[] { 0 }, 120 * 20, // Time in ticks
1000); // EU
@@ -567,23 +585,23 @@ public class RECIPES_GREGTECH {
try {
CORE.RA.addDehydratorRecipe(new ItemStack[] { ItemUtils.getGregtechCircuit(0) }, // Item
- // input
- // (Array,
- // up
- // to
- // 2)
+ // input
+ // (Array,
+ // up
+ // to
+ // 2)
FluidUtils.getFluidStack("lithiumhydroxide", 144), // Fluid
- // input
- // (slot
- // 1)
+ // input
+ // (slot
+ // 1)
null, // Fluid output (slot 2)
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 1) }, // Output
- // Array
- // of
- // Items
- // -
- // Upto
- // 9,
+ // Array
+ // of
+ // Items
+ // -
+ // Upto
+ // 9,
new int[] { 0 }, 1 * 20, // Time in ticks
64); // EU
@@ -598,24 +616,24 @@ public class RECIPES_GREGTECH {
CORE.RA.addDehydratorRecipe(
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustCookedZrCl4", 9),
ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 9) }, // Item
- // input
- // (Array,
- // up
- // to
- // 2)
+ // input
+ // (Array,
+ // up
+ // to
+ // 2)
FluidUtils.getFluidStack("hydrofluoricacid", 9 * 144), // Fluid
- // input
- // (slot
- // 1)
+ // input
+ // (slot
+ // 1)
null, // Fluid output (slot 2)
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 9),
ItemUtils.getItemStackOfAmountFromOreDict("dustZrF4", 9) }, // Output
- // Array
- // of
- // Items
- // -
- // Upto
- // 9,
+ // Array
+ // of
+ // Items
+ // -
+ // Upto
+ // 9,
new int[] { 0 }, 120 * 20, // Time in ticks
500); // EU
@@ -630,15 +648,15 @@ public class RECIPES_GREGTECH {
CORE.RA.addDehydratorRecipe(
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustFluorite", 37),
ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 16) }, // Item
- // input
- // (Array,
- // up
- // to
- // 2)
+ // input
+ // (Array,
+ // up
+ // to
+ // 2)
FluidUtils.getFluidStack("sulfuricacid", 56 * 144), // Fluid
- // input
- // (slot
- // 1)
+ // input
+ // (slot
+ // 1)
null, // Fluid output (slot 2)
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumSulfate", 30),
ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 16),
@@ -646,15 +664,15 @@ public class RECIPES_GREGTECH {
ItemUtils.getItemStackOfAmountFromOreDict("dustGold", 2),
ItemUtils.getItemStackOfAmountFromOreDict("dustTin", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 2) }, // Output
- // Array
- // of
- // Items
- // -
- // Upto
- // 9,
+ // Array
+ // of
+ // Items
+ // -
+ // Upto
+ // 9,
new int[] { 0, 0, 100, 100, 300, 200 }, 10 * 60 * 20, // Time
- // in
- // ticks
+ // in
+ // ticks
230); // EU
}
@@ -667,24 +685,24 @@ public class RECIPES_GREGTECH {
CORE.RA.addDehydratorRecipe(
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellBerylliumHydroxide", 2),
ItemUtils.getItemStackOfAmountFromOreDict("cellAmmoniumBifluoride", 4) }, // Item
- // input
- // (Array,
- // up
- // to
- // 2)
+ // input
+ // (Array,
+ // up
+ // to
+ // 2)
null, // Fluid input (slot 1)
FluidUtils.getFluidStack("ammoniumtetrafluoroberyllate", 6000), // Fluid
- // output
- // (slot
- // 2)
+ // output
+ // (slot
+ // 2)
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 4),
ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 2) }, // Output
- // Array
- // of
- // Items
- // -
- // Upto
- // 9,
+ // Array
+ // of
+ // Items
+ // -
+ // Upto
+ // 9,
new int[] { 0, 0, 0 }, 32 * 20, // Time in ticks
64); // EU
@@ -697,25 +715,25 @@ public class RECIPES_GREGTECH {
try {
CORE.RA.addDehydratorRecipe(
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 5) }, // Item
- // input
- // (Array,
- // up
- // to
- // 2)
+ // input
+ // (Array,
+ // up
+ // to
+ // 2)
FluidUtils.getFluidStack("ammoniumtetrafluoroberyllate", 5000), // Fluid
- // input
- // (slot
- // 1)
+ // input
+ // (slot
+ // 1)
null, // Fluid output (slot 2)
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellAmmonia", 2),
ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 2),
ItemUtils.getItemStackOfAmountFromOreDict("cellBerylliumFluoride", 1) }, // Output
- // Array
- // of
- // Items
- // -
- // Upto
- // 9,
+ // Array
+ // of
+ // Items
+ // -
+ // Upto
+ // 9,
new int[] { 0, 0, 0 }, 5 * 60 * 20, // Time in ticks
120); // EU
@@ -729,10 +747,10 @@ public class RECIPES_GREGTECH {
CORE.RA.addDehydratorRecipe(null, // Item input (Array, up to 2)
FluidUtils.getFluidStack("sludge", 1000), // Fluid input
- // (slot 1)
+ // (slot 1)
FluidUtils.getFluidStack("nitricacid", 10), // Fluid
- // output
- // (slot 2)
+ // output
+ // (slot 2)
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustTinyIron", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustTinyCopper", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustTinyTin", 1),
@@ -742,15 +760,15 @@ public class RECIPES_GREGTECH {
ItemUtils.getItemStackOfAmountFromOreDict("dustTinySilver", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustTinyGold", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustTinyIridium", 1) }, // Output
- // Array
- // of
- // Items
- // -
- // Upto
- // 9,
+ // Array
+ // of
+ // Items
+ // -
+ // Upto
+ // 9,
new int[] { 10, 5, 5, 4, 4, 3, 2, 2, 1 }, 2 * 20, // Time
- // in
- // ticks
+ // in
+ // ticks
500); // EU
}
@@ -772,20 +790,20 @@ public class RECIPES_GREGTECH {
try {
// Fli2BeF4 + Thorium TetraFluoride = Uranium233
CORE.RA.addLFTRRecipe(FluidUtils.getFluidStack("molten.LiFBeF2ThF4UF4".toLowerCase(), 144 * 4), // Fluid
- // input
- // (slot
- // 1)
+ // input
+ // (slot
+ // 1)
FluidUtils.getFluidStack("molten.li2bef4", 1200), // Fluid
- // output
- // (slot
- // 2)
+ // output
+ // (slot
+ // 2)
FluidUtils.getFluidStack("molten.uraniumhexafluoride", (1200 + (144 * 4))), // Output
- // Array
- // of
- // Items
- // -
- // Upto
- // 9,
+ // Array
+ // of
+ // Items
+ // -
+ // Upto
+ // 9,
300 * 60 * 20, // Time in ticks
3500); // EU
@@ -796,20 +814,20 @@ public class RECIPES_GREGTECH {
try {
// Fli2BeF4 + Uranium235 = 1x Uranium233
CORE.RA.addLFTRRecipe(FluidUtils.getFluidStack("molten.LiFBeF2ZrF4U235".toLowerCase(), 144 * 16), // Fluid
- // input
- // (slot
- // 1)
+ // input
+ // (slot
+ // 1)
FluidUtils.getFluidStack("molten.li2bef4", 144 * 12), // Fluid
- // output
- // (slot
- // 2)
+ // output
+ // (slot
+ // 2)
FluidUtils.getFluidStack("molten.uraniumhexafluoride", 3 * 144), // Output
- // Array
- // of
- // Items
- // -
- // Upto
- // 9,
+ // Array
+ // of
+ // Items
+ // -
+ // Upto
+ // 9,
120 * 60 * 20, // Time in ticks
8000); // EU
}
@@ -819,20 +837,20 @@ public class RECIPES_GREGTECH {
try {
// Fli2BeF4 + Uranium233 TetraFluoride = Uranium233
CORE.RA.addLFTRRecipe(FluidUtils.getFluidStack("molten.LiFBeF2ZrF4UF4".toLowerCase(), 144 * 2), // Fluid
- // input
- // (slot
- // 1)
+ // input
+ // (slot
+ // 1)
FluidUtils.getFluidStack("molten.li2bef4", 500), // Fluid
- // output
- // (slot
- // 2)
+ // output
+ // (slot
+ // 2)
FluidUtils.getFluidStack("molten.uraniumhexafluoride", 1288), // Output
- // Array
- // of
- // Items
- // -
- // Upto
- // 9,
+ // Array
+ // of
+ // Items
+ // -
+ // Upto
+ // 9,
420 * 60 * 20, // Time in ticks
4000); // EU
@@ -850,68 +868,68 @@ public class RECIPES_GREGTECH {
final String salt_LiFBeF2ZrF4UF4 = "LiFBeF2ZrF4UF4".toLowerCase();
final FluidStack LithiumFluoride = FluidUtils.getFluidStack("molten.lithiumfluoride", 100); // Re-usable
- // FluidStacks
+ // FluidStacks
final FluidStack BerylliumFluoride = FluidUtils.getFluidStack("molten.berylliumfluoride", 100); // Re-usable
- // FluidStacks
+ // FluidStacks
final FluidStack ThoriumFluoride = FluidUtils.getFluidStack("molten.thoriumtetrafluoride", 100); // Re-usable
- // FluidStacks
+ // FluidStacks
final FluidStack ZirconiumFluoride = FluidUtils.getFluidStack("molten.zirconiumtetrafluoride", 100); // Re-usable
- // FluidStacks
+ // FluidStacks
final FluidStack UraniumTetraFluoride = FluidUtils.getFluidStack("molten.uraniumtetrafluoride", 100); // Re-usable
- // FluidStacks
+ // FluidStacks
final FluidStack Uranium235 = FluidUtils.getFluidStack("molten.uranium235", 1000); // Re-usable
- // FluidStacks
+ // FluidStacks
final FluidStack LiFBeF2ThF4UF4 = FluidUtils.getFluidStack("molten." + salt_LiFBeF2ThF4UF4, 100); // Re-usable
- // FluidStacks
+ // FluidStacks
final FluidStack LiFBeF2ZrF4U235 = FluidUtils.getFluidStack("molten." + salt_LiFBeF2ZrF4U235, 100); // Re-usable
- // FluidStacks
+ // FluidStacks
final FluidStack LiFBeF2ZrF4UF4 = FluidUtils.getFluidStack("molten." + salt_LiFBeF2ZrF4UF4, 100); // Re-usable
- // FluidStacks
+ // FluidStacks
// 7LiF - BeF2 - ZrF4 - UF4 - 650C
CORE.RA.addFissionFuel(FluidUtils.getFluidStack(LithiumFluoride, 6500), // Input
- // A
+ // A
FluidUtils.getFluidStack(BerylliumFluoride, 2500), // Input
- // B
+ // B
FluidUtils.getFluidStack(ZirconiumFluoride, 800), // Input C
FluidUtils.getFluidStack(UraniumTetraFluoride, 700), // Input
- // D
+ // D
null, null, null, null, null, // Extra 5 inputs
FluidUtils.getFluidStack(LiFBeF2ZrF4UF4, 10000), // Output
- // Fluid
- // 1
+ // Fluid
+ // 1
null, // Output Fluid 2
60 * 60 * 20, // Duration
500);
// 7LiF - BeF2 - ZrF4 - U235 - 590C
CORE.RA.addFissionFuel(FluidUtils.getFluidStack(LithiumFluoride, 5500), // Input
- // A
+ // A
FluidUtils.getFluidStack(BerylliumFluoride, 1500), // Input
- // B
+ // B
FluidUtils.getFluidStack(ZirconiumFluoride, 600), // Input C
FluidUtils.getFluidStack(Uranium235, 2400), // Input D
null, null, null, null, null, // Extra 5 inputs
FluidUtils.getFluidStack(LiFBeF2ZrF4U235, 10000), // Output
- // Fluid
- // 1
+ // Fluid
+ // 1
null, // Output Fluid 2
45 * 60 * 20, // Duration
500);
// 7liF - BeF2 - ThF4 - UF4 - 566C
CORE.RA.addFissionFuel(FluidUtils.getFluidStack(LithiumFluoride, 6200), // Input
- // A
+ // A
FluidUtils.getFluidStack(BerylliumFluoride, 2800), // Input
- // B
+ // B
FluidUtils.getFluidStack(ThoriumFluoride, 700), // Input C
FluidUtils.getFluidStack(UraniumTetraFluoride, 700), // Input
- // D
+ // D
null, null, null, null, null, // Extra 5 inputs
FluidUtils.getFluidStack(LiFBeF2ThF4UF4, 10000), // Output
- // Fluid
- // 1
+ // Fluid
+ // 1
null, // Output Fluid 2
60 * 60 * 20, // Duration
500);
@@ -1085,26 +1103,26 @@ public class RECIPES_GREGTECH {
private static void chemicalReactorRecipes() {
GT_Values.RA.addChemicalRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumCarbonate", 5), // Input
- // Stack
- // 1
+ // Stack
+ // 1
ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumHydroxide", 5), // Input
- // Stack
- // 2
+ // Stack
+ // 2
null, // Fluid Input
null, // Fluid Output
ItemUtils.getItemStackOfAmountFromOreDict("dustLi2CO3CaOH2", 10), // Output
- // Stack
+ // Stack
600 * 20);
GT_Values.RA.addChemicalRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 5), // Input
- // Stack
- // 1
+ // Stack
+ // 1
null, // Input Stack 2
FluidUtils.getFluidStack("hydrofluoricacid", 5 * 144), // Fluid
- // Input
+ // Input
FluidUtils.getFluidStack("water", 5 * 144), // Fluid Output
ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumFluoride", 5), // Output
- // Stack
+ // Stack
600 * 20);
GT_Values.RA.addChemicalRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustApatite", 16), null,
@@ -1237,7 +1255,7 @@ public class RECIPES_GREGTECH {
}
private static void cyclotronRecipes() {
-
+
//Polonium
CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.bismuth", 1),
new ItemStack[] { GregtechItemList.Pellet_RTG_PO210.get(1) }, null, new int[] { 100 }, 20 * 300, 2040,
@@ -1247,7 +1265,7 @@ public class RECIPES_GREGTECH {
CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.americium", 1),
new ItemStack[] { GregtechItemList.Pellet_RTG_AM241.get(4) }, null, new int[] { 2500 }, 20 * 300, 1020,
500 * 20); //PO Special Value
-
+
//Strontium u235
CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.uranium235", 10),
new ItemStack[] { GregtechItemList.Pellet_RTG_SR90.get(1) }, null, new int[] { 570 }, 20 * 300, 1020,
@@ -1257,24 +1275,24 @@ public class RECIPES_GREGTECH {
CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.uranium233", 10),
new ItemStack[] { GregtechItemList.Pellet_RTG_SR90.get(1) }, null, new int[] { 660 }, 20 * 300, 1020,
500 * 20); //PO Special Value
-
+
//Strontium pu239
CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.plutonium239", 10),
new ItemStack[] { GregtechItemList.Pellet_RTG_SR90.get(1) }, null, new int[] { 220 }, 20 * 300, 1020,
500 * 20); //PO Special Value
-
+
//Plutonium
CORE.RA.addCyclotronRecipe(CI.getNumberedCircuit(0), FluidUtils.getFluidStack("molten.plutonium238", 1),
new ItemStack[] { GregtechItemList.Pellet_RTG_PU238.get(2) }, null, new int[] { 780 }, 20 * 300, 1020,
500 * 20); //PO Special Value
-
-
+
+
//Neptunium
CORE.RA.addCyclotronRecipe(new ItemStack[] {ELEMENT.getInstance().URANIUM238.getDust(1) }, FluidUtils.getFluidStack("deuterium", 400),
ItemUtils.getSimpleStack(ModItems.dustNeptunium238), null, new int[] { 500 }, 20 * 5, 500,
500 * 20); //PO Special Value
-
-
+
+
}
private static void sifterRecipes() {
@@ -1297,6 +1315,34 @@ public class RECIPES_GREGTECH {
ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1) },
new int[] { 10000, 5000, 1500, 1000, 500, 500 }, 20 * 30, 60);
+
+ // Radium
+ GT_Values.RA.addSifterRecipe(ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedUranium", 1),
+ new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustUranium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTinyLead", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1) },
+ new int[] { 10000, 5000, 1000, 500, 500, 500 }, 20 * 30, 60);
+ // Radium
+ GT_Values.RA.addSifterRecipe(ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedUraninite", 1),
+ new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustUraninite", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTinyUranium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1) },
+ new int[] { 10000, 5000, 500, 250, 250, 250 }, 20 * 30, 60);
+ // Radium
+ GT_Values.RA.addSifterRecipe(ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedPitchblende", 1),
+ new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustPitchblende", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTinyLead", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1) },
+ new int[] { 10000, 5000, 500, 250, 250, 250 }, 20 * 30, 60);
}
private static void electroMagneticSeperatorRecipes() {
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java
index e56d1b57f9..2588a88143 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_General.java
@@ -23,7 +23,7 @@ import gtPlusPlus.core.material.nuclear.FLUORIDES;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.RecipeUtils;
-import gtPlusPlus.core.world.darkworld.Dimension_DarkWorld;
+import gtPlusPlus.everglades.dimension.Dimension_Everglades;
import gtPlusPlus.xmod.bop.blocks.BOP_Block_Registrator;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import net.minecraftforge.oredict.OreDictionary;
@@ -114,7 +114,7 @@ public class RECIPES_General {
if (ModBlocks.blockOreFluorite != null){
RecipeUtils.addShapelessGregtechRecipe(new ItemStack[]{ItemUtils.getSimpleStack(ModBlocks.blockOreFluorite)}, FLUORIDES.FLUORITE.getOre(1));
}
-
+
//Iron bars
final ItemStack ironBars;
if (CORE.GTNH) {
@@ -131,22 +131,23 @@ public class RECIPES_General {
ItemUtils.getSimpleStack(ModBlocks.blockFishTrap))){
Logger.INFO("Added a recipe for the Fish Trap.");
}
-
+
//Small Gear Extruder Shape
if (!CORE.GTNH) {
GT_ModHandler.addCraftingRecipe(GregtechItemList.Shape_Extruder_SmallGear.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"hXS", "XPX", "fXd", Character.valueOf('P'), ItemList.Shape_Extruder_Gear, Character.valueOf('X'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Steel)});
- }
-
- String[] ironTypes = {"", "Wrought", "Pig", "Any"};
- for (int y=0;y<ironTypes.length;y++) {
- //Iron bars
- String ironRecipe = "stick"+ironTypes[y]+"Iron";
- if (RecipeUtils.recipeBuilder(
- null, CI.craftingToolWrench, null,
- ironRecipe, ironRecipe, ironRecipe,
- ironRecipe, ironRecipe, ironRecipe,
- ItemUtils.getItemStack("minecraft:iron_bars", 8))) {
- Logger.INFO("Re-added old GT recipe for Iron Bars.");
+
+
+ String[] ironTypes = {"", "Wrought", "Pig", "Any"};
+ for (int y=0;y<ironTypes.length;y++) {
+ //Iron bars
+ String ironRecipe = "stick"+ironTypes[y]+"Iron";
+ if (RecipeUtils.recipeBuilder(
+ null, CI.craftingToolWrench, null,
+ ironRecipe, ironRecipe, ironRecipe,
+ ironRecipe, ironRecipe, ironRecipe,
+ ItemUtils.getItemStack("minecraft:iron_bars", 8))) {
+ Logger.INFO("Re-added old GT recipe for Iron Bars.");
+ }
}
}
@@ -164,10 +165,10 @@ public class RECIPES_General {
CI.sensor_HV, CI.fieldGenerator_MV, CI.sensor_HV,
CI.craftingToolHammer_Hard, ItemList.Casing_SolidSteel.get(1), CI.craftingToolSolderingIron,
CI.emitter_HV, CI.fieldGenerator_MV, CI.emitter_HV,
- ItemUtils.getSimpleStack(Dimension_DarkWorld.blockPortalFrame, 2))){
+ ItemUtils.getSimpleStack(Dimension_Everglades.blockPortalFrame, 2))){
Logger.INFO("Added a recipe for the Toxic Everglades Portal frame");
}
-
+
//Alkalus Coin
if (RecipeUtils.recipeBuilder(
"gemExquisiteRuby", "gemFlawlessDiamond", "gemExquisiteDiamond",
@@ -204,9 +205,9 @@ public class RECIPES_General {
getSimpleStack(Items.experience_bottle), ItemUtils.simpleMetaStack(ModBlocks.blockCompressedObsidian, 2, 1), getSimpleStack(Items.experience_bottle),
ItemUtils.getSimpleStack(ModBlocks.blockXpConverter, 1));
-
-
-
+
+
+
// Rope/Fiber/Net
RecipeUtils.addShapelessGregtechRecipe(
new ItemStack[]{
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java
index fa46b392e6..76182e61d9 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_LaserEngraver.java
@@ -11,7 +11,7 @@ import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.world.darkworld.Dimension_DarkWorld;
+import gtPlusPlus.everglades.dimension.Dimension_Everglades;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
public class RECIPES_LaserEngraver implements IOreRecipeRegistrator {
@@ -126,7 +126,7 @@ public class RECIPES_LaserEngraver implements IOreRecipeRegistrator {
}
else if (aOreDictName.equals(OreDictNames.craftingLensOrange.toString())) {
- GT_Values.RA.addLaserEngraverRecipe(ItemUtils.getSimpleStack(ModItems.itemAlkalusDisk), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemUtils.getSimpleStack(Dimension_DarkWorld.portalItem), 360*60*20, 4096);
+ GT_Values.RA.addLaserEngraverRecipe(ItemUtils.getSimpleStack(ModItems.itemAlkalusDisk), GT_Utility.copyAmount(0L, new Object[]{aStack}), ItemUtils.getSimpleStack(Dimension_Everglades.portalItem), 360*60*20, 4096);
}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/Dimension_DarkWorld.java b/src/Java/gtPlusPlus/core/world/darkworld/Dimension_DarkWorld.java
deleted file mode 100644
index 678d9b0c2b..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/Dimension_DarkWorld.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package gtPlusPlus.core.world.darkworld;
-
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.world.darkworld.block.BlockDarkWorldPortal;
-import gtPlusPlus.core.world.darkworld.item.ItemDarkWorldPortalTrigger;
-import gtPlusPlus.core.world.darkworld.world.WorldProviderMod;
-import net.minecraftforge.common.DimensionManager;
-
-public class Dimension_DarkWorld {
-
- public Object instance;
- public static int DIMID = CORE.DARKWORLD_ID;
- public static BlockDarkWorldPortal portalBlock;
- public static ItemDarkWorldPortalTrigger portalItem;
- public static Block blockTopLayer;
- public static Block blockSecondLayer;
- public static Block blockMainFiller = Blocks.stone;
- public static Block blockSecondaryFiller;
- public static Block blockFluidLakes;
- public static Block blockPortalFrame;
-
- public void load() {
- DimensionManager.registerProviderType(DIMID, WorldProviderMod.class, false);
- DimensionManager.registerDimension(DIMID, DIMID);
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java b/src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java
deleted file mode 100644
index 353eed083d..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/biome/BiomeGenerator_Custom.java
+++ /dev/null
@@ -1,355 +0,0 @@
-package gtPlusPlus.core.world.darkworld.biome;
-
-import static net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.*;
-import static net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.*;
-
-import java.util.Random;
-
-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;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraft.world.gen.feature.*;
-
-import gtPlusPlus.core.world.darkworld.gen.WorldGenDeadLilly;
-import gtPlusPlus.core.world.darkworld.gen.WorldGenMinable_Custom;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.event.terraingen.DecorateBiomeEvent;
-import net.minecraftforge.event.terraingen.OreGenEvent;
-import net.minecraftforge.event.terraingen.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;
-
- 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_)
- {
- 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();
- 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)
- {
- 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)
- {
- 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)
- {
- 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)
- {
- 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)
- {
- 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/biome/Biome_DarkWorld.java b/src/Java/gtPlusPlus/core/world/darkworld/biome/Biome_DarkWorld.java
deleted file mode 100644
index e9669d9b50..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/biome/Biome_DarkWorld.java
+++ /dev/null
@@ -1,146 +0,0 @@
-package gtPlusPlus.core.world.darkworld.biome;
-
-import java.lang.reflect.Field;
-import java.util.Random;
-
-import cpw.mods.fml.common.event.FMLPreInitializationEvent;
-import cpw.mods.fml.common.event.FMLServerStartingEvent;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-import net.minecraft.entity.monster.EntityPigZombie;
-import net.minecraft.entity.passive.EntityBat;
-import net.minecraft.entity.passive.EntitySquid;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-import net.minecraft.world.biome.BiomeGenBase;
-
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.entity.monster.EntitySickBlaze;
-import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import gtPlusPlus.core.world.darkworld.Dimension_DarkWorld;
-import net.minecraftforge.common.BiomeDictionary;
-import net.minecraftforge.common.BiomeManager;
-
-public class Biome_DarkWorld {
-
- public static BiomeGenDarkWorld biome = new BiomeGenDarkWorld();
-
- public Object instance;
-
- public Biome_DarkWorld() {
- }
-
- public void load() {
- BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.DEAD);
- BiomeManager.addSpawnBiome(biome);
- }
-
- public void generateNether(World world, Random random, int chunkX, int chunkZ) {
- }
-
- public void generateSurface(World world, Random random, int chunkX, int chunkZ) {
- }
-
- public void registerRenderers() {
- }
-
- public int addFuel(ItemStack fuel) {
- return 0;
- }
-
- public void serverLoad(FMLServerStartingEvent event) {
- }
-
- public void preInit(FMLPreInitializationEvent event) {
- }
-
- static class BiomeGenDarkWorld extends BiomeGenBase {
- @SuppressWarnings("unchecked")
- public BiomeGenDarkWorld() {
- super(CORE.DARKBIOME_ID);
- this.setBiomeID();
- this.theBiomeDecorator = new BiomeGenerator_Custom();
- this.theBiomeDecorator.treesPerChunk = 10;
- Logger.INFO("Dark World Temperature Category: "+getTempCategory());
- this.setBiomeName("Dark World");
- this.topBlock = Dimension_DarkWorld.blockTopLayer;
- this.fillerBlock = Dimension_DarkWorld.blockSecondLayer;
- this.enableRain = true;
- this.enableSnow = false;
- this.rainfall = 0.7F;
- this.setHeight(new BiomeGenBase.Height(0.3F, 0.5F));
- this.heightVariation = 0.4F;
- this.waterColorMultiplier = 0x17290A;
- this.rootHeight = -0.25f; //Ground level
-
- this.spawnableMonsterList.clear();
- this.spawnableCreatureList.clear();
- this.spawnableWaterCreatureList.clear();
- this.spawnableCaveCreatureList.clear();
-
- //Enemies
- this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntitySickBlaze.class, 100, 2, 6));
- this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityPigZombie.class, 75, 4, 16));
- this.spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(EntityStaballoyConstruct.class, 20, 1, 2));
-
- //Animals
- this.spawnableWaterCreatureList.add(new BiomeGenBase.SpawnListEntry(EntitySquid.class, 1, 1, 6));
- this.spawnableCaveCreatureList.add(new BiomeGenBase.SpawnListEntry(EntityBat.class, 10, 8, 8));
-
- }
-
- private synchronized boolean setBiomeID() {
- BiomeGenBase[] mTempList;
- try {
- Field mInternalBiomeList = ReflectionUtils.getField(BiomeGenBase.class, "biomeList");
- Field mClone = mInternalBiomeList;
- mTempList = (BiomeGenBase[]) mInternalBiomeList.get(null);
- if (mTempList != null){
- mTempList[CORE.DARKBIOME_ID] = this;
- mInternalBiomeList.set(null, mTempList);
- if (mTempList != mInternalBiomeList.get(null)){
- ReflectionUtils.setFinalStatic(mInternalBiomeList, mTempList);
- Logger.REFLECTION("Set Biome ID for Dark World Biome internally in 'biomeList' field from "+BiomeGenBase.class.getCanonicalName()+".");
- return true;
- }
- else {
- Logger.REFLECTION("Failed to set Biome ID for Dark World Biome internally in 'biomeList' field from "+BiomeGenBase.class.getCanonicalName()+".");
- }
- }
- return false;
- }
- catch (Exception e) {
- Logger.REFLECTION("Could not access 'biomeList' field in "+BiomeGenBase.class.getCanonicalName()+".");
- return false;
- }
- }
-
- @SideOnly(Side.CLIENT)
- public int getBiomeGrassColor() {
- return 0x111f11;
- }
-
- @SideOnly(Side.CLIENT)
- public int getBiomeFoliageColor() {
- return 0x111f11;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public int getSkyColorByTemp(float par1) {
- return 0xF67A14;
- }
-
- @SuppressWarnings({ "unchecked", "unused" })
- private boolean addToMonsterSpawnLists(Class<?> EntityClass, int a, int b, int c){
- //this.spawnableMonsterList.add(new SpawnListEntry(EntityClass, a, b, c));
- this.spawnableCaveCreatureList.add(new SpawnListEntry(EntityClass, a, b, c));
- return true;
- }
-
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/biome/GenLayerBiomes.java b/src/Java/gtPlusPlus/core/world/darkworld/biome/GenLayerBiomes.java
deleted file mode 100644
index f7176f86fb..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/biome/GenLayerBiomes.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package gtPlusPlus.core.world.darkworld.biome;
-
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraft.world.gen.layer.GenLayer;
-import net.minecraft.world.gen.layer.IntCache;
-
-public class GenLayerBiomes extends GenLayer {
-
- protected BiomeGenBase[] allowedBiomes = { Biome_DarkWorld.biome, };
-
- public GenLayerBiomes(long seed) {
- super(seed);
- }
-
- public GenLayerBiomes(long seed, GenLayer genlayer) {
- super(seed);
- this.parent = genlayer;
- }
-
- @Override
- public int[] getInts(int x, int z, int width, int depth) {
- int[] dest = IntCache.getIntCache(width * depth);
- for (int dz = 0; dz < depth; dz++) {
- for (int dx = 0; dx < width; dx++) {
- this.initChunkSeed(dx + x, dz + z);
- dest[(dx + dz * width)] = this.allowedBiomes[nextInt(this.allowedBiomes.length)].biomeID;
- }
- }
- return dest;
- }
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/biome/GenLayerDarkWorld.java b/src/Java/gtPlusPlus/core/world/darkworld/biome/GenLayerDarkWorld.java
deleted file mode 100644
index 4353c6d540..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/biome/GenLayerDarkWorld.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package gtPlusPlus.core.world.darkworld.biome;
-
-import net.minecraft.world.WorldType;
-import net.minecraft.world.gen.layer.GenLayer;
-import net.minecraft.world.gen.layer.GenLayerVoronoiZoom;
-import net.minecraft.world.gen.layer.GenLayerZoom;
-
-public class GenLayerDarkWorld extends GenLayer {
-
- public GenLayerDarkWorld(long seed) {
- super(seed);
- }
-
- public static GenLayer[] makeTheWorld(long seed, WorldType type) {
- GenLayer biomes = new GenLayerBiomes(1L);
- biomes = new GenLayerZoom(1000L, biomes);
- biomes = new GenLayerZoom(1001L, biomes);
- biomes = new GenLayerZoom(1002L, biomes);
- biomes = new GenLayerZoom(1003L, biomes);
- biomes = new GenLayerZoom(1004L, biomes);
- biomes = new GenLayerZoom(1005L, biomes);
- GenLayer genlayervoronoizoom = new GenLayerVoronoiZoom(10L, biomes);
- biomes.initWorldGenSeed(seed);
- genlayervoronoizoom.initWorldGenSeed(seed);
- return new GenLayer[] { biomes, genlayervoronoizoom };
- }
-
- @Override
- public int[] getInts(int p_75904_1_, int p_75904_2_, int p_75904_3_, int p_75904_4_) {
- return new int[] {};
- }
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldGround.java b/src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldGround.java
deleted file mode 100644
index 95e21baa45..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldGround.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package gtPlusPlus.core.world.darkworld.block;
-
-import cpw.mods.fml.common.registry.LanguageRegistry;
-
-import net.minecraft.block.BlockGrass;
-
-import gtPlusPlus.api.interfaces.ITileTooltip;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-
-public class BlockDarkWorldGround extends BlockGrass implements ITileTooltip{
-
- public BlockDarkWorldGround() {
- this.setCreativeTab(AddToCreativeTab.tabBOP);
- this.setBlockName("blockDarkWorldGround");
- this.setHardness(1.0F);
- this.setBlockTextureName("minecraft" + ":" + "grass");
- LanguageRegistry.addName(this, "Unstable Earth");
- }
-
- @Override
- public int getTooltipID() {
- return 2;
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldPollutedDirt.java b/src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldPollutedDirt.java
deleted file mode 100644
index 82acaf1ff4..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldPollutedDirt.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package gtPlusPlus.core.world.darkworld.block;
-
-import cpw.mods.fml.common.registry.LanguageRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-import net.minecraft.block.BlockDirt;
-import net.minecraft.world.ColorizerGrass;
-import net.minecraft.world.IBlockAccess;
-
-import gtPlusPlus.api.interfaces.ITileTooltip;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-
-public class BlockDarkWorldPollutedDirt extends BlockDirt implements ITileTooltip{
-
- public BlockDarkWorldPollutedDirt() {
- this.setCreativeTab(AddToCreativeTab.tabBOP);
- this.setBlockName("blockDarkWorldGround2");
- this.setHardness(0.5F);
- this.setBlockTextureName("minecraft" + ":" + "dirt");
- LanguageRegistry.addName(this, "Polluted Soil");
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public int getBlockColor()
- {
- double d0 = 0.5D;
- double d1 = 1.0D;
- return ColorizerGrass.getGrassColor(d0, d1);
- }
-
- /**
- * Returns the color this block should be rendered. Used by leaves.
- */
- @Override
- @SideOnly(Side.CLIENT)
- public int getRenderColor(int p_149741_1_)
- {
- return this.getBlockColor();
- }
-
- /**
- * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called
- * when first determining what to render.
- */
- @Override
- @SideOnly(Side.CLIENT)
- public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_)
- {
- int l = 0;
- int i1 = 0;
- int j1 = 0;
-
- for (int k1 = -1; k1 <= 1; ++k1)
- {
- for (int l1 = -1; l1 <= 1; ++l1)
- {
- int i2 = p_149720_1_.getBiomeGenForCoords(p_149720_2_ + l1, p_149720_4_ + k1).getBiomeGrassColor(p_149720_2_ + l1, p_149720_3_, p_149720_4_ + k1);
- l += (i2 & 16711680) >> 16;
- i1 += (i2 & 65280) >> 8;
- j1 += i2 & 255;
- }
- }
-
- return (l / 9 & 255) << 16 | (i1 / 9 & 255) << 8 | j1 / 9 & 255;
- }
-
- @Override
- public int getTooltipID() {
- return 3;
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldPortal.java b/src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldPortal.java
deleted file mode 100644
index 061e2c8dc3..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldPortal.java
+++ /dev/null
@@ -1,403 +0,0 @@
-package gtPlusPlus.core.world.darkworld.block;
-
-import java.util.Random;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockBreakable;
-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.player.EntityPlayerMP;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.AxisAlignedBB;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-
-import gtPlusPlus.api.interfaces.ITileTooltip;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.minecraft.BlockPos;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.world.darkworld.Dimension_DarkWorld;
-import gtPlusPlus.core.world.darkworld.world.TeleporterDimensionMod;
-
-public class BlockDarkWorldPortal extends BlockBreakable implements ITileTooltip{
- IIcon gor = null, dol = null, st1 = null, st2 = null, st3 = null, st4 = null;
-
- public BlockDarkWorldPortal() {
- super("portal", Material.portal, false);
- this.setTickRandomly(true);
- this.setHardness(-1.0F);
- this.setLightLevel(0.75F);
- this.setCreativeTab(CreativeTabs.tabBlock);
- this.setBlockName("blockDarkWorldPortal");
-
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public IIcon getIcon(int i, int par2) {
-
- if (i == 0)
- return gor;
-
- else if (i == 1)
- return dol;
-
- else if (i == 2)
- return st1;
-
- else if (i == 3)
- return st2;
-
- else if (i == 4)
- return st4;
-
- else if (i == 5)
- return st3;
-
- else
- return gor;
-
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public void registerBlockIcons(IIconRegister reg) {
- this.gor = reg.registerIcon("portal");
- this.dol = reg.registerIcon("portal");
- this.st1 = reg.registerIcon("portal");
- this.st2 = reg.registerIcon("portal");
- this.st3 = reg.registerIcon("portal");
- this.st4 = reg.registerIcon("portal");
- }
-
- /**
- * Ticks the block if it's been scheduled
- */
- @Override
- public void updateTick(World par1World, int x, int y, int z, Random par5Random) {
- super.updateTick(par1World, x, y, z, par5Random);
-
- int blockCount = 0;
- BlockPos portal = new BlockPos(x, y, z, par1World.provider.dimensionId);
-
- for (BlockPos side : portal.getSurroundingBlocks()) {
- Block b = side.getBlockAtPos();
- if (b == Dimension_DarkWorld.blockPortalFrame || b == Dimension_DarkWorld.portalBlock) {
- blockCount++;
- }
- }
- if (blockCount < 4) {
- par1World.setBlockToAir(x, y, z);
- }
-
- }
-
- /**
- * Returns a bounding box from the pool of bounding boxes (this means
- * this box can change after the pool has been cleared to be reused)
- */
- @Override
- public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) {
- return null;
- }
-
- /**
- * Updates the blocks bounds based on its current state. Args: world, x,
- * y, z
- */
- @Override
- public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {
- float f;
- float f1;
- if (par1IBlockAccess.getBlock(par2 - 1, par3, par4) != this && par1IBlockAccess.getBlock(par2 + 1, par3, par4) != this) {
- f = 0.125F;
- f1 = 0.5F;
- this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f1, 0.5F + f, 1.0F, 0.5F + f1);
- } else {
- f = 0.5F;
- f1 = 0.125F;
- this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f1, 0.5F + f, 1.0F, 0.5F + f1);
- }
- }
-
- /**
- * Is this block (a) opaque and (B) a full 1m cube? This determines
- * whether or not to render the shared face of two adjacent blocks and
- * also whether the player can attach torches, redstone wire, etc to
- * this block.
- */
- @Override
- public boolean isOpaqueCube() {
- return false;
- }
-
- /**
- * If this block doesn't render as an ordinary block it will return
- * False (examples: signs, buttons, stairs, etc)
- */
- @Override
- public boolean renderAsNormalBlock() {
- return false;
- }
-
- /**
- * Checks to see if this location is valid to create a portal and will
- * return True if it does. Args: world, x, y, z
- */
- public boolean tryToCreatePortal(World par1World, int par2, int par3, int par4) {
- byte b0 = 0;
- byte b1 = 0;
- if (par1World.getBlock(par2 - 1, par3, par4) == Dimension_DarkWorld.blockPortalFrame
- || par1World.getBlock(par2 + 1, par3, par4) == Dimension_DarkWorld.blockPortalFrame) {
- b0 = 1;
- }
- if (par1World.getBlock(par2, par3, par4 - 1) == Dimension_DarkWorld.blockPortalFrame
- || par1World.getBlock(par2, par3, par4 + 1) == Dimension_DarkWorld.blockPortalFrame) {
- b1 = 1;
- }
- if (b0 == b1) {
- return false;
- } else {
- if (par1World.getBlock(par2 - b0, par3, par4 - b1) == Blocks.air) {
- par2 -= b0;
- par4 -= b1;
- }
- int l;
- int i1;
- for (l = -1; l <= 2; ++l) {
- for (i1 = -1; i1 <= 3; ++i1) {
- boolean flag = l == -1 || l == 2 || i1 == -1 || i1 == 3;
- if (l != -1 && l != 2 || i1 != -1 && i1 != 3) {
- Block j1 = par1World.getBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l);
- if (flag) {
- if (j1 != Dimension_DarkWorld.blockPortalFrame) {
- return false;
- }
- }
- /*
- * else if (j1 != 0 && j1 !=
- * Main.TutorialFire.blockID) { return false; }
- */
- }
- }
- }
- for (l = 0; l < 2; ++l) {
- for (i1 = 0; i1 < 3; ++i1) {
- par1World.setBlock(par2 + b0 * l, par3 + i1, par4 + b1 * l, this, 0, 2);
- }
- }
- return true;
- }
- }
-
- /**
- * Lets the block know when one of its neighbor changes. Doesn't know
- * which neighbor changed (coordinates passed are their own) Args: x, y,
- * z, neighbor blockID
- */
- public void onNeighborBlockChange(BlockPos pos) {
- int x = pos.xPos, y = pos.yPos, z = pos.zPos;
- Logger.INFO("Trigger");
- int blockCount = 0;
- BlockPos portal = pos;
- World par1World = portal.world;
- for (BlockPos side : portal.getSurroundingBlocks()) {
- Block b = side.getBlockAtPos();
- if (b == Dimension_DarkWorld.blockPortalFrame || b == Dimension_DarkWorld.portalBlock) {
- blockCount++;
- }
- }
- if (blockCount < 4) {
- par1World.setBlockToAir(x, y, z);
- par1World.scheduleBlockUpdate(x, y, z, portal.getBlockAtPos(), 0);
- }
-
-
-
- byte b0 = 0;
- byte b1 = 1;
- if (par1World.getBlock(x - 1, y, z) == this || par1World.getBlock(x + 1, y, z) == this) {
- b0 = 1;
- b1 = 0;
- }
- int i1;
- for (i1 = y; par1World.getBlock(x, i1 - 1, z) == this; --i1) {
- ;
- }
- if (par1World.getBlock(x, i1 - 1, z) != Dimension_DarkWorld.blockPortalFrame) {
- par1World.setBlockToAir(x, y, z);
- } else {
- int j1;
- for (j1 = 1; j1 < 4 && par1World.getBlock(x, i1 + j1, z) == this; ++j1) {
- ;
- }
- if (j1 == 3 && par1World.getBlock(x, i1 + j1, z) == Dimension_DarkWorld.blockPortalFrame) {
- boolean flag = par1World.getBlock(x - 1, y, z) == this || par1World.getBlock(x + 1, y, z) == this;
- boolean flag1 = par1World.getBlock(x, y, z - 1) == this || par1World.getBlock(x, y, z + 1) == this;
- if (flag && flag1) {
- par1World.setBlockToAir(x, y, z);
- } else {
- if ((par1World.getBlock(x + b0, y, z + b1) != Dimension_DarkWorld.blockPortalFrame || par1World
- .getBlock(x - b0, y, z - b1) != this)
- && (par1World.getBlock(x - b0, y, z - b1) != Dimension_DarkWorld.blockPortalFrame || par1World.getBlock(x + b0, y,
- z + b1) != this)) {
- par1World.setBlockToAir(x, y, z);
- }
- }
- } else {
- par1World.setBlockToAir(x, y, z);
- }
- }
- }
-
- @Override
- public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
- onNeighborBlockChange(new BlockPos(x, y, z, world.provider.dimensionId));
- super.onNeighborBlockChange(world, x, y, z, block);
- }
-
- /*@Override
- public void onNeighborChange(IBlockAccess world, int x, int y, int z, int tileX, int tileY, int tileZ) {
- onNeighborBlockChange(new BlockPos(x, y, z, world.));
- super.onNeighborChange(world, x, y, z, tileX, tileY, tileZ);
- }*/
-
- @Override
- @SideOnly(Side.CLIENT)
- /**
- * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
- * coordinates. Args: blockAccess, x, y, z, side
- */
- public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) {
- if (par1IBlockAccess.getBlock(par2, par3, par4) == this) {
- return false;
- } else {
- boolean flag = par1IBlockAccess.getBlock(par2 - 1, par3, par4) == this && par1IBlockAccess.getBlock(par2 - 2, par3, par4) != this;
- boolean flag1 = par1IBlockAccess.getBlock(par2 + 1, par3, par4) == this && par1IBlockAccess.getBlock(par2 + 2, par3, par4) != this;
- boolean flag2 = par1IBlockAccess.getBlock(par2, par3, par4 - 1) == this && par1IBlockAccess.getBlock(par2, par3, par4 - 2) != this;
- boolean flag3 = par1IBlockAccess.getBlock(par2, par3, par4 + 1) == this && par1IBlockAccess.getBlock(par2, par3, par4 + 2) != this;
- boolean flag4 = flag || flag1;
- boolean flag5 = flag2 || flag3;
- return flag4 && par5 == 4 ? true : (flag4 && par5 == 5 ? true : (flag5 && par5 == 2 ? true : flag5 && par5 == 3));
- }
- }
-
- /**
- * Returns the quantity of items to drop on block destruction.
- */
- @Override
- public int quantityDropped(Random par1Random) {
- return 0;
- }
-
- /**
- * Triggered whenever an entity collides with this block (enters into
- * the block). Args: world, x, y, z, entity
- */
- @Override
- public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) {
- if ((par5Entity.ridingEntity == null) && (par5Entity.riddenByEntity == null) && ((par5Entity instanceof EntityPlayerMP))) {
- EntityPlayerMP thePlayer = (EntityPlayerMP) par5Entity;
- if (thePlayer.timeUntilPortal > 0) {
- thePlayer.timeUntilPortal = 100;
- } else if (thePlayer.dimension != Dimension_DarkWorld.DIMID) {
- thePlayer.timeUntilPortal = 100;
- thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, Dimension_DarkWorld.DIMID,
- new TeleporterDimensionMod(thePlayer.mcServer.worldServerForDimension(Dimension_DarkWorld.DIMID)));
- } else {
- thePlayer.timeUntilPortal = 100;
- thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, 0,
- new TeleporterDimensionMod(thePlayer.mcServer.worldServerForDimension(0)));
- }
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- /**
- * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
- */
- public int getRenderBlockPass() {
- return 1;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- /**
- * A randomly called display update to be able to add particles or other items for display
- */
- public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) {
- if (CORE.RANDOM.nextInt(100) == 0) {
- par1World.playSound(par2 + 0.5D, par3 + 0.5D, par4 + 0.5D, "portal.portal", 0.5F,
- CORE.RANDOM.nextFloat() * 0.4F + 0.8F, false);
- }
- for (int l = 0; l < 4; ++l) {
- double d0 = par2 + CORE.RANDOM.nextFloat();
- double d1 = par3 + CORE.RANDOM.nextFloat();
- double d2 = par4 + CORE.RANDOM.nextFloat();
- double d3 = 0.0D;
- double d4 = 0.0D;
- double d5 = 0.0D;
- int i1 = CORE.RANDOM.nextInt(2) * 2 - 1;
- d3 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D;
- d4 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D;
- d5 = (CORE.RANDOM.nextFloat() - 0.5D) * 0.5D;
- if (par1World.getBlock(par2 - 1, par3, par4) != this && par1World.getBlock(par2 + 1, par3, par4) != this) {
- d0 = par2 + 0.5D + 0.25D * i1;
- d3 = CORE.RANDOM.nextFloat() * 2.0F * i1;
- } else {
- d2 = par4 + 0.5D + 0.25D * i1;
- d5 = CORE.RANDOM.nextFloat() * 2.0F * i1;
- }
- par1World.spawnParticle("reddust", d0+0.1D, d1, d2, d3, d4, d5);
- par1World.spawnParticle("smoke", d0, d1+0.1D, d2, 0, 0, 0);
-
- Random R = new Random();
-
- if (R.nextInt(10) == 0){
- par1World.spawnParticle("largesmoke", d0, d1, d2, 0, 0+0.2D, 0);
- }
- else if (R.nextInt(5)==1){
- par1World.spawnParticle("flame", d0, d1, d2, 0, 0+0.1D, 0);
- }
- }
- }
-
- @SideOnly(Side.CLIENT)
- /**
- * only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative)
- */
- public int idPicked(World par1World, int par2, int par3, int par4) {
- return 0;
- }
-
- @Override
- public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){
- return Utils.rgbtoHexValue(0, 255, 0);
- }
-
- @Override
- public int getRenderColor(final int aMeta) {
- return Utils.rgbtoHexValue(0, 255, 0);
- }
-
- @Override
- public String getLocalizedName() {
- return EnumChatFormatting.OBFUSCATED+super.getLocalizedName();
- }
-
- @Override
- public int getTooltipID() {
- return 1;
- }
-}
-
-
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldPortalFrame.java b/src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldPortalFrame.java
deleted file mode 100644
index 90c425d2d4..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldPortalFrame.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package gtPlusPlus.core.world.darkworld.block;
-
-import cpw.mods.fml.common.registry.LanguageRegistry;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-
-import gtPlusPlus.api.interfaces.ITileTooltip;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.lib.CORE;
-
-public class BlockDarkWorldPortalFrame extends Block implements ITileTooltip{
-
- public BlockDarkWorldPortalFrame() {
- super(Material.iron);
- this.setCreativeTab(AddToCreativeTab.tabBOP);
- this.setBlockName("blockDarkWorldPortalFrame");
- this.setHardness(3.0F);
- this.setLightLevel(0.5F);
- this.setBlockTextureName(CORE.MODID + ":" + "metro/TEXTURE_TECH_PANEL_A");
- LanguageRegistry.addName(this, "Containment Frame");
-
- }
-
- @Override
- public int getTooltipID() {
- return 0;
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldSludgeFluid.java b/src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldSludgeFluid.java
deleted file mode 100644
index 8271713dfb..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/block/BlockDarkWorldSludgeFluid.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package gtPlusPlus.core.world.darkworld.block;
-
-import net.minecraft.block.material.MapColor;
-import net.minecraft.block.material.Material;
-import net.minecraft.block.material.MaterialLiquid;
-
-import net.minecraftforge.fluids.Fluid;
-
-public class BlockDarkWorldSludgeFluid extends Fluid {
-
-
- public static final Material SLUDGE = new MaterialLiquid(MapColor.dirtColor);
-
- protected static int mapColor = 0xFFFFFFFF;
- protected static float overlayAlpha = 0.2F;
- //protected static SoundEvent emptySound = SoundEvents.ITEM_BUCKET_EMPTY;
- //protected static SoundEvent fillSound = SoundEvents.ITEM_BUCKET_FILL;
- protected static Material material = SLUDGE;
-
-
- public BlockDarkWorldSludgeFluid(String fluidName, int rgbColour) {
- this(fluidName, rgbColour, null);
- }
-
- public BlockDarkWorldSludgeFluid(String fluidName, int rgbColour, Float overlayAlpha) {
- super(fluidName);
- setColor(rgbColour);
- if (overlayAlpha != null){
- setAlpha(overlayAlpha.floatValue());
- }
- else {
- setAlpha(0);
- }
- }
-
- @Override
- public int getColor()
- {
- return mapColor;
- }
-
- public BlockDarkWorldSludgeFluid setColor(int parColor)
- {
- mapColor = parColor;
- return this;
- }
-
- public float getAlpha()
- {
- return overlayAlpha;
- }
-
- public BlockDarkWorldSludgeFluid setAlpha(float parOverlayAlpha)
- {
- overlayAlpha = parOverlayAlpha;
- return this;
- }
-
- /*public blockDarkWorldSludgeFluid setEmptySound(SoundEvent parSound)
- {
- emptySound = parSound;
- return this;
- }
-
- public SoundEvent getEmptySound()
- {
- return emptySound;
- }
-
- @Override
- public blockDarkWorldSludgeFluid setFillSound(SoundEvent parSound)
- {
- fillSound = parSound;
- return this;
- }
-
- @Override
- public SoundEvent getFillSound()
- {
- return fillSound;
- }*/
-
- public BlockDarkWorldSludgeFluid setMaterial(Material parMaterial)
- {
- material = parMaterial;
- return this;
- }
-
- public Material getMaterial()
- {
- return material;
- }
-
- /*@Override
- public boolean doesVaporize(FluidStack fluidStack)
- {
- if (block == null)
- return false;
- return block.getDefaultState().getMaterial() == getMaterial();
- }*/
-}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/block/DarkWorldContentLoader.java b/src/Java/gtPlusPlus/core/world/darkworld/block/DarkWorldContentLoader.java
deleted file mode 100644
index b851e10343..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/block/DarkWorldContentLoader.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package gtPlusPlus.core.world.darkworld.block;
-
-import static gtPlusPlus.core.world.darkworld.Dimension_DarkWorld.*;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-
-import net.minecraft.init.Blocks;
-
-import gtPlusPlus.core.block.base.BlockBaseFluid;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.world.darkworld.item.ItemBlockToxicEverglades;
-import gtPlusPlus.core.world.darkworld.item.ItemDarkWorldPortalTrigger;
-import net.minecraftforge.fluids.FluidRegistry;
-
-public class DarkWorldContentLoader {
-
- //Static Vars
- public static BlockDarkWorldSludgeFluid SLUDGE;
-
-
- public synchronized static void run() {
- initMisc();
- initItems();
- initBlocks();
- }
-
- public synchronized static boolean initMisc(){
-
- //Fluids
- SLUDGE = (BlockDarkWorldSludgeFluid) new BlockDarkWorldSludgeFluid(
- "sludge",
- Utils.rgbtoHexValue(30, 130, 30))
- .setDensity(1800)
- .setGaseous(false)
- .setLuminosity(2)
- .setViscosity(25000)
- .setTemperature(300);
- FluidRegistry.registerFluid(SLUDGE);
-
- return true;
- }
-
- public synchronized static boolean initItems(){
- portalItem = (ItemDarkWorldPortalTrigger) (new ItemDarkWorldPortalTrigger().setUnlocalizedName("everglades.trigger"));
- GameRegistry.registerItem(portalItem, "everglades.trigger");
- return true;
- }
-
- public synchronized static boolean initBlocks(){
-
- //Create Block Instances
- blockFluidLakes = new BlockBaseFluid("Sludge", SLUDGE, BlockDarkWorldSludgeFluid.SLUDGE).setLightLevel(2f).setLightOpacity(1).setBlockName("fluidSludge");
- portalBlock = new BlockDarkWorldPortal();
- blockTopLayer = new BlockDarkWorldGround();
- blockSecondLayer = new BlockDarkWorldPollutedDirt();
- blockPortalFrame = new BlockDarkWorldPortalFrame();
-
- //Registry
- GameRegistry.registerBlock(portalBlock, ItemBlockToxicEverglades.class, "dimensionDarkWorld_portal");
- GameRegistry.registerBlock(blockTopLayer, ItemBlockToxicEverglades.class, "blockDarkWorldGround");
- GameRegistry.registerBlock(blockSecondLayer, ItemBlockToxicEverglades.class, "blockDarkWorldGround2");
- GameRegistry.registerBlock(blockPortalFrame, ItemBlockToxicEverglades.class, "blockDarkWorldPortalFrame");
-
- //Make Flammable
- Blocks.fire.setFireInfo(blockTopLayer, 30, 20);
-
- return true;
- }
-
-
-}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/chunk/ChunkProviderModded.java b/src/Java/gtPlusPlus/core/world/darkworld/chunk/ChunkProviderModded.java
deleted file mode 100644
index b8c86821f4..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/chunk/ChunkProviderModded.java
+++ /dev/null
@@ -1,510 +0,0 @@
-package gtPlusPlus.core.world.darkworld.chunk;
-
-import java.util.List;
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.BlockFalling;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.IProgressUpdate;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.*;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraft.world.chunk.Chunk;
-import net.minecraft.world.chunk.IChunkProvider;
-import net.minecraft.world.gen.*;
-import net.minecraft.world.gen.feature.WorldGenLakes;
-import net.minecraft.world.gen.structure.MapGenMineshaft;
-import net.minecraft.world.gen.structure.MapGenScatteredFeature;
-import net.minecraft.world.gen.structure.MapGenVillage;
-
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.world.darkworld.Dimension_DarkWorld;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.event.terraingen.ChunkProviderEvent;
-import net.minecraftforge.event.terraingen.PopulateChunkEvent;
-import net.minecraftforge.event.terraingen.TerrainGen;
-
-public class ChunkProviderModded implements IChunkProvider {
- private Random rand;
- private NoiseGeneratorOctaves field_147431_j;
- private NoiseGeneratorOctaves field_147432_k;
- private NoiseGeneratorOctaves field_147429_l;
- private NoiseGeneratorPerlin field_147430_m;
- /**
- * A NoiseGeneratorOctaves used in generating terrain
- */
- public NoiseGeneratorOctaves noiseGen5;
- /**
- * A NoiseGeneratorOctaves used in generating terrain
- */
- public NoiseGeneratorOctaves noiseGen6;
- public NoiseGeneratorOctaves mobSpawnerNoise;
- /**
- * Reference to the World object.
- */
- private World worldObj;
- private WorldType field_147435_p;
- private final double[] field_147434_q;
- private final float[] parabolicField;
- private double[] stoneNoise = new double[256];
- private MapGenBase caveGenerator = new MapGenCaves();
- /**
- * Holds Stronghold Generator
- */
- // private MapGenStronghold strongholdGenerator = new
- // MapGenStronghold();
- /**
- * Holds Village Generator
- */
- private MapGenVillage villageGenerator = new MapGenVillage();
- /**
- * Holds Mineshaft Generator
- */
- private MapGenMineshaft mineshaftGenerator = new MapGenMineshaft();
- private MapGenScatteredFeature scatteredFeatureGenerator = new MapGenScatteredFeature();
- /**
- * Holds ravine generator
- */
- private MapGenBase ravineGenerator = new MapGenRavine();
- /**
- * The biomes that are used to generate the chunk
- */
- private BiomeGenBase[] biomesForGeneration;
- double[] field_147427_d;
- double[] field_147428_e;
- double[] field_147425_f;
- double[] field_147426_g;
- int[][] field_73219_j = new int[32][32];
- {
- caveGenerator = TerrainGen.getModdedMapGen(caveGenerator,
- net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE);
- /*
- * strongholdGenerator = (MapGenStronghold)
- * TerrainGen.getModdedMapGen(strongholdGenerator,
- * net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.
- * STRONGHOLD);
- */
- villageGenerator = (MapGenVillage) TerrainGen.getModdedMapGen(villageGenerator,
- net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE);
- mineshaftGenerator = (MapGenMineshaft) TerrainGen.getModdedMapGen(mineshaftGenerator,
- net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT);
- scatteredFeatureGenerator = (MapGenScatteredFeature) TerrainGen.getModdedMapGen(scatteredFeatureGenerator,
- net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE);
- ravineGenerator = TerrainGen.getModdedMapGen(ravineGenerator,
- net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE);
- }
-
- public ChunkProviderModded(World par1World, long par2) {
- this.worldObj = par1World;
- this.field_147435_p = par1World.getWorldInfo().getTerrainType();
- this.rand = new Random(par2);
- this.field_147431_j = new NoiseGeneratorOctaves(this.rand, 16);
- this.field_147432_k = new NoiseGeneratorOctaves(this.rand, 16);
- this.field_147429_l = new NoiseGeneratorOctaves(this.rand, 8);
- this.field_147430_m = new NoiseGeneratorPerlin(this.rand, 4);
- this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10);
- this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16);
- this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
- this.field_147434_q = new double[825];
- this.parabolicField = new float[25];
-
- for (int j = -2; j <= 2; ++j) {
- for (int k = -2; k <= 2; ++k) {
- float f = 10.0F / MathHelper.sqrt_float(j * j + k * k + 0.2F);
- this.parabolicField[j + 2 + (k + 2) * 5] = f;
- }
- }
-
- NoiseGenerator[] noiseGens = { field_147431_j, field_147432_k, field_147429_l, field_147430_m, noiseGen5,
- noiseGen6, mobSpawnerNoise };
- noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, this.rand, noiseGens);
- this.field_147431_j = (NoiseGeneratorOctaves) noiseGens[0];
- this.field_147432_k = (NoiseGeneratorOctaves) noiseGens[1];
- this.field_147429_l = (NoiseGeneratorOctaves) noiseGens[2];
- this.field_147430_m = (NoiseGeneratorPerlin) noiseGens[3];
- this.noiseGen5 = (NoiseGeneratorOctaves) noiseGens[4];
- this.noiseGen6 = (NoiseGeneratorOctaves) noiseGens[5];
- this.mobSpawnerNoise = (NoiseGeneratorOctaves) noiseGens[6];
- }
-
- public void func_147424_a(int p_147424_1_, int p_147424_2_, Block[] p_147424_3_) {
- byte b0 = 63;
- this.biomesForGeneration = this.worldObj.getWorldChunkManager()
- .getBiomesForGeneration(this.biomesForGeneration, p_147424_1_ * 4 - 2, p_147424_2_ * 4 - 2, 10, 10);
- this.func_147423_a(p_147424_1_ * 4, 0, p_147424_2_ * 4);
-
- for (int k = 0; k < 4; ++k) {
- int l = k * 5;
- int i1 = (k + 1) * 5;
-
- for (int j1 = 0; j1 < 4; ++j1) {
- int k1 = (l + j1) * 33;
- int l1 = (l + j1 + 1) * 33;
- int i2 = (i1 + j1) * 33;
- int j2 = (i1 + j1 + 1) * 33;
-
- for (int k2 = 0; k2 < 32; ++k2) {
- double d0 = 0.125D;
- double d1 = this.field_147434_q[k1 + k2];
- double d2 = this.field_147434_q[l1 + k2];
- double d3 = this.field_147434_q[i2 + k2];
- double d4 = this.field_147434_q[j2 + k2];
- double d5 = (this.field_147434_q[k1 + k2 + 1] - d1) * d0;
- double d6 = (this.field_147434_q[l1 + k2 + 1] - d2) * d0;
- double d7 = (this.field_147434_q[i2 + k2 + 1] - d3) * d0;
- double d8 = (this.field_147434_q[j2 + k2 + 1] - d4) * d0;
-
- for (int l2 = 0; l2 < 8; ++l2) {
- double d9 = 0.25D;
- double d10 = d1;
- double d11 = d2;
- double d12 = (d3 - d1) * d9;
- double d13 = (d4 - d2) * d9;
-
- for (int i3 = 0; i3 < 4; ++i3) {
- int j3 = i3 + k * 4 << 12 | 0 + j1 * 4 << 8 | k2 * 8 + l2;
- short short1 = 256; //TODO - wots dis do
- j3 -= short1;
- double d14 = 0.25D;
- double d16 = (d11 - d10) * d14;
- double d15 = d10 - d16;
-
- for (int k3 = 0; k3 < 4; ++k3) {
- if ((d15 += d16) > 0.0D) {
- p_147424_3_[j3 += short1] = Dimension_DarkWorld.blockMainFiller;
- }
- else if (k2 * 8 + l2 < b0) {
- try {
- p_147424_3_[j3 += short1] = Dimension_DarkWorld.blockFluidLakes; //River Fluid .
- }
- catch (Throwable t){
- p_147424_3_[j3 += short1] = Blocks.water; //River Fluid Fallback
- }
- }
- else {
- p_147424_3_[j3 += short1] = null;
- }
- }
-
- d10 += d12;
- d11 += d13;
- }
-
- d1 += d5;
- d2 += d6;
- d3 += d7;
- d4 += d8;
- }
- }
- }
- }
- }
-
- public void replaceBlocksForBiome(int p_147422_1_, int p_147422_2_, Block[] p_147422_3_, byte[] p_147422_4_, BiomeGenBase[] p_147422_5_) {
- @SuppressWarnings("deprecation")
- ChunkProviderEvent.ReplaceBiomeBlocks event = new ChunkProviderEvent.ReplaceBiomeBlocks(this, p_147422_1_,
- p_147422_2_, p_147422_3_, p_147422_5_);
- MinecraftForge.EVENT_BUS.post(event);
- if (event.getResult() == cpw.mods.fml.common.eventhandler.Event.Result.DENY)
- return;
-
- double d0 = 0.03125D;
- this.stoneNoise = this.field_147430_m.func_151599_a(this.stoneNoise, p_147422_1_ * 16, p_147422_2_ * 16, 16,
- 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
-
- for (int k = 0; k < 16; ++k) {
- for (int l = 0; l < 16; ++l) {
- BiomeGenBase biomegenbase = p_147422_5_[l + k * 16];
- biomegenbase.genTerrainBlocks(this.worldObj, this.rand, p_147422_3_, p_147422_4_,
- p_147422_1_ * 16 + k, p_147422_2_ * 16 + l, this.stoneNoise[l + k * 16]);
- }
- }
- }
-
- /**
- * loads or generates the chunk at the chunk location specified
- */
- @Override
- public Chunk loadChunk(int par1, int par2) {
- return this.provideChunk(par1, par2);
- }
-
- /**
- * Will return back a chunk, if it doesn't exist and its not a MP client
- * it will generates all the blocks for the specified chunk from the map
- * seed and chunk seed
- */
- @Override
- public Chunk provideChunk(int par1, int par2) {
- this.rand.setSeed(par1 * 341873128712L + par2 * 132897987541L);
- Block[] ablock = new Block[65536];
- byte[] abyte = new byte[65536];
- this.func_147424_a(par1, par2, ablock);
- this.biomesForGeneration = this.worldObj.getWorldChunkManager()
- .loadBlockGeneratorData(this.biomesForGeneration, par1 * 16, par2 * 16, 16, 16);
- this.replaceBlocksForBiome(par1, par2, ablock, abyte, this.biomesForGeneration);
-
- Chunk chunk = new Chunk(this.worldObj, ablock, abyte, par1, par2);
- byte[] abyte1 = chunk.getBiomeArray();
-
- for (int k = 0; k < abyte1.length; ++k) {
- abyte1[k] = (byte) this.biomesForGeneration[k].biomeID;
- }
-
- chunk.generateSkylightMap();
- return chunk;
- }
-
- private void func_147423_a(int p_147423_1_, int p_147423_2_, int p_147423_3_) {
- this.field_147426_g = this.noiseGen6.generateNoiseOctaves(this.field_147426_g, p_147423_1_, p_147423_3_, 5,
- 5, 200.0D, 200.0D, 0.5D);
- this.field_147427_d = this.field_147429_l.generateNoiseOctaves(this.field_147427_d, p_147423_1_,
- p_147423_2_, p_147423_3_, 5, 33, 5, 8.555150000000001D, 4.277575000000001D, 8.555150000000001D);
- this.field_147428_e = this.field_147431_j.generateNoiseOctaves(this.field_147428_e, p_147423_1_,
- p_147423_2_, p_147423_3_, 5, 33, 5, 684.412D, 684.412D, 684.412D);
- this.field_147425_f = this.field_147432_k.generateNoiseOctaves(this.field_147425_f, p_147423_1_,
- p_147423_2_, p_147423_3_, 5, 33, 5, 684.412D, 684.412D, 684.412D);
- int l = 0;
- int i1 = 0;
- for (int j1 = 0; j1 < 5; ++j1) {
- for (int k1 = 0; k1 < 5; ++k1) {
- float f = 0.0F;
- float f1 = 0.0F;
- float f2 = 0.0F;
- byte b0 = 2;
- BiomeGenBase biomegenbase = this.biomesForGeneration[j1 + 2 + (k1 + 2) * 10];
-
- for (int l1 = -b0; l1 <= b0; ++l1) {
- for (int i2 = -b0; i2 <= b0; ++i2) {
- BiomeGenBase biomegenbase1 = this.biomesForGeneration[j1 + l1 + 2 + (k1 + i2 + 2) * 10];
- float f3 = biomegenbase1.rootHeight;
- float f4 = biomegenbase1.heightVariation;
-
- if (this.field_147435_p == WorldType.AMPLIFIED && f3 > 0.0F) {
- f3 = 1.0F + f3 * 2.0F;
- f4 = 1.0F + f4 * 4.0F;
- }
-
- float f5 = this.parabolicField[l1 + 2 + (i2 + 2) * 5] / (f3 + 2.0F);
-
- if (biomegenbase1.rootHeight > biomegenbase.rootHeight) {
- f5 /= 2.0F;
- }
-
- f += f4 * f5;
- f1 += f3 * f5;
- f2 += f5;
- }
- }
-
- f /= f2;
- f1 /= f2;
- f = f * 0.9F + 0.1F;
- f1 = (f1 * 4.0F - 1.0F) / 8.0F;
- double d13 = this.field_147426_g[i1] / 8000.0D;
-
- if (d13 < 0.0D) {
- d13 = -d13 * 0.3D;
- }
-
- d13 = d13 * 3.0D - 2.0D;
-
- if (d13 < 0.0D) {
- d13 /= 2.0D;
-
- if (d13 < -1.0D) {
- d13 = -1.0D;
- }
-
- d13 /= 1.4D;
- d13 /= 2.0D;
- }
- else {
- if (d13 > 1.0D) {
- d13 = 1.0D;
- }
-
- d13 /= 8.0D;
- }
-
- ++i1;
- double d12 = f1;
- double d14 = f;
- d12 += d13 * 0.2D;
- d12 = d12 * 8.5D / 8.0D;
- double d5 = 8.5D + d12 * 4.0D;
-
- for (int j2 = 0; j2 < 33; ++j2) {
- double d6 = (j2 - d5) * 12.0D * 128.0D / 256.0D / d14;
-
- if (d6 < 0.0D) {
- d6 *= 4.0D;
- }
-
- double d7 = this.field_147428_e[l] / 512.0D;
- double d8 = this.field_147425_f[l] / 512.0D;
- double d9 = (this.field_147427_d[l] / 10.0D + 1.0D) / 2.0D;
- double d10 = MathHelper.denormalizeClamp(d7, d8, d9) - d6;
-
- if (j2 > 29) {
- double d11 = (j2 - 29) / 3.0F;
- d10 = d10 * (1.0D - d11) + -10.0D * d11;
- }
-
- this.field_147434_q[l] = d10;
- ++l;
- }
- }
- }
- }
-
- /**
- * Checks to see if a chunk exists at x, y
- */
- @Override
- public boolean chunkExists(int par1, int par2) {
- return true;
- }
-
- /**
- * Populates chunk with ores etc etc
- */
- @Override
- public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) {
- BlockFalling.fallInstantly = false;
- int k = par2 * 16;
- int l = par3 * 16;
- BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
- this.rand.setSeed(this.worldObj.getSeed());
- long i1 = this.rand.nextLong() / 2L * 2L + 1L;
- long j1 = this.rand.nextLong() / 2L * 2L + 1L;
- this.rand.setSeed(par2 * i1 + par3 * j1 ^ this.worldObj.getSeed());
- boolean flag = false;
-
- MinecraftForge.EVENT_BUS
- .post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));
-
- int k1;
- int l1;
- int i2;
-
- if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag
- && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3,
- flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAKE)) {
- k1 = k + this.rand.nextInt(16) + 8;
- l1 = this.rand.nextInt(256);
- i2 = l + this.rand.nextInt(16) + 8;
- try {
- (new WorldGenLakes(Dimension_DarkWorld.blockFluidLakes)).generate(this.worldObj, this.rand, k1, l1, i2);
- } catch (NullPointerException n){
- n.getStackTrace();
- (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2);
- Logger.INFO("Error while generating DarkWorld Lake.");
- }
- }
-
- if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag,
- net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAVA) && !flag
- && this.rand.nextInt(8) == 0) {
- k1 = k + this.rand.nextInt(16) + 8;
- l1 = this.rand.nextInt(this.rand.nextInt(248) + 8);
- i2 = l + this.rand.nextInt(16) + 8;
-
- if (l1 < 63 || this.rand.nextInt(10) == 0) { //Changes 63 -> 128
- try{
- (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2);
- } catch (NullPointerException n){
- Logger.INFO("Error while generating DarkWorld Lake. [2]");
- }
- }
- }
- biomegenbase.decorate(this.worldObj, this.rand, k, l);
- SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
- k += 8;
- l += 8;
-
- MinecraftForge.EVENT_BUS
- .post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));
-
- BlockFalling.fallInstantly = false;
- }
-
- /**
- * Two modes of operation: if passed true, save all Chunks in one go. If
- * passed false, save up to two chunks. Return true if all chunks have
- * been saved.
- */
- @Override
- public boolean saveChunks(boolean par1, IProgressUpdate par2IProgressUpdate) {
- return true;
- }
-
- /**
- * Save extra data not associated with any Chunk. Not saved during
- * autosave, only during world unload. Currently unimplemented.
- */
- @Override
- public void saveExtraData() {
- }
-
- /**
- * Unloads chunks that are marked to be unloaded. This is not guaranteed
- * to unload every such chunk.
- */
- @Override
- public boolean unloadQueuedChunks() {
- return false;
- }
-
- /**
- * Returns if the IChunkProvider supports saving.
- */
- @Override
- public boolean canSave() {
- return true;
- }
-
- /**
- * Converts the instance data to a readable string.
- */
- @Override
- public String makeString() {
- return "RandomLevelSource";
- }
-
- /**
- * Returns a list of creatures of the specified type that can spawn at
- * the given location.
- */
- @SuppressWarnings("rawtypes")
- @Override
- public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4) {
- BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(par2, par4);
- return par1EnumCreatureType == EnumCreatureType.monster
- && this.scatteredFeatureGenerator.func_143030_a(par2, par3, par4)
- ? this.scatteredFeatureGenerator.getScatteredFeatureSpawnList()
- : biomegenbase.getSpawnableList(par1EnumCreatureType);
- }
-
- @Override
- public ChunkPosition func_147416_a(World p_147416_1_, String p_147416_2_, int p_147416_3_, int p_147416_4_, int p_147416_5_) {
- return
- "Village".equals(p_147416_2_) &&
- this.villageGenerator != null ?
- this.villageGenerator.func_151545_a(p_147416_1_,
- p_147416_3_, p_147416_4_, p_147416_5_) :
- null;
- }
-
- @Override
- public int getLoadedChunkCount() {
- return 0;
- }
-
- @Override
- public void recreateStructures(int par1, int par2) {
-
- }
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenDeadLilly.java b/src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenDeadLilly.java
deleted file mode 100644
index 22c3b5a090..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenDeadLilly.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package gtPlusPlus.core.world.darkworld.gen;
-
-import java.util.Random;
-
-import net.minecraft.init.Blocks;
-import net.minecraft.world.World;
-import net.minecraft.world.gen.feature.WorldGenWaterlily;
-
-public class WorldGenDeadLilly extends WorldGenWaterlily {
-
- @Override
- public boolean generate(World world, Random rand, int x, int y, int z)
- {
- for (int l = 0; l < 10; ++l)
- {
- int i1 = x + rand.nextInt(8) - rand.nextInt(8);
- int j1 = y + rand.nextInt(4) - rand.nextInt(4);
- int k1 = z + rand.nextInt(8) - rand.nextInt(8);
-
- if (world.isAirBlock(i1, j1, k1) && Blocks.waterlily.canPlaceBlockAt(world, i1, j1, k1))
- {
- world.setBlock(i1, j1, k1, Blocks.waterlily, 0, 2);
- }
- }
-
- return true;
- }
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenMinable_Custom.java b/src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenMinable_Custom.java
deleted file mode 100644
index 2c9cda0017..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/gen/WorldGenMinable_Custom.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package gtPlusPlus.core.world.darkworld.gen;
-
-import static gtPlusPlus.core.lib.CORE.PI;
-
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import net.minecraft.world.gen.feature.WorldGenMinable;
-
-import gtPlusPlus.api.objects.Logger;
-
-public class WorldGenMinable_Custom extends WorldGenMinable
-{
- /** The block to generate. */
- private Block oreToGenerate;
- /** The number of blocks to generate. */
- private int numberOfBlocks;
- /** The block to replace. */
- private Block blockToReplace;
- /** The meta of the block. */
- private int mineableBlockMeta;
-
- public WorldGenMinable_Custom(final Block block, final int count){
- super(block, count, Blocks.stone);
- }
-
- public WorldGenMinable_Custom(final Block block, final int count, final Block target){
- super(block, count, target);
- this.oreToGenerate = block;
- this.numberOfBlocks = count;
- this.blockToReplace = target;
- }
-
- public WorldGenMinable_Custom(final Block block, final int meta, final int number, final Block target){
- this(block, number, target);
- this.mineableBlockMeta = meta;
- }
-
- @Override
- public boolean generate(final World world, final Random rand, final int x, final int y, final int z)
- {
- final float f = rand.nextFloat() * PI;
- final double d0 = x + 16 + ((MathHelper.sin(f) * this.numberOfBlocks) / 4.0F);
- final double d1 = (x + 16) - ((MathHelper.sin(f) * this.numberOfBlocks) / 4.0F);
- final double d2 = z + 16 + ((MathHelper.cos(f) * this.numberOfBlocks) / 4.0F);
- final double d3 = (z + 16) - ((MathHelper.cos(f) * this.numberOfBlocks) / 4.0F);
- final double d4 = (y + rand.nextInt(8)) - 1;
- final double d5 = (y + rand.nextInt(8)) - 1;
-
- for (int l = 0; l <= this.numberOfBlocks; ++l)
- {
- final double d6 = d0 + (((d1 - d0) * l) / this.numberOfBlocks);
- final double d7 = d4 + (((d5 - d4) * l) / this.numberOfBlocks);
- final double d8 = d2 + (((d3 - d2) * l) / this.numberOfBlocks);
- final double d9 = (rand.nextDouble() * this.numberOfBlocks) / 8.0D;
- final double d10 = ((MathHelper.sin((l * PI) / this.numberOfBlocks) + 1.0F) * d9) + 1.0D;
- final double d11 = ((MathHelper.sin((l * PI) / this.numberOfBlocks) + 1.0F) * d9) + 1.0D;
- final int i1 = MathHelper.floor_double(d6 - (d10 / 2.0D));
- final int j1 = MathHelper.floor_double(d7 - (d11 / 2.0D));
- final int k1 = MathHelper.floor_double(d8 - (d10 / 2.0D));
- final int l1 = MathHelper.floor_double(d6 + (d10 / 2.0D));
- final int i2 = MathHelper.floor_double(d7 + (d11 / 2.0D));
- final int j2 = MathHelper.floor_double(d8 + (d10 / 2.0D));
-
- for (int k2 = i1; k2 <= l1; ++k2){
- final double d12 = ((k2 + 0.5D) - d6) / (d10 / 2.0D);
- if ((d12 * d12) < 1.0D){
- for (int l2 = j1; l2 <= i2; ++l2){
- final double d13 = ((l2 + 0.5D) - d7) / (d11 / 2.0D);
- if (((d12 * d12) + (d13 * d13)) < 1.0D){
- for (int i3 = k1; i3 <= j2; ++i3){
- final double d14 = ((i3 + 0.5D) - d8) / (d10 / 2.0D);
- if ((((d12 * d12) + (d13 * d13) + (d14 * d14)) < 1.0D) && world.getBlock(k2, l2, i3).isReplaceableOreGen(world, k2, l2, i3, this.blockToReplace))
- {
- world.setBlock(k2, l2, i3, this.oreToGenerate, this.mineableBlockMeta, 3);
- Logger.INFO("Generated a "+this.oreToGenerate.getLocalizedName()+" at x: "+k2+" | y: "+l2+" | z: "+i3);
- }
- }
- }
- }
- }
- }
- }
-
- return true;
- }
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT.java b/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT.java
deleted file mode 100644
index e71e884fc7..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package gtPlusPlus.core.world.darkworld.gen.gt;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.concurrent.ConcurrentHashMap;
-
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.IChunkProvider;
-
-import gtPlusPlus.xmod.gregtech.HANDLER_GT;
-
-public abstract class WorldGen_GT {
- public final String mWorldGenName;
- public final boolean mEnabled;
- private final Map<String, Boolean> mDimensionMap = new ConcurrentHashMap<String, Boolean>();
-
- public WorldGen_GT(String aName, List aList, boolean aDefault) {
- this.mWorldGenName = aName;
- this.mEnabled = HANDLER_GT.sCustomWorldgenFile.get("worldgen", this.mWorldGenName, aDefault);
- if (this.mEnabled) {
- aList.add(this);
- }
-
- }
-
- public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX,
- int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
- return false;
- }
-
- public boolean executeCavegen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX,
- int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
- return false;
- }
-
- public boolean isGenerationAllowed(World aWorld, int aDimensionType, int aAllowedDimensionType) {
- String aDimName = aWorld.provider.getDimensionName();
- Boolean tAllowed = (Boolean) this.mDimensionMap.get(aDimName);
- if (tAllowed == null) {
- boolean tValue = HANDLER_GT.sCustomWorldgenFile.get("worldgen.dimensions." + this.mWorldGenName, aDimName,
- aDimensionType == aAllowedDimensionType);
- this.mDimensionMap.put(aDimName, Boolean.valueOf(tValue));
- return tValue;
- } else {
- return tAllowed.booleanValue();
- }
- }
-} \ 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
deleted file mode 100644
index f3dfb2cf08..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Base.java
+++ /dev/null
@@ -1,471 +0,0 @@
-package gtPlusPlus.core.world.darkworld.gen.gt;
-
-import java.util.*;
-
-import cpw.mods.fml.common.IWorldGenerator;
-
-import net.minecraft.block.Block;
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.Chunk;
-import net.minecraft.world.chunk.IChunkProvider;
-import net.minecraft.world.gen.feature.WorldGenMinable;
-
-import gregtech.api.util.GT_Log;
-
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.api.objects.random.XSTR;
-import gtPlusPlus.core.material.ELEMENT;
-import gtPlusPlus.core.world.darkworld.Dimension_DarkWorld;
-import gtPlusPlus.xmod.gregtech.HANDLER_GT;
-
-public class WorldGen_GT_Base implements IWorldGenerator {
-
- /**
- * Class Variables
- */
-
- /**
- * Control percentage of filled 3x3 chunks. Lower number means less oreveins
- * spawn
- */
- public static int oreveinPercentage;
- /**
- * Control number of attempts to find a valid orevein. Generally this
- * maximum limit isn't hit, selecting a vein is cheap
- */
- public static int oreveinAttempts;
- /**
- * Control number of attempts to place a valid orevein. If a vein wasn't
- * placed due to height restrictions, completely in the water, etc, another
- * attempt is tried.
- */
- public static int oreveinMaxPlacementAttempts;
- /**
- * Debug parameter for world generation. Tracks chunks added/removed from
- * run queue.
- */
- public static boolean debugWorldGen = false;
- /**
- * Try re-implement Richard Hendrick's Chunk by Chunk Ore Generation from
- * his GT5u fork.
- */
-
- public static List<Runnable> mList = new ArrayList<Runnable>();
- public static HashSet<Long> ProcChunks = new HashSet<Long>();
- // This is probably not going to work. Trying to create a fake orevein to
- // put into hashtable when there will be no ores in a vein.
- public static WorldGen_GT_Ore_Layer noOresInVein = new WorldGen_GT_Ore_Layer("vein0", 0, 255, 0, 0,
- 0, ELEMENT.getInstance().ALUMINIUM, ELEMENT.getInstance().ALUMINIUM, ELEMENT.getInstance().ALUMINIUM, ELEMENT.getInstance().ALUMINIUM);
-
- public static Hashtable<Long, WorldGen_GT_Ore_Layer> validOreveins = new Hashtable<Long, WorldGen_GT_Ore_Layer>(
- 1024);
-
- public boolean mIsGenerating = false;
- public static final Object listLock = new Object();
- // private static boolean gcAsteroids = true;
-
- public WorldGen_GT_Base() {
- if (debugWorldGen) {
- GT_Log.out.println("GTPP_Worldgenerator created");
- }
- }
-
- @Override
- public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator,
- IChunkProvider chunkProvider) {
- if (world.provider.dimensionId == Dimension_DarkWorld.DIMID) {
- generateSafely(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider);
- }
- }
-
- public synchronized void generateSafely(Random random, int chunkX, int chunkZ, World world,
- IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
- int xDim = Dimension_DarkWorld.DIMID;
- switch (world.provider.dimensionId) {
- case -1: // Nether
- // generateNether(world, random, chunkX * 16, chunkZ * 16);
- break;
- case 0: // Overworld
- // generateSurface(world, random, chunkX * 16, chunkZ * 16);
- break;
- case 1: // End
- // generateEnd(world, random, chunkX * 16, chunkZ * 16);
- break;
- default: // Any other dimension
- if (world.provider.dimensionId != xDim) {
- break;
- }
- else {
- generateDarkWorld(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider);
- break;
- }
- }
- }
-
- private synchronized void generateDarkWorld(Random aRandom, int aX, int aZ, World aWorld,
- IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
- Logger.WORLD("Trying to Generate Dimension.");
- synchronized (listLock) {
- Logger.WORLD("Locked List addition.");
- if (WorldGen_GT_Base.mList.add(new WorldGenContainer(new XSTR(Math.abs(aRandom.nextInt()) + 1), aX, aZ,
- Dimension_DarkWorld.DIMID,
- aWorld, aChunkGenerator, aChunkProvider,
- aWorld.getBiomeGenForCoords(aX * 16 + 8, aZ * 16 + 8).biomeName))){
- Logger.WORLD("Locked List addition. Success.");
- }
- else {
- Logger.WORLD("Locked List addition. Fail.");
- }
- if (debugWorldGen)
- GT_Log.out.println("ADD WorldSeed:" + aWorld.getSeed() + " DimId" + aWorld.provider.dimensionId
- + " chunk x:" + aX + " z:" + aZ + " SIZE: " + WorldGen_GT_Base.mList.size());
- }
-
- if (!this.mIsGenerating) {
- Logger.WORLD("Is not generating.");
- this.mIsGenerating = true;
- Logger.WORLD("Setting Generation to true.");
- int mList_sS = WorldGen_GT_Base.mList.size();
- mList_sS = Math.min(mList_sS, 3); // Run a maximum of 3 chunks at a
- // time through worldgen. Extra
- // chunks get done later.
- for (int i = 0; i < mList_sS; i++) {
- WorldGenContainer toRun = (WorldGenContainer) WorldGen_GT_Base.mList.get(0);
- if (debugWorldGen)
- GT_Log.out.println("RUN WorldSeed:" + aWorld.getSeed() + " DimId" + aWorld.provider.dimensionId
- + " chunk x:" + toRun.mX + " z:" + toRun.mZ + " SIZE: " + WorldGen_GT_Base.mList.size()
- + " i: " + i);
- synchronized (listLock) {
- Logger.WORLD("Locked List Removal.");
- WorldGen_GT_Base.mList.remove(0);
- }
- toRun.run();
- }
- this.mIsGenerating = false;
- Logger.WORLD("Is Generating now set to false..");
- }
- }
-
- public void generateOre(Block block, World world, Random random, int chunk_x, int chunk_z, int maxX, int maxZ,
- int maxVeinSize, int chancesToSpawn, int minY, int maxY, Block generateIn) {
- int heightRange = maxY - minY;
- WorldGenMinable worldgenminable = new WorldGenMinable(block, maxVeinSize, generateIn);
- for (int k1 = 0; k1 < chancesToSpawn; ++k1) {
- int xrand = random.nextInt(16);
- int yrand = random.nextInt(heightRange) + minY;
- int zrand = random.nextInt(16);
- worldgenminable.generate(world, random, chunk_x + xrand, yrand, chunk_z + zrand);
- }
- }
-
- public static class WorldGenContainer implements Runnable {
- public final Random mRandom;
- public final int mX;
- public final int mZ;
- public final int mDimensionType;
- public final World mWorld;
- public final IChunkProvider mChunkGenerator;
- public final IChunkProvider mChunkProvider;
- public final String mBiome;
-
- // Local class to track which orevein seeds must be checked when doing
- // chunkified worldgen
- class NearbySeeds {
- public int mX;
- public int mZ;
-
- NearbySeeds(int x, int z) {
- this.mX = x;
- this.mZ = z;
- }
- };
-
- 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) {
- this.mRandom = aRandom;
- this.mX = aX;
- this.mZ = aZ;
- this.mDimensionType = aDimensionType;
- this.mWorld = aWorld;
- this.mChunkGenerator = aChunkGenerator;
- this.mChunkProvider = aChunkProvider;
- this.mBiome = aBiome;
- }
-
- public void worldGenFindVein(int oreseedX, int oreseedZ) {
- // Explanation of oreveinseed implementation.
- // (long)this.mWorld.getSeed()<<16) Deep Dark does two oregen
- // passes, one with getSeed set to +1 the original world seed. This
- // pushes that +1 off the low bits of oreseedZ, so that the hashes
- // are far apart for the two passes.
- // ((this.mWorld.provider.dimensionId & 0xffL)<<56) Puts the
- // dimension in the top bits of the hash, to make sure to get unique
- // hashes per dimension
- // ((long)oreseedX & 0x000000000fffffffL) << 28) Puts the chunk X in
- // the bits 29-55. Cuts off the top few bits of the chunk so we have
- // bits for dimension.
- // ( (long)oreseedZ & 0x000000000fffffffL )) Puts the chunk Z in the
- // bits 0-27. Cuts off the top few bits of the chunk so we have bits
- // for dimension.
- long oreveinSeed = (this.mWorld.getSeed() << 16) ^ ((this.mWorld.provider.dimensionId & 0xffL) << 56
- | ((oreseedX & 0x000000000fffffffL) << 28) | (oreseedZ & 0x000000000fffffffL)); // Use
- // an
- // RNG
- // that
- // is
- // identical
- // every
- // time
- // it
- // is
- // called
- // for
- // this
- // oreseed.
- XSTR oreveinRNG = new XSTR(oreveinSeed);
- int oreveinPercentageRoll = oreveinRNG.nextInt(100); // Roll the
- // dice, see
- // if we get
- // an
- // orevein
- // here at
- // all
- int noOrePlacedCount = 0;
- String tDimensionName = "";
- if (debugWorldGen) {
- tDimensionName = this.mWorld.provider.getDimensionName();
- }
-
- if (debugWorldGen){
- GT_Log.out.println(" Finding oreveins for oreveinSeed=" + oreveinSeed + " mX=" + this.mX + " mZ="
- + this.mZ + " oreseedX=" + oreseedX + " oreseedZ=" + oreseedZ + " worldSeed="
- + this.mWorld.getSeed());
- }
-
- Logger.INFO("[World Generation Debug] !validOreveins.containsKey(oreveinSeed) | oreveinSeed: "+oreveinSeed);
- // Search for a valid orevein for this dimension
- if (!validOreveins.containsKey(oreveinSeed)) {
-
-
- Logger.INFO("[World Generation Debug] oreveinPercentageRoll < oreveinPercentage? "+((oreveinPercentageRoll < oreveinPercentage)));
- Logger.INFO("[World Generation Debug] WorldGen_GT_Ore_Layer.sWeight > 0? "+(WorldGen_GT_Ore_Layer.sWeight > 0));
- Logger.INFO("[World Generation Debug] WorldGen_GT_Ore_Layer.sList.size() > 0? "+(WorldGen_GT_Ore_Layer.sList.size() > 0));
- if ((oreveinPercentageRoll < oreveinPercentage) && (WorldGen_GT_Ore_Layer.sWeight > 0)
- && (WorldGen_GT_Ore_Layer.sList.size() > 0)) {
- int placementAttempts = 0;
- boolean oreveinFound = false;
- int i;
- for (i = 0; (i < oreveinAttempts) && (!oreveinFound)
- && (placementAttempts < oreveinMaxPlacementAttempts); i++) {
- Logger.INFO("[World Generation Debug] i: "+i);
- Logger.INFO("[World Generation Debug] placementAttempts: "+placementAttempts);
- Logger.INFO("[World Generation Debug] oreveinAttempts: "+oreveinAttempts);
- Logger.INFO("[World Generation Debug] (placementAttempts < oreveinMaxPlacementAttempts): "+(placementAttempts < oreveinMaxPlacementAttempts));
- Logger.INFO("[World Generation Debug] oreveinFound: "+oreveinFound);
- int tRandomWeight = oreveinRNG.nextInt(WorldGen_GT_Ore_Layer.sWeight);
- for (WorldGen_GT_Ore_Layer tWorldGen : WorldGen_GT_Ore_Layer.sList) {
- Logger.INFO("[World Generation Debug] Iterating sList - Size: "+WorldGen_GT_Ore_Layer.sList.size());
- tRandomWeight -= (tWorldGen).mWeight;
- if (tRandomWeight <= 0) {
- try {
- // Adjust the seed so that this layer has a
- // series of unique random numbers.
- // Otherwise multiple attempts at this same
- // oreseed will get the same offset and X/Z
- // values. If an orevein failed, any orevein
- // with the
- // same minimum heights would fail as well.
- // This prevents that, giving each orevein a
- // unique height each pass through here.
- int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld,
- new XSTR(oreveinSeed ^ (Block.getIdFromBlock(tWorldGen.mPrimaryMeta))), this.mBiome,
- this.mDimensionType, this.mX * 16, this.mZ * 16, oreseedX * 16,
- oreseedZ * 16, this.mChunkGenerator, this.mChunkProvider);
- switch (placementResult) {
- case WorldGen_GT_Ore_Layer.ORE_PLACED:
- if (debugWorldGen)
- GT_Log.out.println(" Added oreveinSeed=" + oreveinSeed
- + " tries at oremix=" + i + " placementAttempts="
- + placementAttempts + " dimensionName=" + tDimensionName);
- validOreveins.put(oreveinSeed, tWorldGen);
- oreveinFound = true;
- Logger.INFO("[World Generation Debug] ORE_PLACED");
- break;
- case WorldGen_GT_Ore_Layer.NO_ORE_IN_BOTTOM_LAYER:
- placementAttempts++;
- Logger.INFO("[World Generation Debug] NO_ORE_IN_BOTTOM_LAYER | Attempts: "+placementAttempts);
- // SHould do retry in this case
- // until out of chances
- break;
- case WorldGen_GT_Ore_Layer.NO_OVERLAP:
- // Orevein didn't reach this chunk,
- // can't add it yet to the hash
- Logger.INFO("[World Generation Debug] NO_OVERLAP");
- if (debugWorldGen) GT_Log.out.println(
- " Added far oreveinSeed=" + oreveinSeed + " " +
- ( tWorldGen).mWorldGenName +
- " tries at oremix=" + i +
- " placementAttempts=" + placementAttempts +
- " dimensionName=" + tDimensionName
- );
- validOreveins.put(oreveinSeed, tWorldGen);
- oreveinFound = true;
- break;
- case WorldGen_GT_Ore_Layer.NO_OVERLAP_AIR_BLOCK:
- if (debugWorldGen) GT_Log.out.println(
- " No overlap and air block in test spot=" + oreveinSeed + " " +
- ( tWorldGen).mWorldGenName +
- " tries at oremix=" + i +
- " placementAttempts=" + placementAttempts +
- " dimensionName=" + tDimensionName
- );
- // SHould do retry in this case until out of chances
- Logger.INFO("[World Generation Debug] NO_OVERLAP_AIR_BLOCK");
- placementAttempts++;
- break;
- }
- break; // Try the next orevein
- }
- catch (Throwable e) {
- if (debugWorldGen)
- GT_Log.out.println("Exception occurred on oreVein" + tWorldGen + " oreveinSeed="
- + oreveinSeed + " mX=" + this.mX + " mZ=" + this.mZ + " oreseedX="
- + oreseedX + " oreseedZ=" + oreseedZ);
- e.printStackTrace(GT_Log.err);
- }
- }
- }
- }
- // Only add an empty orevein if are unable to place a vein
- // at the oreseed chunk.
- if ((!oreveinFound) && (this.mX == oreseedX) && (this.mZ == oreseedZ)) {
- if (debugWorldGen)
- GT_Log.out.println(" Empty oreveinSeed=" + oreveinSeed + " mX=" + this.mX + " mZ=" + this.mZ
- + " oreseedX=" + oreseedX + " oreseedZ=" + oreseedZ + " tries at oremix=" + i
- + " placementAttempts=" + placementAttempts + " dimensionName=" + tDimensionName);
- validOreveins.put(oreveinSeed, noOresInVein);
- }
- }
- else if (oreveinPercentageRoll >= oreveinPercentage) {
- if (debugWorldGen)
- GT_Log.out.println(" Skipped oreveinSeed=" + oreveinSeed + " mX=" + this.mX + " mZ=" + this.mZ
- + " oreseedX=" + oreseedX + " oreseedZ=" + oreseedZ + " RNG=" + oreveinPercentageRoll
- + " %=" + oreveinPercentage + " dimensionName=" + tDimensionName);
- validOreveins.put(oreveinSeed, noOresInVein);
- }
- }
- else {
- // oreseed is located in the previously processed table
- if (debugWorldGen)
- GT_Log.out.print(" Valid oreveinSeed=" + oreveinSeed + " validOreveins.size()="
- + validOreveins.size() + " ");
- WorldGen_GT_Ore_Layer tWorldGen = validOreveins.get(oreveinSeed);
- oreveinRNG.setSeed(oreveinSeed ^ (Block.getIdFromBlock(tWorldGen.mPrimaryMeta))); // Reset
- // RNG
- // to
- // only
- // be
- // based
- // on
- // oreseed
- // X/Z
- // and
- // type
- // of
- // vein
- int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, oreveinRNG, this.mBiome,
- this.mDimensionType, this.mX * 16, this.mZ * 16, oreseedX * 16, oreseedZ * 16,
- this.mChunkGenerator, this.mChunkProvider);
- switch (placementResult) {
- case WorldGen_GT_Ore_Layer.NO_ORE_IN_BOTTOM_LAYER:
- if (debugWorldGen)
- GT_Log.out.println(" No ore in bottom layer");
- break;
- case WorldGen_GT_Ore_Layer.NO_OVERLAP:
- if (debugWorldGen)
- GT_Log.out.println(" No overlap");
- break;
- }
- }
- }
-
- @Override
- public void run() {
- long startTime = System.nanoTime();
- int oreveinMaxSize;
-
- // Determine bounding box on how far out to check for oreveins
- // affecting this chunk
- // For now, manually reducing oreveinMaxSize when not in the
- // Underdark for performance
- if (this.mWorld.provider.getDimensionName().equals("Underdark")) {
- oreveinMaxSize = 24; // Leave Deep Dark/Underdark max oregen at
- // 32, instead of 64
- }
- else {
- oreveinMaxSize = 48;
- }
-
- int wXbox = this.mX - (oreveinMaxSize / 16);
- int eXbox = this.mX + (oreveinMaxSize / 16 + 1); // Need to add 1
- // since it is
- // compared
- // using a <
- int nZbox = this.mZ - (oreveinMaxSize / 16);
- int sZbox = this.mZ + (oreveinMaxSize / 16 + 1);
-
- // Search for orevein seeds and add to the list;
- for (int x = wXbox; x < eXbox; x++) {
- for (int z = nZbox; z < sZbox; z++) {
- // Determine if this X/Z is an orevein seed
- if (((Math.abs(x) % 3) == 1) && ((Math.abs(z) % 3) == 1)) {
- if (debugWorldGen)
- GT_Log.out.println("Adding seed x=" + x + " z=" + z);
- seedList.add(new NearbySeeds(x, z));
- }
- }
- }
-
- // Now process each oreseed vs this requested chunk
- for (; seedList.size() != 0; seedList.remove(0)) {
- if (debugWorldGen)
- GT_Log.out.println("Processing seed x=" + seedList.get(0).mX + " z=" + seedList.get(0).mZ);
- worldGenFindVein(seedList.get(0).mX, seedList.get(0).mZ);
- }
-
- long oregenTime = System.nanoTime();
-
- // Do leftover worldgen for this chunk (GT_Stones and GT_small_ores)
- try {
- for (WorldGen_GT tWorldGen : HANDLER_GT.sWorldgenList) {
- /*
- * if (debugWorldGen) GT_Log.out.println(
- * "tWorldGen.mWorldGenName="+tWorldGen.mWorldGenName );
- */
- tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, this.mX * 16,
- this.mZ * 16, this.mChunkGenerator, this.mChunkProvider);
- }
- }
- catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
- }
-
- long leftOverTime = System.nanoTime();
-
- Chunk tChunk = this.mWorld.getChunkFromBlockCoords(this.mX, this.mZ);
- if (tChunk != null) {
- tChunk.isModified = true;
- }
- long endTime = System.nanoTime();
- long duration = (endTime - startTime);
- if (debugWorldGen) {
- GT_Log.out.println(" Oregen took " + (oregenTime - startTime) + " Leftover gen took "
- + (leftOverTime - oregenTime) + " Worldgen took " + duration + " nanoseconds");
- }
- }
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Ore_Layer.java b/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Ore_Layer.java
deleted file mode 100644
index d34aa3604a..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_GT_Ore_Layer.java
+++ /dev/null
@@ -1,514 +0,0 @@
-package gtPlusPlus.core.world.darkworld.gen.gt;
-
-import static gtPlusPlus.core.world.darkworld.gen.gt.WorldGen_GT_Base.debugWorldGen;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.*;
-
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-import net.minecraft.world.chunk.IChunkProvider;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Materials;
-import gregtech.api.util.GT_Log;
-import gregtech.common.blocks.GT_Block_Ores;
-import gregtech.common.blocks.GT_TileEntity_Ores;
-
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import gtPlusPlus.core.world.darkworld.Dimension_DarkWorld;
-import gtPlusPlus.xmod.gregtech.HANDLER_GT;
-
-public class WorldGen_GT_Ore_Layer
-extends WorldGen_GT {
- public static ArrayList<WorldGen_GT_Ore_Layer> sList = new ArrayList<WorldGen_GT_Ore_Layer>();
- public static int sWeight = 0;
- public final short mMinY;
- public final short mMaxY;
- public final short mWeight;
- public final short mDensity;
- public final short mSize;
- public Block mPrimaryMeta;
- public Block mSecondaryMeta;
- public Block mBetweenMeta;
- public Block mSporadicMeta;
- public final Material mPrimary;
- public final Material mSecondary;
- public final Material mBetween;
- public final Material mSporadic;
-
- public static boolean mUpdated = CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK;
- public static final Block mStoneTypes;
-
- //public final String mBiome;
- public final String mRestrictBiome;
- public final boolean mOverworld;
- public final boolean mNether;
- public final boolean mEnd;
- public static final int WRONG_BIOME=0;
- public static final int WRONG_DIMENSION=1;
- public static final int NO_ORE_IN_BOTTOM_LAYER=2;
- public static final int NO_OVERLAP=3;
- public static final int ORE_PLACED=4;
- public static final int NO_OVERLAP_AIR_BLOCK=5;
-
- //public final boolean mMoon;
- //public final boolean mMars;
- //public final boolean mAsteroid;
- public final String aTextWorldgen = "worldgen.";
-
- static {
- if (mUpdated) {
- Object tempBlock = null;
- try {
- Field temp = ReflectionUtils.getField(GregTech_API.class, "sBlockStones");
- tempBlock = temp.get(null);
- }
- catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) {}
- mStoneTypes = (Block) tempBlock;
- }
- else {
- mStoneTypes = null;
- }
- }
-
-
- public WorldGen_GT_Ore_Layer(String aName, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic) {
- this(aName, true, aMinY, aMaxY, aWeight, aDensity, aSize, false, false, false, false, false, false, aPrimary, aSecondary, aBetween, aSporadic);
- }
-
-
- public WorldGen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, Material aPrimary, Material aSecondary, Material aBetween, Material aSporadic) {
- super(aName, sList, aDefault);
- Logger.WORLD("Creating Ore Layer Object");
- this.mOverworld = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld);
- this.mNether = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether);
- this.mEnd = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd);
- //this.mMoon = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Moon", aMoon);
- //this.mMars = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Mars", aMars);
- //this.mAsteroid = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Asteroid", aAsteroid);
- this.mMinY = 5;
- short mMaxY = 14;
- if (mMaxY < (this.mMinY + 7)) {
- GT_Log.out.println(
- "Oremix " + this.mWorldGenName +
- " has invalid Min/Max heights!"
- );
- mMaxY = (short) (this.mMinY + 7);
- }
- this.mMaxY = mMaxY;
- this.mWeight = ((short) HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight));
- this.mDensity = ((short) HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity));
- this.mSize = ((short) Math.max(1, HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize)));
- this.mPrimary = aPrimary;
- this.mSecondary = aSecondary;
- this.mBetween = aBetween;
- this.mSporadic = aSporadic;
- this.mPrimaryMeta = aPrimary.getOreBlock(1);
- this.mSecondaryMeta = aSecondary.getOreBlock(1);
- this.mBetweenMeta = aBetween.getOreBlock(1);
- this.mSporadicMeta = aSporadic.getOreBlock(1);
- this.mRestrictBiome = HANDLER_GT.sCustomWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None");
-
- //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mPrimaryMeta + " for " + mWorldGenName + " does not exist");
- //if (mSecondaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSecondaryMeta + " for " + mWorldGenName + " does not exist");
- //if (mBetweenMeta != -1 && GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mBetweenMeta + " for " + mWorldGenName + " does not exist");
- //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSporadicMeta + " for " + mWorldGenName + " does not exist");
-
- if (this.mEnabled) {
- //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[(mBetweenMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
- //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
- sWeight += this.mWeight;
- }
- }
-
- public int executeWorldgenChunkified(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, int aSeedX, int aSeedZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {
-
- //Debug Handler
- /**
- * This handles Variables that are null during Init
- */
-
- if (this.mPrimaryMeta == Blocks.stone || this.mSecondaryMeta == Blocks.stone
- || this.mBetweenMeta == Blocks.stone || this.mSporadicMeta == Blocks.stone){
- this.mPrimaryMeta = this.mPrimary.getOreBlock(1);
- this.mSecondaryMeta = this.mSecondary.getOreBlock(1);
- this.mBetweenMeta = this.mBetween.getOreBlock(1);
- this.mSporadicMeta = this.mSporadic.getOreBlock(1);
- Logger.WORLD("[Vein Generator] An Ore in a Vein had defaulted back to a default value, so they have now been reset to correct values.");
- }
-
- if( mWorldGenName.equals("vein0") ) {
- if (debugWorldGen) GT_Log.out.println(
- " NoOresInVein-vein0"
- );
- // This is a special empty orevein
- Logger.WORLD("[World Generation Debug] Special Empty Vein placed.");
- return ORE_PLACED;
- }
- if (aDimensionType != Dimension_DarkWorld.DIMID) {
- /* // Debug code, but spams log
- if (debugWorldGen) {
- GT_Log.out.println(
- "Wrong dimension"
- );
- }
- */
- Logger.WORLD("[World Generation Debug] Wrong dimension.");
- return WRONG_DIMENSION;
- }
- if (!this.mRestrictBiome.equals("None") && !(this.mRestrictBiome.equals(aBiome))) {
- return WRONG_BIOME;
- }
- int[] placeCount=new int[4];
-
- int tMinY = mMinY + aRandom.nextInt(mMaxY - mMinY - 5);
- // Determine West/East ends of orevein
- int wXVein = aSeedX - aRandom.nextInt(mSize); // West side
- int eXVein = aSeedX + 16 + aRandom.nextInt(mSize);
- // Limit Orevein to only blocks present in current chunk
- int wX = Math.max( wXVein, aChunkX + 2); // Bias placement by 2 blocks to prevent worldgen cascade.
- int eX = Math.min( eXVein, aChunkX + 2 + 16);
- if (wX >= eX) { //No overlap between orevein and this chunk exists in X
- Block tBlock = aWorld.getBlock(aChunkX + 8, tMinY, aChunkZ + 8);
- if (tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.stone) ||
- tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Dimension_DarkWorld.blockSecondLayer) ||
- tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Dimension_DarkWorld.blockMainFiller) ||
- tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Dimension_DarkWorld.blockSecondaryFiller) ||
- tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.netherrack) ||
- tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.end_stone) ||
- tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, GregTech_API.sBlockGranites) ||
- (mUpdated && tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, mStoneTypes)) ) {
- // Didn't reach, but could have placed. Save orevein for future use.
- return NO_OVERLAP;
- } else {
- // Didn't reach, but couldn't place in test spot anywys, try for another orevein
- return NO_OVERLAP_AIR_BLOCK;
- }
- }
- // Determine North/Sound ends of orevein
- int nZVein = aSeedZ - aRandom.nextInt(mSize);
- int sZVein = aSeedZ + 16 + aRandom.nextInt(mSize);
-
- int nZ = Math.max(nZVein, aChunkZ + 2); // Bias placement by 2 blocks to prevent worldgen cascade.
- int sZ = Math.min(sZVein, aChunkZ + 2 + 16);
- if (nZ >= sZ) { //No overlap between orevein and this chunk exists in Z
- Block tBlock = aWorld.getBlock(aChunkX + 8, tMinY, aChunkZ + 8);
- if (tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.stone) ||
- tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.netherrack) ||
- tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, Blocks.end_stone) ||
- tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, GregTech_API.sBlockGranites) ||
- (mUpdated && tBlock.isReplaceableOreGen(aWorld, aChunkX+8, tMinY, aChunkZ + 8, mStoneTypes)) ) {
- // Didn't reach, but could have placed. Save orevein for future use.
- return NO_OVERLAP;
- } else {
- // Didn't reach, but couldn't place in test spot anywys, try for another orevein
- return NO_OVERLAP_AIR_BLOCK;
- }
-
- }
-
- if (debugWorldGen) {
- String tDimensionName = aWorld.provider.getDimensionName();
- GT_Log.out.print(
- "Trying Orevein:" + this.mWorldGenName +
- " Dimension=" + tDimensionName +
- " mX="+aChunkX/16+
- " mZ="+aChunkZ/16+
- " oreseedX="+ aSeedX/16 +
- " oreseedZ="+ aSeedZ/16 +
- " cY="+tMinY
- );
- }
- // Adjust the density down the more chunks we are away from the oreseed. The 5 chunks surrounding the seed should always be max density due to truncation of Math.sqrt().
- int localDensity = (Math.max(1, this.mDensity / ((int)Math.sqrt(2 + Math.pow(aChunkX/16 - aSeedX/16, 2) + Math.pow(aChunkZ/16 - aSeedZ/16, 2)))));
-
- // To allow for early exit due to no ore placed in the bottom layer (probably because we are in the sky), unroll 1 pass through the loop
- // Now we do bottom-level-first oregen, and work our way upwards.
- int level = tMinY - 1; //Dunno why, but the first layer is actually played one below tMinY. Go figure.
- for (int tX = wX; tX < eX; tX++) {
- int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity);
- for (int tZ = nZ; tZ < sZ; tZ++) {
- int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity);
- if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta != null) ) {
- if (setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, false)) {
- placeCount[1]++;
- }
- }
- else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
- if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false))
- placeCount[3]++;
- }
- }
- }
- /*if ((placeCount[1]+placeCount[3])==0) {
- if (debugWorldGen) GT_Log.out.println(
- " No ore in bottom layer"
- );
- return NO_ORE_IN_BOTTOM_LAYER; // Exit early, didn't place anything in the bottom layer
- }*/
- Logger.WORLD("[World Generation Debug] Trying to set Ores?");
- for (level = tMinY; level < (tMinY-1+3); level++) {
- for (int tX = wX; tX < eX; tX++) {
- int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity);
- for (int tZ = nZ; tZ < sZ; tZ++) {
- int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity);
- if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSecondaryMeta != null) ) {
- if (setOreBlock(aWorld, tX, level, tZ, this.mSecondaryMeta, false, false)) {
- placeCount[1]++;
- }
- }
- else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
- if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false))
- placeCount[3]++;
- }
- }
- }
- }
- // Low Middle layer is between + sporadic
- // level should be = tMinY-1+3 from end of for loop
- for (int tX = wX; tX < eX; tX++) {
- int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity);
- for (int tZ = nZ; tZ < sZ; tZ++) {
- int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity);
- if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta != null) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate
- if (setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, false)) {
- placeCount[2]++;
- }
- }
- else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
- if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false))
- placeCount[3]++;
- }
- }
- }
- // High Middle layer is between + primary + sporadic
- level++; // Increment level to next layer
- for (int tX = wX; tX < eX; tX++) {
- int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity);
- for (int tZ = nZ; tZ < sZ; tZ++) {
- int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity);
- if ((aRandom.nextInt(2) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mBetweenMeta != null) ) { // Between are only 1 per vertical column, reduce by 1/2 to compensate
- if (setOreBlock(aWorld, tX, level, tZ, this.mBetweenMeta, false, false)) {
- placeCount[2]++;
- }
- }
- else if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta != null) ) {
- if (setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, false)) {
- placeCount[0]++;
- }
- }
- else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
- if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false))
- placeCount[3]++;
- }
- }
- }
- // Top two layers are primary + sporadic
- level++; // Increment level to next layer
- for( ; level < (tMinY + 6); level++){ // should do two layers
- for (int tX = wX; tX < eX; tX++) {
- int placeX = Math.max(1, Math.max(MathHelper.abs_int(wXVein - tX), MathHelper.abs_int(eXVein - tX))/localDensity);
- for (int tZ = nZ; tZ < sZ; tZ++) {
- int placeZ = Math.max(1, Math.max(MathHelper.abs_int(sZVein - tZ), MathHelper.abs_int(nZVein - tZ))/localDensity);
- if ( ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mPrimaryMeta != null) ) {
- if (setOreBlock(aWorld, tX, level, tZ, this.mPrimaryMeta, false, false)) {
- placeCount[0]++;
- }
- }
- else if ((aRandom.nextInt(7) == 0) && ((aRandom.nextInt(placeZ) == 0) || (aRandom.nextInt(placeX) == 0)) && (this.mSporadicMeta != null) ) { // Sporadics are only 1 per vertical column normally, reduce by 1/7 to compensate
- if (setOreBlock(aWorld, tX, level, tZ, this.mSporadicMeta, false, false))
- placeCount[3]++;
- }
- }
- }
- }
- if (debugWorldGen) {
- String tDimensionName = aWorld.provider.getDimensionName();
- GT_Log.out.println(
- "Generated Orevein:" + this.mWorldGenName +
- " Dimension=" + tDimensionName +
- " mX="+aChunkX/16+
- " mZ="+aChunkZ/16+
- " oreseedX="+ aSeedX/16 +
- " oreseedZ="+ aSeedZ/16 +
- " cY="+tMinY+
- " wXVein" + wXVein +
- " eXVein" + eXVein +
- " nZVein" + nZVein +
- " sZVein" + sZVein +
- " locDen=" + localDensity +
- " Den=" + this.mDensity +
- " Sec="+placeCount[1]+
- " Spo="+placeCount[3]+
- " Bet="+placeCount[2]+
- " Pri="+placeCount[0]
- );
- }
- // Something (at least the bottom layer must have 1 block) must have been placed, return true
- return ORE_PLACED;
- }
-
- private String fString = "unset", ore1String = "unset", ore2String = "unset", ore3String = "unset", ore4String = "unset";
- Map<Materials, String> gtOreMap = new HashMap<Materials, String>();
-
- @SuppressWarnings("deprecation")
- public boolean setOreBlock(World aWorld, int aX, int aY, int aZ, Block aMetaData, boolean isSmallOre,
- boolean air) {
- if (!air) {
- aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1));
- }
-
- //Set GT ORE
- if (aMetaData instanceof GT_Block_Ores){
- if (ore1String.equals("unset")) {
- ore1String = Utils.sanitizeString(this.mPrimary.getLocalizedName().toLowerCase());
- }
- if (ore2String.equals("unset")) {
- ore2String = Utils.sanitizeString(this.mSecondaryMeta.getLocalizedName().toLowerCase());
- }
- if (ore3String.equals("unset")) {
- ore3String = Utils.sanitizeString(this.mBetweenMeta.getLocalizedName().toLowerCase());
- }
- if (ore4String.equals("unset")) {
- ore4String = Utils.sanitizeString(this.mSporadicMeta.getLocalizedName().toLowerCase());
- }
-
- if (this.mPrimaryMeta == aMetaData){
- for (Materials f : Materials.values()){
- if (!gtOreMap.containsKey(f)) {
- gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase()));
- }
- fString = gtOreMap.get(f);
- if (fString.contains(ore1String)){
- int r = f.mMetaItemSubID;
- if (setOreBlock(aWorld, aX, aY, aZ, r, false)){
- Logger.WORLD("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ);
- return true;
- }
- }
- }
- }
- if (this.mSecondaryMeta == aMetaData){
- for (Materials f : Materials.values()){
- if (!gtOreMap.containsKey(f)) {
- gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase()));
- }
- fString = gtOreMap.get(f);
- if (fString.contains(ore2String)){
- int r = f.mMetaItemSubID;
- if (setOreBlock(aWorld, aX, aY, aZ, r, false)){
- Logger.WORLD("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ);
- return true;
- }
- }
- }
- }
- if (this.mBetweenMeta == aMetaData){
- for (Materials f : Materials.values()){
- if (!gtOreMap.containsKey(f)) {
- gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase()));
- }
- fString = gtOreMap.get(f);
- if (fString.contains(ore3String)){
- int r = f.mMetaItemSubID;
- if (setOreBlock(aWorld, aX, aY, aZ, r, false)){
- Logger.WORLD("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ);
- return true;
- }
- }
- }
- }
- if (this.mSporadicMeta == aMetaData){
- for (Materials f : Materials.values()){
- if (!gtOreMap.containsKey(f)) {
- gtOreMap.put(f, Utils.sanitizeString(f.name().toLowerCase()));
- }
- fString = gtOreMap.get(f);
- if (fString.contains(ore4String)){
- int r = f.mMetaItemSubID;
- if (setOreBlock(aWorld, aX, aY, aZ, r, false)){
- Logger.WORLD("[World Generation Debug] Set "+f.mDefaultLocalName+" Ore at X: "+aX+" | Y: "+aY+" | Z: "+aZ);
- return true;
- }
- }
- }
- }
-
- }
-
- Block tBlock = aWorld.getBlock(aX, aY, aZ);
- Block tOreBlock = aMetaData;
- int BlockMeta = aWorld.getBlockMetadata(aX, aY, aZ);
- String BlockName = tBlock.getUnlocalizedName();
- if (
- tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone) ||
- tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.sand) ||
- tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.dirt) ||
- tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites) ||
- (mUpdated && tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, mStoneTypes)) ||
- tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Dimension_DarkWorld.blockSecondLayer) ||
- tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Dimension_DarkWorld.blockMainFiller) ||
- tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Dimension_DarkWorld.blockSecondaryFiller) ||
- tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.sandstone)) {
-
- if (aWorld.setBlock(aX, aY, aZ, tOreBlock, 0, 3)){
- Logger.WORLD("[World Generation Debug] Set "+tOreBlock.getLocalizedName()+" at X: "+aX+" | Y: "+aY+" | Z: "+aZ);
- return true;
- }
- }
- return false;
- }
-
-
- private boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int mMetaItemSubID, boolean useless){
-
- //Get Class and Methods
- Method setOres = null;
- boolean is08 = !CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK;
-
- //GT 5.08
- if (is08){
- try {
- setOres = GT_TileEntity_Ores.class.getDeclaredMethod("setOreBlock", World.class, int.class, int.class, int.class, int.class);
- }
- catch (NoSuchMethodException | SecurityException e) {
-
- }
- }
- //GT 5.09
- else {
- try {
- setOres = GT_TileEntity_Ores.class.getDeclaredMethod("setOreBlock", World.class, int.class, int.class, int.class, int.class, boolean.class);
- }
- catch (NoSuchMethodException | SecurityException e) {
-
- }
- }
-
- try {
- if (is08 && setOres != null){
- setOres.invoke(null, aWorld, aX, aY, aZ, mMetaItemSubID);
- }
- else if (!is08 && setOres != null){
- setOres.invoke(null, aWorld, aX, aY, aZ, mMetaItemSubID, useless);
- }
- else {
- return false;
- }}
- catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
-
- }
- return false;
- }
-} \ No newline at end of file
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
deleted file mode 100644
index 0dc6750904..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/gen/gt/WorldGen_Ores.java
+++ /dev/null
@@ -1,327 +0,0 @@
-package gtPlusPlus.core.world.darkworld.gen.gt;
-
-import java.util.Hashtable;
-
-import net.minecraft.block.Block;
-
-import gregtech.api.enums.Materials;
-
-import gtPlusPlus.api.objects.data.Pair;
-import gtPlusPlus.core.material.ELEMENT;
-import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.material.ORES;
-import gtPlusPlus.core.material.nuclear.FLUORIDES;
-import gtPlusPlus.core.util.minecraft.MaterialUtils;
-import gtPlusPlus.core.world.darkworld.object.BoxedQuad;
-
-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; //
-
- private static final Material PYRITE = MaterialUtils.generateMaterialFromGtENUM(Materials.Pyrite);
- private static final Material PYROPE = MaterialUtils.generateMaterialFromGtENUM(Materials.Pyrope);
- private static final Material ALMANDINE = MaterialUtils.generateMaterialFromGtENUM(Materials.Almandine);
- private static final Material RUBY = MaterialUtils.generateMaterialFromGtENUM(Materials.Ruby);
- private static final Material CHALCOPYRITE = MaterialUtils.generateMaterialFromGtENUM(Materials.Chalcopyrite);
- private static final Material PLATINUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Platinum);
- private static final Material TOPAZ = MaterialUtils.generateMaterialFromGtENUM(Materials.Topaz);
- private static final Material SAPPHIRE_GREEN = MaterialUtils.generateMaterialFromGtENUM(Materials.GreenSapphire);
- private static final Material SAPPHIRE_BLUE = MaterialUtils.generateMaterialFromGtENUM(Materials.Sapphire);
- private static final Material BAUXITE = MaterialUtils.generateMaterialFromGtENUM(Materials.Bauxite);
-
- private static final Material NAQPLUS = MaterialUtils.generateMaterialFromGtENUM(Materials.NaquadahEnriched);
- private static final Material NAQUADRIA = MaterialUtils.generateMaterialFromGtENUM(Materials.Naquadria);
- private static final Material OSMIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Osmium);
- private static final Material AMETHYST = MaterialUtils.generateMaterialFromGtENUM(Materials.Amethyst);
- private static final Material BISMUTH = MaterialUtils.generateMaterialFromGtENUM(Materials.Bismuth);
- private static final Material PLUTONIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Plutonium);
- private static final Material URNAIUM235 = MaterialUtils.generateMaterialFromGtENUM(Materials.Uranium235);
- private static final Material INFUSEDGOLD = MaterialUtils.generateMaterialFromGtENUM(Materials.InfusedGold);
-
-
-
- public static WorldGen_GT_Ore_Layer BaseVein = new WorldGen_GT_Ore_Layer(
- "veinA",
- 20, 40,
- 1,
- 8,
- 128,
- ELEMENT.getInstance().ALUMINIUM,
- ELEMENT.getInstance().SILICON,
- ELEMENT.getInstance().COPPER,
- ELEMENT.getInstance().LEAD);
-
-
-
- /**
- * Custom ore Veins
- */
-
- public static WorldGen_GT_Ore_Layer Vein1 = new WorldGen_GT_Ore_Layer(
- "vein1",
- 0, 60,
- 30,
- 16,
- 16,
- ORES.AGARDITE_CD,
- ORES.AGARDITE_LA,
- ELEMENT.getInstance().SILICON,
- ELEMENT.getInstance().BERYLLIUM);
-
- public static WorldGen_GT_Ore_Layer Vein2 = new WorldGen_GT_Ore_Layer(
- "vein2",
- 0, 60,
- 30,
- 16,
- 16,
- ORES.AGARDITE_ND,
- ORES.AGARDITE_Y,
- PYRITE,
- ORES.CERITE);
-
- public static WorldGen_GT_Ore_Layer Vein3 = new WorldGen_GT_Ore_Layer(
- "vein3",
- 0, 60,
- 30,
- 16,
- 32,
- ORES.CERITE,
- ORES.NICHROMITE,
- PYROPE,
- ORES.HIBONITE);
-
- public static WorldGen_GT_Ore_Layer Vein4 = new WorldGen_GT_Ore_Layer(
- "vein4",
- 0, 60,
- 40,
- 16,
- 32,
- ORES.GEIKIELITE,
- ORES.CRYOLITE,
- ORES.GADOLINITE_CE,
- RUBY);
-
-
-
- public static WorldGen_GT_Ore_Layer Vein5 = new WorldGen_GT_Ore_Layer(
- "vein5",
- 30, 128,
- 20,
- 8,
- 64,
- ORES.HIBONITE,
- ORES.YTTRIALITE,
- ORES.ZIRCONILITE,
- ORES.CERITE);
- public static WorldGen_GT_Ore_Layer Vein6 = new WorldGen_GT_Ore_Layer(
- "vein6",
- 0, 40,
- 20,
- 8,
- 64,
- ORES.XENOTIME,
- ORES.ZIRKELITE,
- ORES.CROCROITE,
- ALMANDINE);
- public static WorldGen_GT_Ore_Layer Vein7 = new WorldGen_GT_Ore_Layer(
- "vein7",
- 40, 128,
- 20,
- 8,
- 64,
- RUBY,
- TOPAZ,
- ORES.SAMARSKITE_Y,
- ORES.SAMARSKITE_YB);
- public static WorldGen_GT_Ore_Layer Vein8 = new WorldGen_GT_Ore_Layer(
- "vein8",
- 0, 40,
- 20,
- 8,
- 64,
- ORES.TITANITE,
- ORES.ZIMBABWEITE,
- ORES.ZIRCON,
- ORES.FLORENCITE);
-
-
-
-
- public static WorldGen_GT_Ore_Layer Vein9 = new WorldGen_GT_Ore_Layer(
- "vein9",
- 10, 30,
- 20,
- 4,
- 64,
- ORES.LANTHANITE_CE,
- FLUORIDES.FLUORITE,
- PLATINUM,
- ORES.FLORENCITE);
- public static WorldGen_GT_Ore_Layer Vein10 = new WorldGen_GT_Ore_Layer(
- "vein10",
- 20, 50,
- 20,
- 8,
- 32,
- ORES.GEIKIELITE,
- ORES.YTTROCERITE,
- ORES.LANTHANITE_LA,
- BAUXITE);
- public static WorldGen_GT_Ore_Layer Vein11 = new WorldGen_GT_Ore_Layer(
- "vein11",
- 30, 70,
- 20,
- 5,
- 64,
- FLUORIDES.FLUORITE,
- SAPPHIRE_BLUE,
- ORES.ZIRCON,
- ORES.CRYOLITE);
- public static WorldGen_GT_Ore_Layer Vein12 = new WorldGen_GT_Ore_Layer(
- "vein12",
- 40, 80,
- 20,
- 8,
- 32,
- ORES.CERITE,
- SAPPHIRE_GREEN,
- CHALCOPYRITE,
- ORES.HIBONITE);
-
- /**
- * Best Rarest Veins 2017
- */
-
- public static WorldGen_GT_Ore_Layer Vein13 = new WorldGen_GT_Ore_Layer(
- "vein13",
- 5, 15,
- 5,
- 5,
- 16,
- ORES.CRYOLITE,
- NAQPLUS,
- NAQUADRIA,
- ORES.FLORENCITE);
-
- public static WorldGen_GT_Ore_Layer Vein14 = new WorldGen_GT_Ore_Layer(
- "vein14",
- 10, 20,
- 8,
- 3,
- 16,
- URNAIUM235,
- PLUTONIUM,
- OSMIUM,
- AMETHYST);
-
- public static WorldGen_GT_Ore_Layer Vein15 = new WorldGen_GT_Ore_Layer(
- "vein15",
- 5, 25,
- 5,
- 6,
- 24,
- ORES.FLUORCAPHITE,
- BISMUTH,
- ORES.GADOLINITE_CE,
- ORES.GADOLINITE_Y);
-
- public static WorldGen_GT_Ore_Layer Vein16 = new WorldGen_GT_Ore_Layer(
- "vein16",
- 0, 25,
- 4,
- 6,
- 32,
- ORES.YTTROCERITE,
- ORES.LEPERSONNITE,
- INFUSEDGOLD,
- FLUORIDES.FLUORITE);
-
- public static WorldGen_GT_Ore_Layer Vein17 = new WorldGen_GT_Ore_Layer(
- "vein17",
- 10, 35,
- 4,
- 5,
- 32,
- ORES.FLORENCITE,
- URNAIUM235,
- ORES.SAMARSKITE_YB,
- ORES.POLYCRASE);
- public static WorldGen_GT_Ore_Layer Vein18 = new WorldGen_GT_Ore_Layer(
- "vein18",
- 15, 40,
- 4,
- 4,
- 64,
- ORES.GADOLINITE_CE,
- ORES.GADOLINITE_Y,
- ORES.AGARDITE_LA,
- ORES.AGARDITE_CD);
-
-
-
-
- public static Hashtable<Long, WorldGen_GT_Ore_Layer> validOreveins = new Hashtable<Long, WorldGen_GT_Ore_Layer>(
- 1024);
-
-
- public static volatile BoxedQuad<Integer, Integer, Integer, Integer> OreVein1 = new BoxedQuad(null, null, null, null);
-
- static long ID = 0;
- public static void generateValidOreVeins(){
- validOreveins.put(ID++, BaseVein);
- validOreveins.put(ID++, Vein1);
- validOreveins.put(ID++, Vein2);
- validOreveins.put(ID++, Vein3);
- validOreveins.put(ID++, Vein4);
- validOreveins.put(ID++, Vein5);
- validOreveins.put(ID++, Vein6);
- validOreveins.put(ID++, Vein7);
- validOreveins.put(ID++, Vein8);
- validOreveins.put(ID++, Vein9);
- validOreveins.put(ID++, Vein10);
- validOreveins.put(ID++, Vein11);
- validOreveins.put(ID++, Vein12);
- validOreveins.put(ID++, Vein13);
- validOreveins.put(ID++, Vein14);
- validOreveins.put(ID++, Vein15);
- validOreveins.put(ID++, Vein16);
- validOreveins.put(ID++, Vein17);
- validOreveins.put(ID++, Vein18);
- }
-
-}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/item/ItemBlockToxicEverglades.java b/src/Java/gtPlusPlus/core/world/darkworld/item/ItemBlockToxicEverglades.java
deleted file mode 100644
index 1021f1aa1f..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/item/ItemBlockToxicEverglades.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package gtPlusPlus.core.world.darkworld.item;
-
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemBlock;
-import net.minecraft.item.ItemStack;
-
-import gtPlusPlus.api.interfaces.ITileTooltip;
-
-public class ItemBlockToxicEverglades extends ItemBlock {
-
- protected final int mID;
-
- public ItemBlockToxicEverglades(final Block block) {
- super(block);
- this.mID = ((ITileTooltip) block).getTooltipID();
- }
-
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- if (this.mID == 0){ //blockDarkWorldPortalFrame
- list.add("Use this to access the Toxic Everglades.");
- list.add("Assembled in the same shape as the Nether Portal.");
- }
- else if (this.mID == 1){ //blockDarkWorldPortal
- list.add("Place this if you are lazy to create the portal structure, slacker.");
- }
- else if (this.mID == 2){ //blockDarkWorldGround
- list.add("Will burn very quickly if it happens to catch fire.");
- }
- else if (this.mID == 3){ //blockDarkWorldPollutedDirt
- list.add("Maybe you can do something with this?.");
- if (stack.getItemDamage() > 0) {
- list.add("This smells worse than a bean fart...");
- }
- }
- }
-
-
-}
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/item/ItemDarkWorldPortalTrigger.java b/src/Java/gtPlusPlus/core/world/darkworld/item/ItemDarkWorldPortalTrigger.java
deleted file mode 100644
index 146f21de91..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/item/ItemDarkWorldPortalTrigger.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package gtPlusPlus.core.world.darkworld.item;
-
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-
-import gtPlusPlus.core.block.ModBlocks;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.world.darkworld.Dimension_DarkWorld;
-
-public class ItemDarkWorldPortalTrigger extends Item {
- public ItemDarkWorldPortalTrigger() {
- super();
- this.maxStackSize = 1;
- setMaxDamage(64);
- setCreativeTab(CreativeTabs.tabTools);
- this.setTextureName(CORE.MODID + ":" + "itemAlkalusDisk");
- }
-
- @Override
- public Item setMaxStackSize(int int1) {
- return super.setMaxStackSize(1);
- }
-
- @Override
- public EnumRarity getRarity(ItemStack thisItem) {
- return EnumRarity.epic;
- }
-
- @Override
- public boolean hasEffect(ItemStack par1ItemStack, int pass) {
- return true;
- }
-
- @Override
- public String getItemStackDisplayName(final ItemStack p_77653_1_) {
- return EnumChatFormatting.GOLD+"Alkalus Disk ["+EnumChatFormatting.RED+"Activated"+EnumChatFormatting.GOLD+"]";
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- list.add(EnumChatFormatting.GREEN+"Shines the way, towards the far away Everglades.");
- list.add(EnumChatFormatting.GREEN+"This item produces such a temperature, that you'd hate to use it incorrectly.");
- super.addInformation(stack, aPlayer, list, bool);
- }
-
- @Override
- public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) {
- return Utils.rgbtoHexValue(255, 128, 0);
- }
-
- @Override
- public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7,
- float par8, float par9, float par10) {
- if (par7 == 0) {
- par5--;
- }
- if (par7 == 1) {
- par5++;
- }
- if (par7 == 2) {
- par6--;
- }
- if (par7 == 3) {
- par6++;
- }
- if (par7 == 4) {
- par4--;
- }
- if (par7 == 5) {
- par4++;
- }
- if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack)) {
- return false;
- }
- Block i1 = par3World.getBlock(par4, par5, par6);
- if (i1 == Blocks.air) {
- par3World.playSoundEffect(par4 + 0.5D, par5 + 0.5D, par6 + 0.5D, "fire.ignite", 1.0F, itemRand.nextFloat() * 0.4F + 0.8F);
- if (Dimension_DarkWorld.portalBlock.tryToCreatePortal(par3World, par4, par5, par6)){
- //Make a Portal
- }
- else {
- if (!par3World.isRemote){
- par3World.setBlock(par4, par5, par6, ModBlocks.blockHellfire, 0, 3);
- }
- }
- }
- par1ItemStack.damageItem(1, par2EntityPlayer);
- return true;
- }
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/object/BoxedQuad.java b/src/Java/gtPlusPlus/core/world/darkworld/object/BoxedQuad.java
deleted file mode 100644
index 3437b0ebf1..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/object/BoxedQuad.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package gtPlusPlus.core.world.darkworld.object;
-
-import net.minecraft.block.Block;
-
-import gtPlusPlus.api.objects.data.Pair;
-
-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
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/world/CustomWorldType.java b/src/Java/gtPlusPlus/core/world/darkworld/world/CustomWorldType.java
deleted file mode 100644
index eb9c284543..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/world/CustomWorldType.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package gtPlusPlus.core.world.darkworld.world;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import net.minecraft.world.WorldType;
-
-public class CustomWorldType extends WorldType{
-
- public CustomWorldType(String name) {
- super(name);
- }
-
- public CustomWorldType(int p_i1959_1_, String p_i1959_2_){
- this("test");
- try {
- //System.out.println(Arrays.toString(getClass().getSuperclass().getMethods()));
- Method m = getClass().getSuperclass().getDeclaredMethod("WorldType", new Class<?>[]{});
- m.setAccessible(true);
- m.invoke(this, p_i1959_1_, p_i1959_2_, 0);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public CustomWorldType(int p_i1960_1_, String p_i1960_2_, int p_i1960_3_){
- this("test2");
- try {
- //System.out.println(Arrays.toString(getClass().getSuperclass().getMethods()));
- Method m = getClass().getSuperclass().getDeclaredMethod("WorldType", new Class<?>[]{});
- m.setAccessible(true);
- m.invoke(this, p_i1960_1_, p_i1960_2_, p_i1960_3_);
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- }
-
- private WorldType getMC(){
- try {
- Constructor<WorldType> c = WorldType.class.getDeclaredConstructor();
- c.setAccessible(true); // solution
- return c.newInstance();
-
- // production code should handle these exceptions more gracefully
- } catch (InvocationTargetException x) {
- x.printStackTrace();
- } catch (NoSuchMethodException x) {
- x.printStackTrace();
- } catch (InstantiationException x) {
- x.printStackTrace();
- } catch (IllegalAccessException x) {
- x.printStackTrace();
- }
- return null;
- }
-}
-
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/world/DarkWorldPortalPosition.java b/src/Java/gtPlusPlus/core/world/darkworld/world/DarkWorldPortalPosition.java
deleted file mode 100644
index 9dcfb8cd2c..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/world/DarkWorldPortalPosition.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package gtPlusPlus.core.world.darkworld.world;
-
-import net.minecraft.util.ChunkCoordinates;
-
-public class DarkWorldPortalPosition extends ChunkCoordinates {
- public long field_85087_d;
- final TeleporterDimensionMod field_85088_e;
-
- public DarkWorldPortalPosition(TeleporterDimensionMod darkworldTeleporter, int par2, int par3, int par4, long par5) {
- super(par2, par3, par4);
- this.field_85088_e = darkworldTeleporter;
- this.field_85087_d = par5;
- }
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/world/TeleporterDimensionMod.java b/src/Java/gtPlusPlus/core/world/darkworld/world/TeleporterDimensionMod.java
deleted file mode 100644
index 638f78d0c1..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/world/TeleporterDimensionMod.java
+++ /dev/null
@@ -1,471 +0,0 @@
-package gtPlusPlus.core.world.darkworld.world;
-
-import java.util.*;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.init.Blocks;
-import net.minecraft.util.*;
-import net.minecraft.world.ChunkCoordIntPair;
-import net.minecraft.world.Teleporter;
-import net.minecraft.world.WorldServer;
-
-import gtPlusPlus.core.world.darkworld.Dimension_DarkWorld;
-
-public class TeleporterDimensionMod extends Teleporter {
-
- private final WorldServer worldServerInstance;
- /**
- * A private Random() function in Teleporter
- */
- private final Random random;
- /**
- * Stores successful portal placement locations for rapid lookup.
- */
- private final LongHashMap destinationCoordinateCache = new LongHashMap();
- /**
- * A list of valid keys for the destinationCoordainteCache. These are
- * based on the X & Z of the players initial location.
- */
- @SuppressWarnings("rawtypes")
- private final List destinationCoordinateKeys = new ArrayList();
-
- public TeleporterDimensionMod(WorldServer par1WorldServer) {
- super(par1WorldServer);
- this.worldServerInstance = par1WorldServer;
- this.random = new Random(par1WorldServer.getSeed());
- }
-
- /**
- * Place an entity in a nearby portal, creating one if necessary.
- */
- @Override
- public void placeInPortal(Entity par1Entity, double par2, double par4, double par6, float par8) {
- if (this.worldServerInstance.provider.dimensionId != 1) {
- if (!this.placeInExistingPortal(par1Entity, par2, par4, par6, par8)) {
- this.makePortal(par1Entity);
- this.placeInExistingPortal(par1Entity, par2, par4, par6, par8);
- }
- }
- else {
- int i = MathHelper.floor_double(par1Entity.posX);
- int j = MathHelper.floor_double(par1Entity.posY) - 1;
- int k = MathHelper.floor_double(par1Entity.posZ);
- byte b0 = 1;
- byte b1 = 0;
-
- for (int l = -2; l <= 2; ++l) {
- for (int i1 = -2; i1 <= 2; ++i1) {
- for (int j1 = -1; j1 < 3; ++j1) {
- int k1 = i + i1 * b0 + l * b1;
- int l1 = j + j1;
- int i2 = k + i1 * b1 - l * b0;
- boolean flag = j1 < 0;
- this.worldServerInstance.setBlock(k1, l1, i2, flag ? Dimension_DarkWorld.blockPortalFrame : Blocks.air);
- }
- }
- }
-
- par1Entity.setLocationAndAngles(i, j, k, par1Entity.rotationYaw, 0.0F);
- par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D;
- }
- }
-
- /**
- * Place an entity in a nearby portal which already exists.
- */
- @Override
- public boolean placeInExistingPortal(Entity par1Entity, double par2, double par4, double par6, float par8) {
- short short1 = 128;
- double d3 = -1.0D;
- int i = 0;
- int j = 0;
- int k = 0;
- int l = MathHelper.floor_double(par1Entity.posX);
- int i1 = MathHelper.floor_double(par1Entity.posZ);
- long j1 = ChunkCoordIntPair.chunkXZ2Int(l, i1);
- boolean flag = true;
- double d7;
- int l3;
-
- if (this.destinationCoordinateCache.containsItem(j1)) {
- Teleporter.PortalPosition portalposition = (Teleporter.PortalPosition) this.destinationCoordinateCache
- .getValueByKey(j1);
- d3 = 0.0D;
- i = portalposition.posX;
- j = portalposition.posY;
- k = portalposition.posZ;
- portalposition.lastUpdateTime = this.worldServerInstance.getTotalWorldTime();
- flag = false;
- }
- else {
- for (l3 = l - short1; l3 <= l + short1; ++l3) {
- double d4 = l3 + 0.5D - par1Entity.posX;
-
- for (int l1 = i1 - short1; l1 <= i1 + short1; ++l1) {
- double d5 = l1 + 0.5D - par1Entity.posZ;
-
- for (int i2 = this.worldServerInstance.getActualHeight() - 1; i2 >= 0; --i2) {
- if (this.worldServerInstance.getBlock(l3, i2, l1) == Dimension_DarkWorld.portalBlock) {
- while (this.worldServerInstance.getBlock(l3, i2 - 1, l1) == Dimension_DarkWorld.portalBlock) {
- --i2;
- }
-
- d7 = i2 + 0.5D - par1Entity.posY;
- double d8 = d4 * d4 + d7 * d7 + d5 * d5;
-
- if (d3 < 0.0D || d8 < d3) {
- d3 = d8;
- i = l3;
- j = i2;
- k = l1;
- }
- }
- }
- }
- }
- }
-
- if (d3 >= 0.0D) {
- if (flag) {
- this.destinationCoordinateCache.add(j1,
- new Teleporter.PortalPosition(i, j, k, this.worldServerInstance.getTotalWorldTime()));
- this.destinationCoordinateKeys.add(Long.valueOf(j1));
- }
-
- double d11 = i + 0.5D;
- double d6 = j + 0.5D;
- d7 = k + 0.5D;
- int i4 = -1;
-
- if (this.worldServerInstance.getBlock(i - 1, j, k) == Dimension_DarkWorld.portalBlock) {
- i4 = 2;
- }
-
- if (this.worldServerInstance.getBlock(i + 1, j, k) == Dimension_DarkWorld.portalBlock) {
- i4 = 0;
- }
-
- if (this.worldServerInstance.getBlock(i, j, k - 1) == Dimension_DarkWorld.portalBlock) {
- i4 = 3;
- }
-
- if (this.worldServerInstance.getBlock(i, j, k + 1) == Dimension_DarkWorld.portalBlock) {
- i4 = 1;
- }
-
- int j2 = par1Entity.getTeleportDirection();
-
- if (i4 > -1) {
- int k2 = Direction.rotateLeft[i4];
- int l2 = Direction.offsetX[i4];
- int i3 = Direction.offsetZ[i4];
- int j3 = Direction.offsetX[k2];
- int k3 = Direction.offsetZ[k2];
- boolean flag1 = !this.worldServerInstance.isAirBlock(i + l2 + j3, j, k + i3 + k3)
- || !this.worldServerInstance.isAirBlock(i + l2 + j3, j + 1, k + i3 + k3);
- boolean flag2 = !this.worldServerInstance.isAirBlock(i + l2, j, k + i3)
- || !this.worldServerInstance.isAirBlock(i + l2, j + 1, k + i3);
-
- if (flag1 && flag2) {
- i4 = Direction.rotateOpposite[i4];
- k2 = Direction.rotateOpposite[k2];
- l2 = Direction.offsetX[i4];
- i3 = Direction.offsetZ[i4];
- j3 = Direction.offsetX[k2];
- k3 = Direction.offsetZ[k2];
- l3 = i - j3;
- d11 -= j3;
- int k1 = k - k3;
- d7 -= k3;
- flag1 = !this.worldServerInstance.isAirBlock(l3 + l2 + j3, j, k1 + i3 + k3)
- || !this.worldServerInstance.isAirBlock(l3 + l2 + j3, j + 1, k1 + i3 + k3);
- flag2 = !this.worldServerInstance.isAirBlock(l3 + l2, j, k1 + i3)
- || !this.worldServerInstance.isAirBlock(l3 + l2, j + 1, k1 + i3);
- }
-
- float f1 = 0.5F;
- float f2 = 0.5F;
-
- if (!flag1 && flag2) {
- f1 = 1.0F;
- }
- else if (flag1 && !flag2) {
- f1 = 0.0F;
- }
- else if (flag1 && flag2) {
- f2 = 0.0F;
- }
-
- d11 += j3 * f1 + f2 * l2;
- d7 += k3 * f1 + f2 * i3;
- float f3 = 0.0F;
- float f4 = 0.0F;
- float f5 = 0.0F;
- float f6 = 0.0F;
-
- if (i4 == j2) {
- f3 = 1.0F;
- f4 = 1.0F;
- }
- else if (i4 == Direction.rotateOpposite[j2]) {
- f3 = -1.0F;
- f4 = -1.0F;
- }
- else if (i4 == Direction.rotateRight[j2]) {
- f5 = 1.0F;
- f6 = -1.0F;
- }
- else {
- f5 = -1.0F;
- f6 = 1.0F;
- }
-
- double d9 = par1Entity.motionX;
- double d10 = par1Entity.motionZ;
- par1Entity.motionX = d9 * f3 + d10 * f6;
- par1Entity.motionZ = d9 * f5 + d10 * f4;
- par1Entity.rotationYaw = par8 - j2 * 90 + i4 * 90;
- }
- else {
- par1Entity.motionX = par1Entity.motionY = par1Entity.motionZ = 0.0D;
- }
-
- par1Entity.setLocationAndAngles(d11, d6, d7, par1Entity.rotationYaw, par1Entity.rotationPitch);
- return true;
- }
- else {
- return false;
- }
- }
-
- @Override
- public boolean makePortal(Entity par1Entity) {
- byte b0 = 16;
- double d0 = -1.0D;
- int i = MathHelper.floor_double(par1Entity.posX);
- int j = MathHelper.floor_double(par1Entity.posY);
- int k = MathHelper.floor_double(par1Entity.posZ);
- int l = i;
- int i1 = j;
- int j1 = k;
- int k1 = 0;
- int l1 = this.random.nextInt(4);
- int i2;
- double d1;
- double d2;
- int k2;
- int i3;
- int k3;
- int j3;
- int i4;
- int l3;
- int k4;
- int j4;
- int i5;
- int l4;
- double d3;
- double d4;
-
- for (i2 = i - b0; i2 <= i + b0; ++i2) {
- d1 = i2 + 0.5D - par1Entity.posX;
-
- for (k2 = k - b0; k2 <= k + b0; ++k2) {
- d2 = k2 + 0.5D - par1Entity.posZ;
- label274:
-
- for (i3 = this.worldServerInstance.getActualHeight() - 1; i3 >= 0; --i3) {
- if (this.worldServerInstance.isAirBlock(i2, i3, k2)) {
- while (i3 > 0 && this.worldServerInstance.isAirBlock(i2, i3 - 1, k2)) {
- --i3;
- }
-
- for (j3 = l1; j3 < l1 + 4; ++j3) {
- k3 = j3 % 2;
- l3 = 1 - k3;
-
- if (j3 % 4 >= 2) {
- k3 = -k3;
- l3 = -l3;
- }
-
- for (i4 = 0; i4 < 3; ++i4) {
- for (j4 = 0; j4 < 4; ++j4) {
- for (k4 = -1; k4 < 4; ++k4) {
- l4 = i2 + (j4 - 1) * k3 + i4 * l3;
- i5 = i3 + k4;
- int j5 = k2 + (j4 - 1) * l3 - i4 * k3;
-
- if (k4 < 0
- && !this.worldServerInstance.getBlock(l4, i5, j5).getMaterial()
- .isSolid()
- || k4 >= 0 && !this.worldServerInstance.isAirBlock(l4, i5, j5)) {
- continue label274;
- }
- }
- }
- }
-
- d4 = i3 + 0.5D - par1Entity.posY;
- d3 = d1 * d1 + d4 * d4 + d2 * d2;
-
- if (d0 < 0.0D || d3 < d0) {
- d0 = d3;
- l = i2;
- i1 = i3;
- j1 = k2;
- k1 = j3 % 4;
- }
- }
- }
- }
- }
- }
-
- if (d0 < 0.0D) {
- for (i2 = i - b0; i2 <= i + b0; ++i2) {
- d1 = i2 + 0.5D - par1Entity.posX;
-
- for (k2 = k - b0; k2 <= k + b0; ++k2) {
- d2 = k2 + 0.5D - par1Entity.posZ;
- label222:
-
- for (i3 = this.worldServerInstance.getActualHeight() - 1; i3 >= 0; --i3) {
- if (this.worldServerInstance.isAirBlock(i2, i3, k2)) {
- while (i3 > 0 && this.worldServerInstance.isAirBlock(i2, i3 - 1, k2)) {
- --i3;
- }
-
- for (j3 = l1; j3 < l1 + 2; ++j3) {
- k3 = j3 % 2;
- l3 = 1 - k3;
-
- for (i4 = 0; i4 < 4; ++i4) {
- for (j4 = -1; j4 < 4; ++j4) {
- k4 = i2 + (i4 - 1) * k3;
- l4 = i3 + j4;
- i5 = k2 + (i4 - 1) * l3;
-
- if (j4 < 0
- && !this.worldServerInstance.getBlock(k4, l4, i5).getMaterial()
- .isSolid()
- || j4 >= 0 && !this.worldServerInstance.isAirBlock(k4, l4, i5)) {
- continue label222;
- }
- }
- }
-
- d4 = i3 + 0.5D - par1Entity.posY;
- d3 = d1 * d1 + d4 * d4 + d2 * d2;
-
- if (d0 < 0.0D || d3 < d0) {
- d0 = d3;
- l = i2;
- i1 = i3;
- j1 = k2;
- k1 = j3 % 2;
- }
- }
- }
- }
- }
- }
- }
-
- int k5 = l;
- int j2 = i1;
- k2 = j1;
- int l5 = k1 % 2;
- int l2 = 1 - l5;
-
- if (k1 % 4 >= 2) {
- l5 = -l5;
- l2 = -l2;
- }
-
- boolean flag;
-
- if (d0 < 0.0D) {
- if (i1 < 70) {
- i1 = 70;
- }
-
- if (i1 > this.worldServerInstance.getActualHeight() - 10) {
- i1 = this.worldServerInstance.getActualHeight() - 10;
- }
-
- j2 = i1;
-
- for (i3 = -1; i3 <= 1; ++i3) {
- for (j3 = 1; j3 < 3; ++j3) {
- for (k3 = -1; k3 < 3; ++k3) {
- l3 = k5 + (j3 - 1) * l5 + i3 * l2;
- i4 = j2 + k3;
- j4 = k2 + (j3 - 1) * l2 - i3 * l5;
- flag = k3 < 0;
- this.worldServerInstance.setBlock(l3, i4, j4, flag ? Dimension_DarkWorld.blockPortalFrame : Blocks.air);
- }
- }
- }
- }
-
- for (i3 = 0; i3 < 4; ++i3) {
- for (j3 = 0; j3 < 4; ++j3) {
- for (k3 = -1; k3 < 4; ++k3) {
- l3 = k5 + (j3 - 1) * l5;
- i4 = j2 + k3;
- j4 = k2 + (j3 - 1) * l2;
- flag = j3 == 0 || j3 == 3 || k3 == -1 || k3 == 3;
- this.worldServerInstance.setBlock(l3, i4, j4, flag ? Dimension_DarkWorld.blockPortalFrame : Dimension_DarkWorld.portalBlock, 0, 2);
- }
- }
-
- for (j3 = 0; j3 < 4; ++j3) {
- for (k3 = -1; k3 < 4; ++k3) {
- l3 = k5 + (j3 - 1) * l5;
- i4 = j2 + k3;
- j4 = k2 + (j3 - 1) * l2;
- this.worldServerInstance.notifyBlocksOfNeighborChange(l3, i4, j4,
- this.worldServerInstance.getBlock(l3, i4, j4));
- }
- }
- }
-
- return true;
- }
-
- /**
- * called periodically to remove out-of-date portal locations from the
- * cache list. Argument par1 is a WorldServer.getTotalWorldTime() value.
- */
- @Override
- public void removeStalePortalLocations(long par1) {
- if (par1 % 100L == 0L) {
- @SuppressWarnings("rawtypes")
- Iterator iterator = this.destinationCoordinateKeys.iterator();
- long j = par1 - 600L;
-
- while (iterator.hasNext()) {
- Long olong = (Long) iterator.next();
- Teleporter.PortalPosition portalposition = (Teleporter.PortalPosition) this.destinationCoordinateCache
- .getValueByKey(olong.longValue());
-
- if (portalposition == null || portalposition.lastUpdateTime < j) {
- iterator.remove();
- this.destinationCoordinateCache.remove(olong.longValue());
- }
- }
- }
- }
-
- public class PortalPosition extends ChunkCoordinates {
- /**
- * The worldtime at which this PortalPosition was last verified
- */
- public long lastUpdateTime;
-
- public PortalPosition(int par2, int par3, int par4, long par5) {
- super(par2, par3, par4);
- this.lastUpdateTime = par5;
- }
- }
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/world/WorldChunkManagerCustom.java b/src/Java/gtPlusPlus/core/world/darkworld/world/WorldChunkManagerCustom.java
deleted file mode 100644
index 4977d1caf0..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/world/WorldChunkManagerCustom.java
+++ /dev/null
@@ -1,263 +0,0 @@
-package gtPlusPlus.core.world.darkworld.world;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-import net.minecraft.crash.CrashReport;
-import net.minecraft.crash.CrashReportCategory;
-import net.minecraft.util.ReportedException;
-import net.minecraft.world.ChunkPosition;
-import net.minecraft.world.World;
-import net.minecraft.world.WorldType;
-import net.minecraft.world.biome.BiomeCache;
-import net.minecraft.world.biome.BiomeGenBase;
-import net.minecraft.world.biome.WorldChunkManager;
-import net.minecraft.world.gen.layer.GenLayer;
-import net.minecraft.world.gen.layer.IntCache;
-
-import gtPlusPlus.core.world.darkworld.biome.GenLayerDarkWorld;
-
-public class WorldChunkManagerCustom extends WorldChunkManager {
-
- private GenLayer genBiomes;
- /** A GenLayer containing the indices into BiomeGenBase.biomeList[] */
- private GenLayer biomeIndexLayer;
- /** The BiomeCache object for this world. */
- private BiomeCache biomeCache;
- /** A list of biomes that the player can spawn in. */
- private List<BiomeGenBase> biomesToSpawnIn;
-
- @SuppressWarnings({ "rawtypes" })
- public WorldChunkManagerCustom() {
- this.biomeCache = new BiomeCache(this);
- this.biomesToSpawnIn = new ArrayList();
- this.biomesToSpawnIn.addAll(allowedBiomes); // TODO
- }
-
- public WorldChunkManagerCustom(long seed, WorldType worldType) {
- this();
- // i changed this to my GenLayerDarkWorld
- GenLayer[] agenlayer = GenLayerDarkWorld.makeTheWorld(seed, worldType);
-
- agenlayer = getModdedBiomeGenerators(worldType, seed, agenlayer);
- this.genBiomes = agenlayer[0];
- this.biomeIndexLayer = agenlayer[1];
-
- }
-
- public WorldChunkManagerCustom(World world) {
- this(world.getSeed(), world.getWorldInfo().getTerrainType());
-
- }
-
- /**
- * Gets the list of valid biomes for the player to spawn in.
- */
- @Override
- public List<BiomeGenBase> getBiomesToSpawnIn() {
- return this.biomesToSpawnIn;
- }
-
- /**
- * Returns a list of rainfall values for the specified blocks. Args:
- * listToReuse, x, z, width, length.
- */
- @Override
- public float[] getRainfall(float[] listToReuse, int x, int z, int width, int length) {
- IntCache.resetIntCache();
-
- if (listToReuse == null || listToReuse.length < width * length) {
- listToReuse = new float[width * length];
- }
-
- int[] aint = this.biomeIndexLayer.getInts(x, z, width, length);
-
- for (int i1 = 0; i1 < width * length; ++i1) {
- try {
- float f = BiomeGenBase.getBiome(aint[i1]).getIntRainfall() / 65536.0F;
-
- if (f > 1.0F) {
- f = 1.0F;
- }
-
- listToReuse[i1] = f;
- }
- catch (Throwable throwable) {
- CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id");
- CrashReportCategory crashreportcategory = crashreport.makeCategory("DownfallBlock");
- crashreportcategory.addCrashSection("biome id", Integer.valueOf(i1));
- crashreportcategory.addCrashSection("downfalls[] size", Integer.valueOf(listToReuse.length));
- crashreportcategory.addCrashSection("x", Integer.valueOf(x));
- crashreportcategory.addCrashSection("z", Integer.valueOf(z));
- crashreportcategory.addCrashSection("w", Integer.valueOf(width));
- crashreportcategory.addCrashSection("h", Integer.valueOf(length));
- throw new ReportedException(crashreport);
- }
- }
-
- return listToReuse;
- }
-
- /**
- * Return an adjusted version of a given temperature based on the y
- * height
- */
- @Override
- @SideOnly(Side.CLIENT)
- public float getTemperatureAtHeight(float par1, int par2) {
- return par1;
- }
-
- /**
- * Returns an array of biomes for the location input.
- */
- @Override
- public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase[] par1ArrayOfBiomeGenBase, int par2, int par3, int par4, int par5) {
- IntCache.resetIntCache();
-
- if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5) {
- par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
- }
-
- int[] aint = this.genBiomes.getInts(par2, par3, par4, par5);
-
- try {
- for (int i = 0; i < par4 * par5; ++i) {
- par1ArrayOfBiomeGenBase[i] = BiomeGenBase.getBiome(aint[i]);
- }
-
- return par1ArrayOfBiomeGenBase;
- }
- catch (Throwable throwable) {
- CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id");
- CrashReportCategory crashreportcategory = crashreport.makeCategory("RawBiomeBlock");
- crashreportcategory.addCrashSection("biomes[] size", Integer.valueOf(par1ArrayOfBiomeGenBase.length));
- crashreportcategory.addCrashSection("x", Integer.valueOf(par2));
- crashreportcategory.addCrashSection("z", Integer.valueOf(par3));
- crashreportcategory.addCrashSection("w", Integer.valueOf(par4));
- crashreportcategory.addCrashSection("h", Integer.valueOf(par5));
- throw new ReportedException(crashreport);
- }
- }
-
- /**
- * Returns biomes to use for the blocks and loads the other data like
- * temperature and humidity onto the WorldChunkManager Args:
- * oldBiomeList, x, z, width, depth
- */
- @Override
- public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase[] oldBiomeList, int x, int z, int width, int depth) {
- return this.getBiomeGenAt(oldBiomeList, x, z, width, depth, true);
- }
-
- /**
- * Return a list of biomes for the specified blocks. Args: listToReuse,
- * x, y, width, length, cacheFlag (if false, don't check biomeCache to
- * avoid infinite loop in BiomeCacheBlock)
- */
- @Override
- public BiomeGenBase[] getBiomeGenAt(BiomeGenBase[] listToReuse, int x, int y, int width, int length, boolean cacheFlag) {
- IntCache.resetIntCache();
-
- if (listToReuse == null || listToReuse.length < width * length) {
- listToReuse = new BiomeGenBase[width * length];
- }
-
- if (cacheFlag && width == 16 && length == 16 && (x & 15) == 0 && (y & 15) == 0) {
- BiomeGenBase[] abiomegenbase1 = this.biomeCache.getCachedBiomes(x, y);
- System.arraycopy(abiomegenbase1, 0, listToReuse, 0, width * length);
- return listToReuse;
- }
- else {
- int[] aint = this.biomeIndexLayer.getInts(x, y, width, length);
-
- for (int i = 0; i < width * length; ++i) {
- listToReuse[i] = BiomeGenBase.getBiome(aint[i]);
- }
- return listToReuse;
- }
- }
-
- /**
- * checks given Chunk's Biomes against List of allowed ones
- */
- @Override
- @SuppressWarnings("rawtypes")
- public boolean areBiomesViable(int x, int y, int z, List par4List) {
- IntCache.resetIntCache();
- int l = x - z >> 2;
- int i1 = y - z >> 2;
- int j1 = x + z >> 2;
- int k1 = y + z >> 2;
- int l1 = j1 - l + 1;
- int i2 = k1 - i1 + 1;
- int[] aint = this.genBiomes.getInts(l, i1, l1, i2);
-
- try {
- for (int j2 = 0; j2 < l1 * i2; ++j2) {
- BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[j2]);
-
- if (!par4List.contains(biomegenbase)) {
- return false;
- }
- }
-
- return true;
- }
- catch (Throwable throwable) {
- CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Invalid Biome id");
- CrashReportCategory crashreportcategory = crashreport.makeCategory("Layer");
- crashreportcategory.addCrashSection("Layer", this.genBiomes.toString());
- crashreportcategory.addCrashSection("x", Integer.valueOf(x));
- crashreportcategory.addCrashSection("z", Integer.valueOf(y));
- crashreportcategory.addCrashSection("radius", Integer.valueOf(z));
- crashreportcategory.addCrashSection("allowed", par4List);
- throw new ReportedException(crashreport);
- }
- }
-
- /**
- * Finds a valid position within a range, that is in one of the listed
- * biomes. Searches {par1,par2} +-par3 blocks. Strongly favors positive
- * y positions.
- */
- @Override
- @SuppressWarnings("rawtypes")
- public ChunkPosition findBiomePosition(int p_150795_1_, int p_150795_2_, int p_150795_3_, List p_150795_4_, Random p_150795_5_) {
- IntCache.resetIntCache();
- int l = p_150795_1_ - p_150795_3_ >> 2;
- int i1 = p_150795_2_ - p_150795_3_ >> 2;
- int j1 = p_150795_1_ + p_150795_3_ >> 2;
- int k1 = p_150795_2_ + p_150795_3_ >> 2;
- int l1 = j1 - l + 1;
- int i2 = k1 - i1 + 1;
- int[] aint = this.genBiomes.getInts(l, i1, l1, i2);
- ChunkPosition chunkposition = null;
- int j2 = 0;
-
- for (int k2 = 0; k2 < l1 * i2; ++k2) {
- int l2 = l + k2 % l1 << 2;
- int i3 = i1 + k2 / l1 << 2;
- BiomeGenBase biomegenbase = BiomeGenBase.getBiome(aint[k2]);
-
- if (p_150795_4_.contains(biomegenbase) && (chunkposition == null || p_150795_5_.nextInt(j2 + 1) == 0)) {
- chunkposition = new ChunkPosition(l2, 0, i3);
- ++j2;
- }
- }
-
- return chunkposition;
- }
-
- /**
- * Calls the WorldChunkManager's biomeCache.cleanupCache()
- */
- @Override
- public void cleanupCache() {
- this.biomeCache.cleanupCache();
- }
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/world/darkworld/world/WorldProviderMod.java b/src/Java/gtPlusPlus/core/world/darkworld/world/WorldProviderMod.java
deleted file mode 100644
index c01537e565..0000000000
--- a/src/Java/gtPlusPlus/core/world/darkworld/world/WorldProviderMod.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package gtPlusPlus.core.world.darkworld.world;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-import net.minecraft.util.Vec3;
-import net.minecraft.world.WorldProvider;
-import net.minecraft.world.WorldType;
-import net.minecraft.world.chunk.IChunkProvider;
-
-import gtPlusPlus.core.world.darkworld.Dimension_DarkWorld;
-import gtPlusPlus.core.world.darkworld.chunk.ChunkProviderModded;
-
-public class WorldProviderMod extends WorldProvider {
-
- @Override
- public void registerWorldChunkManager() {
- this.worldChunkMgr = new WorldChunkManagerCustom(this.worldObj.getSeed(), WorldType.AMPLIFIED);
- this.isHellWorld = false;
- this.hasNoSky = false;
- this.dimensionId = Dimension_DarkWorld.DIMID;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public Vec3 getFogColor(float par1, float par2) {
- return Vec3.createVectorHelper(0.01568627450980392D, 0.09019607843137255D, 0.0D);
- }
-
- @Override
- public IChunkProvider createChunkGenerator() {
- return new ChunkProviderModded(this.worldObj, this.worldObj.getSeed() - 1278);
- }
-
- @Override
- public boolean isSurfaceWorld() {
- return true;
- }
-
- @Override
- public boolean canCoordinateBeSpawn(int par1, int par2) {
- return false;
- }
-
- @Override
- public boolean canRespawnHere() {
- return true;
- }
-
- @Override
- public float getSunBrightness(float par1) {
- return (par1*2F);
- }
-
- @Override
- public float getStarBrightness(float par1) {
- return (par1*5F);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public boolean doesXZShowFog(int par1, int par2) {
- return true;
- }
-
- @Override
- public String getDimensionName() {
- return "dimensionDarkWorld";
- }
-
-} \ No newline at end of file