Fire PopulateChunkEvent Pre and Post in ChunkProviderFlat. Closes #2050
This commit is contained in:
parent
c0840da355
commit
357d2f8d86
|
@ -0,0 +1,29 @@
|
||||||
|
--- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderFlat.java
|
||||||
|
+++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderFlat.java
|
||||||
|
@@ -163,6 +163,7 @@
|
||||||
|
|
||||||
|
public void func_185931_b(int p_185931_1_, int p_185931_2_)
|
||||||
|
{
|
||||||
|
+ net.minecraft.block.BlockFalling.field_149832_M = true;
|
||||||
|
int i = p_185931_1_ * 16;
|
||||||
|
int j = p_185931_2_ * 16;
|
||||||
|
BlockPos blockpos = new BlockPos(i, 0, j);
|
||||||
|
@@ -174,6 +175,8 @@
|
||||||
|
this.field_73161_b.setSeed((long)p_185931_1_ * k + (long)p_185931_2_ * l ^ this.field_73163_a.func_72905_C());
|
||||||
|
ChunkPos chunkpos = new ChunkPos(p_185931_1_, p_185931_2_);
|
||||||
|
|
||||||
|
+ net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(true, this, this.field_73163_a, this.field_73161_b, p_185931_1_, p_185931_2_, flag);
|
||||||
|
+
|
||||||
|
for (MapGenStructure mapgenstructure : this.field_82696_f)
|
||||||
|
{
|
||||||
|
boolean flag1 = mapgenstructure.func_175794_a(this.field_73163_a, this.field_73161_b, chunkpos);
|
||||||
|
@@ -211,6 +214,9 @@
|
||||||
|
{
|
||||||
|
biome.func_180624_a(this.field_73163_a, this.field_73161_b, blockpos);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(false, this, this.field_73163_a, this.field_73161_b, p_185931_1_, p_185931_2_, flag);
|
||||||
|
+ net.minecraft.block.BlockFalling.field_149832_M = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean func_185933_a(Chunk p_185933_1_, int p_185933_2_, int p_185933_3_)
|
Loading…
Reference in New Issue