aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower/net/minecraft/world/entity/monster/ElderGuardian.java.patch
blob: 405c41eae7a53dde7c308c26064487f8511b7962 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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);
     }
 }