this part is important, too :3

This commit is contained in:
BillyGalbreath
2021-05-13 22:37:18 -05:00
parent 2015fe5f71
commit 09d98d3620

View File

@@ -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..f5007837f99c0f8cf941293c215516cd926fe999 100644
index 2f51e80a02817f1e36c8fe9542809ab881263a16..cdfcf27953f8bc53b4fa1d0f813970d6f4fc68ef 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;
@@ -24,7 +24,24 @@ index 2f51e80a02817f1e36c8fe9542809ab881263a16..f5007837f99c0f8cf941293c215516cd
this.goalSelector.a(1, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F));
this.goalSelector.a(2, new PathfinderGoalSit(this));
this.goalSelector.a(2, new PathfinderGoalFollowOwner(this, 1.0D, 5.0F, 1.0F, true));
@@ -353,7 +355,7 @@ public class EntityParrot extends EntityPerchable implements EntityBird {
@@ -309,6 +311,7 @@ public class EntityParrot extends EntityPerchable implements EntityBird {
}
}
+ if (world.purpurConfig.parrotBreedable) return super.b(entityhuman, enumhand); // Purpur
return EnumInteractionResult.a(this.world.isClientSide);
} else if (itemstack.getItem() == EntityParrot.bw) {
if (!entityhuman.abilities.canInstantlyBuild) {
@@ -334,7 +337,7 @@ public class EntityParrot extends EntityPerchable implements EntityBird {
@Override
public boolean k(ItemStack itemstack) {
- return false;
+ return world.purpurConfig.parrotBreedable && itemstack.getItem() == Items.WHEAT_SEEDS;
}
public static boolean c(EntityTypes<EntityParrot> entitytypes, GeneratorAccess generatoraccess, EnumMobSpawn enummobspawn, BlockPosition blockposition, Random random) {
@@ -353,13 +356,13 @@ public class EntityParrot extends EntityPerchable implements EntityBird {
@Override
public boolean mate(EntityAnimal entityanimal) {
@@ -33,6 +50,13 @@ index 2f51e80a02817f1e36c8fe9542809ab881263a16..f5007837f99c0f8cf941293c215516cd
}
@Nullable
@Override
public EntityAgeable createChild(WorldServer worldserver, EntityAgeable entityageable) {
- return null;
+ return worldserver.purpurConfig.parrotBreedable ? EntityTypes.PARROT.create(worldserver) : null; // Purpur
}
@Override
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index ffb8d505a723d61bd6311f4116524d9a99a27f62..db8b31972b38f907a53b4f63465c83d1f47f4dc3 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java