2019-12-04 06:58:22 +01:00
--- a/net/minecraft/server/MobSpawnerTrader.java
+++ b/net/minecraft/server/MobSpawnerTrader.java
2020-06-25 02:00:00 +02:00
@@ -83,7 +83,7 @@
2019-12-04 06:58:22 +01:00
return false;
}
2020-06-25 02:00:00 +02:00
- EntityVillagerTrader entityvillagertrader = (EntityVillagerTrader) EntityTypes.WANDERING_TRADER.spawnCreature(worldserver, (NBTTagCompound) null, (IChatBaseComponent) null, (EntityHuman) null, blockposition2, EnumMobSpawn.EVENT, false, false);
+ EntityVillagerTrader entityvillagertrader = (EntityVillagerTrader) EntityTypes.WANDERING_TRADER.spawnCreature(worldserver, (NBTTagCompound) null, (IChatBaseComponent) null, (EntityHuman) null, blockposition2, EnumMobSpawn.EVENT, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
2019-12-04 06:58:22 +01:00
if (entityvillagertrader != null) {
for (int i = 0; i < 2; ++i) {
2021-02-15 09:30:15 +01:00
@@ -91,7 +91,7 @@
}
this.b.a(entityvillagertrader.getUniqueID());
- entityvillagertrader.u(48000);
+ // entityvillagertrader.u(48000); // CraftBukkit - moved to EntityVillagerTrader constructor. This lets the value be modified by plugins on CreatureSpawnEvent
entityvillagertrader.g(blockposition1);
entityvillagertrader.a(blockposition1, 16);
return true;
2020-06-25 02:00:00 +02:00
@@ -106,7 +106,7 @@
2020-08-11 23:00:00 +02:00
BlockPosition blockposition = this.a((IWorldReader) worldserver, entityvillagertrader.getChunkCoordinates(), i);
2019-12-04 06:58:22 +01:00
if (blockposition != null) {
2020-08-11 23:00:00 +02:00
- EntityLlamaTrader entityllamatrader = (EntityLlamaTrader) EntityTypes.TRADER_LLAMA.spawnCreature(worldserver, (NBTTagCompound) null, (IChatBaseComponent) null, (EntityHuman) null, blockposition, EnumMobSpawn.EVENT, false, false);
+ EntityLlamaTrader entityllamatrader = (EntityLlamaTrader) EntityTypes.TRADER_LLAMA.spawnCreature(worldserver, (NBTTagCompound) null, (IChatBaseComponent) null, (EntityHuman) null, blockposition, EnumMobSpawn.EVENT, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
2019-12-04 06:58:22 +01:00
if (entityllamatrader != null) {
entityllamatrader.setLeashHolder(entityvillagertrader, true);