diff options
Diffstat (limited to 'patch-remap/og/net/minecraft/world/entity/npc/MobSpawnerTrader.patch')
-rw-r--r-- | patch-remap/og/net/minecraft/world/entity/npc/MobSpawnerTrader.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/entity/npc/MobSpawnerTrader.patch b/patch-remap/og/net/minecraft/world/entity/npc/MobSpawnerTrader.patch new file mode 100644 index 0000000000..c19f83c2c8 --- /dev/null +++ b/patch-remap/og/net/minecraft/world/entity/npc/MobSpawnerTrader.patch @@ -0,0 +1,29 @@ +--- a/net/minecraft/world/entity/npc/MobSpawnerTrader.java ++++ b/net/minecraft/world/entity/npc/MobSpawnerTrader.java +@@ -110,7 +110,7 @@ + return false; + } + +- EntityVillagerTrader entityvillagertrader = (EntityVillagerTrader) EntityTypes.WANDERING_TRADER.spawn(worldserver, blockposition2, EnumMobSpawn.EVENT); ++ EntityVillagerTrader entityvillagertrader = (EntityVillagerTrader) EntityTypes.WANDERING_TRADER.spawn(worldserver, blockposition2, EnumMobSpawn.EVENT, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit + + if (entityvillagertrader != null) { + for (int i = 0; i < 2; ++i) { +@@ -118,7 +118,7 @@ + } + + this.serverLevelData.setWanderingTraderId(entityvillagertrader.getUUID()); +- entityvillagertrader.setDespawnDelay(48000); ++ // entityvillagertrader.setDespawnDelay(48000); // CraftBukkit - moved to EntityVillagerTrader constructor. This lets the value be modified by plugins on CreatureSpawnEvent + entityvillagertrader.setWanderTarget(blockposition1); + entityvillagertrader.restrictTo(blockposition1, 16); + return true; +@@ -133,7 +133,7 @@ + BlockPosition blockposition = this.findSpawnPositionNear(worldserver, entityvillagertrader.blockPosition(), i); + + if (blockposition != null) { +- EntityLlamaTrader entityllamatrader = (EntityLlamaTrader) EntityTypes.TRADER_LLAMA.spawn(worldserver, blockposition, EnumMobSpawn.EVENT); ++ EntityLlamaTrader entityllamatrader = (EntityLlamaTrader) EntityTypes.TRADER_LLAMA.spawn(worldserver, blockposition, EnumMobSpawn.EVENT, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit + + if (entityllamatrader != null) { + entityllamatrader.setLeashedTo(entityvillagertrader, true); |