mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
cab333b217
Don't send requests of every player was found in the global api cache SpigotMC/Spigot@841270ff1e Correctly set the response code for the cached lookups and return the ... SpigotMC/Spigot@f170b7899c Don't try and re-set the global api cache on reload SpigotMC/Spigot@b410a00a66 Use a compile time sneaky throw hack. SpigotMC/Spigot@508462b96b Fix a missed rename in WorldGenGroundBush SpigotMC/Spigot@0614d8fae9
39 lines
1.9 KiB
Diff
39 lines
1.9 KiB
Diff
From 8918932f19329e049f824f9d2a227b2b11632be2 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 bec5aa8..222e3ac 100644
|
|
--- 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
|
|
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 );
|
|
+ }
|
|
}
|
|
--
|
|
1.9.1
|
|
|