diff options
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/world/entity/monster/ElderGuardian.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower/net/minecraft/world/entity/monster/ElderGuardian.java.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/world/entity/monster/ElderGuardian.java.patch b/patch-remap/mache-spigotflower/net/minecraft/world/entity/monster/ElderGuardian.java.patch new file mode 100644 index 0000000000..405c41eae7 --- /dev/null +++ b/patch-remap/mache-spigotflower/net/minecraft/world/entity/monster/ElderGuardian.java.patch @@ -0,0 +1,75 @@ +--- a/net/minecraft/world/entity/monster/ElderGuardian.java ++++ b/net/minecraft/world/entity/monster/ElderGuardian.java +@@ -27,8 +27,8 @@ + private static final int EFFECT_AMPLIFIER = 2; + private static final int EFFECT_DISPLAY_LIMIT = 1200; + +- public ElderGuardian(EntityType<? extends ElderGuardian> entitytype, Level level) { +- super(entitytype, level); ++ public ElderGuardian(EntityType<? extends ElderGuardian> entityType, Level level) { ++ super(entityType, level); + this.setPersistenceRequired(); + if (this.randomStrollGoal != null) { + this.randomStrollGoal.setInterval(400); +@@ -41,45 +41,39 @@ + } + + @Override +- @Override + public int getAttackDuration() { + return 60; + } + + @Override +- @Override + protected SoundEvent getAmbientSound() { + return this.isInWaterOrBubble() ? SoundEvents.ELDER_GUARDIAN_AMBIENT : SoundEvents.ELDER_GUARDIAN_AMBIENT_LAND; + } + + @Override +- @Override +- protected SoundEvent getHurtSound(DamageSource damagesource) { ++ protected SoundEvent getHurtSound(DamageSource damageSource) { + return this.isInWaterOrBubble() ? SoundEvents.ELDER_GUARDIAN_HURT : SoundEvents.ELDER_GUARDIAN_HURT_LAND; + } + + @Override +- @Override + protected SoundEvent getDeathSound() { + return this.isInWaterOrBubble() ? SoundEvents.ELDER_GUARDIAN_DEATH : SoundEvents.ELDER_GUARDIAN_DEATH_LAND; + } + + @Override +- @Override + protected SoundEvent getFlopSound() { + return SoundEvents.ELDER_GUARDIAN_FLOP; + } + + @Override +- @Override + protected void customServerAiStep() { + super.customServerAiStep(); + if ((this.tickCount + this.getId()) % 1200 == 0) { +- MobEffectInstance mobeffectinstance = new MobEffectInstance(MobEffects.DIG_SLOWDOWN, 6000, 2); +- List<ServerPlayer> list = MobEffectUtil.addEffectToPlayersAround((ServerLevel) this.level(), this, this.position(), 50.0D, mobeffectinstance, 1200); ++ MobEffectInstance mobeffect = new MobEffectInstance(MobEffects.DIG_SLOWDOWN, 6000, 2); ++ List<ServerPlayer> list = MobEffectUtil.addEffectToPlayersAround((ServerLevel) this.level(), this, this.position(), 50.0D, mobeffect, 1200, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit + +- list.forEach((serverplayer) -> { +- serverplayer.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, this.isSilent() ? 0.0F : 1.0F)); ++ list.forEach((entityplayer) -> { ++ entityplayer.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, this.isSilent() ? 0.0F : 1.0F)); + }); + } + +@@ -90,8 +84,7 @@ + } + + @Override +- @Override +- protected Vector3f getPassengerAttachmentPoint(Entity entity, EntityDimensions entitydimensions, float f) { +- return new Vector3f(0.0F, entitydimensions.height + 0.353125F * f, 0.0F); ++ protected Vector3f getPassengerAttachmentPoint(Entity entity, EntityDimensions entitysize, float f) { ++ return new Vector3f(0.0F, entitysize.height + 0.353125F * f, 0.0F); + } + } |