mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
36 lines
1.2 KiB
Diff
36 lines
1.2 KiB
Diff
--- ../src_base/common/net/minecraft/src/ComponentVillage.java
|
|
+++ ../src_work/common/net/minecraft/src/ComponentVillage.java
|
|
@@ -2,6 +2,10 @@
|
|
|
|
import java.util.List;
|
|
import java.util.Random;
|
|
+
|
|
+import net.minecraftforge.common.*;
|
|
+import net.minecraftforge.event.Event.*;
|
|
+import net.minecraftforge.event.terraingen.*;
|
|
|
|
public abstract class ComponentVillage extends StructureComponent
|
|
{
|
|
@@ -133,6 +137,10 @@
|
|
*/
|
|
protected int getBiomeSpecificBlock(int par1, int par2)
|
|
{
|
|
+ BiomeEvent.GetVillageBlockID event = new BiomeEvent.GetVillageBlockID(startPiece.biome, par1, par2);
|
|
+ MinecraftForge.TERRAIN_GEN_BUS.post(event);
|
|
+ if (event.getResult() == Result.DENY) return event.replacement;
|
|
+
|
|
if (this.startPiece.inDesert)
|
|
{
|
|
if (par1 == Block.wood.blockID)
|
|
@@ -174,6 +182,10 @@
|
|
*/
|
|
protected int getBiomeSpecificBlockMetadata(int par1, int par2)
|
|
{
|
|
+ BiomeEvent.GetVillageBlockMeta event = new BiomeEvent.GetVillageBlockMeta(startPiece.biome, par1, par2);
|
|
+ MinecraftForge.TERRAIN_GEN_BUS.post(event);
|
|
+ if (event.getResult() == Result.DENY) return event.replacement;
|
|
+
|
|
if (this.startPiece.inDesert)
|
|
{
|
|
if (par1 == Block.wood.blockID)
|