Commits
md_5 authored fb92f345d94
49 49 | this.setBaby(nbttagcompound.getBoolean("IsBaby")); |
50 50 | this.setCannotHunt(nbttagcompound.getBoolean("CannotHunt")); |
51 51 | this.inventory.fromTag(nbttagcompound.getList("Inventory", 10)); |
52 52 | + // CraftBukkit start |
53 53 | + this.allowedBarterItems = nbttagcompound.getList("Bukkit.BarterList", 8).stream().map(NBTBase::getAsString).map(MinecraftKey::tryParse).map(IRegistry.ITEM::get).collect(Collectors.toCollection(HashSet::new)); |
54 54 | + this.interestItems = nbttagcompound.getList("Bukkit.InterestList", 8).stream().map(NBTBase::getAsString).map(MinecraftKey::tryParse).map(IRegistry.ITEM::get).collect(Collectors.toCollection(HashSet::new)); |
55 55 | + // CraftBukkit end |
56 56 | } |
57 57 | |
58 58 | @VisibleForDebug |
59 + | |
60 + | |
61 + | @Override |
62 + | public boolean removeWhenFarAway(double d0) { |
63 + | - return !this.isPersistenceRequired(); |
64 + | + return true; // CraftBukkit - SPIGOT-6278 |
65 + | } |
66 + | |
67 + | @Override |
59 68 | |
60 69 | |
61 70 | @Override |
62 71 | public BehaviorController<EntityPiglin> getBrain() { |
63 72 | - return super.getBrain(); |
64 73 | + return (BehaviorController<EntityPiglin>) super.getBrain(); // CraftBukkit - Decompile error |
65 74 | } |
66 75 | |
67 76 | @Override |
68 77 | |