World Patches work.
This commit is contained in:
parent
8a506022d7
commit
74b2c3dfe6
41 changed files with 810 additions and 936 deletions
|
@ -57,7 +57,7 @@
|
|||
Vec3d vec3d1 = vec3d.addVector((double)f6 * d3, (double)f5 * d3, (double)f7 * d3);
|
||||
return worldIn.rayTraceBlocks(vec3d, vec3d1, useLiquids, !useLiquids, false);
|
||||
}
|
||||
@@ -422,11 +431,628 @@
|
||||
@@ -422,11 +431,629 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -301,6 +301,7 @@
|
|||
+ * @param original Original result registered with the chest gen hooks.
|
||||
+ * @return New values to use as the random item, typically this will be original
|
||||
+ */
|
||||
+ @Deprecated // LootTables!
|
||||
+ public net.minecraft.util.WeightedRandomChestContent getChestGenBase(net.minecraftforge.common.ChestGenHooks chest, Random rnd, net.minecraft.util.WeightedRandomChestContent original)
|
||||
+ {
|
||||
+ if (this instanceof ItemEnchantedBook)
|
||||
|
@ -686,7 +687,7 @@
|
|||
public static void registerItems()
|
||||
{
|
||||
registerItemBlock(Blocks.stone, (new ItemMultiTexture(Blocks.stone, Blocks.stone, new Function<ItemStack, String>()
|
||||
@@ -935,6 +1561,10 @@
|
||||
@@ -935,6 +1562,10 @@
|
||||
private final float damageVsEntity;
|
||||
private final int enchantability;
|
||||
|
||||
|
@ -697,7 +698,7 @@
|
|||
private ToolMaterial(int harvestLevel, int maxUses, float efficiency, float damageVsEntity, int enchantability)
|
||||
{
|
||||
this.harvestLevel = harvestLevel;
|
||||
@@ -969,9 +1599,36 @@
|
||||
@@ -969,9 +1600,36 @@
|
||||
return this.enchantability;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -212,6 +198,322 @@
|
||||
@@ -212,6 +198,327 @@
|
||||
return new WorldBorder();
|
||||
}
|
||||
|
||||
|
@ -67,6 +67,7 @@
|
|||
+ /**
|
||||
+ * Sets the providers current dimension ID, used in default getSaveFolder()
|
||||
+ * Added to allow default providers to be registered for multiple dimensions.
|
||||
+ * This is to denote the exact dimension ID opposed to the 'type' in WorldType
|
||||
+ *
|
||||
+ * @param dim Dimension ID
|
||||
+ */
|
||||
|
@ -74,6 +75,10 @@
|
|||
+ {
|
||||
+ this.dimensionId = dim;
|
||||
+ }
|
||||
+ public int getDimension()
|
||||
+ {
|
||||
+ return this.dimensionId;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the sub-folder of the world folder that this WorldProvider saves to.
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/world/WorldProviderSurface.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/WorldProviderSurface.java
|
||||
@@ -9,6 +9,6 @@
|
||||
|
||||
public boolean func_186056_c(int p_186056_1_, int p_186056_2_)
|
||||
{
|
||||
- return !this.worldObj.isSpawnChunk(p_186056_1_, p_186056_2_);
|
||||
+ return !this.worldObj.isSpawnChunk(p_186056_1_, p_186056_2_) || !net.minecraftforge.common.DimensionManager.shouldLoadSpawn(this.worldObj.provider.getDimension());
|
||||
}
|
||||
}
|
|
@ -198,7 +198,15 @@
|
|||
i = MathHelper.clamp_int(i, 0, this.entityLists.length - 1);
|
||||
j = MathHelper.clamp_int(j, 0, this.entityLists.length - 1);
|
||||
|
||||
@@ -1050,7 +1050,7 @@
|
||||
@@ -994,6 +994,7 @@
|
||||
{
|
||||
this.func_150809_p();
|
||||
p_186034_1_.func_185931_b(this.xPosition, this.zPosition);
|
||||
+ net.minecraftforge.fml.common.registry.GameRegistry.generateWorld(this.xPosition, this.zPosition, this.worldObj, p_186034_1_, this.worldObj.getChunkProvider());
|
||||
this.setChunkModified();
|
||||
}
|
||||
}
|
||||
@@ -1050,7 +1051,7 @@
|
||||
{
|
||||
BlockPos blockpos = (BlockPos)this.tileEntityPosQueue.poll();
|
||||
|
||||
|
@ -207,7 +215,7 @@
|
|||
{
|
||||
TileEntity tileentity = this.createNewTileEntity(blockpos);
|
||||
this.worldObj.setTileEntity(blockpos, tileentity);
|
||||
@@ -1114,6 +1114,13 @@
|
||||
@@ -1114,6 +1115,13 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void func_186033_a(PacketBuffer p_186033_1_, int p_186033_2_, boolean p_186033_3_)
|
||||
{
|
||||
|
@ -221,7 +229,7 @@
|
|||
boolean flag = !this.worldObj.provider.getHasNoSky();
|
||||
|
||||
for (int i = 0; i < this.storageArrays.length; ++i)
|
||||
@@ -1162,10 +1169,16 @@
|
||||
@@ -1162,10 +1170,16 @@
|
||||
this.isTerrainPopulated = true;
|
||||
this.generateHeightMap();
|
||||
|
||||
|
@ -238,7 +246,7 @@
|
|||
}
|
||||
|
||||
public BiomeGenBase getBiome(BlockPos pos, BiomeProvider chunkManager)
|
||||
@@ -1239,7 +1252,7 @@
|
||||
@@ -1239,7 +1253,7 @@
|
||||
{
|
||||
BlockPos blockpos2 = blockpos1.offset(enumfacing);
|
||||
|
||||
|
@ -247,7 +255,7 @@
|
|||
{
|
||||
this.worldObj.checkLight(blockpos2);
|
||||
}
|
||||
@@ -1370,7 +1383,7 @@
|
||||
@@ -1370,7 +1384,7 @@
|
||||
{
|
||||
blockpos$mutableblockpos.set(blockpos$mutableblockpos.getX(), l, blockpos$mutableblockpos.getZ());
|
||||
|
||||
|
@ -256,7 +264,7 @@
|
|||
{
|
||||
this.worldObj.checkLight(blockpos$mutableblockpos);
|
||||
}
|
||||
@@ -1481,4 +1494,20 @@
|
||||
@@ -1481,4 +1495,20 @@
|
||||
QUEUED,
|
||||
CHECK;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,72 @@
|
|||
--- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderEnd.java
|
||||
@@ -123,6 +123,9 @@
|
||||
@@ -39,6 +39,9 @@
|
||||
double[] field_185967_f;
|
||||
double[] field_185968_g;
|
||||
private final WorldGenEndIsland field_185975_r = new WorldGenEndIsland();
|
||||
+ // temporary variables used during event handling
|
||||
+ private int chunkX = 0;
|
||||
+ private int chunkZ = 0;
|
||||
|
||||
public ChunkProviderEnd(World p_i46667_1_, boolean p_i46667_2_, long p_i46667_3_)
|
||||
{
|
||||
@@ -51,6 +54,16 @@
|
||||
this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10);
|
||||
this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16);
|
||||
this.field_185973_o = new NoiseGeneratorSimplex(this.rand);
|
||||
+
|
||||
+ net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextEnd ctx =
|
||||
+ new net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextEnd(field_185969_i, field_185970_j, field_185971_k, noiseGen5, noiseGen6, field_185973_o);
|
||||
+ ctx = net.minecraftforge.event.terraingen.TerrainGen.getModdedNoiseGenerators(p_i46667_1_, this.rand, ctx);
|
||||
+ this.field_185969_i = ctx.getLPerlin1();
|
||||
+ this.field_185970_j = ctx.getLPerlin2();
|
||||
+ this.field_185971_k = ctx.getPerlin();
|
||||
+ this.noiseGen5 = ctx.getDepth();
|
||||
+ this.noiseGen6 = ctx.getScale();
|
||||
+ this.field_185973_o = ctx.getIsland();
|
||||
}
|
||||
|
||||
public void setBlocksInChunk(int p_180518_1_, int p_180518_2_, ChunkPrimer p_180518_3_)
|
||||
@@ -123,6 +136,7 @@
|
||||
|
||||
public void func_185962_a(ChunkPrimer p_185962_1_)
|
||||
{
|
||||
+ net.minecraftforge.event.terraingen.ChunkProviderEvent.ReplaceBiomeBlocks event = new net.minecraftforge.event.terraingen.ChunkProviderEvent.ReplaceBiomeBlocks(this, chunkX, chunkZ, p_180519_1_, this.endWorld);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
|
||||
+ if (event.getResult() == net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) return;
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.onReplaceBiomeBlocks(this, this.chunkX, this.chunkZ, p_185962_1_, this.worldObj)) return;
|
||||
for (int i = 0; i < 16; ++i)
|
||||
{
|
||||
for (int j = 0; j < 16; ++j)
|
||||
@@ -174,6 +188,7 @@
|
||||
|
||||
public Chunk func_185932_a(int p_185932_1_, int p_185932_2_)
|
||||
{
|
||||
+ this.chunkX = p_185932_1_; this.chunkZ = p_185932_2_;
|
||||
this.rand.setSeed((long)p_185932_1_ * 341873128712L + (long)p_185932_2_ * 132897987541L);
|
||||
ChunkPrimer chunkprimer = new ChunkPrimer();
|
||||
this.biomesForGeneration = this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration, p_185932_1_ * 16, p_185932_2_ * 16, 16, 16);
|
||||
@@ -255,6 +270,10 @@
|
||||
|
||||
private double[] func_185963_a(double[] p_185963_1_, int p_185963_2_, int p_185963_3_, int p_185963_4_, int p_185963_5_, int p_185963_6_, int p_185963_7_)
|
||||
{
|
||||
+ net.minecraftforge.event.terraingen.ChunkGeneratorEvent.InitNoiseField event = new net.minecraftforge.event.terraingen.ChunkGeneratorEvent.InitNoiseField(this, p_185963_1_, p_185963_2_, p_185963_3_, p_185963_4_, p_185963_5_, p_185963_6_, p_185963_7_);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
|
||||
+ if (event.getResult() == net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) return event.noisefield;
|
||||
+
|
||||
if (p_185963_1_ == null)
|
||||
{
|
||||
p_185963_1_ = new double[p_185963_5_ * p_185963_6_ * p_185963_7_];
|
||||
@@ -327,6 +346,7 @@
|
||||
public void func_185931_b(int p_185931_1_, int p_185931_2_)
|
||||
{
|
||||
BlockFalling.fallInstantly = true;
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(true, this, this.worldObj, p_185931_1_, p_185931_2_, false);
|
||||
BlockPos blockpos = new BlockPos(p_185931_1_ * 16, 0, p_185931_2_ * 16);
|
||||
|
||||
if (this.mapFeaturesEnabled)
|
||||
@@ -374,6 +394,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(false, this, this.worldObj, p_185931_1_, p_185931_2_, false);
|
||||
BlockFalling.fallInstantly = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,104 @@
|
|||
--- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderHell.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderHell.java
|
||||
@@ -76,6 +76,19 @@
|
||||
this.field_185946_g = new NoiseGeneratorOctaves(this.field_185954_p, 10);
|
||||
this.field_185947_h = new NoiseGeneratorOctaves(this.field_185954_p, 16);
|
||||
worldIn.setSeaLevel(63);
|
||||
+
|
||||
+ net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextHell ctx =
|
||||
+ new net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextHell(field_185957_u, field_185958_v, field_185959_w, slowsandGravelNoiseGen, netherrackExculsivityNoiseGen, field_185946_g, field_185947_h);
|
||||
+ ctx = net.minecraftforge.event.terraingen.TerrainGen.getModdedNoiseGenerators(worldIn, this.field_185954_p, ctx);
|
||||
+ this.field_185957_u = ctx.getLPerlin1();
|
||||
+ this.field_185958_v = ctx.getLPerlin2();
|
||||
+ this.field_185959_w = ctx.getPerlin();
|
||||
+ this.slowsandGravelNoiseGen = ctx.getPerlin2();
|
||||
+ this.netherrackExculsivityNoiseGen = ctx.getPerlin3();
|
||||
+ this.field_185946_g = ctx.getScale();
|
||||
+ this.field_185947_h = ctx.getDepth();
|
||||
+ this.genNetherBridge = (MapGenNetherBridge)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(genNetherBridge, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.NETHER_BRIDGE);
|
||||
+ this.field_185939_I = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(field_185939_I, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.NETHER_CAVE);
|
||||
}
|
||||
|
||||
public void func_185936_a(int p_185936_1_, int p_185936_2_, ChunkPrimer p_185936_3_)
|
||||
@@ -154,6 +167,7 @@
|
||||
|
||||
public void func_185937_b(int p_185937_1_, int p_185937_2_, ChunkPrimer p_185937_3_)
|
||||
{
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.onReplaceBiomeBlocks(this, p_185937_1_, p_185937_2_, p_185937_3_, this.field_185952_n)) return;
|
||||
int i = this.field_185952_n.getSeaLevel() + 1;
|
||||
double d0 = 0.03125D;
|
||||
this.slowsandNoise = this.slowsandGravelNoiseGen.generateNoiseOctaves(this.slowsandNoise, p_185937_1_ * 16, p_185937_2_ * 16, 0, 16, 16, 1, d0, d0, 1.0D);
|
||||
@@ -276,6 +290,10 @@
|
||||
p_185938_1_ = new double[p_185938_5_ * p_185938_6_ * p_185938_7_];
|
||||
}
|
||||
|
||||
+ net.minecraftforge.event.terraingen.ChunkGeneratorEvent.InitNoiseField event = new net.minecraftforge.event.terraingen.ChunkGeneratorEvent.InitNoiseField(this, p_185938_1_, p_185938_2_, p_185938_3_, p_185938_4_, p_185938_5_, p_185938_6_, p_185938_7_);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
|
||||
+ if (event.getResult() == net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) return event.noisefield;
|
||||
+
|
||||
double d0 = 684.412D;
|
||||
double d1 = 2053.236D;
|
||||
this.noiseData4 = this.field_185946_g.generateNoiseOctaves(this.noiseData4, p_185938_2_, p_185938_3_, p_185938_4_, p_185938_5_, 1, p_185938_7_, 1.0D, 0.0D, 1.0D);
|
||||
@@ -357,20 +375,25 @@
|
||||
public void func_185931_b(int p_185931_1_, int p_185931_2_)
|
||||
{
|
||||
BlockFalling.fallInstantly = true;
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(true, this, this.field_185952_n, p_185931_1_, p_185931_2_, false);
|
||||
BlockPos blockpos = new BlockPos(p_185931_1_ * 16, 0, p_185931_2_ * 16);
|
||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_185931_1_, p_185931_2_);
|
||||
this.genNetherBridge.generateStructure(this.field_185952_n, this.field_185954_p, chunkcoordintpair);
|
||||
|
||||
+ if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185952_n, this.field_185954_p, p_185931_1_, p_185931_2_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.NETHER_LAVA))
|
||||
for (int i = 0; i < 8; ++i)
|
||||
{
|
||||
this.field_177472_y.generate(this.field_185952_n, this.field_185954_p, blockpos.add(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(120) + 4, this.field_185954_p.nextInt(16) + 8));
|
||||
}
|
||||
|
||||
+ if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185952_n, this.field_185954_p, p_185931_1_, p_185931_2_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.FIRE))
|
||||
for (int j = 0; j < this.field_185954_p.nextInt(this.field_185954_p.nextInt(10) + 1) + 1; ++j)
|
||||
{
|
||||
this.field_177470_t.generate(this.field_185952_n, this.field_185954_p, blockpos.add(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(120) + 4, this.field_185954_p.nextInt(16) + 8));
|
||||
}
|
||||
|
||||
+ if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185952_n, this.field_185954_p, p_185931_1_, p_185931_2_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.GLOWSTONE))
|
||||
+ {
|
||||
for (int k = 0; k < this.field_185954_p.nextInt(this.field_185954_p.nextInt(10) + 1); ++k)
|
||||
{
|
||||
this.field_177469_u.generate(this.field_185952_n, this.field_185954_p, blockpos.add(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(120) + 4, this.field_185954_p.nextInt(16) + 8));
|
||||
@@ -380,7 +403,13 @@
|
||||
{
|
||||
this.field_177468_v.generate(this.field_185952_n, this.field_185954_p, blockpos.add(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(128), this.field_185954_p.nextInt(16) + 8));
|
||||
}
|
||||
+ }//Forge: End doGLowstone
|
||||
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(false, this, this.field_185952_n, p_185931_1_, p_185931_2_, false);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.terraingen.DecorateBiomeEvent.Pre(this.field_185952_n, this.field_185954_p, blockpos));
|
||||
+
|
||||
+ if (net.minecraftforge.event.terraingen.TerrainGen.decorate(this.field_185952_n, this.field_185954_p, blockpos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.SHROOM))
|
||||
+ {
|
||||
if (this.field_185954_p.nextBoolean())
|
||||
{
|
||||
this.field_177471_z.generate(this.field_185952_n, this.field_185954_p, blockpos.add(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(128), this.field_185954_p.nextInt(16) + 8));
|
||||
@@ -390,17 +419,22 @@
|
||||
{
|
||||
this.field_177465_A.generate(this.field_185952_n, this.field_185954_p, blockpos.add(this.field_185954_p.nextInt(16) + 8, this.field_185954_p.nextInt(128), this.field_185954_p.nextInt(16) + 8));
|
||||
}
|
||||
+ }
|
||||
|
||||
+ if (net.minecraftforge.event.terraingen.TerrainGen.generateOre(this.field_185952_n, this.field_185954_p, field_177467_w, blockpos, net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.QUARTZ))
|
||||
for (int i1 = 0; i1 < 16; ++i1)
|
||||
{
|
||||
this.field_177467_w.generate(this.field_185952_n, this.field_185954_p, blockpos.add(this.field_185954_p.nextInt(16), this.field_185954_p.nextInt(108) + 10, this.field_185954_p.nextInt(16)));
|
||||
}
|
||||
|
||||
+ if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185952_n, this.field_185954_p, p_185931_1_, p_185931_2_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.NETHER_LAVA2))
|
||||
for (int j1 = 0; j1 < 16; ++j1)
|
||||
{
|
||||
this.field_177473_x.generate(this.field_185952_n, this.field_185954_p, blockpos.add(this.field_185954_p.nextInt(16), this.field_185954_p.nextInt(108) + 10, this.field_185954_p.nextInt(16)));
|
||||
}
|
||||
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.terraingen.DecorateBiomeEvent.Post(this.field_185952_n, this.field_185954_p, blockpos));
|
||||
+
|
||||
BlockFalling.fallInstantly = false;
|
||||
}
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
--- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderOverworld.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderOverworld.java
|
||||
@@ -59,6 +59,15 @@
|
||||
|
||||
public ChunkProviderOverworld(World p_i46668_1_, long p_i46668_2_, boolean p_i46668_4_, String p_i46668_5_)
|
||||
{
|
||||
+ {
|
||||
+ field_186003_v = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(field_186003_v, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE);
|
||||
+ field_186004_w = (MapGenStronghold)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(field_186004_w, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.STRONGHOLD);
|
||||
+ field_186005_x = (MapGenVillage)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(field_186005_x, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE);
|
||||
+ field_186006_y = (MapGenMineshaft)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(field_186006_y, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT);
|
||||
+ field_186007_z = (MapGenScatteredFeature)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(field_186007_z, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE);
|
||||
+ field_185979_A = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(field_185979_A, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE);
|
||||
+ field_185980_B = (StructureOceanMonument)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(field_185980_B, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.OCEAN_MONUMENT);
|
||||
+ }
|
||||
this.field_185995_n = p_i46668_1_;
|
||||
this.field_185996_o = p_i46668_4_;
|
||||
this.field_185997_p = p_i46668_1_.getWorldInfo().getTerrainType();
|
||||
@@ -88,6 +97,17 @@
|
||||
this.field_186001_t = this.field_186000_s.useLavaOceans ? Blocks.lava.getDefaultState() : Blocks.water.getDefaultState();
|
||||
p_i46668_1_.setSeaLevel(this.field_186000_s.seaLevel);
|
||||
}
|
||||
+
|
||||
+ net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextOverworld ctx =
|
||||
+ new net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextOverworld(field_185991_j, field_185992_k, field_185993_l, field_185994_m, field_185983_b, field_185984_c, field_185985_d);
|
||||
+ ctx = net.minecraftforge.event.terraingen.TerrainGen.getModdedNoiseGenerators(p_i46668_1_, this.field_185990_i, ctx);
|
||||
+ this.field_185991_j = ctx.getLPerlin1();
|
||||
+ this.field_185992_k = ctx.getLPerlin2();
|
||||
+ this.field_185993_l = ctx.getPerlin();
|
||||
+ this.field_185994_m = ctx.getHeight();
|
||||
+ this.field_185983_b = ctx.getScale();
|
||||
+ this.field_185984_c = ctx.getDepth();
|
||||
+ this.field_185985_d = ctx.getForest();
|
||||
}
|
||||
|
||||
public void func_185976_a(int p_185976_1_, int p_185976_2_, ChunkPrimer p_185976_3_)
|
||||
@@ -161,6 +181,7 @@
|
||||
|
||||
public void func_185977_a(int p_185977_1_, int p_185977_2_, ChunkPrimer p_185977_3_, BiomeGenBase[] p_185977_4_)
|
||||
{
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.onReplaceBiomeBlocks(this, p_185977_1_, p_185977_2_, p_185977_3_, this.field_185995_n)) return;
|
||||
double d0 = 0.03125D;
|
||||
this.field_186002_u = this.field_185994_m.func_151599_a(this.field_186002_u, (double)(p_185977_1_ * 16), (double)(p_185977_2_ * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
|
||||
|
||||
@@ -365,6 +386,8 @@
|
||||
boolean flag = false;
|
||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_185931_1_, p_185931_2_);
|
||||
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(true, this, this.field_185995_n, p_185931_1_, p_185931_2_, flag);
|
||||
+
|
||||
if (this.field_185996_o)
|
||||
{
|
||||
if (this.field_186000_s.useMineShafts)
|
||||
@@ -394,6 +417,7 @@
|
||||
}
|
||||
|
||||
if (biomegenbase != Biomes.desert && biomegenbase != Biomes.desertHills && this.field_186000_s.useWaterLakes && !flag && this.field_185990_i.nextInt(this.field_186000_s.waterLakeChance) == 0)
|
||||
+ if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185995_n, this.field_185990_i, p_185931_1_, p_185931_2_, flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAKE))
|
||||
{
|
||||
int i1 = this.field_185990_i.nextInt(16) + 8;
|
||||
int j1 = this.field_185990_i.nextInt(256);
|
||||
@@ -402,6 +426,7 @@
|
||||
}
|
||||
|
||||
if (!flag && this.field_185990_i.nextInt(this.field_186000_s.lavaLakeChance / 10) == 0 && this.field_186000_s.useLavaLakes)
|
||||
+ if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185995_n, this.field_185990_i, p_185931_1_, p_185931_2_, flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAVA))
|
||||
{
|
||||
int i2 = this.field_185990_i.nextInt(16) + 8;
|
||||
int l2 = this.field_185990_i.nextInt(this.field_185990_i.nextInt(248) + 8);
|
||||
@@ -414,6 +439,7 @@
|
||||
}
|
||||
|
||||
if (this.field_186000_s.useDungeons)
|
||||
+ if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185995_n, this.field_185990_i, p_185931_1_, p_185931_2_, flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.DUNGEON))
|
||||
{
|
||||
for (int j2 = 0; j2 < this.field_186000_s.dungeonChance; ++j2)
|
||||
{
|
||||
@@ -425,9 +451,12 @@
|
||||
}
|
||||
|
||||
biomegenbase.decorate(this.field_185995_n, this.field_185990_i, new BlockPos(i, 0, j));
|
||||
+ if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185995_n, this.field_185990_i, p_185931_1_, p_185931_2_, flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ANIMALS))
|
||||
WorldEntitySpawner.performWorldGenSpawning(this.field_185995_n, biomegenbase, i + 8, j + 8, 16, 16, this.field_185990_i);
|
||||
blockpos = blockpos.add(8, 0, 8);
|
||||
|
||||
+ if (net.minecraftforge.event.terraingen.TerrainGen.populate(this, this.field_185995_n, this.field_185990_i, p_185931_1_, p_185931_2_, flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ICE))
|
||||
+ {
|
||||
for (int k2 = 0; k2 < 16; ++k2)
|
||||
{
|
||||
for (int j3 = 0; j3 < 16; ++j3)
|
||||
@@ -446,7 +475,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+ }//Forge: End ICE
|
||||
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(false, this, this.field_185995_n, p_185931_1_, p_185931_2_, flag);
|
||||
+
|
||||
BlockFalling.fallInstantly = false;
|
||||
}
|
||||
|
|
@ -8,7 +8,74 @@
|
|||
|
||||
public ChunkProviderServer(WorldServer p_i46838_1_, IChunkLoader p_i46838_2_, IChunkGenerator p_i46838_3_)
|
||||
{
|
||||
@@ -118,6 +119,7 @@
|
||||
@@ -92,14 +93,65 @@
|
||||
|
||||
public Chunk func_186025_d(int p_186025_1_, int p_186025_2_)
|
||||
{
|
||||
+ return loadChunk(p_186025_1_, p_186025_2_, null);
|
||||
+ }
|
||||
+
|
||||
+ public Chunk loadChunk(int X, int Z, Runnable runnable)
|
||||
+ {
|
||||
+ long pos = ChunkCoordIntPair.chunkXZ2Int(X, Z);
|
||||
+ this.droppedChunksSet.remove(Long.valueOf(pos));
|
||||
+ Chunk chunk = this.id2ChunkMap.getValueByKey(pos);
|
||||
+ net.minecraft.world.chunk.storage.AnvilChunkLoader loader = null;
|
||||
+
|
||||
+ if (this.chunkLoader instanceof net.minecraft.world.chunk.storage.AnvilChunkLoader)
|
||||
+ {
|
||||
+ loader = (net.minecraft.world.chunk.storage.AnvilChunkLoader) this.chunkLoader;
|
||||
+ }
|
||||
+
|
||||
+ // We can only use the queue for already generated chunks
|
||||
+ if (chunk == null && loader != null && loader.chunkExists(this.worldObj, X, Z))
|
||||
+ {
|
||||
+ if (runnable != null)
|
||||
+ {
|
||||
+ net.minecraftforge.common.chunkio.ChunkIOExecutor.queueChunkLoad(this.worldObj, loader, this, X, Z, runnable);
|
||||
+ return null;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ chunk = net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(this.worldObj, loader, this, X, Z);
|
||||
+ }
|
||||
+ }
|
||||
+ else if (chunk == null)
|
||||
+ {
|
||||
+ chunk = this.originalLoadChunk(X, Z);
|
||||
+ }
|
||||
+
|
||||
+ // If we didn't load the chunk async and have a callback run it now
|
||||
+ if (runnable != null)
|
||||
+ {
|
||||
+ runnable.run();
|
||||
+ }
|
||||
+
|
||||
+ return chunk;
|
||||
+ }
|
||||
+
|
||||
+ public Chunk originalLoadChunk(int p_186025_1_, int p_186025_2_)
|
||||
+ {
|
||||
Chunk chunk = this.func_186028_c(p_186025_1_, p_186025_2_);
|
||||
|
||||
if (chunk == null)
|
||||
{
|
||||
long i = ChunkCoordIntPair.chunkXZ2Int(p_186025_1_, p_186025_2_);
|
||||
- chunk = this.loadChunkFromFile(p_186025_1_, p_186025_2_);
|
||||
+ if (!loadingChunks.add(i))
|
||||
+ {
|
||||
+ net.minecraftforge.fml.common.FMLLog.bigWarning("There is an attempt to load a chunk (%d,%d) in di >mension %d that is already being loaded. This will cause weird chunk breakages.", p_186025_1_, p_186025_2_, worldObj.provider.getDimension());
|
||||
+ }
|
||||
+ chunk = net.minecraftforge.common.ForgeChunkManager.fetchDormantChunk(i, this.worldObj);
|
||||
|
||||
if (chunk == null)
|
||||
+ chunk = this.loadChunkFromFile(p_186025_1_, p_186025_2_);
|
||||
+
|
||||
+ if (chunk == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -118,6 +170,7 @@
|
||||
|
||||
this.id2ChunkMap.add(i, chunk);
|
||||
this.loadedChunks.add(chunk);
|
||||
|
@ -16,7 +83,7 @@
|
|||
chunk.onChunkLoad();
|
||||
chunk.func_186030_a(this, this.field_186029_c);
|
||||
}
|
||||
@@ -214,6 +216,11 @@
|
||||
@@ -214,6 +267,11 @@
|
||||
{
|
||||
if (!this.worldObj.disableLevelSaving)
|
||||
{
|
||||
|
@ -28,14 +95,14 @@
|
|||
for (int i = 0; i < 100; ++i)
|
||||
{
|
||||
if (!this.droppedChunksSet.isEmpty())
|
||||
@@ -228,6 +235,12 @@
|
||||
@@ -228,6 +286,12 @@
|
||||
this.saveChunkExtraData(chunk);
|
||||
this.id2ChunkMap.remove(olong.longValue());
|
||||
this.loadedChunks.remove(chunk);
|
||||
+ net.minecraftforge.common.ForgeChunkManager.putDormantChunk(ChunkCoordIntPair.chunkXZ2Int(chunk.xPosition, chunk.zPosition), chunk);
|
||||
+ if(loadedChunks.size() == 0 && net.minecraftforge.common.ForgeChunkManager.getPersistentChunksFor(this.worldObj).size() == 0 && !net.minecraftforge.common.DimensionManager.shouldLoadSpawn(this.worldObj.provider.getDimensionId())){
|
||||
+ net.minecraftforge.common.DimensionManager.unloadWorld(this.worldObj.provider.getDimensionId());
|
||||
+ return serverChunkGenerator.unloadQueuedChunks();
|
||||
+ if(loadedChunks.size() == 0 && net.minecraftforge.common.ForgeChunkManager.getPersistentChunksFor(this.worldObj).size() == 0 && !net.minecraftforge.common.DimensionManager.shouldLoadSpawn(this.worldObj.provider.getDimension())){
|
||||
+ net.minecraftforge.common.DimensionManager.unloadWorld(this.worldObj.provider.getDimension());
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
|
|
@ -1,15 +1,53 @@
|
|||
--- ../src-base/minecraft/net/minecraft/world/gen/MapGenCaves.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/gen/MapGenCaves.java
|
||||
@@ -143,7 +143,7 @@
|
||||
@@ -141,9 +141,7 @@
|
||||
{
|
||||
if (l1 >= 0 && l1 < 256)
|
||||
{
|
||||
IBlockState iblockstate = p_180702_5_.getBlockState(j1, l1, k1);
|
||||
|
||||
- IBlockState iblockstate = p_180702_5_.getBlockState(j1, l1, k1);
|
||||
-
|
||||
- if (iblockstate.getBlock() == Blocks.flowing_water || iblockstate.getBlock() == Blocks.water)
|
||||
+ if (isOceanBlock(p_180702_5_, j1, l1, k1, p_180702_3_, p_180702_4_))
|
||||
{
|
||||
flag3 = true;
|
||||
}
|
||||
@@ -266,4 +266,71 @@
|
||||
@@ -181,33 +179,12 @@
|
||||
IBlockState iblockstate1 = p_180702_5_.getBlockState(j3, j2, i2);
|
||||
IBlockState iblockstate2 = (IBlockState)Objects.firstNonNull(p_180702_5_.getBlockState(j3, j2 + 1, i2), field_186127_b);
|
||||
|
||||
- if (iblockstate1.getBlock() == Blocks.grass || iblockstate1.getBlock() == Blocks.mycelium)
|
||||
+ if (isTopBlock(p_180702_5_, j3, j2, i2, p_180702_3_, p_180702_4_))
|
||||
{
|
||||
flag1 = true;
|
||||
}
|
||||
|
||||
- if (this.func_175793_a(iblockstate1, iblockstate2))
|
||||
- {
|
||||
- if (j2 - 1 < 10)
|
||||
- {
|
||||
- p_180702_5_.setBlockState(j3, j2, i2, field_186126_a);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- p_180702_5_.setBlockState(j3, j2, i2, field_186127_b);
|
||||
-
|
||||
- if (iblockstate2.getBlock() == Blocks.sand)
|
||||
- {
|
||||
- p_180702_5_.setBlockState(j3, j2 + 1, i2, iblockstate2.getValue(BlockSand.VARIANT) == BlockSand.EnumType.RED_SAND ? field_186129_d : field_186128_c);
|
||||
- }
|
||||
-
|
||||
- if (flag1 && p_180702_5_.getBlockState(j3, j2 - 1, i2).getBlock() == Blocks.dirt)
|
||||
- {
|
||||
- blockpos$mutableblockpos.set(j3 + p_180702_3_ * 16, 0, i2 + p_180702_4_ * 16);
|
||||
- p_180702_5_.setBlockState(j3, j2 - 1, i2, this.worldObj.getBiomeGenForCoords(blockpos$mutableblockpos).topBlock.getBlock().getDefaultState());
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ digBlock(p_180702_5_, j3, j2, i2, p_180702_3_, p_180702_4_, flag1, iblockstate1, iblockstate2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -266,4 +243,71 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,8 +61,8 @@
|
|||
+ //Exception biomes to make sure we generate like vanilla
|
||||
+ private boolean isExceptionBiome(net.minecraft.world.biome.BiomeGenBase biome)
|
||||
+ {
|
||||
+ if (biome == net.minecraft.world.biome.BiomeGenBase.beach) return true;
|
||||
+ if (biome == net.minecraft.world.biome.BiomeGenBase.desert) return true;
|
||||
+ if (biome == net.minecraft.init.Biomes.beach) return true;
|
||||
+ if (biome == net.minecraft.init.Biomes.desert) return true;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
|
@ -60,17 +98,17 @@
|
|||
+
|
||||
+ if (this.func_175793_a(state, up) || state.getBlock() == top.getBlock() || state.getBlock() == filler.getBlock())
|
||||
+ {
|
||||
+ if (y < 10)
|
||||
+ if (y - 1 < 10)
|
||||
+ {
|
||||
+ data.setBlockState(x, y, z, Blocks.lava.getDefaultState());
|
||||
+ data.setBlockState(x, y, z, field_186126_a);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ data.setBlockState(x, y, z, Blocks.air.getDefaultState());
|
||||
+ data.setBlockState(x, y, z, field_186127_b);
|
||||
+
|
||||
+ if (up.getBlock() == Blocks.sand)
|
||||
+ {
|
||||
+ data.setBlockState(x, y + 1, z, up.getValue(BlockSand.VARIANT) == BlockSand.EnumType.RED_SAND ? Blocks.red_sandstone.getDefaultState() : Blocks.sandstone.getDefaultState());
|
||||
+ data.setBlockState(x, y + 1, z, up.getValue(BlockSand.VARIANT) == BlockSand.EnumType.RED_SAND ? field_186129_d : field_186128_c);
|
||||
+ }
|
||||
+
|
||||
+ if (foundTop && data.getBlockState(x, y - 1, z).getBlock() == filler.getBlock())
|
||||
|
|
|
@ -1,15 +1,59 @@
|
|||
--- ../src-base/minecraft/net/minecraft/world/gen/MapGenRavine.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/gen/MapGenRavine.java
|
||||
@@ -130,7 +130,7 @@
|
||||
@@ -128,9 +128,7 @@
|
||||
{
|
||||
if (l1 >= 0 && l1 < 256)
|
||||
{
|
||||
IBlockState iblockstate = p_180707_5_.getBlockState(j1, l1, k1);
|
||||
|
||||
- IBlockState iblockstate = p_180707_5_.getBlockState(j1, l1, k1);
|
||||
-
|
||||
- if (iblockstate.getBlock() == Blocks.flowing_water || iblockstate.getBlock() == Blocks.water)
|
||||
+ if (isOceanBlock(p_180707_5_, j1, l1, k1, p_180707_3_, p_180707_4_))
|
||||
{
|
||||
flag2 = true;
|
||||
}
|
||||
@@ -223,4 +223,68 @@
|
||||
@@ -146,8 +144,6 @@
|
||||
|
||||
if (!flag2)
|
||||
{
|
||||
- BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();
|
||||
-
|
||||
for (int j3 = k2; j3 < k; ++j3)
|
||||
{
|
||||
double d10 = ((double)(j3 + p_180707_3_ * 16) + 0.5D - p_180707_6_) / d9;
|
||||
@@ -165,30 +161,12 @@
|
||||
|
||||
if ((d10 * d10 + d7 * d7) * (double)this.field_75046_d[j2 - 1] + d8 * d8 / 6.0D < 1.0D)
|
||||
{
|
||||
- IBlockState iblockstate1 = p_180707_5_.getBlockState(j3, j2, i2);
|
||||
-
|
||||
- if (iblockstate1.getBlock() == Blocks.grass)
|
||||
+ if (isTopBlock(p_180707_5_, j3, j2, i2, p_180707_3_, p_180707_4_))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (iblockstate1.getBlock() == Blocks.stone || iblockstate1.getBlock() == Blocks.dirt || iblockstate1.getBlock() == Blocks.grass)
|
||||
- {
|
||||
- if (j2 - 1 < 10)
|
||||
- {
|
||||
- p_180707_5_.setBlockState(j3, j2, i2, field_186135_a);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- p_180707_5_.setBlockState(j3, j2, i2, field_186136_b);
|
||||
-
|
||||
- if (flag && p_180707_5_.getBlockState(j3, j2 - 1, i2).getBlock() == Blocks.dirt)
|
||||
- {
|
||||
- blockpos$mutableblockpos.set(j3 + p_180707_3_ * 16, 0, i2 + p_180707_4_ * 16);
|
||||
- p_180707_5_.setBlockState(j3, j2 - 1, i2, this.worldObj.getBiomeGenForCoords(blockpos$mutableblockpos).topBlock);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ digBlock(p_180707_5_, j3, j2, i2, p_180707_3_, p_180707_4_, flag);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -223,4 +201,68 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,10 +66,10 @@
|
|||
+ //Exception biomes to make sure we generate like vanilla
|
||||
+ private boolean isExceptionBiome(net.minecraft.world.biome.BiomeGenBase biome)
|
||||
+ {
|
||||
+ if (biome == net.minecraft.world.biome.BiomeGenBase.beach) return true;
|
||||
+ if (biome == net.minecraft.world.biome.BiomeGenBase.desert) return true;
|
||||
+ if (biome == net.minecraft.world.biome.BiomeGenBase.mushroomIsland) return true;
|
||||
+ if (biome == net.minecraft.world.biome.BiomeGenBase.mushroomIslandShore) return true;
|
||||
+ if (biome == net.minecraft.init.Biomes.beach) return true;
|
||||
+ if (biome == net.minecraft.init.Biomes.desert) return true;
|
||||
+ if (biome == net.minecraft.init.Biomes.mushroomIsland) return true;
|
||||
+ if (biome == net.minecraft.init.Biomes.mushroomIslandShore) return true;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
|
@ -62,13 +106,13 @@
|
|||
+
|
||||
+ if (state.getBlock() == Blocks.stone || state.getBlock() == top.getBlock() || state.getBlock() == filler.getBlock())
|
||||
+ {
|
||||
+ if (y < 10)
|
||||
+ if (y - 1 < 10)
|
||||
+ {
|
||||
+ data.setBlockState(x, y, z, Blocks.lava.getDefaultState());
|
||||
+ data.setBlockState(x, y, z, field_186135_a);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ data.setBlockState(x, y, z, Blocks.air.getDefaultState());
|
||||
+ data.setBlockState(x, y, z, field_186136_b);
|
||||
+
|
||||
+ if (foundTop && data.getBlockState(x, y - 1, z).getBlock() == filler.getBlock())
|
||||
+ {
|
||||
|
|
|
@ -16,7 +16,17 @@
|
|||
GenLayer genlayerhills = new GenLayerHills(1000L, genlayerbiomeedge, lvt_10_1_);
|
||||
GenLayer genlayer5 = GenLayerZoom.magnify(1000L, genlayerriverinit, 2);
|
||||
genlayer5 = GenLayerZoom.magnify(1000L, genlayer5, j);
|
||||
@@ -171,4 +171,27 @@
|
||||
@@ -158,8 +158,7 @@
|
||||
|
||||
protected static boolean isBiomeOceanic(int p_151618_0_)
|
||||
{
|
||||
- BiomeGenBase biomegenbase = BiomeGenBase.getBiome(p_151618_0_);
|
||||
- return biomegenbase == Biomes.ocean || biomegenbase == Biomes.deepOcean || biomegenbase == Biomes.frozenOcean;
|
||||
+ return net.minecraftforge.common.BiomeManager.oceanBiomes.contains(BiomeGenBase.getBiome(p_151618_0_));
|
||||
}
|
||||
|
||||
protected int selectRandom(int... p_151619_1_)
|
||||
@@ -171,4 +170,27 @@
|
||||
{
|
||||
return p_151617_2_ == p_151617_3_ && p_151617_3_ == p_151617_4_ ? p_151617_2_ : (p_151617_1_ == p_151617_2_ && p_151617_1_ == p_151617_3_ ? p_151617_1_ : (p_151617_1_ == p_151617_2_ && p_151617_1_ == p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_3_ && p_151617_1_ == p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_2_ && p_151617_3_ != p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_3_ && p_151617_2_ != p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_4_ && p_151617_2_ != p_151617_3_ ? p_151617_1_ : (p_151617_2_ == p_151617_3_ && p_151617_1_ != p_151617_4_ ? p_151617_2_ : (p_151617_2_ == p_151617_4_ && p_151617_1_ != p_151617_3_ ? p_151617_2_ : (p_151617_3_ == p_151617_4_ && p_151617_1_ != p_151617_2_ ? p_151617_3_ : this.selectRandom(new int[] {p_151617_1_, p_151617_2_, p_151617_3_, p_151617_4_}))))))))));
|
||||
}
|
||||
|
|
|
@ -1,6 +1,84 @@
|
|||
--- ../src-base/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/gen/layer/GenLayerBiome.java
|
||||
@@ -112,4 +112,12 @@
|
||||
@@ -7,10 +7,8 @@
|
||||
|
||||
public class GenLayerBiome extends GenLayer
|
||||
{
|
||||
- private BiomeGenBase[] field_151623_c = new BiomeGenBase[] {Biomes.desert, Biomes.desert, Biomes.desert, Biomes.savanna, Biomes.savanna, Biomes.plains};
|
||||
- private BiomeGenBase[] field_151621_d = new BiomeGenBase[] {Biomes.forest, Biomes.roofedForest, Biomes.extremeHills, Biomes.plains, Biomes.birchForest, Biomes.swampland};
|
||||
- private BiomeGenBase[] field_151622_e = new BiomeGenBase[] {Biomes.forest, Biomes.extremeHills, Biomes.taiga, Biomes.plains};
|
||||
- private BiomeGenBase[] field_151620_f = new BiomeGenBase[] {Biomes.icePlains, Biomes.icePlains, Biomes.icePlains, Biomes.coldTaiga};
|
||||
+ @SuppressWarnings("unchecked")
|
||||
+ private java.util.List<net.minecraftforge.common.BiomeManager.BiomeEntry>[] biomes = new java.util.ArrayList[net.minecraftforge.common.BiomeManager.BiomeType.values().length];
|
||||
private final ChunkProviderSettings field_175973_g;
|
||||
|
||||
public GenLayerBiome(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, String p_i45560_5_)
|
||||
@@ -18,9 +16,30 @@
|
||||
super(p_i45560_1_);
|
||||
this.parent = p_i45560_3_;
|
||||
|
||||
+ for (net.minecraftforge.common.BiomeManager.BiomeType type : net.minecraftforge.common.BiomeManager.BiomeType.values())
|
||||
+ {
|
||||
+ com.google.common.collect.ImmutableList<net.minecraftforge.common.BiomeManager.BiomeEntry> biomesToAdd = net.minecraftforge.common.BiomeManager.getBiomes(type);
|
||||
+ int idx = type.ordinal();
|
||||
+
|
||||
+ if (biomes[idx] == null) biomes[idx] = new java.util.ArrayList<net.minecraftforge.common.BiomeManager.BiomeEntry>();
|
||||
+ if (biomesToAdd != null) biomes[idx].addAll(biomesToAdd);
|
||||
+ }
|
||||
+
|
||||
+ int desertIdx = net.minecraftforge.common.BiomeManager.BiomeType.DESERT.ordinal();
|
||||
+
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.desert, 30));
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.savanna, 20));
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.plains, 10));
|
||||
+
|
||||
if (p_i45560_4_ == WorldType.DEFAULT_1_1)
|
||||
{
|
||||
- this.field_151623_c = new BiomeGenBase[] {Biomes.desert, Biomes.forest, Biomes.extremeHills, Biomes.swampland, Biomes.plains, Biomes.taiga};
|
||||
+ biomes[desertIdx].clear();
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.desert, 10));
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.forest, 10));
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.extremeHills, 10));
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.swampland, 10));
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.plains, 10));
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.taiga, 10));
|
||||
this.field_175973_g = null;
|
||||
}
|
||||
else if (p_i45560_4_ == WorldType.CUSTOMIZED)
|
||||
@@ -74,7 +93,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- aint1[j + i * areaWidth] = BiomeGenBase.func_185362_a(this.field_151623_c[this.nextInt(this.field_151623_c.length)]);
|
||||
+ aint1[k + i * areaWidth] = BiomeGenBase.func_185362_a(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.DESERT).biome);
|
||||
}
|
||||
}
|
||||
else if (k == 2)
|
||||
@@ -85,7 +104,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- aint1[j + i * areaWidth] = BiomeGenBase.func_185362_a(this.field_151621_d[this.nextInt(this.field_151621_d.length)]);
|
||||
+ aint1[j + i * areaWidth] = BiomeGenBase.func_185362_a(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.WARM).biome);
|
||||
}
|
||||
}
|
||||
else if (k == 3)
|
||||
@@ -96,12 +115,12 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- aint1[j + i * areaWidth] = BiomeGenBase.func_185362_a(this.field_151622_e[this.nextInt(this.field_151622_e.length)]);
|
||||
+ aint1[j + i * areaWidth] = BiomeGenBase.func_185362_a(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.COOL).biome);
|
||||
}
|
||||
}
|
||||
else if (k == 4)
|
||||
{
|
||||
- aint1[j + i * areaWidth] = BiomeGenBase.func_185362_a(this.field_151620_f[this.nextInt(this.field_151620_f.length)]);
|
||||
+ aint1[j + i * areaWidth] = BiomeGenBase.func_185362_a(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.ICY).biome);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -112,4 +131,12 @@
|
||||
|
||||
return aint1;
|
||||
}
|
||||
|
|
|
@ -1,29 +1,35 @@
|
|||
--- ../src-base/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/gen/structure/ComponentScatteredFeaturePieces.java
|
||||
@@ -57,6 +57,12 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ static
|
||||
+ {
|
||||
+ net.minecraftforge.common.ChestGenHooks.init(net.minecraftforge.common.ChestGenHooks.PYRAMID_DESERT_CHEST, itemsToGenerateInTemple, 2, 7);
|
||||
+ net.minecraftforge.common.ChestGenHooks.addItem(net.minecraftforge.common.ChestGenHooks.PYRAMID_DESERT_CHEST, new WeightedRandomChestContent(new net.minecraft.item.ItemStack(Items.enchanted_book, 1, 0), 1, 1, 1));
|
||||
+ }
|
||||
+
|
||||
public DesertPyramid(Random p_i2062_1_, int p_i2062_2_, int p_i2062_3_)
|
||||
{
|
||||
super(p_i2062_1_, p_i2062_2_, 64, p_i2062_3_, 21, 15, 21);
|
||||
@@ -451,6 +457,13 @@
|
||||
@@ -451,6 +451,11 @@
|
||||
private static final List<WeightedRandomChestContent> field_175815_j = Lists.newArrayList(new WeightedRandomChestContent[] {new WeightedRandomChestContent(Items.arrow, 0, 2, 7, 30)});
|
||||
private static ComponentScatteredFeaturePieces.JunglePyramid.Stones junglePyramidsRandomScatteredStones = new ComponentScatteredFeaturePieces.JunglePyramid.Stones();
|
||||
|
||||
+ static
|
||||
+ {
|
||||
+ net.minecraftforge.common.ChestGenHooks.init(net.minecraftforge.common.ChestGenHooks.PYRAMID_JUNGLE_DISPENSER, field_175815_j, 2, 2);
|
||||
+ net.minecraftforge.common.ChestGenHooks.init(net.minecraftforge.common.ChestGenHooks.PYRAMID_JUNGLE_CHEST, field_175816_i, 2, 7);
|
||||
+ net.minecraftforge.common.ChestGenHooks.addItem(net.minecraftforge.common.ChestGenHooks.PYRAMID_JUNGLE_CHEST, new WeightedRandomChestContent(new net.minecraft.item.ItemStack(Items.enchanted_book, 1, 0), 1, 1, 1));
|
||||
+ }
|
||||
+
|
||||
public JunglePyramid()
|
||||
{
|
||||
}
|
||||
@@ -607,9 +612,10 @@
|
||||
this.setBlockState(worldIn, Blocks.redstone_wire.getDefaultState(), 4, -3, 1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.mossy_cobblestone.getDefaultState(), 3, -3, 1, structureBoundingBoxIn);
|
||||
|
||||
+ net.minecraftforge.common.ChestGenHooks dispenser = net.minecraftforge.common.ChestGenHooks.getInfo(net.minecraftforge.common.ChestGenHooks.PYRAMID_JUNGLE_DISPENSER);
|
||||
if (!this.field_74945_j)
|
||||
{
|
||||
- this.field_74945_j = this.func_186166_a(worldIn, structureBoundingBoxIn, randomIn, 3, -2, 1, EnumFacing.NORTH, field_175815_j, 2);
|
||||
+ this.field_74945_j = this.func_186166_a(worldIn, structureBoundingBoxIn, randomIn, 3, -2, 1, EnumFacing.NORTH, dispenser.getItems(randomIn), dispenser.getCount(randomIn));
|
||||
}
|
||||
|
||||
this.setBlockState(worldIn, Blocks.vine.getDefaultState().withProperty(BlockVine.SOUTH, Boolean.valueOf(true)), 3, -2, 2, structureBoundingBoxIn);
|
||||
@@ -626,7 +632,7 @@
|
||||
|
||||
if (!this.field_74946_k)
|
||||
{
|
||||
- this.field_74946_k = this.func_186166_a(worldIn, structureBoundingBoxIn, randomIn, 9, -2, 3, EnumFacing.WEST, field_175815_j, 2);
|
||||
+ this.field_74946_k = this.func_186166_a(worldIn, structureBoundingBoxIn, randomIn, 9, -2, 3, EnumFacing.WEST, dispenser.getItems(randomIn), dispenser.getCount(randomIn));
|
||||
}
|
||||
|
||||
this.setBlockState(worldIn, Blocks.vine.getDefaultState().withProperty(BlockVine.EAST, Boolean.valueOf(true)), 8, -1, 3, structureBoundingBoxIn);
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
--- ../src-base/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/gen/structure/MapGenStronghold.java
|
||||
@@ -28,11 +28,19 @@
|
||||
|
||||
for (BiomeGenBase biomegenbase : BiomeGenBase.field_185377_q)
|
||||
{
|
||||
- if (biomegenbase != null && biomegenbase.func_185355_j() > 0.0F)
|
||||
+ if (biomegenbase != null && biomegenbase.func_185355_j() > 0.0F && !net.minecraftforge.common.BiomeManager.strongHoldBiomesBlackList.contains(biomegenbase))
|
||||
{
|
||||
this.field_151546_e.add(biomegenbase);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ for (BiomeGenBase biome : net.minecraftforge.common.BiomeManager.strongHoldBiomes)
|
||||
+ {
|
||||
+ if (!this.field_151546_e.contains(biome))
|
||||
+ {
|
||||
+ this.field_151546_e.add(biome);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
public MapGenStronghold(Map<String, String> p_i2068_1_)
|
|
@ -1,15 +0,0 @@
|
|||
--- ../src-base/minecraft/net/minecraft/world/gen/structure/StructureMineshaftPieces.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/gen/structure/StructureMineshaftPieces.java
|
||||
@@ -31,6 +31,12 @@
|
||||
MapGenStructureIO.registerStructureComponent(StructureMineshaftPieces.Stairs.class, "MSStairs");
|
||||
}
|
||||
|
||||
+ static
|
||||
+ {
|
||||
+ net.minecraftforge.common.ChestGenHooks.init(net.minecraftforge.common.ChestGenHooks.MINESHAFT_CORRIDOR, CHEST_CONTENT_WEIGHT_LIST, 8, 8);
|
||||
+ net.minecraftforge.common.ChestGenHooks.addItem(net.minecraftforge.common.ChestGenHooks.MINESHAFT_CORRIDOR, new WeightedRandomChestContent(new net.minecraft.item.ItemStack(net.minecraft.init.Items.enchanted_book, 1, 0), 1, 1, 1));
|
||||
+ }
|
||||
+
|
||||
private static StructureComponent func_175892_a(List<StructureComponent> listIn, Random rand, int x, int y, int z, EnumFacing facing, int type)
|
||||
{
|
||||
int i = rand.nextInt(100);
|
|
@ -1,41 +0,0 @@
|
|||
--- ../src-base/minecraft/net/minecraft/world/gen/structure/StructureStrongholdPieces.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/gen/structure/StructureStrongholdPieces.java
|
||||
@@ -244,6 +244,12 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ static
|
||||
+ {
|
||||
+ net.minecraftforge.common.ChestGenHooks.init(net.minecraftforge.common.ChestGenHooks.STRONGHOLD_CORRIDOR, strongholdChestContents, 2, 4);
|
||||
+ net.minecraftforge.common.ChestGenHooks.addItem(net.minecraftforge.common.ChestGenHooks.STRONGHOLD_CORRIDOR, new WeightedRandomChestContent(new net.minecraft.item.ItemStack(Items.enchanted_book, 1, 0), 1, 1, 1));
|
||||
+ }
|
||||
+
|
||||
public ChestCorridor(int p_i45582_1_, Random p_i45582_2_, StructureBoundingBox p_i45582_3_, EnumFacing p_i45582_4_)
|
||||
{
|
||||
super(p_i45582_1_);
|
||||
@@ -599,6 +605,12 @@
|
||||
{
|
||||
private boolean isLargeRoom;
|
||||
|
||||
+ static
|
||||
+ {
|
||||
+ net.minecraftforge.common.ChestGenHooks.init(net.minecraftforge.common.ChestGenHooks.STRONGHOLD_LIBRARY, strongholdLibraryChestContents, 1, 5);
|
||||
+ net.minecraftforge.common.ChestGenHooks.addItem(net.minecraftforge.common.ChestGenHooks.STRONGHOLD_LIBRARY, new WeightedRandomChestContent(new net.minecraft.item.ItemStack(Items.enchanted_book, 1, 0), 1, 5, 2));
|
||||
+ }
|
||||
+
|
||||
public Library()
|
||||
{
|
||||
}
|
||||
@@ -1025,6 +1037,12 @@
|
||||
{
|
||||
protected int roomType;
|
||||
|
||||
+ static
|
||||
+ {
|
||||
+ net.minecraftforge.common.ChestGenHooks.init(net.minecraftforge.common.ChestGenHooks.STRONGHOLD_CROSSING, strongholdRoomCrossingChestContents, 1, 5);
|
||||
+ net.minecraftforge.common.ChestGenHooks.addItem(net.minecraftforge.common.ChestGenHooks.STRONGHOLD_CROSSING, new WeightedRandomChestContent(new net.minecraft.item.ItemStack(Items.enchanted_book, 1, 0), 1, 1, 1));
|
||||
+ }
|
||||
+
|
||||
public RoomCrossing()
|
||||
{
|
||||
}
|
|
@ -19,19 +19,7 @@
|
|||
|
||||
return structurevillagepieces$village;
|
||||
}
|
||||
@@ -875,6 +880,11 @@
|
||||
{
|
||||
}
|
||||
|
||||
+ static
|
||||
+ {
|
||||
+ net.minecraftforge.common.ChestGenHooks.init(net.minecraftforge.common.ChestGenHooks.VILLAGE_BLACKSMITH, villageBlacksmithChestContents, 3, 8);
|
||||
+ }
|
||||
+
|
||||
public House2(StructureVillagePieces.Start start, int p_i45563_2_, Random rand, StructureBoundingBox p_i45563_4_, EnumFacing facing)
|
||||
{
|
||||
super(start, p_i45563_2_);
|
||||
@@ -1447,6 +1457,7 @@
|
||||
@@ -1447,6 +1452,7 @@
|
||||
public List<StructureVillagePieces.PieceWeight> structureVillageWeightedPieceList;
|
||||
public List<StructureComponent> field_74932_i = Lists.<StructureComponent>newArrayList();
|
||||
public List<StructureComponent> field_74930_j = Lists.<StructureComponent>newArrayList();
|
||||
|
@ -39,7 +27,15 @@
|
|||
|
||||
public Start()
|
||||
{
|
||||
@@ -1520,6 +1531,7 @@
|
||||
@@ -1460,6 +1466,7 @@
|
||||
this.terrainType = p_i2104_7_;
|
||||
BiomeGenBase biomegenbase = chunkManagerIn.getBiomeGenerator(new BlockPos(p_i2104_4_, 0, p_i2104_5_), Biomes.field_180279_ad);
|
||||
this.inDesert = biomegenbase == Biomes.desert || biomegenbase == Biomes.desertHills;
|
||||
+ this.biome = biomegenbase;
|
||||
this.func_175846_a(this.inDesert);
|
||||
}
|
||||
|
||||
@@ -1520,6 +1527,7 @@
|
||||
protected int field_143015_k = -1;
|
||||
private int villagersSpawned;
|
||||
private boolean isDesertVillage;
|
||||
|
@ -47,7 +43,7 @@
|
|||
|
||||
public Village()
|
||||
{
|
||||
@@ -1532,6 +1544,7 @@
|
||||
@@ -1532,6 +1540,7 @@
|
||||
if (start != null)
|
||||
{
|
||||
this.isDesertVillage = start.inDesert;
|
||||
|
@ -55,7 +51,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1660,6 +1673,9 @@
|
||||
@@ -1660,6 +1669,9 @@
|
||||
|
||||
protected IBlockState func_175847_a(IBlockState p_175847_1_)
|
||||
{
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
double[] noiseData3;
|
||||
double[] noiseData4;
|
||||
double[] noiseData5;
|
||||
+ // temporary variables used during event handling
|
||||
+ private int chunkX = 0;
|
||||
+ private int chunkZ = 0;
|
||||
|
||||
public ChunkProviderEnd(World worldIn, long p_i2007_2_)
|
||||
{
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 2
|
||||
this.noiseGen3 = new NoiseGeneratorOctaves(this.endRNG, 8);
|
||||
this.noiseGen4 = new NoiseGeneratorOctaves(this.endRNG, 10);
|
||||
this.noiseGen5 = new NoiseGeneratorOctaves(this.endRNG, 16);
|
||||
+
|
||||
+ NoiseGenerator[] noiseGens = {noiseGen1, noiseGen2, noiseGen3, noiseGen4, noiseGen5};
|
||||
+ noiseGens = net.minecraftforge.event.terraingen.TerrainGen.getModdedNoiseGenerators(worldIn, this.endRNG, noiseGens);
|
||||
+ this.noiseGen1 = (NoiseGeneratorOctaves)noiseGens[0];
|
||||
+ this.noiseGen2 = (NoiseGeneratorOctaves)noiseGens[1];
|
||||
+ this.noiseGen3 = (NoiseGeneratorOctaves)noiseGens[2];
|
||||
+ this.noiseGen4 = (NoiseGeneratorOctaves)noiseGens[3];
|
||||
+ this.noiseGen5 = (NoiseGeneratorOctaves)noiseGens[4];
|
||||
}
|
||||
|
||||
public void func_180520_a(int p_180520_1_, int p_180520_2_, ChunkPrimer p_180520_3_)
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 4
|
||||
|
||||
public Chunk provideChunk(int x, int z)
|
||||
{
|
||||
+ chunkX = x; chunkZ = z;
|
||||
this.endRNG.setSeed((long)x * 341873128712L + (long)z * 132897987541L);
|
||||
ChunkPrimer chunkprimer = new ChunkPrimer();
|
||||
this.biomesForGeneration = this.endWorld.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration, x * 16, z * 16, 16, 16);
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 5
|
||||
|
||||
private double[] initializeNoiseField(double[] p_73187_1_, int p_73187_2_, int p_73187_3_, int p_73187_4_, int p_73187_5_, int p_73187_6_, int p_73187_7_)
|
||||
{
|
||||
+ net.minecraftforge.event.terraingen.ChunkProviderEvent.InitNoiseField event = new net.minecraftforge.event.terraingen.ChunkProviderEvent.InitNoiseField(this, p_73187_1_, p_73187_2_, p_73187_3_, p_73187_4_, p_73187_5_, p_73187_6_, p_73187_7_);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
|
||||
+ if (event.getResult() == net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) return event.noisefield;
|
||||
+
|
||||
if (p_73187_1_ == null)
|
||||
{
|
||||
p_73187_1_ = new double[p_73187_5_ * p_73187_6_ * p_73187_7_];
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 6
|
||||
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
|
||||
{
|
||||
BlockFalling.fallInstantly = true;
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.terraingen.PopulateChunkEvent.Pre(p_73153_1_, endWorld, endWorld.rand, p_73153_2_, p_73153_3_, false));
|
||||
BlockPos blockpos = new BlockPos(p_73153_2_ * 16, 0, p_73153_3_ * 16);
|
||||
this.endWorld.getBiomeGenForCoords(blockpos.add(16, 0, 16)).decorate(this.endWorld, this.endWorld.rand, blockpos);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.terraingen.PopulateChunkEvent.Post(p_73153_1_, endWorld, endWorld.rand, p_73153_2_, p_73153_3_, false));
|
||||
BlockFalling.fallInstantly = false;
|
||||
}
|
||||
|
||||
++++ END PATCH
|
|
@ -1,117 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
|
||||
public ChunkProviderGenerate(World worldIn, long p_i45636_2_, boolean p_i45636_4_, String p_i45636_5_)
|
||||
{
|
||||
+ {
|
||||
+ caveGenerator = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(caveGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE);
|
||||
+ strongholdGenerator = (MapGenStronghold)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(strongholdGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.STRONGHOLD);
|
||||
+ villageGenerator = (MapGenVillage)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(villageGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE);
|
||||
+ mineshaftGenerator = (MapGenMineshaft)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(mineshaftGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT);
|
||||
+ scatteredFeatureGenerator = (MapGenScatteredFeature)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(scatteredFeatureGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE);
|
||||
+ ravineGenerator = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(ravineGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE);
|
||||
+ oceanMonumentGenerator = (StructureOceanMonument)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(oceanMonumentGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.OCEAN_MONUMENT);
|
||||
+ }
|
||||
this.worldObj = worldIn;
|
||||
this.mapFeaturesEnabled = p_i45636_4_;
|
||||
this.field_177475_o = worldIn.getWorldInfo().getTerrainType();
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 2
|
||||
this.field_177476_s = this.settings.useLavaOceans ? Blocks.lava : Blocks.water;
|
||||
worldIn.setSeaLevel(this.settings.seaLevel);
|
||||
}
|
||||
+
|
||||
+ NoiseGenerator[] noiseGens = {field_147431_j, field_147432_k, field_147429_l, field_147430_m, noiseGen5, noiseGen6, mobSpawnerNoise};
|
||||
+ noiseGens = net.minecraftforge.event.terraingen.TerrainGen.getModdedNoiseGenerators(worldIn, 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 setBlocksInChunk(int p_180518_1_, int p_180518_2_, ChunkPrimer p_180518_3_)
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 3
|
||||
|
||||
public void replaceBlocksForBiome(int p_180517_1_, int p_180517_2_, ChunkPrimer p_180517_3_, BiomeGenBase[] p_180517_4_)
|
||||
{
|
||||
+ net.minecraftforge.event.terraingen.ChunkProviderEvent.ReplaceBiomeBlocks event = new net.minecraftforge.event.terraingen.ChunkProviderEvent.ReplaceBiomeBlocks(this, p_180517_1_, p_180517_2_, p_180517_3_, this.worldObj);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
|
||||
+ if (event.getResult() == net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) return;
|
||||
+
|
||||
double d0 = 0.03125D;
|
||||
this.stoneNoise = this.field_147430_m.func_151599_a(this.stoneNoise, (double)(p_180517_1_ * 16), (double)(p_180517_2_ * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
|
||||
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 4
|
||||
boolean flag = false;
|
||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_73153_2_, p_73153_3_);
|
||||
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.terraingen.PopulateChunkEvent.Pre(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag));
|
||||
+
|
||||
if (this.settings.useMineShafts && this.mapFeaturesEnabled)
|
||||
{
|
||||
this.mineshaftGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 5
|
||||
this.oceanMonumentGenerator.generateStructure(this.worldObj, this.rand, chunkcoordintpair);
|
||||
}
|
||||
|
||||
- if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && this.settings.useWaterLakes && !flag && this.rand.nextInt(this.settings.waterLakeChance) == 0)
|
||||
+ if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && this.settings.useWaterLakes && !flag && this.rand.nextInt(this.settings.waterLakeChance) == 0
|
||||
+ && net.minecraftforge.event.terraingen.TerrainGen.populate(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAKE))
|
||||
{
|
||||
int i1 = this.rand.nextInt(16) + 8;
|
||||
int j1 = this.rand.nextInt(256);
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 6
|
||||
(new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, blockpos.add(i1, j1, k1));
|
||||
}
|
||||
|
||||
- if (!flag && this.rand.nextInt(this.settings.lavaLakeChance / 10) == 0 && this.settings.useLavaLakes)
|
||||
+ if (!flag && this.rand.nextInt(this.settings.lavaLakeChance / 10) == 0 && this.settings.useLavaLakes &&
|
||||
+ net.minecraftforge.event.terraingen.TerrainGen.populate(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.LAVA))
|
||||
{
|
||||
int i2 = this.rand.nextInt(16) + 8;
|
||||
int l2 = this.rand.nextInt(this.rand.nextInt(248) + 8);
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 7
|
||||
|
||||
if (this.settings.useDungeons)
|
||||
{
|
||||
- for (int j2 = 0; j2 < this.settings.dungeonChance; ++j2)
|
||||
+ boolean doGen = net.minecraftforge.event.terraingen.TerrainGen.populate(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.DUNGEON);
|
||||
+ for (int j2 = 0; doGen && j2 < this.settings.dungeonChance; ++j2)
|
||||
{
|
||||
int i3 = this.rand.nextInt(16) + 8;
|
||||
int l3 = this.rand.nextInt(256);
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 8
|
||||
}
|
||||
|
||||
biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(i, 0, j));
|
||||
+ if (net.minecraftforge.event.terraingen.TerrainGen.populate(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ANIMALS))
|
||||
+ {
|
||||
SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, i + 8, j + 8, 16, 16, this.rand);
|
||||
+ }
|
||||
blockpos = blockpos.add(8, 0, 8);
|
||||
|
||||
- for (int k2 = 0; k2 < 16; ++k2)
|
||||
+ boolean doGen = net.minecraftforge.event.terraingen.TerrainGen.populate(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.ICE);
|
||||
+ for (int k2 = 0; doGen && k2 < 16; ++k2)
|
||||
{
|
||||
for (int j3 = 0; j3 < 16; ++j3)
|
||||
{
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 9
|
||||
}
|
||||
}
|
||||
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.terraingen.PopulateChunkEvent.Post(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag));
|
||||
+
|
||||
BlockFalling.fallInstantly = false;
|
||||
}
|
||||
|
||||
++++ END PATCH
|
|
@ -1,144 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
private final WorldGenHellLava field_177472_y = new WorldGenHellLava(Blocks.flowing_lava, false);
|
||||
private final GeneratorBushFeature field_177471_z = new GeneratorBushFeature(Blocks.brown_mushroom);
|
||||
private final GeneratorBushFeature field_177465_A = new GeneratorBushFeature(Blocks.red_mushroom);
|
||||
- private final MapGenNetherBridge genNetherBridge = new MapGenNetherBridge();
|
||||
- private final MapGenBase netherCaveGenerator = new MapGenCavesHell();
|
||||
+ private final MapGenNetherBridge genNetherBridge;
|
||||
+ private final MapGenBase netherCaveGenerator;
|
||||
double[] noiseData1;
|
||||
double[] noiseData2;
|
||||
double[] noiseData3;
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 2
|
||||
|
||||
public ChunkProviderHell(World worldIn, boolean p_i45637_2_, long p_i45637_3_)
|
||||
{
|
||||
+ this.genNetherBridge = (MapGenNetherBridge) net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(new MapGenNetherBridge(), net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.NETHER_BRIDGE);
|
||||
+ this.netherCaveGenerator = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(new MapGenCavesHell(), net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.NETHER_CAVE);
|
||||
this.worldObj = worldIn;
|
||||
this.field_177466_i = p_i45637_2_;
|
||||
this.hellRNG = new Random(p_i45637_3_);
|
||||
- this.netherNoiseGen1 = new NoiseGeneratorOctaves(this.hellRNG, 16);
|
||||
- this.netherNoiseGen2 = new NoiseGeneratorOctaves(this.hellRNG, 16);
|
||||
- this.netherNoiseGen3 = new NoiseGeneratorOctaves(this.hellRNG, 8);
|
||||
- this.slowsandGravelNoiseGen = new NoiseGeneratorOctaves(this.hellRNG, 4);
|
||||
- this.netherrackExculsivityNoiseGen = new NoiseGeneratorOctaves(this.hellRNG, 4);
|
||||
- this.netherNoiseGen6 = new NoiseGeneratorOctaves(this.hellRNG, 10);
|
||||
- this.netherNoiseGen7 = new NoiseGeneratorOctaves(this.hellRNG, 16);
|
||||
+ NoiseGeneratorOctaves netherNoiseGen1 = new NoiseGeneratorOctaves(this.hellRNG, 16);
|
||||
+ NoiseGeneratorOctaves netherNoiseGen2 = new NoiseGeneratorOctaves(this.hellRNG, 16);
|
||||
+ NoiseGeneratorOctaves netherNoiseGen3 = new NoiseGeneratorOctaves(this.hellRNG, 8);
|
||||
+ NoiseGeneratorOctaves slowsandGravelNoiseGen = new NoiseGeneratorOctaves(this.hellRNG, 4);
|
||||
+ NoiseGeneratorOctaves netherrackExculsivityNoiseGen = new NoiseGeneratorOctaves(this.hellRNG, 4);
|
||||
+ NoiseGeneratorOctaves netherNoiseGen6 = new NoiseGeneratorOctaves(this.hellRNG, 10);
|
||||
+ NoiseGeneratorOctaves netherNoiseGen7 = new NoiseGeneratorOctaves(this.hellRNG, 16);
|
||||
+ NoiseGenerator[] noiseGens = new NoiseGenerator[] {
|
||||
+ netherNoiseGen1, netherNoiseGen2, netherNoiseGen3, slowsandGravelNoiseGen, netherrackExculsivityNoiseGen, netherNoiseGen6, netherNoiseGen7
|
||||
+ };
|
||||
+ noiseGens = net.minecraftforge.event.terraingen.TerrainGen.getModdedNoiseGenerators(worldIn, this.hellRNG, noiseGens);
|
||||
+ this.netherNoiseGen1 = (NoiseGeneratorOctaves)noiseGens[0];
|
||||
+ this.netherNoiseGen2 = (NoiseGeneratorOctaves)noiseGens[1];
|
||||
+ this.netherNoiseGen3 = (NoiseGeneratorOctaves)noiseGens[2];
|
||||
+ this.slowsandGravelNoiseGen = (NoiseGeneratorOctaves)noiseGens[3];
|
||||
+ this.netherrackExculsivityNoiseGen = (NoiseGeneratorOctaves)noiseGens[4];
|
||||
+ this.netherNoiseGen6 = (NoiseGeneratorOctaves)noiseGens[5];
|
||||
+ this.netherNoiseGen7 = (NoiseGeneratorOctaves)noiseGens[6];
|
||||
worldIn.setSeaLevel(63);
|
||||
}
|
||||
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 3
|
||||
|
||||
public void func_180516_b(int p_180516_1_, int p_180516_2_, ChunkPrimer p_180516_3_)
|
||||
{
|
||||
+ net.minecraftforge.event.terraingen.ChunkProviderEvent.ReplaceBiomeBlocks event = new net.minecraftforge.event.terraingen.ChunkProviderEvent.ReplaceBiomeBlocks(this, p_180516_1_, p_180516_2_, p_180516_3_, this.worldObj);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
|
||||
+ if (event.getResult() == net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) return;
|
||||
+
|
||||
int i = this.worldObj.getSeaLevel() + 1;
|
||||
double d0 = 0.03125D;
|
||||
this.slowsandNoise = this.slowsandGravelNoiseGen.generateNoiseOctaves(this.slowsandNoise, p_180516_1_ * 16, p_180516_2_ * 16, 0, 16, 16, 1, d0, d0, 1.0D);
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 4
|
||||
|
||||
private double[] initializeNoiseField(double[] p_73164_1_, int p_73164_2_, int p_73164_3_, int p_73164_4_, int p_73164_5_, int p_73164_6_, int p_73164_7_)
|
||||
{
|
||||
+ net.minecraftforge.event.terraingen.ChunkProviderEvent.InitNoiseField event = new net.minecraftforge.event.terraingen.ChunkProviderEvent.InitNoiseField(this, p_73164_1_, p_73164_2_, p_73164_3_, p_73164_4_, p_73164_5_, p_73164_6_, p_73164_7_);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
|
||||
+ if (event.getResult() == net.minecraftforge.fml.common.eventhandler.Event.Result.DENY) return event.noisefield;
|
||||
+
|
||||
if (p_73164_1_ == null)
|
||||
{
|
||||
p_73164_1_ = new double[p_73164_5_ * p_73164_6_ * p_73164_7_];
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 5
|
||||
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
|
||||
{
|
||||
BlockFalling.fallInstantly = true;
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.terraingen.PopulateChunkEvent.Pre(p_73153_1_, worldObj, hellRNG, p_73153_2_, p_73153_3_, false));
|
||||
BlockPos blockpos = new BlockPos(p_73153_2_ * 16, 0, p_73153_3_ * 16);
|
||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_73153_2_, p_73153_3_);
|
||||
this.genNetherBridge.generateStructure(this.worldObj, this.hellRNG, chunkcoordintpair);
|
||||
|
||||
- for (int i = 0; i < 8; ++i)
|
||||
+ boolean doGen = net.minecraftforge.event.terraingen.TerrainGen.populate(p_73153_1_, worldObj, hellRNG, p_73153_2_, p_73153_3_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.NETHER_LAVA);
|
||||
+ for (int i = 0; doGen && i < 8; ++i)
|
||||
{
|
||||
this.field_177472_y.generate(this.worldObj, this.hellRNG, blockpos.add(this.hellRNG.nextInt(16) + 8, this.hellRNG.nextInt(120) + 4, this.hellRNG.nextInt(16) + 8));
|
||||
}
|
||||
|
||||
- for (int j = 0; j < this.hellRNG.nextInt(this.hellRNG.nextInt(10) + 1) + 1; ++j)
|
||||
+ doGen = net.minecraftforge.event.terraingen.TerrainGen.populate(p_73153_1_, worldObj, hellRNG, p_73153_2_, p_73153_3_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.FIRE);
|
||||
+ for (int j = 0; doGen && j < this.hellRNG.nextInt(this.hellRNG.nextInt(10) + 1) + 1; ++j)
|
||||
{
|
||||
this.field_177470_t.generate(this.worldObj, this.hellRNG, blockpos.add(this.hellRNG.nextInt(16) + 8, this.hellRNG.nextInt(120) + 4, this.hellRNG.nextInt(16) + 8));
|
||||
}
|
||||
|
||||
- for (int k = 0; k < this.hellRNG.nextInt(this.hellRNG.nextInt(10) + 1); ++k)
|
||||
+ doGen = net.minecraftforge.event.terraingen.TerrainGen.populate(p_73153_1_, worldObj, hellRNG, p_73153_2_, p_73153_3_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.GLOWSTONE);
|
||||
+ for (int k = 0; doGen && k < this.hellRNG.nextInt(this.hellRNG.nextInt(10) + 1); ++k)
|
||||
{
|
||||
this.field_177469_u.generate(this.worldObj, this.hellRNG, blockpos.add(this.hellRNG.nextInt(16) + 8, this.hellRNG.nextInt(120) + 4, this.hellRNG.nextInt(16) + 8));
|
||||
}
|
||||
|
||||
- for (int l = 0; l < 10; ++l)
|
||||
+ for (int l = 0; doGen && l < 10; ++l)
|
||||
{
|
||||
this.field_177468_v.generate(this.worldObj, this.hellRNG, blockpos.add(this.hellRNG.nextInt(16) + 8, this.hellRNG.nextInt(128), this.hellRNG.nextInt(16) + 8));
|
||||
}
|
||||
|
||||
- if (this.hellRNG.nextBoolean())
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.terraingen.DecorateBiomeEvent.Pre(worldObj, hellRNG, blockpos));
|
||||
+
|
||||
+ doGen = net.minecraftforge.event.terraingen.TerrainGen.decorate(worldObj, hellRNG, blockpos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.SHROOM);
|
||||
+ if (doGen && this.hellRNG.nextBoolean())
|
||||
{
|
||||
this.field_177471_z.generate(this.worldObj, this.hellRNG, blockpos.add(this.hellRNG.nextInt(16) + 8, this.hellRNG.nextInt(128), this.hellRNG.nextInt(16) + 8));
|
||||
}
|
||||
|
||||
- if (this.hellRNG.nextBoolean())
|
||||
+ if (doGen && this.hellRNG.nextBoolean())
|
||||
{
|
||||
this.field_177465_A.generate(this.worldObj, this.hellRNG, blockpos.add(this.hellRNG.nextInt(16) + 8, this.hellRNG.nextInt(128), this.hellRNG.nextInt(16) + 8));
|
||||
}
|
||||
|
||||
- for (int i1 = 0; i1 < 16; ++i1)
|
||||
+ doGen = net.minecraftforge.event.terraingen.TerrainGen.generateOre(worldObj, hellRNG, field_177467_w, blockpos, net.minecraftforge.event.terraingen.OreGenEvent.GenerateMinable.EventType.QUARTZ);
|
||||
+ for (int i1 = 0; doGen && i1 < 16; ++i1)
|
||||
{
|
||||
this.field_177467_w.generate(this.worldObj, this.hellRNG, blockpos.add(this.hellRNG.nextInt(16), this.hellRNG.nextInt(108) + 10, this.hellRNG.nextInt(16)));
|
||||
}
|
||||
|
||||
- for (int j1 = 0; j1 < 16; ++j1)
|
||||
+ doGen = net.minecraftforge.event.terraingen.TerrainGen.populate(p_73153_1_, worldObj, hellRNG, p_73153_2_, p_73153_3_, false, net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType.NETHER_LAVA2);
|
||||
+ for (int j1 = 0; doGen && j1 < 16; ++j1)
|
||||
{
|
||||
this.field_177473_x.generate(this.worldObj, this.hellRNG, blockpos.add(this.hellRNG.nextInt(16), this.hellRNG.nextInt(108) + 10, this.hellRNG.nextInt(16)));
|
||||
}
|
||||
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.terraingen.PopulateChunkEvent.Post(p_73153_1_, worldObj, hellRNG, p_73153_2_, p_73153_3_, false));
|
||||
BlockFalling.fallInstantly = false;
|
||||
}
|
||||
|
||||
++++ END PATCH
|
|
@ -1,85 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
|
||||
public void dropChunk(int x, int z)
|
||||
{
|
||||
- if (this.worldObj.provider.canRespawnHere())
|
||||
+ if (this.worldObj.provider.canRespawnHere() && net.minecraftforge.common.DimensionManager.shouldLoadSpawn(this.worldObj.provider.getDimensionId()))
|
||||
{
|
||||
if (!this.worldObj.isSpawnChunk(x, z))
|
||||
{
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 3
|
||||
|
||||
public Chunk loadChunk(int p_73158_1_, int p_73158_2_)
|
||||
{
|
||||
+ return loadChunk(p_73158_1_, p_73158_2_, null);
|
||||
+ }
|
||||
+
|
||||
+ public Chunk loadChunk(int par1, int par2, Runnable runnable)
|
||||
+ {
|
||||
+ long k = ChunkCoordIntPair.chunkXZ2Int(par1, par2);
|
||||
+ this.droppedChunksSet.remove(Long.valueOf(k));
|
||||
+ Chunk chunk = (Chunk)this.id2ChunkMap.getValueByKey(k);
|
||||
+ net.minecraft.world.chunk.storage.AnvilChunkLoader loader = null;
|
||||
+
|
||||
+ if (this.chunkLoader instanceof net.minecraft.world.chunk.storage.AnvilChunkLoader)
|
||||
+ {
|
||||
+ loader = (net.minecraft.world.chunk.storage.AnvilChunkLoader) this.chunkLoader;
|
||||
+ }
|
||||
+
|
||||
+ // We can only use the queue for already generated chunks
|
||||
+ if (chunk == null && loader != null && loader.chunkExists(this.worldObj, par1, par2))
|
||||
+ {
|
||||
+ if (runnable != null)
|
||||
+ {
|
||||
+ net.minecraftforge.common.chunkio.ChunkIOExecutor.queueChunkLoad(this.worldObj, loader, this, par1, par2, runnable);
|
||||
+ return null;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ chunk = net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(this.worldObj, loader, this, par1, par2);
|
||||
+ }
|
||||
+ }
|
||||
+ else if (chunk == null)
|
||||
+ {
|
||||
+ chunk = this.originalLoadChunk(par1, par2);
|
||||
+ }
|
||||
+
|
||||
+ // If we didn't load the chunk async and have a callback run it now
|
||||
+ if (runnable != null)
|
||||
+ {
|
||||
+ runnable.run();
|
||||
+ }
|
||||
+
|
||||
+ return chunk;
|
||||
+ }
|
||||
+
|
||||
+ public Chunk originalLoadChunk(int p_73158_1_, int p_73158_2_)
|
||||
+ {
|
||||
long i = ChunkCoordIntPair.chunkXZ2Int(p_73158_1_, p_73158_2_);
|
||||
this.droppedChunksSet.remove(Long.valueOf(i));
|
||||
Chunk chunk = (Chunk)this.id2ChunkMap.getValueByKey(i);
|
||||
|
||||
if (chunk == null)
|
||||
{
|
||||
+ boolean added = loadingChunks.add(i);
|
||||
+ if (!added)
|
||||
+ {
|
||||
+ net.minecraftforge.fml.common.FMLLog.bigWarning("There is an attempt to load a chunk (%d,%d) in di >mension %d that is already being loaded. This will cause weird chunk breakages.", p_73158_1_, p_73158_2_, worldObj.provider.getDimensionId());
|
||||
+ }
|
||||
+ chunk = net.minecraftforge.common.ForgeChunkManager.fetchDormantChunk(i, this.worldObj);
|
||||
+
|
||||
+ if (chunk == null)
|
||||
chunk = this.loadChunkFromFile(p_73158_1_, p_73158_2_);
|
||||
|
||||
if (chunk == null)
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 5
|
||||
if (this.serverChunkGenerator != null)
|
||||
{
|
||||
this.serverChunkGenerator.populate(p_73153_1_, p_73153_2_, p_73153_3_);
|
||||
+ net.minecraftforge.fml.common.registry.GameRegistry.generateWorld(p_73153_2_, p_73153_3_, worldObj, serverChunkGenerator, p_73153_1_);
|
||||
chunk.setChunkModified();
|
||||
}
|
||||
}
|
||||
++++ END PATCH
|
|
@ -1,37 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
IBlockState iblockstate1 = p_180702_5_.getBlockState(j3, j2, i2);
|
||||
IBlockState iblockstate2 = (IBlockState)Objects.firstNonNull(p_180702_5_.getBlockState(j3, j2 + 1, i2), Blocks.air.getDefaultState());
|
||||
|
||||
- if (iblockstate1.getBlock() == Blocks.grass || iblockstate1.getBlock() == Blocks.mycelium)
|
||||
+ if (isTopBlock(p_180702_5_, j3, j2, i2, p_180702_3_, p_180702_4_))
|
||||
{
|
||||
flag1 = true;
|
||||
}
|
||||
|
||||
- if (this.func_175793_a(iblockstate1, iblockstate2))
|
||||
- {
|
||||
- if (j2 - 1 < 10)
|
||||
- {
|
||||
- p_180702_5_.setBlockState(j3, j2, i2, Blocks.lava.getDefaultState());
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- p_180702_5_.setBlockState(j3, j2, i2, Blocks.air.getDefaultState());
|
||||
-
|
||||
- if (iblockstate2.getBlock() == Blocks.sand)
|
||||
- {
|
||||
- p_180702_5_.setBlockState(j3, j2 + 1, i2, iblockstate2.getValue(BlockSand.VARIANT) == BlockSand.EnumType.RED_SAND ? Blocks.red_sandstone.getDefaultState() : Blocks.sandstone.getDefaultState());
|
||||
- }
|
||||
-
|
||||
- if (flag1 && p_180702_5_.getBlockState(j3, j2 - 1, i2).getBlock() == Blocks.dirt)
|
||||
- {
|
||||
- blockpos$mutableblockpos.set(j3 + p_180702_3_ * 16, 0, i2 + p_180702_4_ * 16);
|
||||
- p_180702_5_.setBlockState(j3, j2 - 1, i2, this.worldObj.getBiomeGenForCoords(blockpos$mutableblockpos).topBlock.getBlock().getDefaultState());
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ digBlock(p_180702_5_, j3, j2, i2, p_180702_3_, p_180702_4_, flag1, iblockstate1, iblockstate2);
|
||||
}
|
||||
}
|
||||
}
|
||||
++++ END PATCH
|
|
@ -1,32 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
{
|
||||
IBlockState iblockstate1 = p_180707_5_.getBlockState(j3, j2, i2);
|
||||
|
||||
- if (iblockstate1.getBlock() == Blocks.grass)
|
||||
+ if (isTopBlock(p_180707_5_, j3, j2, i2, p_180707_3_, p_180707_4_))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
|
||||
- if (iblockstate1.getBlock() == Blocks.stone || iblockstate1.getBlock() == Blocks.dirt || iblockstate1.getBlock() == Blocks.grass)
|
||||
- {
|
||||
- if (j2 - 1 < 10)
|
||||
- {
|
||||
- p_180707_5_.setBlockState(j3, j2, i2, Blocks.flowing_lava.getDefaultState());
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- p_180707_5_.setBlockState(j3, j2, i2, Blocks.air.getDefaultState());
|
||||
-
|
||||
- if (flag && p_180707_5_.getBlockState(j3, j2 - 1, i2).getBlock() == Blocks.dirt)
|
||||
- {
|
||||
- blockpos$mutableblockpos.set(j3 + p_180707_3_ * 16, 0, i2 + p_180707_4_ * 16);
|
||||
- p_180707_5_.setBlockState(j3, j2 - 1, i2, this.worldObj.getBiomeGenForCoords(blockpos$mutableblockpos).topBlock);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ digBlock(p_180707_5_, j3, j2, i2, p_180707_3_, p_180707_4_, flag);
|
||||
}
|
||||
}
|
||||
}
|
||||
++++ END PATCH
|
|
@ -1,10 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
|
||||
protected static boolean isBiomeOceanic(int p_151618_0_)
|
||||
{
|
||||
- return p_151618_0_ == BiomeGenBase.ocean.biomeID || p_151618_0_ == BiomeGenBase.deepOcean.biomeID || p_151618_0_ == BiomeGenBase.frozenOcean.biomeID;
|
||||
+ return net.minecraftforge.common.BiomeManager.oceanBiomes.contains(BiomeGenBase.getBiome(p_151618_0_));
|
||||
}
|
||||
|
||||
protected int selectRandom(int... p_151619_1_)
|
||||
++++ END PATCH
|
|
@ -1,84 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
|
||||
public class GenLayerBiome extends GenLayer
|
||||
{
|
||||
- private BiomeGenBase[] field_151623_c = new BiomeGenBase[] {BiomeGenBase.desert, BiomeGenBase.desert, BiomeGenBase.desert, BiomeGenBase.savanna, BiomeGenBase.savanna, BiomeGenBase.plains};
|
||||
- private BiomeGenBase[] field_151621_d = new BiomeGenBase[] {BiomeGenBase.forest, BiomeGenBase.roofedForest, BiomeGenBase.extremeHills, BiomeGenBase.plains, BiomeGenBase.birchForest, BiomeGenBase.swampland};
|
||||
- private BiomeGenBase[] field_151622_e = new BiomeGenBase[] {BiomeGenBase.forest, BiomeGenBase.extremeHills, BiomeGenBase.taiga, BiomeGenBase.plains};
|
||||
- private BiomeGenBase[] field_151620_f = new BiomeGenBase[] {BiomeGenBase.icePlains, BiomeGenBase.icePlains, BiomeGenBase.icePlains, BiomeGenBase.coldTaiga};
|
||||
+ @SuppressWarnings("unchecked")
|
||||
+ private java.util.List<net.minecraftforge.common.BiomeManager.BiomeEntry>[] biomes = new java.util.ArrayList[net.minecraftforge.common.BiomeManager.BiomeType.values().length];
|
||||
+
|
||||
private final ChunkProviderSettings field_175973_g;
|
||||
|
||||
public GenLayerBiome(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, String p_i45560_5_)
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 2
|
||||
super(p_i45560_1_);
|
||||
this.parent = p_i45560_3_;
|
||||
|
||||
+ for (net.minecraftforge.common.BiomeManager.BiomeType type : net.minecraftforge.common.BiomeManager.BiomeType.values())
|
||||
+ {
|
||||
+ com.google.common.collect.ImmutableList<net.minecraftforge.common.BiomeManager.BiomeEntry> biomesToAdd = net.minecraftforge.common.BiomeManager.getBiomes(type);
|
||||
+ int idx = type.ordinal();
|
||||
+
|
||||
+ if (biomes[idx] == null) biomes[idx] = new java.util.ArrayList<net.minecraftforge.common.BiomeManager.BiomeEntry>();
|
||||
+ if (biomesToAdd != null) biomes[idx].addAll(biomesToAdd);
|
||||
+ }
|
||||
+
|
||||
+ int desertIdx = net.minecraftforge.common.BiomeManager.BiomeType.DESERT.ordinal();
|
||||
+
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomeGenBase.desert, 30));
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomeGenBase.savanna, 20));
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomeGenBase.plains, 10));
|
||||
+
|
||||
if (p_i45560_4_ == WorldType.DEFAULT_1_1)
|
||||
{
|
||||
- this.field_151623_c = new BiomeGenBase[] {BiomeGenBase.desert, BiomeGenBase.forest, BiomeGenBase.extremeHills, BiomeGenBase.swampland, BiomeGenBase.plains, BiomeGenBase.taiga};
|
||||
+ biomes[desertIdx].clear();
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomeGenBase.desert, 10));
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomeGenBase.forest, 10));
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomeGenBase.extremeHills, 10));
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomeGenBase.swampland, 10));
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomeGenBase.plains, 10));
|
||||
+ biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(BiomeGenBase.taiga, 10));
|
||||
this.field_175973_g = null;
|
||||
}
|
||||
else if (p_i45560_4_ == WorldType.CUSTOMIZED)
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 3
|
||||
}
|
||||
else
|
||||
{
|
||||
- aint1[j + i * areaWidth] = this.field_151623_c[this.nextInt(this.field_151623_c.length)].biomeID;
|
||||
+ aint1[j + i * areaWidth] = getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.DESERT).biome.biomeID;
|
||||
}
|
||||
}
|
||||
else if (k == 2)
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 4
|
||||
}
|
||||
else
|
||||
{
|
||||
- aint1[j + i * areaWidth] = this.field_151621_d[this.nextInt(this.field_151621_d.length)].biomeID;
|
||||
+ aint1[j + i * areaWidth] = getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.WARM).biome.biomeID;
|
||||
}
|
||||
}
|
||||
else if (k == 3)
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 5
|
||||
}
|
||||
else
|
||||
{
|
||||
- aint1[j + i * areaWidth] = this.field_151622_e[this.nextInt(this.field_151622_e.length)].biomeID;
|
||||
+ aint1[j + i * areaWidth] = getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.COOL).biome.biomeID;
|
||||
}
|
||||
}
|
||||
else if (k == 4)
|
||||
{
|
||||
- aint1[j + i * areaWidth] = this.field_151620_f[this.nextInt(this.field_151620_f.length)].biomeID;
|
||||
+ aint1[j + i * areaWidth] = getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.ICY).biome.biomeID;
|
||||
}
|
||||
else
|
||||
{
|
||||
++++ END PATCH
|
|
@ -1,55 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
{
|
||||
int l1 = enumfacing.getFrontOffsetX() * 2;
|
||||
int i2 = enumfacing.getFrontOffsetZ() * 2;
|
||||
- this.field_74940_h[enumfacing.getHorizontalIndex()] = this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 10 + l1, -11, 10 + i2, WeightedRandomChestContent.func_177629_a(itemsToGenerateInTemple, new WeightedRandomChestContent[] {Items.enchanted_book.getRandom(randomIn)}), 2 + randomIn.nextInt(5));
|
||||
+ this.field_74940_h[enumfacing.getHorizontalIndex()] = this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 10 + l1, -11, 10 + i2, net.minecraftforge.common.ChestGenHooks.getItems(net.minecraftforge.common.ChestGenHooks.PYRAMID_DESERT_CHEST, randomIn), net.minecraftforge.common.ChestGenHooks.getCount(net.minecraftforge.common.ChestGenHooks.PYRAMID_DESERT_CHEST, randomIn));
|
||||
}
|
||||
}
|
||||
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 4
|
||||
this.setBlockState(worldIn, Blocks.redstone_wire.getDefaultState(), 4, -3, 1, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.mossy_cobblestone.getDefaultState(), 3, -3, 1, structureBoundingBoxIn);
|
||||
|
||||
+ net.minecraftforge.common.ChestGenHooks dispenser = net.minecraftforge.common.ChestGenHooks.getInfo(net.minecraftforge.common.ChestGenHooks.PYRAMID_JUNGLE_DISPENSER);
|
||||
+ net.minecraftforge.common.ChestGenHooks chest = net.minecraftforge.common.ChestGenHooks.getInfo(net.minecraftforge.common.ChestGenHooks.PYRAMID_JUNGLE_CHEST);
|
||||
+
|
||||
if (!this.field_74945_j)
|
||||
{
|
||||
- this.field_74945_j = this.generateDispenserContents(worldIn, structureBoundingBoxIn, randomIn, 3, -2, 1, EnumFacing.NORTH.getIndex(), field_175815_j, 2);
|
||||
+ this.field_74945_j = this.generateDispenserContents(worldIn, structureBoundingBoxIn, randomIn, 3, -2, 1, EnumFacing.NORTH.getIndex(), dispenser.getItems(randomIn), dispenser.getCount(randomIn));
|
||||
}
|
||||
|
||||
this.setBlockState(worldIn, Blocks.vine.getStateFromMeta(15), 3, -2, 2, structureBoundingBoxIn);
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 5
|
||||
|
||||
if (!this.field_74946_k)
|
||||
{
|
||||
- this.field_74946_k = this.generateDispenserContents(worldIn, structureBoundingBoxIn, randomIn, 9, -2, 3, EnumFacing.WEST.getIndex(), field_175815_j, 2);
|
||||
+ this.field_74946_k = this.generateDispenserContents(worldIn, structureBoundingBoxIn, randomIn, 9, -2, 3, EnumFacing.WEST.getIndex(), dispenser.getItems(randomIn), dispenser.getCount(randomIn));
|
||||
}
|
||||
|
||||
this.setBlockState(worldIn, Blocks.vine.getStateFromMeta(15), 8, -1, 3, structureBoundingBoxIn);
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 6
|
||||
|
||||
if (!this.field_74947_h)
|
||||
{
|
||||
- this.field_74947_h = this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 8, -3, 3, WeightedRandomChestContent.func_177629_a(field_175816_i, new WeightedRandomChestContent[] {Items.enchanted_book.getRandom(randomIn)}), 2 + randomIn.nextInt(5));
|
||||
+ this.field_74947_h = this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 8, -3, 3, chest.getItems(randomIn), chest.getCount(randomIn));
|
||||
}
|
||||
|
||||
this.setBlockState(worldIn, Blocks.mossy_cobblestone.getDefaultState(), 9, -3, 2, structureBoundingBoxIn);
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 7
|
||||
|
||||
if (!this.field_74948_i)
|
||||
{
|
||||
- this.field_74948_i = this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 9, -3, 10, WeightedRandomChestContent.func_177629_a(field_175816_i, new WeightedRandomChestContent[] {Items.enchanted_book.getRandom(randomIn)}), 2 + randomIn.nextInt(5));
|
||||
+ this.field_74948_i = this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 9, -3, 10, chest.getItems(randomIn), chest.getCount(randomIn));
|
||||
}
|
||||
|
||||
return true;
|
||||
++++ END PATCH
|
|
@ -1,21 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
|
||||
for (BiomeGenBase biomegenbase : BiomeGenBase.getBiomeGenArray())
|
||||
{
|
||||
- if (biomegenbase != null && biomegenbase.minHeight > 0.0F)
|
||||
+ if (biomegenbase != null && biomegenbase.minHeight > 0.0F && !net.minecraftforge.common.BiomeManager.strongHoldBiomesBlackList.contains(biomegenbase))
|
||||
{
|
||||
this.field_151546_e.add(biomegenbase);
|
||||
}
|
||||
}
|
||||
+ for (BiomeGenBase biome : net.minecraftforge.common.BiomeManager.strongHoldBiomes)
|
||||
+ {
|
||||
+ if (!this.field_151546_e.contains(biome))
|
||||
+ {
|
||||
+ this.field_151546_e.add(biome);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
public MapGenStronghold(Map<String, String> p_i2068_1_)
|
||||
++++ END PATCH
|
|
@ -1,19 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
this.randomlyPlaceBlock(worldIn, structureBoundingBoxIn, randomIn, 0.05F, 1, 2, k1 - 1, Blocks.torch.getStateFromMeta(EnumFacing.UP.getIndex()));
|
||||
this.randomlyPlaceBlock(worldIn, structureBoundingBoxIn, randomIn, 0.05F, 1, 2, k1 + 1, Blocks.torch.getStateFromMeta(EnumFacing.UP.getIndex()));
|
||||
|
||||
+ net.minecraftforge.common.ChestGenHooks info = net.minecraftforge.common.ChestGenHooks.getInfo(net.minecraftforge.common.ChestGenHooks.MINESHAFT_CORRIDOR);
|
||||
if (randomIn.nextInt(100) == 0)
|
||||
{
|
||||
- this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 2, 0, k1 - 1, WeightedRandomChestContent.func_177629_a(StructureMineshaftPieces.CHEST_CONTENT_WEIGHT_LIST, new WeightedRandomChestContent[] {Items.enchanted_book.getRandom(randomIn)}), 3 + randomIn.nextInt(4));
|
||||
+ this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 2, 0, k1 - 1, info.getItems(randomIn), info.getCount(randomIn));
|
||||
}
|
||||
|
||||
if (randomIn.nextInt(100) == 0)
|
||||
{
|
||||
- this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 0, 0, k1 + 1, WeightedRandomChestContent.func_177629_a(StructureMineshaftPieces.CHEST_CONTENT_WEIGHT_LIST, new WeightedRandomChestContent[] {Items.enchanted_book.getRandom(randomIn)}), 3 + randomIn.nextInt(4));
|
||||
+ this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 0, 0, k1 + 1, info.getItems(randomIn), info.getCount(randomIn));
|
||||
}
|
||||
|
||||
if (this.hasSpiders && !this.spawnerPlaced)
|
||||
++++ END PATCH
|
|
@ -1,29 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
if (this.field_111021_b && structureBoundingBoxIn.isVecInside(new BlockPos(this.getXWithOffset(3, 3), this.getYWithOffset(2), this.getZWithOffset(3, 3))))
|
||||
{
|
||||
this.field_111021_b = false;
|
||||
- this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 3, 2, 3, field_111019_a, 2 + randomIn.nextInt(4));
|
||||
+ this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 3, 2, 3, net.minecraftforge.common.ChestGenHooks.getItems(net.minecraftforge.common.ChestGenHooks.NETHER_FORTRESS, randomIn), net.minecraftforge.common.ChestGenHooks.getCount(net.minecraftforge.common.ChestGenHooks.NETHER_FORTRESS, randomIn));
|
||||
}
|
||||
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 6, 0, 4, 6, 4, Blocks.nether_brick.getDefaultState(), Blocks.nether_brick.getDefaultState(), false);
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 2
|
||||
if (this.field_111020_b && structureBoundingBoxIn.isVecInside(new BlockPos(this.getXWithOffset(1, 3), this.getYWithOffset(2), this.getZWithOffset(1, 3))))
|
||||
{
|
||||
this.field_111020_b = false;
|
||||
- this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 1, 2, 3, field_111019_a, 2 + randomIn.nextInt(4));
|
||||
+ this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 1, 2, 3, net.minecraftforge.common.ChestGenHooks.getItems(net.minecraftforge.common.ChestGenHooks.NETHER_FORTRESS, randomIn), net.minecraftforge.common.ChestGenHooks.getCount(net.minecraftforge.common.ChestGenHooks.NETHER_FORTRESS, randomIn));
|
||||
}
|
||||
|
||||
this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 6, 0, 4, 6, 4, Blocks.nether_brick.getDefaultState(), Blocks.nether_brick.getDefaultState(), false);
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 3
|
||||
abstract static class Piece extends StructureComponent
|
||||
{
|
||||
protected static final List<WeightedRandomChestContent> field_111019_a = Lists.newArrayList(new WeightedRandomChestContent[] {new WeightedRandomChestContent(Items.diamond, 0, 1, 3, 5), new WeightedRandomChestContent(Items.iron_ingot, 0, 1, 5, 5), new WeightedRandomChestContent(Items.gold_ingot, 0, 1, 3, 15), new WeightedRandomChestContent(Items.golden_sword, 0, 1, 1, 5), new WeightedRandomChestContent(Items.golden_chestplate, 0, 1, 1, 5), new WeightedRandomChestContent(Items.flint_and_steel, 0, 1, 1, 5), new WeightedRandomChestContent(Items.nether_wart, 0, 3, 7, 5), new WeightedRandomChestContent(Items.saddle, 0, 1, 1, 10), new WeightedRandomChestContent(Items.golden_horse_armor, 0, 1, 1, 8), new WeightedRandomChestContent(Items.iron_horse_armor, 0, 1, 1, 5), new WeightedRandomChestContent(Items.diamond_horse_armor, 0, 1, 1, 3), new WeightedRandomChestContent(Item.getItemFromBlock(Blocks.obsidian), 0, 2, 4, 2)});
|
||||
+ static { net.minecraftforge.common.ChestGenHooks.init(net.minecraftforge.common.ChestGenHooks.NETHER_FORTRESS, field_111019_a, 2, 5); }
|
||||
|
||||
public Piece()
|
||||
{
|
||||
++++ END PATCH
|
|
@ -1,37 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
if (!this.hasMadeChest && structureBoundingBoxIn.isVecInside(new BlockPos(this.getXWithOffset(3, 3), this.getYWithOffset(2), this.getZWithOffset(3, 3))))
|
||||
{
|
||||
this.hasMadeChest = true;
|
||||
- this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 3, 2, 3, WeightedRandomChestContent.func_177629_a(strongholdChestContents, new WeightedRandomChestContent[] {Items.enchanted_book.getRandom(randomIn)}), 2 + randomIn.nextInt(2));
|
||||
+ this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 3, 2, 3, net.minecraftforge.common.ChestGenHooks.getItems(net.minecraftforge.common.ChestGenHooks.STRONGHOLD_CORRIDOR, randomIn), net.minecraftforge.common.ChestGenHooks.getCount(net.minecraftforge.common.ChestGenHooks.STRONGHOLD_CORRIDOR, randomIn));
|
||||
}
|
||||
|
||||
return true;
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 4
|
||||
this.setBlockState(worldIn, Blocks.torch.getDefaultState(), i1, 8, j1 + 1, structureBoundingBoxIn);
|
||||
}
|
||||
|
||||
- this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 3, 3, 5, WeightedRandomChestContent.func_177629_a(strongholdLibraryChestContents, new WeightedRandomChestContent[] {Items.enchanted_book.getRandom(randomIn, 1, 5, 2)}), 1 + randomIn.nextInt(4));
|
||||
+ net.minecraftforge.common.ChestGenHooks info = net.minecraftforge.common.ChestGenHooks.getInfo(net.minecraftforge.common.ChestGenHooks.STRONGHOLD_LIBRARY);
|
||||
+ this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 3, 3, 5, info.getItems(randomIn), info.getCount(randomIn));
|
||||
|
||||
if (this.isLargeRoom)
|
||||
{
|
||||
this.setBlockState(worldIn, Blocks.air.getDefaultState(), 12, 9, 1, structureBoundingBoxIn);
|
||||
- this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 12, 8, 1, WeightedRandomChestContent.func_177629_a(strongholdLibraryChestContents, new WeightedRandomChestContent[] {Items.enchanted_book.getRandom(randomIn, 1, 5, 2)}), 1 + randomIn.nextInt(4));
|
||||
+ this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 12, 8, 1, info.getItems(randomIn), info.getCount(randomIn));
|
||||
}
|
||||
|
||||
return true;
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 6
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(this.getMetadataWithOffset(Blocks.ladder, EnumFacing.WEST.getIndex())), 9, 1, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(this.getMetadataWithOffset(Blocks.ladder, EnumFacing.WEST.getIndex())), 9, 2, 3, structureBoundingBoxIn);
|
||||
this.setBlockState(worldIn, Blocks.ladder.getStateFromMeta(this.getMetadataWithOffset(Blocks.ladder, EnumFacing.WEST.getIndex())), 9, 3, 3, structureBoundingBoxIn);
|
||||
- this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 3, 4, 8, WeightedRandomChestContent.func_177629_a(strongholdRoomCrossingChestContents, new WeightedRandomChestContent[] {Items.enchanted_book.getRandom(randomIn)}), 1 + randomIn.nextInt(4));
|
||||
+ this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 3, 4, 8, net.minecraftforge.common.ChestGenHooks.getItems(net.minecraftforge.common.ChestGenHooks.STRONGHOLD_CROSSING, randomIn), net.minecraftforge.common.ChestGenHooks.getCount(net.minecraftforge.common.ChestGenHooks.STRONGHOLD_CROSSING, randomIn));
|
||||
}
|
||||
|
||||
return true;
|
||||
++++ END PATCH
|
|
@ -1,19 +0,0 @@
|
|||
++++ REJECTED PATCH 4
|
||||
if (!this.hasMadeChest && structureBoundingBoxIn.isVecInside(new BlockPos(this.getXWithOffset(5, 5), this.getYWithOffset(1), this.getZWithOffset(5, 5))))
|
||||
{
|
||||
this.hasMadeChest = true;
|
||||
- this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 5, 1, 5, villageBlacksmithChestContents, 3 + randomIn.nextInt(6));
|
||||
+ this.generateChestContents(worldIn, structureBoundingBoxIn, randomIn, 5, 1, 5, net.minecraftforge.common.ChestGenHooks.getItems(net.minecraftforge.common.ChestGenHooks.VILLAGE_BLACKSMITH, randomIn), net.minecraftforge.common.ChestGenHooks.getCount(net.minecraftforge.common.ChestGenHooks.VILLAGE_BLACKSMITH, randomIn));
|
||||
}
|
||||
|
||||
for (int i = 6; i <= 8; ++i)
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 6
|
||||
this.terrainType = p_i2104_7_;
|
||||
BiomeGenBase biomegenbase = chunkManagerIn.getBiomeGenerator(new BlockPos(p_i2104_4_, 0, p_i2104_5_), BiomeGenBase.field_180279_ad);
|
||||
this.inDesert = biomegenbase == BiomeGenBase.desert || biomegenbase == BiomeGenBase.desertHills;
|
||||
+ this.biome = biomegenbase;
|
||||
this.func_175846_a(this.inDesert);
|
||||
}
|
||||
|
||||
++++ END PATCH
|
|
@ -24,17 +24,9 @@ import net.minecraftforge.oredict.OreDictionary;
|
|||
public class ChestGenHooks
|
||||
{
|
||||
//Currently implemented categories for chests/dispensers, Dungeon loot is still in DungeonHooks
|
||||
public static final String MINESHAFT_CORRIDOR = "mineshaftCorridor";
|
||||
public static final String PYRAMID_DESERT_CHEST = "pyramidDesertyChest";
|
||||
public static final String PYRAMID_JUNGLE_CHEST = "pyramidJungleChest";
|
||||
public static final String PYRAMID_JUNGLE_DISPENSER = "pyramidJungleDispenser";
|
||||
public static final String STRONGHOLD_CORRIDOR = "strongholdCorridor";
|
||||
public static final String STRONGHOLD_LIBRARY = "strongholdLibrary";
|
||||
public static final String STRONGHOLD_CROSSING = "strongholdCrossing";
|
||||
public static final String VILLAGE_BLACKSMITH = "villageBlacksmith";
|
||||
public static final String PYRAMID_JUNGLE_DISPENSER = "pyramidJungleDispenser"; // TODO: Convert to a Loot Table
|
||||
public static final String BONUS_CHEST = "bonusChest";
|
||||
public static final String DUNGEON_CHEST = "dungeonChest";
|
||||
public static final String NETHER_FORTRESS = "netherFortress";
|
||||
|
||||
private static final HashMap<String, ChestGenHooks> chestInfo = new HashMap<String, ChestGenHooks>();
|
||||
private static boolean hasInit = false;
|
||||
|
@ -53,15 +45,7 @@ public class ChestGenHooks
|
|||
hasInit = true;
|
||||
// This causes the classes static initializers to run
|
||||
new WorldGenDungeons();
|
||||
new DesertPyramid();
|
||||
new JunglePyramid();
|
||||
new StructureMineshaftPieces();
|
||||
new StructureOceanMonument();
|
||||
new StructureStrongholdPieces.ChestCorridor();
|
||||
new StructureStrongholdPieces.Library();
|
||||
new StructureStrongholdPieces.RoomCrossing();
|
||||
new StructureVillagePieces.House2();
|
||||
new StructureNetherBridgePieces.Corridor();
|
||||
WorldServer.fillChestHook();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ import net.minecraft.world.World;
|
|||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.WorldSettings;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.chunk.ChunkPrimer;
|
||||
import net.minecraft.world.chunk.IChunkGenerator;
|
||||
import net.minecraft.world.storage.IPlayerFileData;
|
||||
import net.minecraft.world.storage.SaveHandler;
|
||||
import net.minecraftforge.client.event.ClientChatReceivedEvent;
|
||||
|
@ -73,6 +75,8 @@ import net.minecraftforge.event.entity.player.PlayerSleepInBedEvent;
|
|||
import net.minecraftforge.event.entity.player.PlayerWakeUpEvent;
|
||||
import net.minecraftforge.event.entity.player.SleepingLocationCheckEvent;
|
||||
import net.minecraftforge.event.entity.player.UseHoeEvent;
|
||||
import net.minecraftforge.event.terraingen.ChunkGeneratorEvent;
|
||||
import net.minecraftforge.event.terraingen.PopulateChunkEvent;
|
||||
import net.minecraftforge.event.world.BlockEvent;
|
||||
import net.minecraftforge.event.world.BlockEvent.NeighborNotifyEvent;
|
||||
import net.minecraftforge.event.world.BlockEvent.MultiPlaceEvent;
|
||||
|
@ -521,7 +525,10 @@ public class ForgeEventFactory
|
|||
|
||||
Result canContinueSleep = evt.getResult();
|
||||
if (canContinueSleep == Result.DEFAULT)
|
||||
return player.worldObj.getBlockState(player.playerLocation).getBlock().isBed(player.worldObj, player.playerLocation, player);
|
||||
{
|
||||
IBlockState state = player.worldObj.getBlockState(player.playerLocation);
|
||||
return state.getBlock().isBed(state, player.worldObj, player.playerLocation, player);
|
||||
}
|
||||
else
|
||||
return canContinueSleep == Result.ALLOW;
|
||||
}
|
||||
|
@ -542,4 +549,16 @@ public class ForgeEventFactory
|
|||
return event.getCharge();
|
||||
}
|
||||
|
||||
public static boolean onReplaceBiomeBlocks(IChunkGenerator gen, int x, int z, ChunkPrimer primer, World world)
|
||||
{
|
||||
ChunkGeneratorEvent.ReplaceBiomeBlocks event = new ChunkGeneratorEvent.ReplaceBiomeBlocks(gen, x, z, primer, world);
|
||||
net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
|
||||
return event.getResult() != net.minecraftforge.fml.common.eventhandler.Event.Result.DENY;
|
||||
}
|
||||
|
||||
public static void onChunkPopulate(boolean pre, IChunkGenerator gen, World world, int x, int z, boolean hasVillageGenerated)
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(gen, world, world.rand, x, z, hasVillageGenerated));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,18 +3,19 @@ package net.minecraftforge.event.terraingen;
|
|||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.ChunkPrimer;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.chunk.IChunkGenerator;
|
||||
|
||||
public class ChunkProviderEvent extends Event
|
||||
public class ChunkGeneratorEvent extends Event
|
||||
{
|
||||
private final IChunkGenerator gen;
|
||||
|
||||
public final IChunkProvider chunkProvider;
|
||||
|
||||
public ChunkProviderEvent(IChunkProvider chunkProvider)
|
||||
public ChunkGeneratorEvent(IChunkGenerator gen)
|
||||
{
|
||||
this.chunkProvider = chunkProvider;
|
||||
this.gen = gen;
|
||||
}
|
||||
|
||||
public IChunkGenerator getGenerator() { return this.gen; }
|
||||
|
||||
/**
|
||||
* This event is fired when a chunks blocks are replaced by a biomes top and
|
||||
* filler blocks.
|
||||
|
@ -22,14 +23,14 @@ public class ChunkProviderEvent extends Event
|
|||
* You can set the result to DENY to prevent the default replacement.
|
||||
*/
|
||||
@HasResult
|
||||
public static class ReplaceBiomeBlocks extends ChunkProviderEvent
|
||||
public static class ReplaceBiomeBlocks extends ChunkGeneratorEvent
|
||||
{
|
||||
public final int x;
|
||||
public final int z;
|
||||
public final ChunkPrimer primer;
|
||||
public final World world; // CAN BE NULL
|
||||
|
||||
public ReplaceBiomeBlocks(IChunkProvider chunkProvider, int x, int z, ChunkPrimer primer, World world)
|
||||
public ReplaceBiomeBlocks(IChunkGenerator chunkProvider, int x, int z, ChunkPrimer primer, World world)
|
||||
{
|
||||
super(chunkProvider);
|
||||
this.x = x;
|
||||
|
@ -46,7 +47,7 @@ public class ChunkProviderEvent extends Event
|
|||
* You can set the result to DENY to substitute your own noise field.
|
||||
*/
|
||||
@HasResult
|
||||
public static class InitNoiseField extends ChunkProviderEvent
|
||||
public static class InitNoiseField extends ChunkGeneratorEvent
|
||||
{
|
||||
public double[] noisefield;
|
||||
public final int posX;
|
||||
|
@ -56,7 +57,7 @@ public class ChunkProviderEvent extends Event
|
|||
public final int sizeY;
|
||||
public final int sizeZ;
|
||||
|
||||
public InitNoiseField(IChunkProvider chunkProvider, double[] noisefield, int posX, int posY, int posZ, int sizeX, int sizeY, int sizeZ)
|
||||
public InitNoiseField(IChunkGenerator chunkProvider, double[] noisefield, int posX, int posY, int posZ, int sizeX, int sizeY, int sizeZ)
|
||||
{
|
||||
super(chunkProvider);
|
||||
this.noisefield = noisefield;
|
|
@ -3,20 +3,110 @@ package net.minecraftforge.event.terraingen;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.NoiseGenerator;
|
||||
import net.minecraftforge.event.world.*;
|
||||
import net.minecraft.world.gen.NoiseGeneratorOctaves;
|
||||
import net.minecraft.world.gen.NoiseGeneratorPerlin;
|
||||
import net.minecraft.world.gen.NoiseGeneratorSimplex;
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
|
||||
public class InitNoiseGensEvent extends WorldEvent
|
||||
public class InitNoiseGensEvent<T extends InitNoiseGensEvent.Context> extends WorldEvent
|
||||
{
|
||||
public final Random rand;
|
||||
public final NoiseGenerator[] originalNoiseGens;
|
||||
public NoiseGenerator[] newNoiseGens;
|
||||
private final Random rand;
|
||||
private final T original;
|
||||
private T newValues;
|
||||
|
||||
public InitNoiseGensEvent(World world, Random rand, NoiseGenerator[] original)
|
||||
@SuppressWarnings("unchecked")
|
||||
public InitNoiseGensEvent(World world, Random rand, T original)
|
||||
{
|
||||
super(world);
|
||||
this.rand = rand;
|
||||
originalNoiseGens = original;
|
||||
newNoiseGens = original.clone();
|
||||
this.original = original;
|
||||
this.newValues = (T)original.clone();
|
||||
}
|
||||
public Random getRandom() { return this.rand; }
|
||||
public T getOriginal() { return this.original; }
|
||||
public T getNewValues() { return this.newValues; }
|
||||
|
||||
public static class Context
|
||||
{
|
||||
private NoiseGeneratorOctaves lperlin1;
|
||||
private NoiseGeneratorOctaves lperlin2;
|
||||
private NoiseGeneratorOctaves perlin;
|
||||
private NoiseGeneratorOctaves scale;
|
||||
private NoiseGeneratorOctaves depth;
|
||||
public Context(NoiseGeneratorOctaves lperlin1, NoiseGeneratorOctaves lperlin2, NoiseGeneratorOctaves perlin,
|
||||
NoiseGeneratorOctaves scale, NoiseGeneratorOctaves depth)
|
||||
{
|
||||
this.lperlin1 = lperlin1;
|
||||
this.lperlin2 = lperlin2;
|
||||
this.perlin = perlin;
|
||||
this.scale = scale;
|
||||
this.depth = depth;
|
||||
}
|
||||
public NoiseGeneratorOctaves getLPerlin1() { return lperlin1; }
|
||||
public NoiseGeneratorOctaves getLPerlin2() { return lperlin2; }
|
||||
public NoiseGeneratorOctaves getPerlin() { return perlin; }
|
||||
public NoiseGeneratorOctaves getScale() { return scale; }
|
||||
public NoiseGeneratorOctaves getDepth() { return depth; }
|
||||
public void setLPerlin1(NoiseGeneratorOctaves value) { this.lperlin1 = value; }
|
||||
public void getLPerlin2(NoiseGeneratorOctaves value) { this.lperlin2 = value; }
|
||||
public void getPerlin (NoiseGeneratorOctaves value) { this.perlin = value; }
|
||||
public void getScale (NoiseGeneratorOctaves value) { this.scale = value; }
|
||||
public void getDepth (NoiseGeneratorOctaves value) { this.depth = value; }
|
||||
|
||||
public Context clone(){ return new Context(lperlin1, lperlin2, perlin, scale, depth); }
|
||||
}
|
||||
|
||||
public static class ContextOverworld extends Context
|
||||
{
|
||||
private NoiseGeneratorPerlin height;
|
||||
private NoiseGeneratorOctaves forest;
|
||||
|
||||
public ContextOverworld(NoiseGeneratorOctaves lperlin1, NoiseGeneratorOctaves lperlin2, NoiseGeneratorOctaves perlin,
|
||||
NoiseGeneratorPerlin height, NoiseGeneratorOctaves scale, NoiseGeneratorOctaves depth, NoiseGeneratorOctaves forest)
|
||||
{
|
||||
super(lperlin1, lperlin2, perlin, scale, depth);
|
||||
this.height = height;
|
||||
this.forest = forest;
|
||||
}
|
||||
public ContextOverworld clone() { return new ContextOverworld(getLPerlin1(), getLPerlin2(), getPerlin(), height, getScale(), getDepth(), forest); }
|
||||
public NoiseGeneratorPerlin getHeight() { return height; }
|
||||
public NoiseGeneratorOctaves getForest() { return forest; }
|
||||
|
||||
public void getHeight (NoiseGeneratorPerlin value) { this.height = value; }
|
||||
public void getForest (NoiseGeneratorOctaves value) { this.forest = value; }
|
||||
}
|
||||
|
||||
public static class ContextEnd extends Context
|
||||
{
|
||||
private NoiseGeneratorSimplex island;
|
||||
public ContextEnd(NoiseGeneratorOctaves lperlin1, NoiseGeneratorOctaves lperlin2, NoiseGeneratorOctaves perlin,
|
||||
NoiseGeneratorOctaves scale, NoiseGeneratorOctaves depth, NoiseGeneratorSimplex island)
|
||||
{
|
||||
super(lperlin1, lperlin2, perlin, scale, depth);
|
||||
this.island = island;
|
||||
}
|
||||
public ContextEnd clone() { return new ContextEnd(getLPerlin1(), getLPerlin2(), getPerlin(), getScale(), getDepth(), island); }
|
||||
public NoiseGeneratorSimplex getIsland() { return island; }
|
||||
public void getIsland (NoiseGeneratorSimplex value) { this.island = value; }
|
||||
}
|
||||
|
||||
|
||||
public static class ContextHell extends Context
|
||||
{
|
||||
private NoiseGeneratorOctaves perlin2;
|
||||
private NoiseGeneratorOctaves perlin3;
|
||||
|
||||
public ContextHell(NoiseGeneratorOctaves lperlin1, NoiseGeneratorOctaves lperlin2, NoiseGeneratorOctaves perlin,
|
||||
NoiseGeneratorOctaves perlin2, NoiseGeneratorOctaves perlin3, NoiseGeneratorOctaves scale, NoiseGeneratorOctaves depth)
|
||||
{
|
||||
super(lperlin1, lperlin2, perlin, scale, depth);
|
||||
this.perlin2 = perlin2;
|
||||
this.perlin3 = perlin3;
|
||||
}
|
||||
public ContextHell clone() { return new ContextHell(getLPerlin1(), getLPerlin2(), getPerlin(), perlin2, perlin3, getScale(), getDepth()); }
|
||||
public NoiseGeneratorOctaves getPerlin2() { return perlin2; }
|
||||
public NoiseGeneratorOctaves getPerlin3() { return perlin3; }
|
||||
public void getPerlin2 (NoiseGeneratorOctaves value) { this.perlin2 = value; }
|
||||
public void getPerlin3 (NoiseGeneratorOctaves value) { this.perlin3 = value; }
|
||||
}
|
||||
}
|
|
@ -5,6 +5,7 @@ import java.util.Random;
|
|||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event.HasResult;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkGenerator;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
|
||||
/**
|
||||
|
@ -20,7 +21,7 @@ import net.minecraft.world.chunk.IChunkProvider;
|
|||
* <br>
|
||||
* All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}, except {@link Populate}, which fires on the {@link MinecraftForge#TERRAIN_GEN_BUS}.<br>
|
||||
**/
|
||||
public class PopulateChunkEvent extends ChunkProviderEvent
|
||||
public class PopulateChunkEvent extends ChunkGeneratorEvent
|
||||
{
|
||||
public final World world;
|
||||
public final Random rand;
|
||||
|
@ -28,9 +29,9 @@ public class PopulateChunkEvent extends ChunkProviderEvent
|
|||
public final int chunkZ;
|
||||
public final boolean hasVillageGenerated;
|
||||
|
||||
public PopulateChunkEvent(IChunkProvider chunkProvider, World world, Random rand, int chunkX, int chunkZ, boolean hasVillageGenerated)
|
||||
public PopulateChunkEvent(IChunkGenerator gen, World world, Random rand, int chunkX, int chunkZ, boolean hasVillageGenerated)
|
||||
{
|
||||
super(chunkProvider);
|
||||
super(gen);
|
||||
this.world = world;
|
||||
this.rand = rand;
|
||||
this.chunkX = chunkX;
|
||||
|
@ -53,9 +54,9 @@ public class PopulateChunkEvent extends ChunkProviderEvent
|
|||
**/
|
||||
public static class Pre extends PopulateChunkEvent
|
||||
{
|
||||
public Pre(IChunkProvider chunkProvider, World world, Random rand, int chunkX, int chunkZ, boolean hasVillageGenerated)
|
||||
public Pre(IChunkGenerator gen, World world, Random rand, int chunkX, int chunkZ, boolean hasVillageGenerated)
|
||||
{
|
||||
super(chunkProvider, world, rand, chunkX, chunkZ, hasVillageGenerated);
|
||||
super(gen, world, rand, chunkX, chunkZ, hasVillageGenerated);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,7 +75,7 @@ public class PopulateChunkEvent extends ChunkProviderEvent
|
|||
**/
|
||||
public static class Post extends PopulateChunkEvent
|
||||
{
|
||||
public Post(IChunkProvider chunkProvider, World world, Random rand, int chunkX, int chunkZ, boolean hasVillageGenerated)
|
||||
public Post(IChunkGenerator chunkProvider, World world, Random rand, int chunkX, int chunkZ, boolean hasVillageGenerated)
|
||||
{
|
||||
super(chunkProvider, world, rand, chunkX, chunkZ, hasVillageGenerated);
|
||||
}
|
||||
|
@ -105,9 +106,9 @@ public class PopulateChunkEvent extends ChunkProviderEvent
|
|||
|
||||
public final EventType type;
|
||||
|
||||
public Populate(IChunkProvider chunkProvider, World world, Random rand, int chunkX, int chunkZ, boolean hasVillageGenerated, EventType type)
|
||||
public Populate(IChunkGenerator gen, World world, Random rand, int chunkX, int chunkZ, boolean hasVillageGenerated, EventType type)
|
||||
{
|
||||
super(chunkProvider, world, rand, chunkX, chunkZ, hasVillageGenerated);
|
||||
super(gen, world, rand, chunkX, chunkZ, hasVillageGenerated);
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.Random;
|
|||
import net.minecraftforge.fml.common.eventhandler.Event.*;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkGenerator;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.MapGenBase;
|
||||
import net.minecraft.world.gen.NoiseGenerator;
|
||||
|
@ -15,11 +16,11 @@ import net.minecraftforge.event.terraingen.PopulateChunkEvent.*;
|
|||
|
||||
public abstract class TerrainGen
|
||||
{
|
||||
public static NoiseGenerator[] getModdedNoiseGenerators(World world, Random rand, NoiseGenerator[] original)
|
||||
public static <T extends InitNoiseGensEvent.Context> T getModdedNoiseGenerators(World world, Random rand, T original)
|
||||
{
|
||||
InitNoiseGensEvent event = new InitNoiseGensEvent(world, rand, original);
|
||||
InitNoiseGensEvent<T> event = new InitNoiseGensEvent<T>(world, rand, original);
|
||||
MinecraftForge.TERRAIN_GEN_BUS.post(event);
|
||||
return event.newNoiseGens;
|
||||
return event.getNewValues();
|
||||
}
|
||||
|
||||
public static MapGenBase getModdedMapGen(MapGenBase original, InitMapGenEvent.EventType type)
|
||||
|
@ -29,7 +30,7 @@ public abstract class TerrainGen
|
|||
return event.newGen;
|
||||
}
|
||||
|
||||
public static boolean populate(IChunkProvider chunkProvider, World world, Random rand, int chunkX, int chunkZ, boolean hasVillageGenerated, Populate.EventType type)
|
||||
public static boolean populate(IChunkGenerator chunkProvider, World world, Random rand, int chunkX, int chunkZ, boolean hasVillageGenerated, Populate.EventType type)
|
||||
{
|
||||
PopulateChunkEvent.Populate event = new PopulateChunkEvent.Populate(chunkProvider, world, rand, chunkX, chunkZ, hasVillageGenerated, type);
|
||||
MinecraftForge.TERRAIN_GEN_BUS.post(event);
|
||||
|
|
|
@ -15,6 +15,7 @@ package net.minecraftforge.fml.common;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkGenerator;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
|
||||
|
||||
|
@ -37,5 +38,5 @@ public interface IWorldGenerator
|
|||
* @param chunkProvider : additionalData[2] {@link IChunkProvider} that is requesting the world generation.
|
||||
*
|
||||
*/
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider);
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider);
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkGenerator;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraftforge.fml.common.FMLLog;
|
||||
import net.minecraftforge.fml.common.IFuelHandler;
|
||||
|
@ -94,7 +95,7 @@ public class GameRegistry
|
|||
* @param chunkGenerator The chunk generator
|
||||
* @param chunkProvider The chunk provider
|
||||
*/
|
||||
public static void generateWorld(int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
|
||||
public static void generateWorld(int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider)
|
||||
{
|
||||
if (sortedGeneratorList == null)
|
||||
{
|
||||
|
|
|
@ -19,8 +19,8 @@ net/minecraft/world/biome/BiomeGenBase.<init>(IZ)V=|p_i1971_1_,register
|
|||
net/minecraft/world/chunk/storage/AnvilChunkLoader.loadChunk__Async(Lnet/minecraft/world/World;II)[Ljava/lang/Object;=|p_75815_1_,p_75815_2_,p_75815_3_
|
||||
net/minecraft/world/chunk/storage/AnvilChunkLoader.checkedReadChunkFromNBT__Async(Lnet/minecraft/world/World;IILnet/minecraft/nbt/NBTTagCompound;)[Ljava/lang/Object;=|p_75822_1_,p_75822_2_,p_75822_3_,p_75822_4_
|
||||
net/minecraft/world/chunk/storage/AnvilChunkLoader.loadEntities(Lnet/minecraft/world/World;Lnet/minecraft/nbt/NBTTagCompound;Lnet/minecraft/world/chunk/Chunk;)V=|p_75823_1_,p_75823_2_,chunk
|
||||
net/minecraft/world/gen/ChunkProviderServer.loadChunk(II;Ljava/lang/Runnable;)Lnet/minecraft/world/chunk/Chunk;=|p_73158_1,p_73158_2,runnable
|
||||
net/minecraft/world/gen/ChunkProviderServer.originalLoadChunk(II)Lnet/minecraft/world/chunk/Chunk;=|p_73158_1_,p_73158_2_
|
||||
net/minecraft/world/gen/ChunkProviderServer.loadChunk(II;Ljava/lang/Runnable;)Lnet/minecraft/world/chunk/Chunk;=|p_186025_1_,p_186025_2_,runnable
|
||||
net/minecraft/world/gen/ChunkProviderServer.originalLoadChunk(II)Lnet/minecraft/world/chunk/Chunk;=|p_186025_1_,p_186025_2_
|
||||
|
||||
net/minecraft/block/BlockFire.tryCatchFire(Lnet/minecraft/world/World;Lnet/minecraft/util/BlockPos;ILjava/util/Random;ILnet/minecraft/util/EnumFacing;)V=|p_176536_1_,p_176536_2_,p_176536_3_,p_176536_4_,p_176536_5_,face
|
||||
net/minecraft/block/BlockSkull.getDrops(Lnet/minecraft/world/IBlockAccess;Lnet/minecraft/util/BlockPos;Lnet/minecraft/block/state/IBlockState;I)Ljava/util/List;=|p_180663_1_,p_180663_2_,p_180663_3_,fortune
|
||||
|
|
|
@ -234,3 +234,33 @@ protected net.minecraft.client.gui.FontRenderer func_78277_a(CZ)F # renderUnicod
|
|||
# ServerConfigurationManager
|
||||
#public net.minecraft.server.management.ServerConfigurationManager field_72404_b #playerEntityList - private in 1.8.8
|
||||
#public net.minecraft.server.management.ServerConfigurationManager field_177454_f #uuidToPlayerMap - private in 1.8.8
|
||||
|
||||
# ChunkProviderEnd
|
||||
private-f net/minecraft/world/gen/ChunkProviderEnd/field_185969_i #lperlin1
|
||||
private-f net/minecraft/world/gen/ChunkProviderEnd/field_185970_j #lperlin2
|
||||
private-f net/minecraft/world/gen/ChunkProviderEnd/field_185971_k #perlin
|
||||
private-f net/minecraft/world/gen/ChunkProviderEnd/field_185973_o #island
|
||||
|
||||
# ChunkProviderOverworld
|
||||
private-f net/minecraft/world/gen/ChunkProviderOverworld/field_185991_j #lperlin1
|
||||
private-f net/minecraft/world/gen/ChunkProviderOverworld/field_185992_k #lperlin2
|
||||
private-f net/minecraft/world/gen/ChunkProviderOverworld/field_185993_l #perlin
|
||||
private-f net/minecraft/world/gen/ChunkProviderOverworld/field_185994_m #surface
|
||||
private-f net/minecraft/world/gen/ChunkProviderOverworld/field_185979_A #ravineGenerator
|
||||
private-f net/minecraft/world/gen/ChunkProviderOverworld/field_185980_B #oceanMonumentGenerator
|
||||
private-f net/minecraft/world/gen/ChunkProviderOverworld/field_186003_v #caveGenerator
|
||||
private-f net/minecraft/world/gen/ChunkProviderOverworld/field_186004_w #strongholdGenerator
|
||||
private-f net/minecraft/world/gen/ChunkProviderOverworld/field_186005_x #villageGenerator
|
||||
private-f net/minecraft/world/gen/ChunkProviderOverworld/field_186006_y #mineshaftGenerator
|
||||
private-f net/minecraft/world/gen/ChunkProviderOverworld/field_186007_z #scatteredFeatureGenerator
|
||||
|
||||
# ChunkProviderHell
|
||||
private-f net/minecraft/world/gen/ChunkProviderHell/field_185957_u #lperlin1
|
||||
private-f net/minecraft/world/gen/ChunkProviderHell/field_185958_v #lperlin2
|
||||
private-f net/minecraft/world/gen/ChunkProviderHell/field_185959_w #perlin
|
||||
private-f net/minecraft/world/gen/ChunkProviderHell/field_73177_m #perlin2
|
||||
private-f net/minecraft/world/gen/ChunkProviderHell/field_73174_n #perlin3
|
||||
public-f net/minecraft/world/gen/ChunkProviderHell/field_185946_g #scale
|
||||
public-f net/minecraft/world/gen/ChunkProviderHell/field_185947_h #depth
|
||||
private-f net/minecraft/world/gen/ChunkProviderHell/field_185939_I #netherCaveGenerator
|
||||
private-f net/minecraft/world/gen/ChunkProviderHell/field_73172_c #netherBridgeGenerator
|
Loading…
Reference in a new issue