Bugs & Removal of GG's TileEntityOres

This commit is contained in:
Muramasa 2016-07-29 20:13:02 +01:00
parent 25209a4bcb
commit b5b8ea974f
4 changed files with 4 additions and 83 deletions

View file

@ -1,79 +0,0 @@
package bloodasp.galacticgreg;
import gregtech.api.GregTech_API;
import gregtech.common.blocks.GT_TileEntity_Ores;
import micdoodle8.mods.galacticraft.core.blocks.GCBlocks;
import micdoodle8.mods.galacticraft.planets.mars.blocks.MarsBlocks;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class GT_TileEntity_Ores_Space extends GT_TileEntity_Ores {
public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData) {
return setOreBlock(aWorld, aX, aY, aZ, aMetaData, false);
}
public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean air) {
// GalacticGreg.tmp1++;
// System.out.println("start gen ore"+aMetaData);
if (!air) {
aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1));
}
Block tBlock = aWorld.getBlock(aX, aY, aZ);
int tMeta=0;
tMeta = aWorld.getBlockMetadata(aX, aY, aZ);
if ((aMetaData > 0) && ((tBlock != Blocks.air) || air)) {
if (aMetaData < 1000) {
if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) {
aMetaData += 1000;
} else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) {
aMetaData += 2000;
} else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)) {
if (tBlock == GregTech_API.sBlockGranites) {
if (tMeta < 8) {
aMetaData += 3000;
} else {
aMetaData += 4000;
}
} else {
aMetaData += 3000;
}
}
else
if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GCBlocks.blockMoon)) {
if (tMeta != 4) {
return false;
}
} else if (tBlock == MarsBlocks.marsBlock) {
aMetaData += 4000;
if (tMeta != 9) {
// GalacticGreg.tmp3++;
return false;
} else {
}
} else if (!tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) {
if (!air) {
return false;
}
}
}
// System.out.println("test "+aMetaData);
// System.out.println("block: "+tBlock.getUnlocalizedName()+" meta: "+aWorld.getBlockMetadata(aX, aY, aZ));
// GalacticGreg.tmp2++;
// System.out.println("set ore block");
if(tMeta==4||tMeta==9||tBlock==Blocks.end_stone||tBlock== GregTech_API.sBlockGranites){
//if(aMetaData>1000&&aMetaData<5000){System.out.println("aMeta: "+aMetaData);}
aWorld.setBlock(aX, aY, aZ, GregTech_API.sBlockOres1, getHarvestData((short) aMetaData), 0);
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
// GalacticGreg.tmp4++;
((GT_TileEntity_Ores) tTileEntity).mMetaData = ((short) aMetaData);
((GT_TileEntity_Ores) tTileEntity).mNatural = true;
}
return true;}
}
return false;
}
}

View file

@ -52,7 +52,7 @@ public class GT_Worldgen_GT_Ore_Layer
this.mSecondaryMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSecondaryLayer", aSecondary.mMetaItemSubID));
this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSporadiclyInbetween", aBetween.mMetaItemSubID));
this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "OreSporaticlyAround", aSporadic.mMetaItemSubID));
this.mRestrictBiome = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "mRestrictToBiomeName", "None");
this.mRestrictBiome = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "RestrictToBiomeName", "None");
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);

View file

@ -35,7 +35,7 @@ public class GT_Worldgen_GT_Ore_SmallPieces
this.mMaxY = ((short) Math.max(this.mMinY + 1, GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "MaxHeight", aMaxY)));
this.mAmount = ((short) Math.max(1, GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "Amount", aAmount)));
this.mMeta = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "Ore", aPrimary.mMetaItemSubID));
this.mRestrictBiome = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "mRestrictToBiomeName", "None");
this.mRestrictBiome = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "RestrictToBiomeName", "None");
}
public boolean executeWorldgen(World aWorld, Random aRandom, String aBiome, int aDimensionType, int aChunkX, int aChunkZ, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider) {

View file

@ -21,8 +21,8 @@ import java.util.Random;
public class GT_Worldgenerator
implements IWorldGenerator {
private static int mEndAsteroidProbability = 50;
private static int mGCAsteroidProbability = 300;
private static int mEndAsteroidProbability = 300;
private static int mGCAsteroidProbability = 50;
private static int mSize = 100;
private static int endMinSize = 50;
private static int endMaxSize = 200;