fixed villages generation, fix #1458
This commit is contained in:
parent
30b00a3a2a
commit
aa65b484ac
2 changed files with 28 additions and 25 deletions
|
@ -8,17 +8,17 @@
|
|||
*/
|
||||
package buildcraft.core;
|
||||
|
||||
import buildcraft.BuildCraftCore;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.event.terraingen.PopulateChunkEvent;
|
||||
import net.minecraftforge.event.terraingen.TerrainGen;
|
||||
import buildcraft.BuildCraftCore;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class SpringPopulate {
|
||||
|
||||
|
@ -28,6 +28,7 @@ public class SpringPopulate {
|
|||
boolean doGen = TerrainGen.populate(event.chunkProvider, event.world, event.rand, event.chunkX, event.chunkX, event.hasVillageGenerated, PopulateChunkEvent.Populate.EventType.CUSTOM);
|
||||
|
||||
if (!doGen) {
|
||||
event.setResult(Result.ALLOW);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,14 +8,15 @@
|
|||
*/
|
||||
package buildcraft.energy.worldgen;
|
||||
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.BuildCraftEnergy;
|
||||
import static net.minecraftforge.common.BiomeDictionary.Type.DESERT;
|
||||
import static net.minecraftforge.common.BiomeDictionary.Type.FOREST;
|
||||
import static net.minecraftforge.common.BiomeDictionary.Type.FROZEN;
|
||||
import static net.minecraftforge.common.BiomeDictionary.Type.WASTELAND;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -24,17 +25,17 @@ import net.minecraft.world.World;
|
|||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
import static net.minecraftforge.common.BiomeDictionary.Type.DESERT;
|
||||
import static net.minecraftforge.common.BiomeDictionary.Type.FOREST;
|
||||
import static net.minecraftforge.common.BiomeDictionary.Type.FROZEN;
|
||||
import static net.minecraftforge.common.BiomeDictionary.Type.WASTELAND;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.event.terraingen.PopulateChunkEvent;
|
||||
import net.minecraftforge.event.terraingen.PopulateChunkEvent.Populate.EventType;
|
||||
import net.minecraftforge.event.terraingen.TerrainGen;
|
||||
import net.minecraftforge.fluids.BlockFluidBase;
|
||||
import net.minecraftforge.fluids.IFluidBlock;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.BuildCraftEnergy;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class OilPopulate {
|
||||
|
||||
|
@ -65,6 +66,7 @@ public class OilPopulate {
|
|||
boolean doGen = TerrainGen.populate(event.chunkProvider, event.world, event.rand, event.chunkX, event.chunkX, event.hasVillageGenerated, EVENT_TYPE);
|
||||
|
||||
if (!doGen) {
|
||||
event.setResult(Result.ALLOW);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue