Skip to content
This repository has been archived by the owner on Dec 20, 2022. It is now read-only.

Commit

Permalink
微调粒子效果
Browse files Browse the repository at this point in the history
  • Loading branch information
SugarMGP committed Aug 20, 2022
1 parent 3264126 commit 71610b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public ActionResultType func_230254_b_(PlayerEntity player, Hand hand) {
}
int heal = item.getFood().getHealing();
this.heal(heal);
this.playEffect(ParticleTypes.HEART, this.getPosX(), this.getPosY() + 0.035, this.getPosZ(), 4);
this.playEffect(ParticleTypes.HEART, this.getPosX(), this.getPosY() + 0.425, this.getPosZ(), 4);
}
} else {
if (!player.isCreative()) {
Expand All @@ -96,7 +96,7 @@ public ActionResultType func_230254_b_(PlayerEntity player, Hand hand) {
this.setTamedBy(player);
this.setAttackTarget(null);
} else {
this.playEffect(ParticleTypes.HAPPY_VILLAGER, this.getPosX(), this.getPosY() + 0.035, this.getPosZ(), 8);
this.playEffect(ParticleTypes.HAPPY_VILLAGER, this.getPosX(), this.getPosY() + 0.425, this.getPosZ(), 8);
}
}
}
Expand All @@ -111,7 +111,7 @@ protected void playEffect(BasicParticleType particleTypes, Double posX, Double p
double d2 = this.rand.nextGaussian() * 0.015;
this.world.addParticle(particleTypes,
posX + this.rand.nextDouble() * this.getWidth() * 1.5 - this.getWidth(),
posY + 0.4 + this.rand.nextDouble() * this.getHeight(),
posY + this.rand.nextDouble() * this.getHeight() * 0.8,
posZ + this.rand.nextDouble() * this.getWidth() * 1.5 - this.getWidth(),
d0, d1, d2
);
Expand Down Expand Up @@ -139,7 +139,7 @@ public void livingTick() {

BasicParticleType particleType = this.getEnumNPCLevel().getParticleType();
if (this.getMotion().x != 0.0D || this.getMotion().z != 0.0D) {
this.playEffect(particleType, this.getPosX(), this.getPosY() - 1.1, this.getPosZ(), 1);
this.playEffect(particleType, this.getPosX(), this.getPosY() - 0.45, this.getPosZ(), 1);
}

int regenerationLevel = this.getEnumNPCLevel().getRegenerationLevel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
public enum EnumNPCLevel {
A("eoc.npc_level.a", 25, 28.0D, 2.0D, 0.8D, ParticleTypes.FLAME, 2),
B("eoc.npc_level.b", 20, 24.0D, 1.5D, 0.75D, ParticleTypes.INSTANT_EFFECT, 1),
C("eoc.npc_level.c", 15, 20.0D, 1.0D, 0.7D, ParticleTypes.CLOUD, 0);
C("eoc.npc_level.c", 15, 20.0D, 1.0D, 0.7D, ParticleTypes.SMOKE, 0);

private final String descriptionTranslationKey;
private final int experienceValue;
Expand Down

0 comments on commit 71610b9

Please sign in to comment.