SPIGOT-4338: breedCause API

This commit is contained in:
md_5 2018-09-01 19:28:12 +10:00
parent dc69d2b3db
commit 60d7982024
2 changed files with 15 additions and 2 deletions

View File

@ -1,9 +1,11 @@
--- a/net/minecraft/server/EntityAnimal.java
+++ b/net/minecraft/server/EntityAnimal.java
@@ -8,6 +8,7 @@
@@ -7,7 +7,8 @@
protected Block bF;
private int bC;
private UUID bD;
- private UUID bD;
+ public UUID bD; // PAIL
+ public ItemStack breedItem; // CraftBukkit - Add breedItem variable
protected EntityAnimal(EntityTypes<?> entitytypes, World world) {

View File

@ -1,5 +1,6 @@
package org.bukkit.craftbukkit.entity;
import java.util.UUID;
import net.minecraft.server.EntityAnimal;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.Animals;
@ -19,4 +20,14 @@ public class CraftAnimals extends CraftAgeable implements Animals {
public String toString() {
return "CraftAnimals";
}
@Override
public UUID getBreedCause() {
return getHandle().bD;
}
@Override
public void setBreedCause(UUID uuid) {
getHandle().bD = uuid;
}
}