mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Let parrots breed using any tempting item
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Breedable parrots
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java b/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java
|
||||
index 2f51e80a02817f1e36c8fe9542809ab881263a16..cdfcf27953f8bc53b4fa1d0f813970d6f4fc68ef 100644
|
||||
index 2f51e80a02817f1e36c8fe9542809ab881263a16..abfb08ff562ef4c8971b12f6f64ede08dca15cd0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java
|
||||
@@ -44,6 +44,7 @@ import net.minecraft.world.entity.GroupDataEntity;
|
||||
@@ -16,6 +16,15 @@ index 2f51e80a02817f1e36c8fe9542809ab881263a16..cdfcf27953f8bc53b4fa1d0f813970d6
|
||||
import net.minecraft.world.entity.ai.goal.PathfinderGoalFloat;
|
||||
import net.minecraft.world.entity.ai.goal.PathfinderGoalFollowEntity;
|
||||
import net.minecraft.world.entity.ai.goal.PathfinderGoalFollowOwner;
|
||||
@@ -75,7 +76,7 @@ public class EntityParrot extends EntityPerchable implements EntityBird {
|
||||
}
|
||||
};
|
||||
private static final Item bw = Items.COOKIE;
|
||||
- private static final Set<Item> bx = Sets.newHashSet(new Item[]{Items.WHEAT_SEEDS, Items.MELON_SEEDS, Items.PUMPKIN_SEEDS, Items.BEETROOT_SEEDS});
|
||||
+ private static final Set<Item> bx = Sets.newHashSet(new Item[]{Items.WHEAT_SEEDS, Items.MELON_SEEDS, Items.PUMPKIN_SEEDS, Items.BEETROOT_SEEDS}); public static Set<Item> temptItems() { return bx; } // Purpur - OBFHELPER
|
||||
private static final Map<EntityTypes<?>, SoundEffect> by = (Map) SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // CraftBukkit - decompile error
|
||||
hashmap.put(EntityTypes.BLAZE, SoundEffects.ENTITY_PARROT_IMITATE_BLAZE);
|
||||
hashmap.put(EntityTypes.CAVE_SPIDER, SoundEffects.ENTITY_PARROT_IMITATE_SPIDER);
|
||||
@@ -205,6 +206,7 @@ public class EntityParrot extends EntityPerchable implements EntityBird {
|
||||
this.goalSelector.a(0, new PathfinderGoalFloat(this));
|
||||
this.goalSelector.a(0, new PathfinderGoalHasRider(this)); // Purpur
|
||||
@@ -37,7 +46,7 @@ index 2f51e80a02817f1e36c8fe9542809ab881263a16..cdfcf27953f8bc53b4fa1d0f813970d6
|
||||
@Override
|
||||
public boolean k(ItemStack itemstack) {
|
||||
- return false;
|
||||
+ return world.purpurConfig.parrotBreedable && itemstack.getItem() == Items.WHEAT_SEEDS;
|
||||
+ return world.purpurConfig.parrotBreedable && temptItems().contains(itemstack.getItem()); // Purpur
|
||||
}
|
||||
|
||||
public static boolean c(EntityTypes<EntityParrot> entitytypes, GeneratorAccess generatoraccess, EnumMobSpawn enummobspawn, BlockPosition blockposition, Random random) {
|
||||
|
||||
Reference in New Issue
Block a user