mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: 8fcef3c1f Return after sending empty commands (#5586) 2a67a9e51 Fix missing CraftMetaBook#toBuilder override 48aa06106 Add more Wandering Trader API (#5020) 8cec462a5 [CI-SKIP] Remove Astei from the MIT list (#5577)
This commit is contained in:
@@ -5367,7 +5367,7 @@ index d3032682af94428419daa02f55b6040090d8df73..a0f0d5e0909da5cfe87078d4722b0306
|
||||
this.h(entityhuman);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillagerTrader.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillagerTrader.java
|
||||
index e0324cdb2d4c85714eaad490a7a5c826b38e6b16..90cbef7fe8803295f82bddd6709fdf303aedcaba 100644
|
||||
index 8df4d985e3124ddc1643da8385b15348937bc320..6c390fb20c7f29133a60780a75676d8d3d6eab29 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/EntityVillagerTrader.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillagerTrader.java
|
||||
@@ -6,6 +6,7 @@ import net.minecraft.core.BlockPosition;
|
||||
@@ -5378,15 +5378,15 @@ index e0324cdb2d4c85714eaad490a7a5c826b38e6b16..90cbef7fe8803295f82bddd6709fdf30
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.sounds.SoundEffect;
|
||||
import net.minecraft.sounds.SoundEffects;
|
||||
@@ -69,6 +70,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
|
||||
@@ -73,6 +74,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
|
||||
@Override
|
||||
protected void initPathfinder() {
|
||||
this.goalSelector.a(0, new PathfinderGoalFloat(this));
|
||||
+ this.goalSelector.a(0, new PathfinderGoalHasRider(this)); // Purpur
|
||||
this.goalSelector.a(0, new PathfinderGoalUseItem<>(this, PotionUtil.a(new ItemStack(Items.POTION), Potions.INVISIBILITY), SoundEffects.ENTITY_WANDERING_TRADER_DISAPPEARED, (entityvillagertrader) -> {
|
||||
return this.world.isNight() && !entityvillagertrader.isInvisible();
|
||||
return canDrinkPotion && this.world.isNight() && !entityvillagertrader.isInvisible(); // Paper - Add more WanderingTrader API
|
||||
}));
|
||||
@@ -94,6 +96,16 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
|
||||
@@ -98,6 +100,16 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
|
||||
}
|
||||
|
||||
// Purpur - start
|
||||
@@ -5403,7 +5403,7 @@ index e0324cdb2d4c85714eaad490a7a5c826b38e6b16..90cbef7fe8803295f82bddd6709fdf30
|
||||
@Override
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
return world.purpurConfig.villagerTraderCanBeLeashed && !this.isLeashed();
|
||||
@@ -121,8 +133,9 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
|
||||
@@ -125,8 +137,9 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
|
||||
}
|
||||
|
||||
if (this.getOffers().isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user