diff options
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/world/entity/monster/WitherSkeleton.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower/net/minecraft/world/entity/monster/WitherSkeleton.java.patch | 167 |
1 files changed, 167 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/world/entity/monster/WitherSkeleton.java.patch b/patch-remap/mache-spigotflower/net/minecraft/world/entity/monster/WitherSkeleton.java.patch new file mode 100644 index 0000000000..ecca70df29 --- /dev/null +++ b/patch-remap/mache-spigotflower/net/minecraft/world/entity/monster/WitherSkeleton.java.patch @@ -0,0 +1,167 @@ +--- a/net/minecraft/world/entity/monster/WitherSkeleton.java ++++ b/net/minecraft/world/entity/monster/WitherSkeleton.java +@@ -11,119 +11,107 @@ + import net.minecraft.world.effect.MobEffects; + import net.minecraft.world.entity.Entity; + import net.minecraft.world.entity.EntityDimensions; ++import net.minecraft.world.entity.EntityPose; + import net.minecraft.world.entity.EntityType; ++import net.minecraft.world.entity.EnumMobSpawn; + import net.minecraft.world.entity.EquipmentSlot; ++import net.minecraft.world.entity.GroupDataEntity; + import net.minecraft.world.entity.LivingEntity; +-import net.minecraft.world.entity.MobSpawnType; +-import net.minecraft.world.entity.Pose; +-import net.minecraft.world.entity.SpawnGroupData; + import net.minecraft.world.entity.ai.attributes.Attributes; + import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; + import net.minecraft.world.entity.monster.piglin.AbstractPiglin; + import net.minecraft.world.entity.projectile.AbstractArrow; + import net.minecraft.world.item.ItemStack; + import net.minecraft.world.item.Items; +-import net.minecraft.world.level.ItemLike; ++import net.minecraft.world.level.IMaterial; + import net.minecraft.world.level.Level; + import net.minecraft.world.level.ServerLevelAccessor; + import net.minecraft.world.level.pathfinder.BlockPathTypes; + + public class WitherSkeleton extends AbstractSkeleton { + +- public WitherSkeleton(EntityType<? extends WitherSkeleton> entitytype, Level level) { +- super(entitytype, level); ++ public WitherSkeleton(EntityType<? extends WitherSkeleton> entityType, Level level) { ++ super(entityType, level); + this.setPathfindingMalus(BlockPathTypes.LAVA, 8.0F); + } + + @Override +- @Override + protected void registerGoals() { + this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractPiglin.class, true)); + super.registerGoals(); + } + + @Override +- @Override + protected SoundEvent getAmbientSound() { + return SoundEvents.WITHER_SKELETON_AMBIENT; + } + + @Override +- @Override +- protected SoundEvent getHurtSound(DamageSource damagesource) { ++ protected SoundEvent getHurtSound(DamageSource damageSource) { + return SoundEvents.WITHER_SKELETON_HURT; + } + + @Override +- @Override + protected SoundEvent getDeathSound() { + return SoundEvents.WITHER_SKELETON_DEATH; + } + + @Override +- @Override + SoundEvent getStepSound() { + return SoundEvents.WITHER_SKELETON_STEP; + } + + @Override +- @Override +- protected void dropCustomDeathLoot(DamageSource damagesource, int i, boolean flag) { +- super.dropCustomDeathLoot(damagesource, i, flag); +- Entity entity = damagesource.getEntity(); ++ protected void dropCustomDeathLoot(DamageSource source, int looting, boolean recentlyHit) { ++ super.dropCustomDeathLoot(source, looting, recentlyHit); ++ Entity entity = source.getEntity(); + + if (entity instanceof Creeper) { +- Creeper creeper = (Creeper) entity; ++ Creeper entitycreeper = (Creeper) entity; + +- if (creeper.canDropMobsSkull()) { +- creeper.increaseDroppedSkulls(); +- this.spawnAtLocation((ItemLike) Items.WITHER_SKELETON_SKULL); ++ if (entitycreeper.canDropMobsSkull()) { ++ entitycreeper.increaseDroppedSkulls(); ++ this.spawnAtLocation((IMaterial) Items.WITHER_SKELETON_SKULL); + } + } + + } + + @Override +- @Override +- protected void populateDefaultEquipmentSlots(RandomSource randomsource, DifficultyInstance difficultyinstance) { ++ protected void populateDefaultEquipmentSlots(RandomSource random, DifficultyInstance difficulty) { + this.setItemSlot(EquipmentSlot.MAINHAND, new ItemStack(Items.STONE_SWORD)); + } + + @Override +- @Override +- protected void populateDefaultEquipmentEnchantments(RandomSource randomsource, DifficultyInstance difficultyinstance) {} ++ protected void populateDefaultEquipmentEnchantments(RandomSource random, DifficultyInstance difficulty) {} + + @Nullable + @Override +- @Override +- public SpawnGroupData finalizeSpawn(ServerLevelAccessor serverlevelaccessor, DifficultyInstance difficultyinstance, MobSpawnType mobspawntype, @Nullable SpawnGroupData spawngroupdata, @Nullable CompoundTag compoundtag) { +- SpawnGroupData spawngroupdata1 = super.finalizeSpawn(serverlevelaccessor, difficultyinstance, mobspawntype, spawngroupdata, compoundtag); ++ public GroupDataEntity finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EnumMobSpawn reason, @Nullable GroupDataEntity spawnData, @Nullable CompoundTag dataTag) { ++ GroupDataEntity groupdataentity1 = super.finalizeSpawn(level, difficulty, reason, spawnData, dataTag); + + this.getAttribute(Attributes.ATTACK_DAMAGE).setBaseValue(4.0D); + this.reassessWeaponGoal(); +- return spawngroupdata1; ++ return groupdataentity1; + } + + @Override +- @Override +- protected float getStandingEyeHeight(Pose pose, EntityDimensions entitydimensions) { ++ protected float getStandingEyeHeight(EntityPose pose, EntityDimensions size) { + return 2.1F; + } + + @Override +- @Override + protected float ridingOffset(Entity entity) { + return -0.875F; + } + + @Override +- @Override + public boolean doHurtTarget(Entity entity) { + if (!super.doHurtTarget(entity)) { + return false; + } else { + if (entity instanceof LivingEntity) { +- ((LivingEntity) entity).addEffect(new MobEffectInstance(MobEffects.WITHER, 200), this); ++ ((LivingEntity) entity).addEffect(new MobEffectInstance(MobEffects.WITHER, 200), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit + } + + return true; +@@ -131,17 +119,15 @@ + } + + @Override +- @Override +- protected AbstractArrow getArrow(ItemStack itemstack, float f) { +- AbstractArrow abstractarrow = super.getArrow(itemstack, f); ++ protected AbstractArrow getArrow(ItemStack arrowStack, float distanceFactor) { ++ AbstractArrow entityarrow = super.getArrow(arrowStack, distanceFactor); + +- abstractarrow.setSecondsOnFire(100); +- return abstractarrow; ++ entityarrow.setSecondsOnFire(100); ++ return entityarrow; + } + + @Override +- @Override +- public boolean canBeAffected(MobEffectInstance mobeffectinstance) { +- return mobeffectinstance.getEffect() == MobEffects.WITHER ? false : super.canBeAffected(mobeffectinstance); ++ public boolean canBeAffected(MobEffectInstance potioneffect) { ++ return potioneffect.getEffect() == MobEffects.WITHER ? false : super.canBeAffected(potioneffect); + } + } |