2014-03-09 23:14:45 +01:00
|
|
|
From d0df8fa002cb346745fc63550f641c258b39348b Mon Sep 17 00:00:00 2001
|
2014-01-20 21:20:00 +01:00
|
|
|
From: Dmck2b <dmck2b+github@gmail.com>
|
|
|
|
Date: Mon, 20 Jan 2014 20:18:23 +0000
|
|
|
|
Subject: [PATCH] Allow toggling of ZombiePigmen spawning in portal blocks
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockPortal.java b/src/main/java/net/minecraft/server/BlockPortal.java
|
2014-02-12 14:48:26 +01:00
|
|
|
index bec5aa8..222e3ac 100644
|
2014-01-20 21:20:00 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/BlockPortal.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BlockPortal.java
|
|
|
|
@@ -15,7 +15,7 @@ public class BlockPortal extends BlockHalfTransparent {
|
|
|
|
|
|
|
|
public void a(World world, int i, int j, int k, Random random) {
|
|
|
|
super.a(world, i, j, k, random);
|
|
|
|
- if (world.worldProvider.d() && world.getGameRules().getBoolean("doMobSpawning") && random.nextInt(2000) < world.difficulty.a()) {
|
|
|
|
+ if (world.spigotConfig.enableZombiePigmenPortalSpawns && world.worldProvider.d() && world.getGameRules().getBoolean("doMobSpawning") && random.nextInt(2000) < world.difficulty.a()) { // Spigot
|
|
|
|
int l;
|
|
|
|
|
|
|
|
for (l = j; !World.a((IBlockAccess) world, i, l, k) && l > 0; --l) {
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
2014-03-09 22:37:28 +01:00
|
|
|
index 558e9cd..ffdb33e 100644
|
2014-01-20 21:20:00 +01:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
@@ -257,4 +257,11 @@ public class SpigotWorldConfig
|
|
|
|
nerfSpawnerMobs = getBoolean( "nerf-spawner-mobs", false );
|
2014-01-21 22:34:03 +01:00
|
|
|
log( "Nerfing mobs spawned from spawners: " + nerfSpawnerMobs );
|
2014-01-20 21:20:00 +01:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean enableZombiePigmenPortalSpawns;
|
|
|
|
+ private void enableZombiePigmenPortalSpawns()
|
|
|
|
+ {
|
|
|
|
+ enableZombiePigmenPortalSpawns = getBoolean( "enable-zombie-pigmen-portal-spawns", true );
|
2014-01-21 22:34:03 +01:00
|
|
|
+ log( "Allow Zombie Pigmen to spawn from portal blocks: " + enableZombiePigmenPortalSpawns );
|
2014-01-20 21:20:00 +01:00
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2014-03-09 22:37:28 +01:00
|
|
|
1.8.3.2
|
2014-01-20 21:20:00 +01:00
|
|
|
|