add flying types
This commit is contained in:
parent
b317139c97
commit
414dc668ff
11 changed files with 29 additions and 22 deletions
|
@ -29,8 +29,9 @@ public class CommandMilk extends Command {
|
|||
int done = 0;
|
||||
for(EntityLiving entity : entities) {
|
||||
if(type != null && entity.hasEffect(type)) {
|
||||
int amplifier = entity.getEffect(type).getAmplifier();
|
||||
entity.removeEffect(type);
|
||||
exec.logConsole("%s von %s entfernt", type.getDisplay(), entity.getCommandName());
|
||||
exec.logConsole("%s von %s entfernt", type.getDisplay(amplifier), entity.getCommandName());
|
||||
done++;
|
||||
}
|
||||
else if(type == null && !entity.getEffects().isEmpty()) {
|
||||
|
|
|
@ -27,7 +27,7 @@ public class CommandPotion extends Command {
|
|||
public Object exec(CommandEnvironment env, Executor exec, List<EntityLiving> entities, Potion type, int duration, int strength, boolean particles, boolean ambient, boolean keep) {
|
||||
int done = 0;
|
||||
for(EntityLiving entity : entities) {
|
||||
if(entity.isPotionApplicable(type)) {
|
||||
if(entity.isPotionApplicable(type, strength - 1)) {
|
||||
if(type.isInstant()) {
|
||||
type.onImpact(null, null, entity, strength - 1, 1.0);
|
||||
}
|
||||
|
@ -38,9 +38,9 @@ public class CommandPotion extends Command {
|
|||
entity.addEffect(effect);
|
||||
}
|
||||
if(type.isInstant() || duration == 0)
|
||||
exec.logConsole("%d * %s an %s gegeben", strength, type.getDisplay(), entity.getCommandName());
|
||||
exec.logConsole("%s an %s gegeben", type.getDisplay(strength - 1), entity.getCommandName());
|
||||
else
|
||||
exec.logConsole("%d * %s für %d Sekunden an %s gegeben", strength, type.getDisplay(), duration, entity.getCommandName());
|
||||
exec.logConsole("%s für %d Sekunden an %s gegeben", type.getDisplay(strength - 1), duration, entity.getCommandName());
|
||||
done++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2763,7 +2763,7 @@ public class Player extends NetHandler implements ICrafting, Executor, IPlayer
|
|||
this.entity.addEffect(new PotionEffect(Potion.HASTE, Integer.MAX_VALUE, 255, false, false));
|
||||
this.entity.addEffect(new PotionEffect(Potion.RESISTANCE, Integer.MAX_VALUE, 255, false, false));
|
||||
this.entity.addEffect(new PotionEffect(Potion.FIRE_RESISTANCE, Integer.MAX_VALUE, 0, false, false));
|
||||
this.entity.addEffect(new PotionEffect(Potion.FLYING, Integer.MAX_VALUE, 0, false, false));
|
||||
this.entity.addEffect(new PotionEffect(Potion.FLYING, Integer.MAX_VALUE, 1, false, false));
|
||||
this.entity.addEffect(new PotionEffect(Potion.MANA, Integer.MAX_VALUE, 255, false, false));
|
||||
this.addFeed(TextColor.GREEN + "Statuseffekte wurden hinzugefügt");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue