@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityCaveSpider.java
|
||||
+++ b/net/minecraft/server/EntityCaveSpider.java
|
||||
@@ -25,7 +25,7 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityCaveSpider.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityCaveSpider.java
|
||||
@@ -41,7 +41,7 @@
|
||||
}
|
||||
|
||||
if (b0 > 0) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/EntityCreeper.java
|
||||
+++ b/net/minecraft/server/EntityCreeper.java
|
||||
@@ -3,6 +3,12 @@
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
--- a/net/minecraft/world/entity/monster/EntityCreeper.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityCreeper.java
|
||||
@@ -38,6 +38,12 @@
|
||||
import net.minecraft.world.level.IMaterial;
|
||||
import net.minecraft.world.level.World;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
@@ -13,7 +13,7 @@
|
||||
public class EntityCreeper extends EntityMonster {
|
||||
|
||||
private static final DataWatcherObject<Integer> b = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.b);
|
||||
@@ -165,9 +171,19 @@
|
||||
@@ -200,9 +206,19 @@
|
||||
@Override
|
||||
public void onLightningStrike(WorldServer worldserver, EntityLightning entitylightning) {
|
||||
super.onLightningStrike(worldserver, entitylightning);
|
||||
@@ -34,7 +34,7 @@
|
||||
@Override
|
||||
protected EnumInteractionResult b(EntityHuman entityhuman, EnumHand enumhand) {
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
@@ -192,10 +208,18 @@
|
||||
@@ -227,10 +243,18 @@
|
||||
Explosion.Effect explosion_effect = this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) ? Explosion.Effect.DESTROY : Explosion.Effect.NONE;
|
||||
float f = this.isPowered() ? 2.0F : 1.0F;
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -206,6 +230,7 @@
|
||||
@@ -241,6 +265,7 @@
|
||||
if (!collection.isEmpty()) {
|
||||
EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.locX(), this.locY(), this.locZ());
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
entityareaeffectcloud.setRadius(2.5F);
|
||||
entityareaeffectcloud.setRadiusOnUse(-0.5F);
|
||||
entityareaeffectcloud.setWaitTime(10);
|
||||
@@ -219,7 +244,7 @@
|
||||
@@ -254,7 +279,7 @@
|
||||
entityareaeffectcloud.addEffect(new MobEffect(mobeffect));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityEnderman.java
|
||||
+++ b/net/minecraft/server/EntityEnderman.java
|
||||
@@ -51,7 +51,17 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityEnderman.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityEnderman.java
|
||||
@@ -105,7 +105,17 @@
|
||||
|
||||
@Override
|
||||
public void setGoalTarget(@Nullable EntityLiving entityliving) {
|
||||
@@ -19,7 +19,7 @@
|
||||
AttributeModifiable attributemodifiable = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
||||
|
||||
if (entityliving == null) {
|
||||
@@ -66,6 +76,7 @@
|
||||
@@ -120,6 +130,7 @@
|
||||
attributemodifiable.b(EntityEnderman.c);
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -359,8 +370,12 @@
|
||||
@@ -413,8 +424,12 @@
|
||||
boolean flag = movingobjectpositionblock.getBlockPosition().equals(blockposition);
|
||||
|
||||
if (block.a((Tag) TagsBlock.ENDERMAN_HOLDABLE) && flag) {
|
||||
@@ -42,7 +42,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -395,8 +410,12 @@
|
||||
@@ -449,8 +464,12 @@
|
||||
if (iblockdata2 != null) {
|
||||
iblockdata2 = Block.b(iblockdata2, (GeneratorAccess) this.a.world, blockposition);
|
||||
if (this.a(world, blockposition, iblockdata2, iblockdata, iblockdata1, blockposition1)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityGhast.java
|
||||
+++ b/net/minecraft/server/EntityGhast.java
|
||||
@@ -163,7 +163,8 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityGhast.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityGhast.java
|
||||
@@ -193,7 +193,8 @@
|
||||
|
||||
EntityLargeFireball entitylargefireball = new EntityLargeFireball(world, this.ghast, d2, d3, d4);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityGuardianElder.java
|
||||
+++ b/net/minecraft/server/EntityGuardianElder.java
|
||||
@@ -65,7 +65,7 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityGuardianElder.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityGuardianElder.java
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
if (!entityplayer.hasEffect(mobeffectlist) || entityplayer.getEffect(mobeffectlist).getAmplifier() < 2 || entityplayer.getEffect(mobeffectlist).getDuration() < 1200) {
|
||||
entityplayer.playerConnection.sendPacket(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.k, this.isSilent() ? 0.0F : 1.0F));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityIllagerIllusioner.java
|
||||
+++ b/net/minecraft/server/EntityIllagerIllusioner.java
|
||||
@@ -30,7 +30,7 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityIllagerIllusioner.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityIllagerIllusioner.java
|
||||
@@ -67,7 +67,7 @@
|
||||
this.goalSelector.a(8, new PathfinderGoalRandomStroll(this, 0.6D));
|
||||
this.goalSelector.a(9, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 3.0F, 1.0F));
|
||||
this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F));
|
||||
@@ -9,7 +9,7 @@
|
||||
this.targetSelector.a(2, (new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)).a(300));
|
||||
this.targetSelector.a(3, (new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)).a(300));
|
||||
this.targetSelector.a(3, (new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, false)).a(300));
|
||||
@@ -169,7 +169,7 @@
|
||||
@@ -206,7 +206,7 @@
|
||||
|
||||
@Override
|
||||
protected void j() {
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -206,7 +206,7 @@
|
||||
@@ -243,7 +243,7 @@
|
||||
|
||||
@Override
|
||||
protected void j() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityIllagerWizard.java
|
||||
+++ b/net/minecraft/server/EntityIllagerWizard.java
|
||||
@@ -145,6 +145,11 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityIllagerWizard.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityIllagerWizard.java
|
||||
@@ -156,6 +156,11 @@
|
||||
public void e() {
|
||||
--this.b;
|
||||
if (this.b == 0) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityPhantom.java
|
||||
+++ b/net/minecraft/server/EntityPhantom.java
|
||||
@@ -207,7 +207,7 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityPhantom.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityPhantom.java
|
||||
@@ -243,7 +243,7 @@
|
||||
EntityHuman entityhuman = (EntityHuman) iterator.next();
|
||||
|
||||
if (EntityPhantom.this.a((EntityLiving) entityhuman, PathfinderTargetCondition.a)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityPigZombie.java
|
||||
+++ b/net/minecraft/server/EntityPigZombie.java
|
||||
@@ -35,7 +35,7 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityPigZombie.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityPigZombie.java
|
||||
@@ -69,7 +69,7 @@
|
||||
protected void m() {
|
||||
this.goalSelector.a(2, new PathfinderGoalZombieAttack(this, 1.0D, false));
|
||||
this.goalSelector.a(7, new PathfinderGoalRandomStrollLand(this, 1.0D));
|
||||
@@ -9,7 +9,7 @@
|
||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, this::a_));
|
||||
this.targetSelector.a(3, new PathfinderGoalUniversalAngerReset<>(this, true));
|
||||
}
|
||||
@@ -108,7 +108,7 @@
|
||||
@@ -142,7 +142,7 @@
|
||||
}).filter((entitypigzombie) -> {
|
||||
return !entitypigzombie.r(this.getGoalTarget());
|
||||
}).forEach((entitypigzombie) -> {
|
||||
@@ -18,7 +18,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
@@ -151,7 +151,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -27,7 +27,7 @@
|
||||
if (this.getGoalTarget() == null && entityliving != null) {
|
||||
this.bo = EntityPigZombie.d.a(this.random);
|
||||
this.bt = EntityPigZombie.bs.a(this.random);
|
||||
@@ -127,12 +127,21 @@
|
||||
@@ -161,12 +161,21 @@
|
||||
this.e((EntityHuman) entityliving);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityPillager.java
|
||||
+++ b/net/minecraft/server/EntityPillager.java
|
||||
@@ -22,7 +22,7 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityPillager.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityPillager.java
|
||||
@@ -70,7 +70,7 @@
|
||||
this.goalSelector.a(8, new PathfinderGoalRandomStroll(this, 0.6D));
|
||||
this.goalSelector.a(9, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 15.0F, 1.0F));
|
||||
this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 15.0F));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityRavager.java
|
||||
+++ b/net/minecraft/server/EntityRavager.java
|
||||
@@ -28,7 +28,7 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityRavager.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityRavager.java
|
||||
@@ -69,7 +69,7 @@
|
||||
this.goalSelector.a(5, new PathfinderGoalRandomStrollLand(this, 0.4D));
|
||||
this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F));
|
||||
this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F));
|
||||
@@ -9,12 +9,12 @@
|
||||
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
|
||||
this.targetSelector.a(4, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, true));
|
||||
this.targetSelector.a(4, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true));
|
||||
@@ -119,7 +119,7 @@
|
||||
@@ -160,7 +160,7 @@
|
||||
IBlockData iblockdata = this.world.getType(blockposition);
|
||||
Block block = iblockdata.getBlock();
|
||||
|
||||
- if (block instanceof BlockLeaves) {
|
||||
+ if (block instanceof BlockLeaves && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, Blocks.AIR.getBlockData()).isCancelled()) { // CraftBukkit
|
||||
+ if (block instanceof BlockLeaves && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, net.minecraft.world.level.block.Blocks.AIR.getBlockData()).isCancelled()) { // CraftBukkit
|
||||
flag = this.world.a(blockposition, true, this) || flag;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
--- a/net/minecraft/server/EntityShulker.java
|
||||
+++ b/net/minecraft/server/EntityShulker.java
|
||||
@@ -7,6 +7,11 @@
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/entity/monster/EntityShulker.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityShulker.java
|
||||
@@ -47,6 +47,12 @@
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.server.level.WorldServer;
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
+// CraftBukkit end
|
||||
@@ -12,7 +13,7 @@
|
||||
public class EntityShulker extends EntityGolem implements IMonster {
|
||||
|
||||
private static final UUID bp = UUID.fromString("7E0292F2-9434-48D5-A29F-9583AF7DF27F");
|
||||
@@ -31,7 +36,7 @@
|
||||
@@ -71,7 +77,7 @@
|
||||
this.goalSelector.a(4, new EntityShulker.a());
|
||||
this.goalSelector.a(7, new EntityShulker.e());
|
||||
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
|
||||
@@ -21,7 +22,7 @@
|
||||
this.targetSelector.a(2, new EntityShulker.d(this));
|
||||
this.targetSelector.a(3, new EntityShulker.c(this));
|
||||
}
|
||||
@@ -279,6 +284,16 @@
|
||||
@@ -319,6 +325,16 @@
|
||||
EnumDirection enumdirection = this.g(blockposition1);
|
||||
|
||||
if (enumdirection != null) {
|
||||
@@ -38,7 +39,7 @@
|
||||
this.datawatcher.set(EntityShulker.b, enumdirection);
|
||||
this.playSound(SoundEffects.ENTITY_SHULKER_TELEPORT, 1.0F, 1.0F);
|
||||
this.datawatcher.set(EntityShulker.c, Optional.of(blockposition1));
|
||||
@@ -319,6 +334,7 @@
|
||||
@@ -359,6 +375,7 @@
|
||||
}
|
||||
|
||||
this.g((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntitySilverfish.java
|
||||
+++ b/net/minecraft/server/EntitySilverfish.java
|
||||
@@ -18,7 +18,7 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntitySilverfish.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntitySilverfish.java
|
||||
@@ -45,7 +45,7 @@
|
||||
this.goalSelector.a(3, this.b);
|
||||
this.goalSelector.a(4, new PathfinderGoalMeleeAttack(this, 1.0D, false));
|
||||
this.goalSelector.a(5, new EntitySilverfish.PathfinderGoalSilverfishHideInBlock(this));
|
||||
@@ -9,7 +9,7 @@
|
||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
|
||||
}
|
||||
|
||||
@@ -156,6 +156,11 @@
|
||||
@@ -183,6 +183,11 @@
|
||||
IBlockData iblockdata = world.getType(blockposition);
|
||||
|
||||
if (BlockMonsterEggs.h(iblockdata)) {
|
||||
@@ -21,12 +21,12 @@
|
||||
world.setTypeAndData(blockposition, BlockMonsterEggs.c(iblockdata.getBlock()), 3);
|
||||
this.a.doSpawnEffect();
|
||||
this.a.die();
|
||||
@@ -202,6 +207,11 @@
|
||||
@@ -229,6 +234,11 @@
|
||||
Block block = iblockdata.getBlock();
|
||||
|
||||
if (block instanceof BlockMonsterEggs) {
|
||||
+ // CraftBukkit start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.silverfish, blockposition1, Blocks.AIR.getBlockData()).isCancelled()) {
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.silverfish, blockposition1, net.minecraft.world.level.block.Blocks.AIR.getBlockData()).isCancelled()) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/server/EntitySkeletonAbstract.java
|
||||
+++ b/net/minecraft/server/EntitySkeletonAbstract.java
|
||||
@@ -154,8 +154,19 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java
|
||||
@@ -196,8 +196,19 @@
|
||||
double d3 = (double) MathHelper.sqrt(d0 * d0 + d2 * d2);
|
||||
|
||||
entityarrow.shoot(d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - this.world.getDifficulty().a() * 4));
|
||||
+ // CraftBukkit start
|
||||
+ org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(this, this.getItemInMainHand(), null, entityarrow, EnumHand.MAIN_HAND, 0.8F, true);
|
||||
+ org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(this, this.getItemInMainHand(), null, entityarrow, net.minecraft.world.EnumHand.MAIN_HAND, 0.8F, true);
|
||||
+ if (event.isCancelled()) {
|
||||
+ event.getProjectile().remove();
|
||||
+ return;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntitySkeletonWither.java
|
||||
+++ b/net/minecraft/server/EntitySkeletonWither.java
|
||||
@@ -80,7 +80,7 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntitySkeletonWither.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntitySkeletonWither.java
|
||||
@@ -105,7 +105,7 @@
|
||||
return false;
|
||||
} else {
|
||||
if (entity instanceof EntityLiving) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/EntitySlime.java
|
||||
+++ b/net/minecraft/server/EntitySlime.java
|
||||
@@ -6,6 +6,14 @@
|
||||
import java.util.Random;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/entity/monster/EntitySlime.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntitySlime.java
|
||||
@@ -45,6 +45,14 @@
|
||||
import net.minecraft.world.level.storage.loot.LootTables;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import java.util.ArrayList;
|
||||
@@ -15,7 +15,7 @@
|
||||
public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
|
||||
private static final DataWatcherObject<Integer> bo = DataWatcher.a(EntitySlime.class, DataWatcherRegistry.b);
|
||||
@@ -149,7 +157,7 @@
|
||||
@@ -188,7 +196,7 @@
|
||||
|
||||
@Override
|
||||
public EntityTypes<? extends EntitySlime> getEntityType() {
|
||||
@@ -24,7 +24,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -163,6 +171,19 @@
|
||||
@@ -202,6 +210,19 @@
|
||||
int j = i / 2;
|
||||
int k = 2 + this.random.nextInt(3);
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
for (int l = 0; l < k; ++l) {
|
||||
float f1 = ((float) (l % 2) - 0.5F) * f;
|
||||
float f2 = ((float) (l / 2) - 0.5F) * f;
|
||||
@@ -177,8 +198,17 @@
|
||||
@@ -216,8 +237,17 @@
|
||||
entityslime.setInvulnerable(this.isInvulnerable());
|
||||
entityslime.setSize(j, true);
|
||||
entityslime.setPositionRotation(this.locX() + (double) f1, this.locY() + 0.5D, this.locZ() + (double) f2, this.random.nextFloat() * 360.0F, 0.0F);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntitySpider.java
|
||||
+++ b/net/minecraft/server/EntitySpider.java
|
||||
@@ -136,7 +136,7 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntitySpider.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntitySpider.java
|
||||
@@ -175,7 +175,7 @@
|
||||
MobEffectList mobeffectlist = ((EntitySpider.GroupDataSpider) object).a;
|
||||
|
||||
if (mobeffectlist != null) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityStrider.java
|
||||
+++ b/net/minecraft/server/EntityStrider.java
|
||||
@@ -252,7 +252,12 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityStrider.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityStrider.java
|
||||
@@ -318,7 +318,12 @@
|
||||
IBlockData iblockdata1 = this.aN();
|
||||
boolean flag = iblockdata.a((Tag) TagsBlock.STRIDER_WARM_BLOCKS) || iblockdata1.a((Tag) TagsBlock.STRIDER_WARM_BLOCKS) || this.b((Tag) TagsFluid.LAVA) > 0.0D;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityVex.java
|
||||
+++ b/net/minecraft/server/EntityVex.java
|
||||
@@ -45,7 +45,7 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityVex.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityVex.java
|
||||
@@ -81,7 +81,7 @@
|
||||
this.goalSelector.a(8, new EntityVex.d());
|
||||
this.goalSelector.a(9, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 3.0F, 1.0F));
|
||||
this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F));
|
||||
@@ -9,7 +9,7 @@
|
||||
this.targetSelector.a(2, new EntityVex.b(this));
|
||||
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
|
||||
}
|
||||
@@ -186,7 +186,7 @@
|
||||
@@ -222,7 +222,7 @@
|
||||
|
||||
@Override
|
||||
public void c() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityWitch.java
|
||||
+++ b/net/minecraft/server/EntityWitch.java
|
||||
@@ -93,7 +93,7 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityWitch.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityWitch.java
|
||||
@@ -132,7 +132,7 @@
|
||||
while (iterator.hasNext()) {
|
||||
MobEffect mobeffect = (MobEffect) iterator.next();
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
--- a/net/minecraft/server/EntityZombie.java
|
||||
+++ b/net/minecraft/server/EntityZombie.java
|
||||
@@ -9,6 +9,14 @@
|
||||
import java.util.function.Predicate;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/entity/monster/EntityZombie.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityZombie.java
|
||||
@@ -70,6 +70,15 @@
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import org.bukkit.entity.Zombie;
|
||||
+import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
+import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||
@@ -15,7 +16,7 @@
|
||||
public class EntityZombie extends EntityMonster {
|
||||
|
||||
private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
|
||||
@@ -23,6 +31,7 @@
|
||||
@@ -84,6 +93,7 @@
|
||||
private boolean bs;
|
||||
private int bt;
|
||||
public int drownedConversionTime;
|
||||
@@ -23,7 +24,7 @@
|
||||
|
||||
public EntityZombie(EntityTypes<? extends EntityZombie> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -139,7 +148,10 @@
|
||||
@@ -200,7 +210,10 @@
|
||||
public void tick() {
|
||||
if (!this.world.isClientSide && this.isAlive() && !this.isNoAI()) {
|
||||
if (this.isDrownConverting()) {
|
||||
@@ -35,7 +36,7 @@
|
||||
if (this.drownedConversionTime < 0) {
|
||||
this.eP();
|
||||
}
|
||||
@@ -156,6 +168,7 @@
|
||||
@@ -217,6 +230,7 @@
|
||||
}
|
||||
|
||||
super.tick();
|
||||
@@ -43,7 +44,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -188,6 +201,7 @@
|
||||
@@ -249,6 +263,7 @@
|
||||
}
|
||||
|
||||
public void startDrownedConversion(int i) {
|
||||
@@ -51,7 +52,7 @@
|
||||
this.drownedConversionTime = i;
|
||||
this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true);
|
||||
}
|
||||
@@ -201,11 +215,15 @@
|
||||
@@ -262,11 +277,15 @@
|
||||
}
|
||||
|
||||
protected void b(EntityTypes<? extends EntityZombie> entitytypes) {
|
||||
@@ -68,7 +69,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -245,9 +263,9 @@
|
||||
@@ -306,9 +325,9 @@
|
||||
if (SpawnerCreature.a(entitypositiontypes_surface, (IWorldReader) this.world, blockposition, entitytypes) && EntityPositionTypes.a(entitytypes, worldserver, EnumMobSpawn.REINFORCEMENT, blockposition, this.world.random)) {
|
||||
entityzombie.setPosition((double) i1, (double) j1, (double) k1);
|
||||
if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.j((Entity) entityzombie) && this.world.getCubes(entityzombie) && !this.world.containsLiquid(entityzombie.getBoundingBox())) {
|
||||
@@ -80,7 +81,7 @@
|
||||
this.getAttributeInstance(GenericAttributes.SPAWN_REINFORCEMENTS).addModifier(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, AttributeModifier.Operation.ADDITION));
|
||||
entityzombie.getAttributeInstance(GenericAttributes.SPAWN_REINFORCEMENTS).addModifier(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, AttributeModifier.Operation.ADDITION));
|
||||
break;
|
||||
@@ -268,7 +286,14 @@
|
||||
@@ -329,7 +348,14 @@
|
||||
float f = this.world.getDamageScaler(this.getChunkCoordinates()).b();
|
||||
|
||||
if (this.getItemInMainHand().isEmpty() && this.isBurning() && this.random.nextFloat() < f * 0.3F) {
|
||||
@@ -96,7 +97,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,7 +374,12 @@
|
||||
@@ -410,7 +436,12 @@
|
||||
}
|
||||
|
||||
EntityVillager entityvillager = (EntityVillager) entityliving;
|
||||
@@ -110,7 +111,7 @@
|
||||
|
||||
entityzombievillager.prepare(worldserver, worldserver.getDamageScaler(entityzombievillager.getChunkCoordinates()), EnumMobSpawn.CONVERSION, new EntityZombie.GroupDataZombie(false, true), (NBTTagCompound) null);
|
||||
entityzombievillager.setVillagerData(entityvillager.getVillagerData());
|
||||
@@ -406,7 +436,7 @@
|
||||
@@ -467,7 +498,7 @@
|
||||
entitychicken1.prepare(worldaccess, difficultydamagescaler, EnumMobSpawn.JOCKEY, (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
entitychicken1.setChickenJockey(true);
|
||||
this.startRiding(entitychicken1);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityZombieHusk.java
|
||||
+++ b/net/minecraft/server/EntityZombieHusk.java
|
||||
@@ -44,7 +44,7 @@
|
||||
--- a/net/minecraft/world/entity/monster/EntityZombieHusk.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityZombieHusk.java
|
||||
@@ -58,7 +58,7 @@
|
||||
if (flag && this.getItemInMainHand().isEmpty() && entity instanceof EntityLiving) {
|
||||
float f = this.world.getDamageScaler(this.getChunkCoordinates()).b();
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
--- a/net/minecraft/server/EntityZombieVillager.java
|
||||
+++ b/net/minecraft/server/EntityZombieVillager.java
|
||||
@@ -6,6 +6,12 @@
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/entity/monster/EntityZombieVillager.java
|
||||
+++ b/net/minecraft/world/entity/monster/EntityZombieVillager.java
|
||||
@@ -47,6 +47,13 @@
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import org.bukkit.entity.ZombieVillager;
|
||||
+import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
+import org.bukkit.event.entity.EntityTransformEvent;
|
||||
@@ -13,7 +14,7 @@
|
||||
public class EntityZombieVillager extends EntityZombie implements VillagerDataHolder {
|
||||
|
||||
public static final DataWatcherObject<Boolean> CONVERTING = DataWatcher.a(EntityZombieVillager.class, DataWatcherRegistry.i);
|
||||
@@ -15,6 +21,7 @@
|
||||
@@ -56,6 +63,7 @@
|
||||
private NBTBase bp;
|
||||
private NBTTagCompound bq;
|
||||
private int br;
|
||||
@@ -21,7 +22,7 @@
|
||||
|
||||
public EntityZombieVillager(EntityTypes<? extends EntityZombieVillager> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -31,7 +38,7 @@
|
||||
@@ -72,7 +80,7 @@
|
||||
@Override
|
||||
public void saveData(NBTTagCompound nbttagcompound) {
|
||||
super.saveData(nbttagcompound);
|
||||
@@ -30,7 +31,7 @@
|
||||
Logger logger = EntityZombieVillager.LOGGER;
|
||||
|
||||
logger.getClass();
|
||||
@@ -87,6 +94,10 @@
|
||||
@@ -128,6 +136,10 @@
|
||||
public void tick() {
|
||||
if (!this.world.isClientSide && this.isAlive() && this.isConverting()) {
|
||||
int i = this.getConversionProgress();
|
||||
@@ -41,7 +42,7 @@
|
||||
|
||||
this.conversionTime -= i;
|
||||
if (this.conversionTime <= 0) {
|
||||
@@ -95,6 +106,7 @@
|
||||
@@ -136,6 +148,7 @@
|
||||
}
|
||||
|
||||
super.tick();
|
||||
@@ -49,7 +50,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -138,13 +150,22 @@
|
||||
@@ -179,13 +192,22 @@
|
||||
this.conversionPlayer = uuid;
|
||||
this.conversionTime = i;
|
||||
this.getDataWatcher().set(EntityZombieVillager.CONVERTING, true);
|
||||
@@ -75,7 +76,7 @@
|
||||
EnumItemSlot[] aenumitemslot = EnumItemSlot.values();
|
||||
int i = aenumitemslot.length;
|
||||
|
||||
@@ -185,7 +206,7 @@
|
||||
@@ -226,7 +248,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityPiglinAbstract.java
|
||||
+++ b/net/minecraft/server/EntityPiglinAbstract.java
|
||||
@@ -81,7 +81,7 @@
|
||||
--- a/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.java
|
||||
+++ b/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.java
|
||||
@@ -99,7 +99,7 @@
|
||||
}
|
||||
|
||||
protected void c(WorldServer worldserver) {
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
if (entitypigzombie != null) {
|
||||
entitypigzombie.addEffect(new MobEffect(MobEffects.CONFUSION, 200, 0));
|
||||
@@ -96,7 +96,7 @@
|
||||
@@ -114,7 +114,7 @@
|
||||
@Nullable
|
||||
@Override
|
||||
public EntityLiving getGoalTarget() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/PiglinAI.java
|
||||
+++ b/net/minecraft/server/PiglinAI.java
|
||||
@@ -52,7 +52,8 @@
|
||||
--- a/net/minecraft/world/entity/monster/piglin/PiglinAI.java
|
||||
+++ b/net/minecraft/world/entity/monster/piglin/PiglinAI.java
|
||||
@@ -114,7 +114,8 @@
|
||||
private static void b(EntityPiglin entitypiglin, BehaviorController<EntityPiglin> behaviorcontroller) {
|
||||
behaviorcontroller.a(Activity.FLIGHT, 10, ImmutableList.of(new BehaviorAttackTargetForget<>((entityliving) -> {
|
||||
return !b(entitypiglin, entityliving);
|
||||
@@ -10,7 +10,7 @@
|
||||
}
|
||||
|
||||
private static void c(BehaviorController<EntityPiglin> behaviorcontroller) {
|
||||
@@ -70,7 +71,8 @@
|
||||
@@ -132,7 +133,8 @@
|
||||
}
|
||||
|
||||
private static void f(BehaviorController<EntityPiglin> behaviorcontroller) {
|
||||
@@ -20,7 +20,7 @@
|
||||
}
|
||||
|
||||
private static BehaviorGateSingle<EntityPiglin> a() {
|
||||
@@ -78,7 +80,8 @@
|
||||
@@ -140,7 +142,8 @@
|
||||
}
|
||||
|
||||
private static BehaviorGateSingle<EntityPiglin> b() {
|
||||
@@ -30,7 +30,7 @@
|
||||
}
|
||||
|
||||
private static BehaviorWalkAway<BlockPosition> c() {
|
||||
@@ -95,10 +98,10 @@
|
||||
@@ -157,10 +160,10 @@
|
||||
|
||||
protected static void b(EntityPiglin entitypiglin) {
|
||||
BehaviorController<EntityPiglin> behaviorcontroller = entitypiglin.getBehaviorController();
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
if (activity != activity1) {
|
||||
d(entitypiglin).ifPresent(entitypiglin::a);
|
||||
@@ -130,14 +133,18 @@
|
||||
@@ -192,14 +195,18 @@
|
||||
n(entitypiglin);
|
||||
ItemStack itemstack;
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
Item item = itemstack.getItem();
|
||||
|
||||
@@ -148,7 +155,7 @@
|
||||
@@ -210,7 +217,7 @@
|
||||
} else if (c(item) && !u(entitypiglin)) {
|
||||
s(entitypiglin);
|
||||
} else {
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
if (!flag) {
|
||||
d(entitypiglin, itemstack);
|
||||
@@ -350,7 +357,7 @@
|
||||
@@ -412,7 +419,7 @@
|
||||
}
|
||||
|
||||
public static void a(EntityHuman entityhuman, boolean flag) {
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
list.stream().filter(PiglinAI::d).filter((entitypiglin) -> {
|
||||
return !flag || BehaviorUtil.c(entitypiglin, entityhuman);
|
||||
@@ -586,7 +593,7 @@
|
||||
@@ -648,7 +655,7 @@
|
||||
EntityLiving entityliving = (EntityLiving) behaviorcontroller.getMemory(MemoryModuleType.AVOID_TARGET).get();
|
||||
EntityTypes<?> entitytypes = entityliving.getEntityType();
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -668,7 +675,7 @@
|
||||
@@ -730,7 +737,7 @@
|
||||
}
|
||||
|
||||
public static boolean b(EntityLiving entityliving) {
|
||||
|
||||
Reference in New Issue
Block a user