3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 06:40:07 +01:00
Paper/nms-patches/EntityCat.patch

42 Zeilen
2.3 KiB
Diff

2019-04-23 04:00:00 +02:00
--- a/net/minecraft/server/EntityCat.java
+++ b/net/minecraft/server/EntityCat.java
2020-06-25 02:00:00 +02:00
@@ -15,7 +15,7 @@
private static final DataWatcherObject<Boolean> bA = DataWatcher.a(EntityCat.class, DataWatcherRegistry.i);
private static final DataWatcherObject<Boolean> bB = DataWatcher.a(EntityCat.class, DataWatcherRegistry.i);
private static final DataWatcherObject<Integer> bC = DataWatcher.a(EntityCat.class, DataWatcherRegistry.b);
- public static final Map<Integer, MinecraftKey> bx = (Map) SystemUtils.a((Object) Maps.newHashMap(), (hashmap) -> {
+ public static final Map<Integer, MinecraftKey> bx = (Map) SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // CraftBukkit - decompile error
2019-04-23 04:00:00 +02:00
hashmap.put(0, new MinecraftKey("textures/entity/cat/tabby.png"));
hashmap.put(1, new MinecraftKey("textures/entity/cat/black.png"));
hashmap.put(2, new MinecraftKey("textures/entity/cat/red.png"));
2020-06-25 02:00:00 +02:00
@@ -341,7 +341,7 @@
2019-12-10 23:00:00 +01:00
}
2020-06-25 02:00:00 +02:00
} else if (this.k(itemstack)) {
2019-12-10 23:00:00 +01:00
this.a(entityhuman, itemstack);
- if (this.random.nextInt(3) == 0) {
+ if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) { // CraftBukkit
this.tame(entityhuman);
2020-06-25 02:00:00 +02:00
this.setWillSit(true);
2019-12-10 23:00:00 +01:00
this.world.broadcastEntityEffect(this, (byte) 7);
2020-06-25 02:00:00 +02:00
@@ -529,7 +529,7 @@
2019-04-23 04:00:00 +02:00
static class PathfinderGoalTemptChance extends PathfinderGoalTempt {
@Nullable
- private EntityHuman chosenTarget;
+ private EntityLiving chosenTarget; // CraftBukkit
private final EntityCat d;
public PathfinderGoalTemptChance(EntityCat entitycat, double d0, RecipeItemStack recipeitemstack, boolean flag) {
2020-06-25 02:00:00 +02:00
@@ -564,9 +564,9 @@
2019-04-23 04:00:00 +02:00
private final EntityCat i;
public a(EntityCat entitycat, Class<T> oclass, float f, double d0, double d1) {
- Predicate predicate = IEntitySelector.e;
+ // Predicate predicate = IEntitySelector.e; // CraftBukkit - decompile error
- super(entitycat, oclass, f, d0, d1, predicate::test);
+ super(entitycat, oclass, f, d0, d1, IEntitySelector.e::test); // CraftBukkit - decompile error
this.i = entitycat;
}