19972e09b8
5a0150f586ed3eb15fe6f1f596d1a5a7d806f0f9 Fix ITEM_BREAK e6a3911057bd94d8bd7021cbb4923fb84fb106d1 Upstream merge d1cdcf8d4c3639f956474f02ed662517cffbe23e Remove old patch 068df64aeee368377e1673667bffc7a6dcf90554 Rebuild all patches
39 lines
1.9 KiB
Diff
39 lines
1.9 KiB
Diff
From c39b1e98057b0fa00d788e6da9c6c99e06503763 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 7565dfb..368d67c 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockPortal.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockPortal.java
|
|
@@ -16,7 +16,7 @@ public class BlockPortal extends BlockHalfTransparent {
|
|
|
|
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();
|
|
|
|
BlockPosition blockposition1;
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
index d7766bb..5c1d59c 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
@@ -259,4 +259,11 @@ public class SpigotWorldConfig
|
|
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 );
|
|
+ }
|
|
}
|
|
--
|
|
2.1.0
|
|
|