Files
CatServer/patches/net/minecraft/world/gen/ChunkGeneratorFlat.java.patch
2019-02-24 22:29:41 +08:00

30 lines
1.2 KiB
Diff

--- ../src-base/minecraft/net/minecraft/world/gen/ChunkGeneratorFlat.java
+++ ../src-work/minecraft/net/minecraft/world/gen/ChunkGeneratorFlat.java
@@ -162,6 +162,7 @@
public void populate(int x, int z)
{
+ net.minecraft.block.BlockFalling.fallInstantly = true;
int i = x * 16;
int j = z * 16;
BlockPos blockpos = new BlockPos(i, 0, j);
@@ -173,6 +174,8 @@
this.random.setSeed((long)x * k + (long)z * l ^ this.world.getSeed());
ChunkPos chunkpos = new ChunkPos(x, z);
+ net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(true, this, this.world, this.random, x, z, flag);
+
for (MapGenStructure mapgenstructure : this.structureGenerators.values())
{
boolean flag1 = mapgenstructure.generateStructure(this.world, this.random, chunkpos);
@@ -210,6 +213,9 @@
{
biome.decorate(this.world, this.random, blockpos);
}
+
+ net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(false, this, this.world, this.random, x, z, flag);
+ net.minecraft.block.BlockFalling.fallInstantly = false;
}
public boolean generateStructures(Chunk chunkIn, int x, int z)