aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/australia/gen/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/australia/gen/map')
-rw-r--r--src/Java/gtPlusPlus/australia/gen/map/MapGenLargeRavine.java162
-rw-r--r--src/Java/gtPlusPlus/australia/gen/map/MapGenVillageLogging.java73
-rw-r--r--src/Java/gtPlusPlus/australia/gen/map/component/ComponentHut.java257
-rw-r--r--src/Java/gtPlusPlus/australia/gen/map/component/ComponentShack.java80
4 files changed, 362 insertions, 210 deletions
diff --git a/src/Java/gtPlusPlus/australia/gen/map/MapGenLargeRavine.java b/src/Java/gtPlusPlus/australia/gen/map/MapGenLargeRavine.java
index 4455c81317..160e734bb7 100644
--- a/src/Java/gtPlusPlus/australia/gen/map/MapGenLargeRavine.java
+++ b/src/Java/gtPlusPlus/australia/gen/map/MapGenLargeRavine.java
@@ -10,58 +10,54 @@ import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.gen.MapGenRavine;
-public class MapGenLargeRavine extends MapGenRavine
-{
+public class MapGenLargeRavine extends MapGenRavine {
private float[] field_75046_d = new float[1024];
@Override
- protected void func_151540_a(long aSeed, int var1, int var2, Block[] aBlocksInChunkOrPassedIn, double p_151540_6_, double p_151540_8_, double p_151540_10_, float p_151540_12_, float p_151540_13_, float p_151540_14_, int possibleCurrentY, int possibleMaxY, double p_151540_17_)
- {
- //Logger.INFO("Generating Large Ravine.");
+ protected void func_151540_a(long aSeed, int var1, int var2, Block[] aBlocksInChunkOrPassedIn, double p_151540_6_,
+ double p_151540_8_, double p_151540_10_, float p_151540_12_, float p_151540_13_, float p_151540_14_,
+ int possibleCurrentY, int possibleMaxY, double p_151540_17_) {
Random random = CORE.RANDOM;
+ //gtPlusPlus.api.objects.Logger.WORLD("Generating Large Ravine. 1");
this.range *= 2;
- double d4 = (double)(var1 * 24 + 16);
- double d5 = (double)(var2 * 24 + 16);
+ double d4 = (double) (var1 * 24 + 16);
+ double d5 = (double) (var2 * 24 + 16);
float f3 = 0.0F;
float f4 = 0.0F;
- if (possibleMaxY <= 25)
- {
+ if (possibleMaxY <= 25) {
int j1 = Math.min(this.range * 16 - 32, 200);
possibleMaxY = j1 - random.nextInt(j1 / 4);
}
boolean possibleIsUnderGroundFlag = false;
- if (possibleCurrentY <= -1)
- {
+ if (possibleCurrentY <= -1) {
possibleCurrentY = possibleMaxY / 3;
possibleIsUnderGroundFlag = true;
}
float f5 = 1.0F;
- for (int k1 = 0; k1 < 256; ++k1)
- {
- if (k1 == 0 || random.nextInt(3) == 0)
- {
+ for (int k1 = 0; k1 < 256; ++k1) {
+ if (k1 == 0 || random.nextInt(3) == 0) {
f5 = 1.0F + random.nextFloat() * random.nextFloat() * 1.0F;
}
this.field_75046_d[k1] = f5 * f5;
}
- for (; possibleCurrentY < possibleMaxY; ++possibleCurrentY)
- {
- double d12 = 3.5D + (double)(MathHelper.sin((float)possibleCurrentY * CORE.PI / (float)possibleMaxY) * p_151540_12_ * 1.0F);
+ for (; possibleCurrentY < possibleMaxY; ++possibleCurrentY) {
+ double d12 = 3.5D + (double) (MathHelper.sin((float) possibleCurrentY * CORE.PI / (float) possibleMaxY)
+ * p_151540_12_ * 1.0F);
double d6 = d12 * p_151540_17_;
- d12 *= (double)random.nextFloat() * 0.55D + 0.75D;
- d6 *= (double)random.nextFloat() * 0.55D + 0.75D;
+ d12 *= (double) random.nextFloat() * 0.55D + 0.75D;
+ d6 *= (double) random.nextFloat() * 0.55D + 0.75D;
float f6 = MathHelper.cos(p_151540_14_);
float f7 = MathHelper.sin(p_151540_14_);
- p_151540_6_ += (double)(MathHelper.cos(p_151540_13_) * f6);
- p_151540_8_ += (double)f7;
- p_151540_10_ += (double)(MathHelper.sin(p_151540_13_) * f6);
+ p_151540_6_ += (double) (MathHelper.cos(p_151540_13_) * f6);
+ p_151540_8_ += (double) f7;
+ p_151540_10_ += (double) (MathHelper.sin(p_151540_13_) * f6);
p_151540_14_ *= 1.7F;
p_151540_14_ += f4 * 0.25F;
p_151540_13_ += f3 * 0.25F;
@@ -70,20 +66,18 @@ public class MapGenLargeRavine extends MapGenRavine
f4 += (random.nextFloat() - random.nextFloat()) * random.nextFloat() * 2.0F;
f3 += (random.nextFloat() - random.nextFloat()) * random.nextFloat() * 4.0F;
- if (possibleIsUnderGroundFlag || random.nextInt(4) != 0)
- {
+ if (possibleIsUnderGroundFlag || random.nextInt(4) != 0) {
double d7 = p_151540_6_ - d4;
double d8 = p_151540_10_ - d5;
- double d9 = (double)(possibleMaxY - possibleCurrentY);
- double d10 = (double)(p_151540_12_ + 2.0F + 16.0F);
+ double d9 = (double) (possibleMaxY - possibleCurrentY);
+ double d10 = (double) (p_151540_12_ + 2.0F + 16.0F);
- if (d7 * d7 + d8 * d8 - d9 * d9 > d10 * d10)
- {
+ if (d7 * d7 + d8 * d8 - d9 * d9 > d10 * d10) {
return;
}
- if (p_151540_6_ >= d4 - 16.0D - d12 * 2.0D && p_151540_10_ >= d5 - 16.0D - d12 * 2.0D && p_151540_6_ <= d4 + 16.0D + d12 * 2.0D && p_151540_10_ <= d5 + 16.0D + d12 * 2.0D)
- {
+ if (p_151540_6_ >= d4 - 16.0D - d12 * 2.0D && p_151540_10_ >= d5 - 16.0D - d12 * 2.0D
+ && p_151540_6_ <= d4 + 16.0D + d12 * 2.0D && p_151540_10_ <= d5 + 16.0D + d12 * 2.0D) {
int i4 = MathHelper.floor_double(p_151540_6_ - d12) - var1 * 16 - 1;
int l1 = MathHelper.floor_double(p_151540_6_ + d12) - var1 * 16 + 1;
int j4 = MathHelper.floor_double(p_151540_8_ - d6) - 1;
@@ -91,33 +85,27 @@ public class MapGenLargeRavine extends MapGenRavine
int k4 = MathHelper.floor_double(p_151540_10_ - d12) - var2 * 16 - 1;
int j2 = MathHelper.floor_double(p_151540_10_ + d12) - var2 * 16 + 1;
- if (i4 < 0)
- {
+ if (i4 < 0) {
i4 = 0;
}
- if (l1 > 16)
- {
+ if (l1 > 16) {
l1 = 16;
}
- if (j4 < 1)
- {
+ if (j4 < 1) {
j4 = 1;
}
- if (i2 > 248)
- {
+ if (i2 > 248) {
i2 = 248;
}
- if (k4 < 0)
- {
+ if (k4 < 0) {
k4 = 0;
}
- if (j2 > 16)
- {
+ if (j2 > 16) {
j2 = 16;
}
@@ -125,25 +113,19 @@ public class MapGenLargeRavine extends MapGenRavine
int k2;
int j3;
- for (k2 = i4; !flag2 && k2 < l1; ++k2)
- {
- for (int l2 = k4; !flag2 && l2 < j2; ++l2)
- {
- for (int i3 = i2 + 1; !flag2 && i3 >= j4 - 1; --i3)
- {
+ for (k2 = i4; !flag2 && k2 < l1; ++k2) {
+ for (int l2 = k4; !flag2 && l2 < j2; ++l2) {
+ for (int i3 = i2 + 1; !flag2 && i3 >= j4 - 1; --i3) {
j3 = (k2 * 16 + l2) * 256 + i3;
- if (i3 >= 0 && i3 < 256)
- {
+ if (i3 >= 0 && i3 < 256) {
Block block = aBlocksInChunkOrPassedIn[j3];
- if (isOceanBlock(aBlocksInChunkOrPassedIn, j3, k2, i3, l2, var1, var2))
- {
+ if (isOceanBlock(aBlocksInChunkOrPassedIn, j3, k2, i3, l2, var1, var2)) {
flag2 = true;
}
- if (i3 != j4 - 1 && k2 != i4 && k2 != l1 - 1 && l2 != k4 && l2 != j2 - 1)
- {
+ if (i3 != j4 - 1 && k2 != i4 && k2 != l1 - 1 && l2 != k4 && l2 != j2 - 1) {
i3 = j4;
}
}
@@ -151,33 +133,28 @@ public class MapGenLargeRavine extends MapGenRavine
}
}
- if (!flag2)
- {
- for (k2 = i4; k2 < l1; ++k2)
- {
- double d13 = ((double)(k2 + var1 * 16) + 0.5D - p_151540_6_) / d12;
+ if (!flag2) {
+ for (k2 = i4; k2 < l1; ++k2) {
+ double d13 = ((double) (k2 + var1 * 16) + 0.5D - p_151540_6_) / d12;
- for (j3 = k4; j3 < j2; ++j3)
- {
- double d14 = ((double)(j3 + var2 * 16) + 0.5D - p_151540_10_) / d12;
+ for (j3 = k4; j3 < j2; ++j3) {
+ double d14 = ((double) (j3 + var2 * 16) + 0.5D - p_151540_10_) / d12;
int k3 = (k2 * 16 + j3) * 256 + i2;
boolean flag = false;
- if (d13 * d13 + d14 * d14 < 1.0D)
- {
- for (int l3 = i2 - 1; l3 >= j4; --l3)
- {
- double d11 = ((double)l3 + 0.5D - p_151540_8_) / d6;
+ if (d13 * d13 + d14 * d14 < 1.0D) {
+ for (int l3 = i2 - 1; l3 >= j4; --l3) {
+ double d11 = ((double) l3 + 0.5D - p_151540_8_) / d6;
- if ((d13 * d13 + d14 * d14) * (double)this.field_75046_d[l3] + d11 * d11 / 6.0D < 1.0D)
- {
+ if ((d13 * d13 + d14 * d14) * (double) this.field_75046_d[l3]
+ + d11 * d11 / 6.0D < 1.0D) {
Block block1 = aBlocksInChunkOrPassedIn[k3];
- if (checkIfTopBlock(aBlocksInChunkOrPassedIn, k3, k2, l3, j3, var1, var2))
- {
+ if (checkIfTopBlock(aBlocksInChunkOrPassedIn, k3, k2, l3, j3, var1, var2)) {
flag = true;
}
+ gtPlusPlus.api.objects.Logger.WORLD("Generating Large Ravine. 2");
digBlock(aBlocksInChunkOrPassedIn, k3, k2, l3, j3, var1, var2, flag);
}
@@ -187,8 +164,7 @@ public class MapGenLargeRavine extends MapGenRavine
}
}
- if (possibleIsUnderGroundFlag)
- {
+ if (possibleIsUnderGroundFlag) {
break;
}
}
@@ -197,21 +173,18 @@ public class MapGenLargeRavine extends MapGenRavine
}
}
-
- //generate?
- @Override
- protected void func_151538_a(World p_151538_1_, int p_151538_2_, int p_151538_3_, int chunkX, int chunkZ, Block[] blocks)
- {
- if (this.rand.nextInt(50) == 0)
- {
- double d0 = (double)(p_151538_2_ * 16 + this.rand.nextInt(16));
- double d1 = (double)(this.rand.nextInt(this.rand.nextInt(40) + 8) + 20);
- double d2 = (double)(p_151538_3_ * 16 + this.rand.nextInt(16));
+ // generate?
+ @Override
+ protected void func_151538_a(World p_151538_1_, int p_151538_2_, int p_151538_3_, int chunkX, int chunkZ,
+ Block[] blocks) {
+ if (this.rand.nextInt(50) == 0) {
+ double d0 = (double) (p_151538_2_ * 16 + this.rand.nextInt(16));
+ double d1 = (double) (this.rand.nextInt(this.rand.nextInt(40) + 8) + 20);
+ double d2 = (double) (p_151538_3_ * 16 + this.rand.nextInt(16));
byte b0 = 1;
- for (int i1 = 0; i1 < b0; ++i1)
- {
- float f = this.rand.nextFloat() * (float)Math.PI * 2.0F;
+ for (int i1 = 0; i1 < b0; ++i1) {
+ float f = this.rand.nextFloat() * (float) Math.PI * 2.0F;
float f1 = (this.rand.nextFloat() - 0.5F) * 2.0F / 8.0F;
float f2 = (this.rand.nextFloat() * 2.0F + this.rand.nextFloat()) * 2.0F;
this.func_151540_a(this.rand.nextLong(), chunkX, chunkZ, blocks, d0, d1, d2, f2, f, f1, 0, 0, 3.0D);
@@ -221,20 +194,21 @@ public class MapGenLargeRavine extends MapGenRavine
private static Method isTopBlock;
- //Determine if the block at the specified location is the top block for the biome, we take into account
- private synchronized boolean checkIfTopBlock(Block[] data, int index, int x, int y, int z, int chunkX, int chunkZ){
+ // Determine if the block at the specified location is the top block for the
+ // biome, we take into account
+ private synchronized boolean checkIfTopBlock(Block[] data, int index, int x, int y, int z, int chunkX, int chunkZ) {
try {
if (isTopBlock == null) {
- isTopBlock = MapGenRavine.class.getDeclaredMethod("isTopBlock", Block[].class, int.class, int.class, int.class, int.class, int.class, int.class);
+ isTopBlock = MapGenRavine.class.getDeclaredMethod("isTopBlock", Block[].class, int.class, int.class,
+ int.class, int.class, int.class, int.class);
}
if (isTopBlock != null) {
return (boolean) isTopBlock.invoke(this, data, index, x, y, z, chunkX, chunkZ);
- }
- else {
+ } else {
return false;
}
- }
- catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException n) {
+ } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException n) {
return false;
}
}
diff --git a/src/Java/gtPlusPlus/australia/gen/map/MapGenVillageLogging.java b/src/Java/gtPlusPlus/australia/gen/map/MapGenVillageLogging.java
deleted file mode 100644
index 69278591fe..0000000000
--- a/src/Java/gtPlusPlus/australia/gen/map/MapGenVillageLogging.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package gtPlusPlus.australia.gen.map;
-
-import java.util.Map;
-import java.util.Random;
-
-import gtPlusPlus.api.objects.Logger;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraft.world.gen.structure.MapGenVillage;
-import net.minecraft.world.gen.structure.StructureStart;
-
-public class MapGenVillageLogging extends MapGenVillage {
-
- public MapGenVillageLogging() {
- super();
- }
-
- public MapGenVillageLogging(Map p_i2093_1_) {
- super(p_i2093_1_);
- }
-
- @Override
- public String func_143025_a() {
- return super.func_143025_a();
- }
-
- @Override
- protected boolean canSpawnStructureAtCoords(int p_75047_1_, int p_75047_2_) {
- boolean aBool = super.canSpawnStructureAtCoords(p_75047_1_, p_75047_2_);
- if (aBool) {
- Logger.INFO("Is Location Valid for Spawning a Village? "+aBool);
- }
- return aBool;
- }
-
- @Override
- protected StructureStart getStructureStart(int p_75049_1_, int p_75049_2_) {
- Logger.INFO("Created MapGenVillageLogging Start Object");
- return new MapGenVillageLogging.Start(this.worldObj, this.rand, p_75049_1_, p_75049_2_, 0);
- }
-
- public static class StartLogging extends Start {
- /** well ... thats what it does */
- private boolean hasMoreThanTwoComponents;
- private static final String __OBFID = "CL_00000515";
-
- public StartLogging() {
- super();
- Logger.INFO("Created StartLogging Object");
- }
-
- public StartLogging(World p_i2092_1_, Random p_i2092_2_, int p_i2092_3_, int p_i2092_4_, int p_i2092_5_) {
- super(p_i2092_1_, p_i2092_2_, p_i2092_3_, p_i2092_4_, p_i2092_5_);
- Logger.INFO("Created StartLogging Object");
- }
-
- /**
- * currently only defined for Villages, returns true if Village has more than 2
- * non-road components
- */
- public boolean isSizeableStructure() {
- return this.hasMoreThanTwoComponents;
- }
-
- public void func_143022_a(NBTTagCompound p_143022_1_) {
- super.func_143022_a(p_143022_1_);
- }
-
- public void func_143017_b(NBTTagCompound p_143017_1_) {
- super.func_143017_b(p_143017_1_);
- }
- }
-} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/australia/gen/map/component/ComponentHut.java b/src/Java/gtPlusPlus/australia/gen/map/component/ComponentHut.java
index de90a91fb1..4af5aa09ab 100644
--- a/src/Java/gtPlusPlus/australia/gen/map/component/ComponentHut.java
+++ b/src/Java/gtPlusPlus/australia/gen/map/component/ComponentHut.java
@@ -6,6 +6,7 @@ import gtPlusPlus.api.interfaces.IGeneratorWorld;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.australia.GTplusplus_Australia;
import gtPlusPlus.core.util.math.MathUtils;
+import gtPlusPlus.plugin.villagers.entity.EntityNativeAustralian;
import net.minecraft.block.Block;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.init.Blocks;
@@ -30,6 +31,256 @@ public class ComponentHut extends AustraliaComponent {
}
public boolean addComponentParts(World world, Random random) {
+
+ BiomeGenBase biom = world.getBiomeGenForCoords(getXWithOffset(0, 0), getZWithOffset(0, 0));
+ int groundAvg = calcGroundHeight(world, this.boundingBox);
+ if (groundAvg < 0) {
+ return true;
+ }
+ this.boundingBox.offset(0, groundAvg - this.boundingBox.maxY + 10 - 1, 0);
+ if ((isWaterBelow(world, 0, -1, 0, this.boundingBox)) || (isWaterBelow(world, 0, -1, 6, this.boundingBox))
+ || (isWaterBelow(world, 6, -1, 0, this.boundingBox))
+ || (isWaterBelow(world, 6, -1, 6, this.boundingBox))) {
+ return false;
+ }
+
+ Block aWall1, aWall2, aRoof, aFloor;
+
+ if (biom.biomeID == GTplusplus_Australia.Australian_Desert_Biome_3.biomeID) {
+ aWall1 = Blocks.sand;
+ aWall2 = Blocks.sandstone;
+ aRoof = Blocks.sandstone;
+ aFloor = Blocks.sandstone;
+ }
+ else if (biom.biomeID == GTplusplus_Australia.Australian_Outback_Biome.biomeID) {
+ aWall1 = Blocks.clay;
+ aWall2 = Blocks.hardened_clay;
+ aRoof = Blocks.hardened_clay;
+ aFloor = Blocks.stained_hardened_clay;
+ }
+ else {
+ aWall1 = Blocks.sand;
+ aWall2 = Blocks.sandstone;
+ aRoof = Blocks.sandstone;
+ aFloor = Blocks.sandstone;
+ }
+
+ //Empty Area
+ fillWithAir(world, this.boundingBox, 0, 1, 0, 6, 9, 6);
+
+ //Build Floor
+ fillWithMetadataBlocks(world, this.boundingBox, 0, 0, 0, 6, 0, 6, aFloor, 0, aFloor, 1, false);
+
+ //Layer 2
+ int dir = MathUtils.randInt(0, 3);
+
+ //Door First
+ if (dir == 0) {
+ placeDoorAtCurrentPosition(
+ world, this.boundingBox, random, 0, 1, 3, getMetadataWithOffset(Blocks.wooden_door, 1));
+ }
+ else if (dir == 0) {
+ placeDoorAtCurrentPosition(
+ world, this.boundingBox, random, 3, 1, 6, getMetadataWithOffset(Blocks.wooden_door, 1));
+ }
+ else if (dir == 0) {
+ placeDoorAtCurrentPosition(
+ world, this.boundingBox, random, 6, 1, 3, getMetadataWithOffset(Blocks.wooden_door, 1));
+ }
+ else {
+ placeDoorAtCurrentPosition(
+ world, this.boundingBox, random, 3, 1, 0, getMetadataWithOffset(Blocks.wooden_door, 1));
+ }
+
+ //Layer 1
+ //Wall Top
+ place(aWall1, 0, 0, 1, 2, this.boundingBox, world);
+ if (dir != 0) place(aWall1, 0, 0, 1, 3, this.boundingBox, world);
+ place(aWall1, 0, 0, 1, 4, this.boundingBox, world);
+ //Wall Right
+ place(aWall1, 0, 2, 1, 6, this.boundingBox, world);
+ if (dir != 1) place(aWall2, 0, 3, 1, 6, this.boundingBox, world);
+ place(aWall1, 0, 4, 1, 6, this.boundingBox, world);
+ //Wall Bottom
+ place(aWall2, 0, 6, 1, 4, this.boundingBox, world);
+ if (dir != 2) place(aWall1, 0, 6, 1, 3, this.boundingBox, world);
+ place(aWall1, 0, 6, 1, 2, this.boundingBox, world);
+ //Wall Left
+ place(aWall1, 0, 4, 1, 0, this.boundingBox, world);
+ if (dir != 3) place(aWall1, 0, 3, 1, 0, this.boundingBox, world);
+ place(aWall2, 0, 2, 1, 0, this.boundingBox, world);
+ //Corners
+ place(aWall1, 0, 1, 1, 5, this.boundingBox, world);
+ place(aWall2, 0, 5, 1, 5, this.boundingBox, world);
+ place(aWall1, 0, 5, 1, 1, this.boundingBox, world);
+ place(aWall1, 0, 1, 1, 1, this.boundingBox, world);
+
+
+ //Wall Top
+ place(aWall1, 0, 0, 2, 2, this.boundingBox, world);
+ //place(aWall1, 0, 0, 2, 3, this.boundingBox, world);
+ place(aWall2, 0, 0, 2, 4, this.boundingBox, world);
+
+ //Wall Right
+ place(aWall2, 0, 2, 2, 6, this.boundingBox, world);
+ //place(aWall1, 0, 3, 2, 6, this.boundingBox, world);
+ place(aWall1, 0, 4, 2, 6, this.boundingBox, world);
+
+ //Wall Bottom
+ place(aWall1, 0, 6, 2, 4, this.boundingBox, world);
+ //place(aWall1, 0, 6, 2, 3, this.boundingBox, world);
+ place(aWall2, 0, 6, 2, 2, this.boundingBox, world);
+
+ //Wall Left
+ place(aWall1, 0, 4, 2, 0, this.boundingBox, world);
+ //place(aWall2, 0, 4, 2, 0, this.boundingBox, world);
+ place(aWall1, 0, 2, 2, 0, this.boundingBox, world);
+
+ //Corners
+ place(aWall1, 0, 1, 2, 5, this.boundingBox, world);
+ place(aWall1, 0, 5, 2, 5, this.boundingBox, world);
+ place(aWall2, 0, 5, 2, 1, this.boundingBox, world);
+ place(aWall2, 0, 1, 2, 1, this.boundingBox, world);
+
+ //Layer 3
+ //Wall Top
+ place(aWall2, 0, 0, 3, 2, this.boundingBox, world);
+ place(aWall1, 0, 0, 3, 3, this.boundingBox, world);
+ place(aWall1, 0, 0, 3, 4, this.boundingBox, world);
+ //Wall Right
+ place(aWall1, 0, 2, 3, 6, this.boundingBox, world);
+ place(aWall1, 0, 3, 3, 6, this.boundingBox, world);
+ place(aWall1, 0, 4, 3, 6, this.boundingBox, world);
+ //Wall Bottom
+ place(aWall1, 0, 6, 3, 4, this.boundingBox, world);
+ place(aWall2, 0, 6, 3, 3, this.boundingBox, world);
+ place(aWall1, 0, 6, 3, 2, this.boundingBox, world);
+ //Wall Left
+ place(aWall1, 0, 4, 3, 0, this.boundingBox, world);
+ place(aWall2, 0, 3, 3, 0, this.boundingBox, world);
+ place(aWall1, 0, 2, 3, 0, this.boundingBox, world);
+ //Corners
+ place(aWall1, 0, 1, 3, 5, this.boundingBox, world);
+ place(aWall2, 0, 5, 3, 5, this.boundingBox, world);
+ place(aWall1, 0, 5, 3, 1, this.boundingBox, world);
+ place(aWall1, 0, 1, 3, 1, this.boundingBox, world);
+
+ //Roof
+ //Roof 1 Top
+ place(aRoof, 0, 1, 4, 2, this.boundingBox, world);
+ place(aRoof, 0, 1, 4, 3, this.boundingBox, world);
+ place(aRoof, 0, 1, 4, 4, this.boundingBox, world);
+ //Roof 1 Right
+ place(aRoof, 0, 2, 4, 5, this.boundingBox, world);
+ place(aRoof, 0, 3, 4, 5, this.boundingBox, world);
+ place(aRoof, 0, 4, 4, 5, this.boundingBox, world);
+ //Roof 1 Bottom
+ place(aRoof, 0, 5, 4, 4, this.boundingBox, world);
+ place(aRoof, 0, 5, 4, 3, this.boundingBox, world);
+ place(aRoof, 0, 5, 4, 2, this.boundingBox, world);
+ //Roof 1 Left
+ place(aRoof, 0, 4, 4, 1, this.boundingBox, world);
+ place(aRoof, 0, 3, 4, 1, this.boundingBox, world);
+ place(aRoof, 0, 2, 4, 1, this.boundingBox, world);
+
+ //Roof 2 Top
+ place(aRoof, 0, 2, 5, 2, this.boundingBox, world);
+ place(aRoof, 0, 2, 5, 3, this.boundingBox, world);
+ place(aRoof, 0, 2, 5, 4, this.boundingBox, world);
+
+ //Roof 2 Right
+ //place(aWall1, 0, 2, 5, 4, this.boundingBox, world);
+ place(aRoof, 0, 3, 5, 4, this.boundingBox, world);
+ //place(aWall1, 0, 4, 5, 4, this.boundingBox, world);
+
+ //Roof 2 Bottom
+ place(aRoof, 0, 4, 5, 4, this.boundingBox, world);
+ place(aRoof, 0, 4, 5, 3, this.boundingBox, world);
+ place(aRoof, 0, 4, 5, 2, this.boundingBox, world);
+
+ //Roof 2 Left
+ //place(aWall1, 0, 4, 5, 2, this.boundingBox, world);
+ place(aRoof, 0, 3, 5, 2, this.boundingBox, world);
+ //place(aWall1, 0, 2, 5, 2, this.boundingBox, world);
+
+ //Roof 3 Top
+ place(Blocks.glowstone, 0, 3, 5, 3, this.boundingBox, world);
+ /*
+ int logID = MathUtils.randInt(0, 1);
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 1, 1, this.boundingBox, world);
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 2, 1, this.boundingBox, world);
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 3, 1, this.boundingBox, world);
+
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 1, 5, this.boundingBox, world);
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 2, 5, this.boundingBox, world);
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 3, 5, this.boundingBox, world);
+
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 1, 1, this.boundingBox, world);
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 2, 1, this.boundingBox, world);
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 3, 1, this.boundingBox, world);
+
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 1, 5, this.boundingBox, world);
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 2, 5, this.boundingBox, world);
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 3, 5, this.boundingBox, world);
+
+ int meta = (this.coordBaseMode == 3) || (this.coordBaseMode == 1) ? 4 : 8;
+
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 4, 2, this.boundingBox, world);
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 4, 3, this.boundingBox, world);
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 0, 4, 4, this.boundingBox, world);
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 2, this.boundingBox, world);
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 3, this.boundingBox, world);
+ place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 4, this.boundingBox, world);
+
+ for (int x = -2; x < 9; x++) {
+ place(Blocks.leaves, MathUtils.randInt(0, 3), x, 3, 0, this.boundingBox, world);
+ place(Blocks.leaves, MathUtils.randInt(0, 3), x, 4, 1, this.boundingBox, world);
+ place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 2, this.boundingBox, world);
+ place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 3, this.boundingBox, world);
+ place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 4, this.boundingBox, world);
+ place(Blocks.leaves, MathUtils.randInt(0, 3), x, 4, 5, this.boundingBox, world);
+ place(Blocks.leaves, MathUtils.randInt(0, 3), x, 3, 6, this.boundingBox, world);
+ }
+
+ int glassMeta = Math.min(16, (coordBaseMode+MathUtils.randInt(0, 8)));
+ if (MathUtils.randInt(0, 5) > 4)
+ place(Blocks.stained_glass, glassMeta, 2, 2, 1, this.boundingBox, world);
+ if (MathUtils.randInt(0, 5) > 4)
+ place(Blocks.stained_glass, glassMeta, 2, 2, 5, this.boundingBox, world);
+ if (MathUtils.randInt(0, 5) > 4)
+ place(Blocks.stained_glass, glassMeta, 4, 2, 5, this.boundingBox, world);
+ if (MathUtils.randInt(0, 5) > 4)
+ place(Blocks.stained_glass, glassMeta, 0, 2, 3, this.boundingBox, world);
+ if (MathUtils.randInt(0, 5) > 4)
+ place(Blocks.stained_glass, glassMeta, 6, 2, 3, this.boundingBox, world);
+
+ placeDoorAtCurrentPosition(world, this.boundingBox, random, 4, 1, 1,
+ getMetadataWithOffset(Blocks.wooden_door, 1));
+
+ place(Blocks.leaves, MathUtils.randInt(0, 3), 1, 1, 4, this.boundingBox, world);
+ place(Blocks.torch, 0, 1, 2, 3, this.boundingBox, world);
+ place(Blocks.torch, 0, 3, 2, 2, this.boundingBox, world);
+ if (!this.hasMadeChest) {
+ int ic = getYWithOffset(0);
+ int jc = getXWithOffset(7, 1);
+ int kc = getZWithOffset(7, 1);
+ if (this.boundingBox.isVecInside(jc, ic, kc)) {
+ this.hasMadeChest = true;
+ generateStructureChestContents(world, this.boundingBox, random, 1, 1, 2, shackChestContents,
+ 1 + random.nextInt(3));
+ }
+ }*/
+ for (int i = 0; i < 7; i++) {
+ for (int j = 0; j < 7; j++) {
+ clearCurrentPositionBlocksUpwards(world, j, 6, i, this.boundingBox);
+ func_151554_b(world, aFloor, 0, j, 0, i, this.boundingBox);
+ }
+ }
+ spawnNatives(world, this.boundingBox, 4, 1, 3, MathUtils.randInt(3, 5));
+
+ return true;
+
+ /*
BiomeGenBase biom = world.getBiomeGenForCoords(getXWithOffset(0, 0), getZWithOffset(0, 0));
int groundAvg = calcGroundHeight(world, this.boundingBox);
if (groundAvg < 0) {
@@ -84,7 +335,7 @@ public class ComponentHut extends AustraliaComponent {
place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 3, this.boundingBox, world);
place(Blocks.dirt, MathUtils.randInt(0, 1), 6, 4, 4, this.boundingBox, world);
- for (int x = 0; x < MathUtils.randInt(5, 9); x++) {
+ for (int x = -2; x < 9; x++) {
place(Blocks.leaves, MathUtils.randInt(0, 3), x, 3, 0, this.boundingBox, world);
place(Blocks.leaves, MathUtils.randInt(0, 3), x, 4, 1, this.boundingBox, world);
place(Blocks.leaves, MathUtils.randInt(0, 3), x, 5, 2, this.boundingBox, world);
@@ -131,7 +382,7 @@ public class ComponentHut extends AustraliaComponent {
spawnNatives(world, this.boundingBox, 4, 1, 3, MathUtils.randInt(3, 5));
return true;
- }
+ */}
private int nativesSpawned = 0;
@@ -146,7 +397,7 @@ public class ComponentHut extends AustraliaComponent {
break;
}
if (par1World.rand.nextInt(MathUtils.randInt(3, 5)) != 0) {
- EntityVillager entityvillager = new EntityVillager(par1World, 7738);
+ EntityNativeAustralian entityvillager = new EntityNativeAustralian(par1World);
entityvillager.func_110163_bv();
entityvillager.setLocationAndAngles(j1 + 0.5D, k1, l1 + 0.5D, 0.0F, 0.0F);
par1World.spawnEntityInWorld(entityvillager);
diff --git a/src/Java/gtPlusPlus/australia/gen/map/component/ComponentShack.java b/src/Java/gtPlusPlus/australia/gen/map/component/ComponentShack.java
index 0bc4249d89..5c40c2b5e8 100644
--- a/src/Java/gtPlusPlus/australia/gen/map/component/ComponentShack.java
+++ b/src/Java/gtPlusPlus/australia/gen/map/component/ComponentShack.java
@@ -96,37 +96,37 @@ public class ComponentShack extends AustraliaComponent {
int mStoneMeta = MathUtils.randInt(0, mStone == Blocks.stained_hardened_clay ? 15 : mStone == Blocks.sandstone ? 2 : 3);
- fillWithAir(world, this.boundingBox, 0, 1, 0, 6, 9, 6);
- fillWithMetadataBlocks(world, this.boundingBox, 0, 0, 1, 6, 1, 5, mStone, mStoneMeta, mStone, mStoneMeta, false);
- fillWithMetadataBlocks(world, this.boundingBox, 0, 2, 1, 6, 3, 5, Blocks.planks, mWoodType, Blocks.planks, mWoodType, false);
- fillWithAir(world, this.boundingBox, 1, 1, 2, 5, 3, 4);
+ fillWithAir(world, this.boundingBox, 0, 0, 0, 7, 7, 7);
+ fillWithMetadataBlocks(world, this.boundingBox, 1, 0, 1, 7, 1, 5, mStone, mStoneMeta, mStone, mStoneMeta, false);
+ fillWithMetadataBlocks(world, this.boundingBox, 1, 2, 1, 7, 3, 5, Blocks.planks, mWoodType, Blocks.planks, mWoodType, false);
+ fillWithAir(world, this.boundingBox, 2, 1, 2, 6, 3, 4);
- place(mLog, logID, 0, 1, 1, this.boundingBox, world);
- place(mLog, logID, 0, 2, 1, this.boundingBox, world);
- place(mLog, logID, 0, 3, 1, this.boundingBox, world);
+ place(mLog, logID, 1, 1, 1, this.boundingBox, world);
+ place(mLog, logID, 1, 2, 1, this.boundingBox, world);
+ place(mLog, logID, 1, 3, 1, this.boundingBox, world);
- place(mLog, logID, 0, 1, 5, this.boundingBox, world);
- place(mLog, logID, 0, 2, 5, this.boundingBox, world);
- place(mLog, logID, 0, 3, 5, this.boundingBox, world);
+ place(mLog, logID, 1, 1, 5, this.boundingBox, world);
+ place(mLog, logID, 1, 2, 5, this.boundingBox, world);
+ place(mLog, logID, 1, 3, 5, this.boundingBox, world);
- place(mLog, logID, 6, 1, 1, this.boundingBox, world);
- place(mLog, logID, 6, 2, 1, this.boundingBox, world);
- place(mLog, logID, 6, 3, 1, this.boundingBox, world);
+ place(mLog, logID, 7, 1, 1, this.boundingBox, world);
+ place(mLog, logID, 7, 2, 1, this.boundingBox, world);
+ place(mLog, logID, 7, 3, 1, this.boundingBox, world);
- place(mLog, logID, 6, 1, 5, this.boundingBox, world);
- place(mLog, logID, 6, 2, 5, this.boundingBox, world);
- place(mLog, logID, 6, 3, 5, this.boundingBox, world);
+ place(mLog, logID, 7, 1, 5, this.boundingBox, world);
+ place(mLog, logID, 7, 2, 5, this.boundingBox, world);
+ place(mLog, logID, 7, 3, 5, this.boundingBox, world);
int meta = (this.coordBaseMode == 3) || (this.coordBaseMode == 1) ? 4 : 8;
- place(mLog, logID, 0, 4, 2, this.boundingBox, world);
- place(mLog, logID, 0, 4, 3, this.boundingBox, world);
- place(mLog, logID, 0, 4, 4, this.boundingBox, world);
- place(mLog, logID, 6, 4, 2, this.boundingBox, world);
- place(mLog, logID, 6, 4, 3, this.boundingBox, world);
- place(mLog, logID, 6, 4, 4, this.boundingBox, world);
+ place(mLog, logID, 1, 4, 2, this.boundingBox, world);
+ place(mLog, logID, 1, 4, 3, this.boundingBox, world);
+ place(mLog, logID, 1, 4, 4, this.boundingBox, world);
+ place(mLog, logID, 7, 4, 2, this.boundingBox, world);
+ place(mLog, logID, 7, 4, 3, this.boundingBox, world);
+ place(mLog, logID, 7, 4, 4, this.boundingBox, world);
- for (int x = 0; x < 7; x++) {
+ for (int x = 0; x < 9; x++) {
place(mWoodenStairs, getMetadataWithOffset(Blocks.oak_stairs, 3), x, 3, 0, this.boundingBox, world);
place(mWoodenStairs, getMetadataWithOffset(Blocks.oak_stairs, 3), x, 4, 1, this.boundingBox, world);
place(mWoodenStairs, getMetadataWithOffset(Blocks.oak_stairs, 3), x, 5, 2, this.boundingBox, world);
@@ -138,38 +138,38 @@ public class ComponentShack extends AustraliaComponent {
int glassMeta = Math.min(16, (coordBaseMode+MathUtils.randInt(0, 8)));
- place(Blocks.stained_glass_pane, glassMeta, 2, 2, 1, this.boundingBox, world);
- place(Blocks.stained_glass_pane, glassMeta, 2, 2, 5, this.boundingBox, world);
- place(Blocks.stained_glass_pane, glassMeta, 4, 2, 5, this.boundingBox, world);
- place(Blocks.stained_glass_pane, glassMeta, 0, 2, 3, this.boundingBox, world);
- place(Blocks.stained_glass_pane, glassMeta, 6, 2, 3, this.boundingBox, world);
+ place(Blocks.stained_glass_pane, glassMeta, 3, 2, 1, this.boundingBox, world);
+ place(Blocks.stained_glass_pane, glassMeta, 3, 2, 5, this.boundingBox, world);
+ place(Blocks.stained_glass_pane, glassMeta, 5, 2, 5, this.boundingBox, world);
+ place(Blocks.stained_glass_pane, glassMeta, 1, 2, 3, this.boundingBox, world);
+ place(Blocks.stained_glass_pane, glassMeta, 7, 2, 3, this.boundingBox, world);
- placeDoorAtCurrentPosition(world, this.boundingBox, random, 4, 1, 1,
+ placeDoorAtCurrentPosition(world, this.boundingBox, random, 5, 1, 1,
getMetadataWithOffset(Blocks.wooden_door, 1));
- place(Blocks.planks, mWoodType, 1, 1, 4, this.boundingBox, world);
- place(Blocks.torch, 0, 1, 2, 4, this.boundingBox, world);
- place(mWoodenStairs, getMetadataWithOffset(mWoodenStairs, 1), 1, 1, 3, this.boundingBox, world);
- place(mWoodenStairs, getMetadataWithOffset(mWoodenStairs, 3), 2, 1, 4, this.boundingBox, world);
- place(Blocks.fence, 0, 2, 1, 3, this.boundingBox, world);
- place(Blocks.stone_pressure_plate, 0, 2, 2, 3, this.boundingBox, world);
+ place(Blocks.glowstone, mWoodType, 2, 1, 4, this.boundingBox, world);
+ place(Blocks.torch, 0, 2, 2, 4, this.boundingBox, world);
+ place(mWoodenStairs, getMetadataWithOffset(mWoodenStairs, 1), 2, 1, 3, this.boundingBox, world);
+ place(mWoodenStairs, getMetadataWithOffset(mWoodenStairs, 3), 3, 1, 4, this.boundingBox, world);
+ place(Blocks.fence, 1, 2, 1, 3, this.boundingBox, world);
+ place(Blocks.stone_pressure_plate, 1, 2, 2, 3, this.boundingBox, world);
if (!this.hasMadeChest) {
int ic = getYWithOffset(0);
int jc = getXWithOffset(7, 1);
int kc = getZWithOffset(7, 1);
if (this.boundingBox.isVecInside(jc, ic, kc)) {
this.hasMadeChest = true;
- generateStructureChestContents(world, this.boundingBox, random, 1, 1, 2, shackChestContents,
+ generateStructureChestContents(world, this.boundingBox, random, 2, 1, 2, shackChestContents,
1 + random.nextInt(3));
}
}
- for (int i = 0; i < 7; i++) {
- for (int j = 0; j < 7; j++) {
+ for (int i = 0; i < 9; i++) {
+ for (int j = 0; j < 9; j++) {
clearCurrentPositionBlocksUpwards(world, j, 6, i, this.boundingBox);
func_151554_b(world, undergroundID, 0, j, 0, i, this.boundingBox);
}
}
- spawnNatives(world, this.boundingBox, 4, 1, 3, MathUtils.randInt(3, 5));
+ spawnNatives(world, this.boundingBox, 3, 2, 3, MathUtils.randInt(3, 5));
return true;
}
@@ -251,7 +251,7 @@ public class ComponentShack extends AustraliaComponent {
if ((MathUtils.randInt(0, 100) < (this.chance/5))) {
int direction = MathUtils.randInt(0, 3);
new ComponentShack(direction, random, x, z).addComponentParts(world, random);
- Logger.WORLD("NativeHut x: " + x + " | z: " + z + " | Dir: " + direction);
+ Logger.WORLD("NativeShack x: " + x + " | z: " + z + " | dir: " + direction);
return true;
}
return false;