mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-15 14:13:56 +01:00
Only set despawnTimer for Wandering Traders spawned by WanderingTraderSpawner
This commit is contained in:
parent
90366d505a
commit
4ced264ab6
2 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@
|
|||
|
||||
public WanderingTrader(EntityType<? extends WanderingTrader> type, Level world) {
|
||||
super(type, world);
|
||||
+ this.setDespawnDelay(48000); // CraftBukkit - set default from MobSpawnerTrader
|
||||
+ //this.setDespawnDelay(48000); // CraftBukkit - set default from MobSpawnerTrader // Paper - move back to MobSpawnerTrader - Vanilla behavior is that only traders spawned by it have this value set.
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
}
|
||||
|
||||
- WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, blockposition2, EntitySpawnReason.EVENT);
|
||||
+ WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, blockposition2, EntitySpawnReason.EVENT, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
|
||||
+ WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, trader -> trader.setDespawnDelay(48000), blockposition2, EntitySpawnReason.EVENT, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit // Paper - set despawnTimer before spawn events called
|
||||
|
||||
if (entityvillagertrader != null) {
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
|
|
Loading…
Reference in a new issue