2016-03-01 00:23:45 +00:00
|
|
|
From 293c8c84dca0a789d28c3dcdefa8c9b46f77467a Mon Sep 17 00:00:00 2001
|
2014-07-21 20:46:54 +00: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
|
2016-02-29 21:33:06 +00:00
|
|
|
index 05f0719..d85335b 100644
|
2014-07-21 20:46:54 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/BlockPortal.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BlockPortal.java
|
2016-02-29 21:33:06 +00:00
|
|
|
@@ -35,7 +35,7 @@ public class BlockPortal extends BlockHalfTransparent {
|
2014-07-21 20:46:54 +00:00
|
|
|
|
2014-11-28 01:17:45 +00:00
|
|
|
public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
|
|
|
|
super.b(world, blockposition, iblockdata, random);
|
|
|
|
- if (world.worldProvider.d() && world.getGameRules().getBoolean("doMobSpawning") && random.nextInt(2000) < world.getDifficulty().a()) {
|
|
|
|
+ if (world.spigotConfig.enableZombiePigmenPortalSpawns && world.worldProvider.d() && world.getGameRules().getBoolean("doMobSpawning") && random.nextInt(2000) < world.getDifficulty().a()) { // Spigot
|
|
|
|
int i = blockposition.getY();
|
2014-07-21 20:46:54 +00:00
|
|
|
|
2014-11-28 01:17:45 +00:00
|
|
|
BlockPosition blockposition1;
|
2014-07-21 20:46:54 +00:00
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
2016-02-29 21:33:06 +00:00
|
|
|
index 3854195..4cca76a 100644
|
2014-07-21 20:46:54 +00:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
2016-02-29 21:33:06 +00:00
|
|
|
@@ -217,4 +217,11 @@ public class SpigotWorldConfig
|
2014-07-21 20:46:54 +00:00
|
|
|
nerfSpawnerMobs = getBoolean( "nerf-spawner-mobs", false );
|
|
|
|
log( "Nerfing mobs spawned from spawners: " + nerfSpawnerMobs );
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean enableZombiePigmenPortalSpawns;
|
|
|
|
+ private void enableZombiePigmenPortalSpawns()
|
|
|
|
+ {
|
|
|
|
+ enableZombiePigmenPortalSpawns = getBoolean( "enable-zombie-pigmen-portal-spawns", true );
|
|
|
|
+ log( "Allow Zombie Pigmen to spawn from portal blocks: " + enableZombiePigmenPortalSpawns );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2016-02-29 21:33:06 +00:00
|
|
|
2.5.0
|
2014-07-21 20:46:54 +00:00
|
|
|
|