Skip to content

Commit

Permalink
Merge pull request #25 from Illyohs/updoot-1.8.9
Browse files Browse the repository at this point in the history
Update 1.8.9
  • Loading branch information
sdj64 committed Jan 19, 2016
2 parents 7dd0714 + c07a255 commit c4e7e86
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 42 deletions.
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
}
}

apply plugin: 'forge'
apply plugin: 'net.minecraftforge.gradle.forge'

version = "3.03a"
group= "com.sdj64.highlands" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "highlands"

minecraft {
version = "1.8-11.14.3.1450"
runDir = "eclipse"
version = "1.8.9-11.15.0.1688"
runDir = "run"

// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not allways work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = "snapshot_20141130"
mappings = "stable_20"
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void decorate(World world, Random random, BlockPos pos)
int x = random.nextInt(16) + 8;
int z = random.nextInt(16) + 8;

BlockPos treepos = world.getHorizon(pos.add(x, 0, z));
BlockPos treepos = world.getHeight(pos.add(x, 0, z));

//generate birch or fir tree
if(random.nextInt(3) == 0){
Expand All @@ -77,7 +77,7 @@ else if(world.getTopSolidOrLiquidBlock(pos).getY() < 110){
int x = random.nextInt(16) + 8;
int z = random.nextInt(16) + 8;

BlockPos treepos = world.getHorizon(pos.add(x, 0, z));
BlockPos treepos = world.getHeight(pos.add(x, 0, z));

//generate birch or fir tree
if(random.nextInt(3) == 0){
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/sdj64/highlands/biome/BiomeGenAlps.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void decorate(World world, Random random, BlockPos pos)
int x = random.nextInt(16) + 8;
int z = random.nextInt(16) + 8;

BlockPos treepos = world.getHorizon(pos.add(x, 0, z));
BlockPos treepos = world.getHeight(pos.add(x, 0, z));

if(random.nextInt(3) == 0){
HighlandsGenerators.firGen.generate(world, random, treepos);
Expand All @@ -64,7 +64,7 @@ else if(world.getTopSolidOrLiquidBlock(pos).getY() < 110){
int x = random.nextInt(16) + 8;
int z = random.nextInt(16) + 8;

BlockPos treepos = world.getHorizon(pos.add(x, 0, z));
BlockPos treepos = world.getHeight(pos.add(x, 0, z));

if(random.nextInt(4) == 0){
if(random.nextInt(3) == 0){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void decorate(World world, Random random, BlockPos pos)
{
k = random.nextInt(16) + 8;
l = random.nextInt(16) + 8;
BlockPos blockpos1 = world.getHorizon(pos.add(k, 0, l));
BlockPos blockpos1 = world.getHeight(pos.add(k, 0, l));
blockBlob.generate(world, random, blockpos1);
}

Expand All @@ -82,7 +82,7 @@ public void decorate(World world, Random random, BlockPos pos)
int x = random.nextInt(16) + 8;
int z = random.nextInt(16) + 8;

BlockPos treepos = world.getHorizon(pos.add(x, 0, z));
BlockPos treepos = world.getHeight(pos.add(x, 0, z));

if(random.nextInt(3) == 0){
HighlandsGenerators.deadTreeGen.generate(world, random, treepos);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void decorate(World world, Random random, BlockPos pos)

int i = random.nextInt(16) + 8;
int j = random.nextInt(16) + 8;
int height = world.getHorizon(pos.add(i, 0, j)).getY() * 2; // could == 0, which crashes nextInt
int height = world.getHeight(pos.add(i, 0, j)).getY() * 2; // could == 0, which crashes nextInt
if (height < 1) height = 1;
int k = random.nextInt(height);
(new WorldGenMelon()).generate(world, random, pos.add(i, k, j));
Expand Down
44 changes: 22 additions & 22 deletions src/main/java/com/sdj64/highlands/biome/ChunkProviderHighlands.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import net.minecraft.world.World;
import net.minecraft.world.WorldType;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.ChunkPrimer;
import net.minecraft.world.chunk.IChunkProvider;
Expand Down Expand Up @@ -206,7 +207,7 @@ public ChunkProviderHighlands(World worldIn, long seed, boolean mapFeaturesEnabl

if (generatorOptions != null)
{
this.settings = ChunkProviderSettings.Factory.func_177865_a(generatorOptions).func_177864_b();
this.settings = ChunkProviderSettings.Factory.jsonToFactory(generatorOptions).func_177864_b();
ModifySettingsForHighlands();
this.field_177476_s = this.settings.useLavaOceans ? Blocks.lava : Blocks.water;
}
Expand Down Expand Up @@ -325,37 +326,37 @@ public Chunk provideChunk(int x, int z)

if (this.settings.useCaves)
{
this.caveGenerator.func_175792_a(this, this.worldObj, x, z, chunkprimer);
this.caveGenerator.generate(this, this.worldObj, x, z, chunkprimer);
}

if (this.settings.useRavines)
{
this.ravineGenerator.func_175792_a(this, this.worldObj, x, z, chunkprimer);
this.ravineGenerator.generate(this, this.worldObj, x, z, chunkprimer);
}

if (this.settings.useMineShafts && this.mapFeaturesEnabled)
{
this.mineshaftGenerator.func_175792_a(this, this.worldObj, x, z, chunkprimer);
this.mineshaftGenerator.generate(this, this.worldObj, x, z, chunkprimer);
}

if (this.settings.useVillages && this.mapFeaturesEnabled)
{
this.villageGenerator.func_175792_a(this, this.worldObj, x, z, chunkprimer);
this.villageGenerator.generate(this, this.worldObj, x, z, chunkprimer);
}

if (this.settings.useStrongholds && this.mapFeaturesEnabled)
{
this.strongholdGenerator.func_175792_a(this, this.worldObj, x, z, chunkprimer);
this.strongholdGenerator.generate(this, this.worldObj, x, z, chunkprimer);
}

if (this.settings.useTemples && this.mapFeaturesEnabled)
{
this.scatteredFeatureGenerator.func_175792_a(this, this.worldObj, x, z, chunkprimer);
this.scatteredFeatureGenerator.generate(this, this.worldObj, x, z, chunkprimer);
}

if (this.settings.useMonuments && this.mapFeaturesEnabled)
{
this.oceanMonumentGenerator.func_175792_a(this, this.worldObj, x, z, chunkprimer);
this.oceanMonumentGenerator.generate(this, this.worldObj, x, z, chunkprimer);
}

Chunk chunk = new Chunk(this.worldObj, chunkprimer, x, z);
Expand Down Expand Up @@ -537,27 +538,27 @@ public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)

if (this.settings.useMineShafts && this.mapFeaturesEnabled)
{
this.mineshaftGenerator.func_175794_a(this.worldObj, this.rand, chunkcoordintpair);
this.mineshaftGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
}

if (this.settings.useVillages && this.mapFeaturesEnabled)
{
flag = this.villageGenerator.func_175794_a(this.worldObj, this.rand, chunkcoordintpair);
flag = this.villageGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
}

if (this.settings.useStrongholds && this.mapFeaturesEnabled)
{
this.strongholdGenerator.func_175794_a(this.worldObj, this.rand, chunkcoordintpair);
this.strongholdGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
}

if (this.settings.useTemples && this.mapFeaturesEnabled)
{
this.scatteredFeatureGenerator.func_175794_a(this.worldObj, this.rand, chunkcoordintpair);
this.scatteredFeatureGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
}

if (this.settings.useMonuments && this.mapFeaturesEnabled)
{
this.oceanMonumentGenerator.func_175794_a(this.worldObj, this.rand, chunkcoordintpair);
this.oceanMonumentGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
}

int k1;
Expand Down Expand Up @@ -612,7 +613,7 @@ public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
BlockPos blockpos1 = this.worldObj.getPrecipitationHeight(blockpos.add(k1, 0, l1));
BlockPos blockpos2 = blockpos1.down();

if (this.worldObj.func_175675_v(blockpos2))
if (this.worldObj.canBlockFreezeWater(blockpos2))
{
this.worldObj.setBlockState(blockpos2, Blocks.ice.getDefaultState(), 2);
}
Expand All @@ -635,7 +636,7 @@ public boolean func_177460_a(IChunkProvider p_177460_1_, Chunk p_177460_2_, int

if (this.settings.useMonuments && this.mapFeaturesEnabled && p_177460_2_.getInhabitedTime() < 3600L)
{
flag |= this.oceanMonumentGenerator.func_175794_a(this.worldObj, this.rand, new ChunkCoordIntPair(p_177460_3_, p_177460_4_));
flag |= this.oceanMonumentGenerator.generateStructure(this.worldObj, this.rand, new ChunkCoordIntPair(p_177460_3_, p_177460_4_));
}

return flag;
Expand Down Expand Up @@ -680,7 +681,7 @@ public String makeString()
return "RandomLevelSource";
}

public List func_177458_a(EnumCreatureType p_177458_1_, BlockPos p_177458_2_)
public List<SpawnListEntry> getPossibleCreatures(EnumCreatureType p_177458_1_, BlockPos p_177458_2_)
{
BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(p_177458_2_);

Expand Down Expand Up @@ -714,27 +715,27 @@ public void recreateStructures(Chunk p_180514_1_, int p_180514_2_, int p_180514_
{
if (this.settings.useMineShafts && this.mapFeaturesEnabled)
{
this.mineshaftGenerator.func_175792_a(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
this.mineshaftGenerator.generate(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
}

if (this.settings.useVillages && this.mapFeaturesEnabled)
{
this.villageGenerator.func_175792_a(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
this.villageGenerator.generate(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
}

if (this.settings.useStrongholds && this.mapFeaturesEnabled)
{
this.strongholdGenerator.func_175792_a(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
this.strongholdGenerator.generate(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
}

if (this.settings.useTemples && this.mapFeaturesEnabled)
{
this.scatteredFeatureGenerator.func_175792_a(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
this.scatteredFeatureGenerator.generate(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
}

if (this.settings.useMonuments && this.mapFeaturesEnabled)
{
this.oceanMonumentGenerator.func_175792_a(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
this.oceanMonumentGenerator.generate(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
}
}

Expand All @@ -743,6 +744,5 @@ public Chunk provideChunk(BlockPos blockPosIn)
return this.provideChunk(blockPosIn.getX() >> 4, blockPosIn.getZ() >> 4);
}



}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class HighlandsBlocks {
public static final int NUM_TREE_TYPES = 7;
public static final int NUM_PLANTS = 9;

public static final CreativeTabs tabHighlands = new CreativeTabs("Highlands")
public static final CreativeTabs tabHighlands = new CreativeTabs("highlands")
{
@SideOnly(Side.CLIENT)
public Item getTabIconItem()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public class OldBlockHighlandsLeaves1 extends OldBlockHighlandsLeaves
{
public static final PropertyEnum VARIANT = PropertyEnum.create("variant", OldBlockHighlandsPlanks.EnumType.class, new Predicate()
{
private static final String __OBFID = "CL_00002085";
public boolean apply(OldBlockHighlandsPlanks.EnumType type)
{
return type.getMetadata() < 4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ void somethingAboutGeneratingLeaves(BlockPos pos, float p_180712_2_)

if (state.getBlock().isAir(this.world, blockpos1) || state.getBlock().isLeaves(this.world, blockpos1))
{
this.func_175905_a(this.world, blockpos1, leafBlock, leafMeta);
// this.func_175905_a(this.world, blockpos1, leafBlock, leafMeta);
this.setBlockAndNotifyAdequately(this.world, blockpos1, leafBlock.getStateFromMeta(leafMeta));
}
}
}
Expand Down Expand Up @@ -187,7 +188,8 @@ void func_175937_a(BlockPos p_175937_1_, BlockPos p_175937_2_)
{
BlockPos blockpos3 = p_175937_1_.add((double)(0.5F + (float)j * f), (double)(0.5F + (float)j * f1), (double)(0.5F + (float)j * f2));
BlockLog.EnumAxis enumaxis = this.func_175938_b(p_175937_1_, blockpos3);
this.func_175903_a(this.world, blockpos3, woodBlock.getStateFromMeta(woodMeta).withProperty(BlockLog.LOG_AXIS, enumaxis));
this.setBlockAndNotifyAdequately(this.world, blockpos3, woodBlock.getStateFromMeta(woodMeta).withProperty(BlockLog.LOG_AXIS, enumaxis));

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ void somethingAboutGeneratingLeaves(BlockPos pos, float p_180712_2_)

if (state.getBlock().isAir(this.world, blockpos1) || state.getBlock().isLeaves(this.world, blockpos1))
{
this.func_175905_a(this.world, blockpos1, leafBlock, leafMeta);
// this.func_175905_a(this.world, blockpos1, leafBlock, leafMeta);
this.setBlockAndNotifyAdequately(this.world, blockpos1, leafBlock.getStateFromMeta(leafMeta));
}
}
}
Expand Down Expand Up @@ -187,7 +188,7 @@ void func_175937_a(BlockPos p_175937_1_, BlockPos p_175937_2_)
{
BlockPos blockpos3 = p_175937_1_.add((double)(0.5F + (float)j * f), (double)(0.5F + (float)j * f1), (double)(0.5F + (float)j * f2));
BlockLog.EnumAxis enumaxis = this.func_175938_b(p_175937_1_, blockpos3);
this.func_175903_a(this.world, blockpos3, woodBlock.getStateFromMeta(woodMeta).withProperty(BlockLog.LOG_AXIS, enumaxis));
this.setBlockAndNotifyAdequately(this.world, blockpos3, woodBlock.getStateFromMeta(woodMeta).withProperty(BlockLog.LOG_AXIS, enumaxis));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public class WorldGenMinable2 extends WorldGenerator
/** The number of blocks to generate. */
private final int numberOfBlocks;
private final Predicate field_175919_c;
private static final String __OBFID = "CL_00000426";

private boolean genInStone;
private IBlockState BSGin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static GenLayer[] initializeAllBiomeGenerators(long p_180781_0_, WorldTyp

if (p_180781_2_ == WorldType.CUSTOMIZED && p_180781_3_.length() > 0)
{
chunkprovidersettings = ChunkProviderSettings.Factory.func_177865_a(p_180781_3_).func_177864_b();
chunkprovidersettings = ChunkProviderSettings.Factory.jsonToFactory(p_180781_3_).func_177864_b();
j = chunkprovidersettings.biomeSize;
k = chunkprovidersettings.riverSize;
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/assets/highlands/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,8 @@ tile.highlands_lavender.name=Lavender
tile.highlands_green_leaf.name=Tropical Leaf Fern
tile.highlands_dune_grass.name=Dune Grass

<!-- Other -->
itemGroup.highlands=Highlands



0 comments on commit c4e7e86

Please sign in to comment.