@@ -1,10 +1,12 @@
|
||||
--- a/net/minecraft/server/EntitySheep.java
|
||||
+++ b/net/minecraft/server/EntitySheep.java
|
||||
@@ -8,10 +8,16 @@
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/entity/animal/EntitySheep.java
|
||||
+++ b/net/minecraft/world/entity/animal/EntitySheep.java
|
||||
@@ -60,10 +60,18 @@
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import net.minecraft.world.level.storage.loot.LootTables;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.inventory.InventoryCraftResult;
|
||||
+import net.minecraft.world.item.Item;
|
||||
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
+import org.bukkit.event.entity.SheepRegrowWoolEvent;
|
||||
+import org.bukkit.inventory.InventoryView;
|
||||
@@ -18,7 +20,7 @@
|
||||
enummap.put(EnumColor.WHITE, Blocks.WHITE_WOOL);
|
||||
enummap.put(EnumColor.ORANGE, Blocks.ORANGE_WOOL);
|
||||
enummap.put(EnumColor.MAGENTA, Blocks.MAGENTA_WOOL);
|
||||
@@ -138,6 +144,11 @@
|
||||
@@ -190,6 +198,11 @@
|
||||
|
||||
if (itemstack.getItem() == Items.SHEARS) {
|
||||
if (!this.world.isClientSide && this.canShear()) {
|
||||
@@ -30,7 +32,7 @@
|
||||
this.shear(SoundCategory.PLAYERS);
|
||||
itemstack.damage(1, entityhuman, (entityhuman1) -> {
|
||||
entityhuman1.broadcastItemBreak(enumhand);
|
||||
@@ -158,7 +169,9 @@
|
||||
@@ -210,7 +223,9 @@
|
||||
int i = 1 + this.random.nextInt(3);
|
||||
|
||||
for (int j = 0; j < i; ++j) {
|
||||
@@ -40,7 +42,7 @@
|
||||
|
||||
if (entityitem != null) {
|
||||
entityitem.setMot(entityitem.getMot().add((double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.1F), (double) (this.random.nextFloat() * 0.05F), (double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.1F)));
|
||||
@@ -248,6 +261,12 @@
|
||||
@@ -300,6 +315,12 @@
|
||||
|
||||
@Override
|
||||
public void blockEaten() {
|
||||
@@ -53,7 +55,7 @@
|
||||
this.setSheared(false);
|
||||
if (this.isBaby()) {
|
||||
this.setAge(60);
|
||||
@@ -266,7 +285,7 @@
|
||||
@@ -318,7 +339,7 @@
|
||||
EnumColor enumcolor = ((EntitySheep) entityanimal).getColor();
|
||||
EnumColor enumcolor1 = ((EntitySheep) entityanimal1).getColor();
|
||||
InventoryCrafting inventorycrafting = a(enumcolor, enumcolor1);
|
||||
@@ -62,7 +64,7 @@
|
||||
return recipecrafting.a(inventorycrafting);
|
||||
}).map(ItemStack::getItem);
|
||||
|
||||
@@ -284,10 +303,18 @@
|
||||
@@ -336,10 +357,18 @@
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user