VisualRange: Adds mode, ELytraFly: Lowers autostart delay
This commit is contained in:
parent
7f9825201d
commit
3901469a17
|
@ -6,6 +6,7 @@ import me.rigamortis.seppuku.api.event.world.EventAddEntity;
|
|||
import me.rigamortis.seppuku.api.event.world.EventRemoveEntity;
|
||||
import me.rigamortis.seppuku.api.friend.Friend;
|
||||
import me.rigamortis.seppuku.api.module.Module;
|
||||
import me.rigamortis.seppuku.api.value.Value;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
||||
|
@ -16,6 +17,12 @@ import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
|||
*/
|
||||
public final class VisualRangeModule extends Module {
|
||||
|
||||
public final Value<Mode> mode = new Value<Mode>("Mode", new String[]{"Mode", "M"}, "Change between alert modes.", Mode.NOTIFICATION);
|
||||
|
||||
private enum Mode {
|
||||
CHAT, NOTIFICATION, BOTH
|
||||
}
|
||||
|
||||
private int prevPlayer = -1;
|
||||
|
||||
public VisualRangeModule() {
|
||||
|
@ -27,8 +34,15 @@ public final class VisualRangeModule extends Module {
|
|||
if (Minecraft.getMinecraft().world != null && !Minecraft.getMinecraft().player.isDead && event.getEntity() instanceof EntityPlayer && !event.getEntity().getName().equalsIgnoreCase(Minecraft.getMinecraft().player.getName())) {
|
||||
final Friend friend = Seppuku.INSTANCE.getFriendManager().isFriend(event.getEntity());
|
||||
final String msg = (friend != null ? ChatFormatting.DARK_PURPLE : ChatFormatting.RED) + (friend != null ? friend.getAlias() : event.getEntity().getName()) + ChatFormatting.WHITE + " has entered your visual range.";
|
||||
Seppuku.INSTANCE.getNotificationManager().addNotification("", msg);
|
||||
Seppuku.INSTANCE.logChat(msg);
|
||||
|
||||
if (this.mode.getValue() == Mode.NOTIFICATION || this.mode.getValue() == Mode.BOTH) {
|
||||
Seppuku.INSTANCE.getNotificationManager().addNotification("", msg);
|
||||
}
|
||||
|
||||
if (this.mode.getValue() == Mode.CHAT || this.mode.getValue() == Mode.BOTH) {
|
||||
Seppuku.INSTANCE.logChat(msg);
|
||||
}
|
||||
|
||||
if (event.getEntity().getEntityId() == this.prevPlayer) {
|
||||
this.prevPlayer = -1;
|
||||
}
|
||||
|
@ -42,8 +56,14 @@ public final class VisualRangeModule extends Module {
|
|||
this.prevPlayer = event.getEntity().getEntityId();
|
||||
final Friend friend = Seppuku.INSTANCE.getFriendManager().isFriend(event.getEntity());
|
||||
final String msg = (friend != null ? ChatFormatting.DARK_PURPLE : ChatFormatting.RED) + (friend != null ? friend.getAlias() : event.getEntity().getName()) + ChatFormatting.WHITE + " has left your visual range.";
|
||||
Seppuku.INSTANCE.getNotificationManager().addNotification("", msg);
|
||||
Seppuku.INSTANCE.logChat(msg);
|
||||
|
||||
if (this.mode.getValue() == Mode.NOTIFICATION || this.mode.getValue() == Mode.BOTH) {
|
||||
Seppuku.INSTANCE.getNotificationManager().addNotification("", msg);
|
||||
}
|
||||
|
||||
if (this.mode.getValue() == Mode.CHAT || this.mode.getValue() == Mode.BOTH) {
|
||||
Seppuku.INSTANCE.logChat(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public final class ElytraFlyModule extends Module {
|
|||
public final Value<Float> speed = new Value<Float>("Speed", new String[]{"Spd", "amount", "s"}, "Speed multiplier for elytra flight, higher values equals more speed.", 1.0f, 0.0f, 5.0f, 0.01f);
|
||||
|
||||
public final Value<Boolean> autoStart = new Value<Boolean>("AutoStart", new String[]{"AutoStart", "start", "autojump", "as"}, "Hold down the jump key to have an easy automated lift off.", true);
|
||||
public final Value<Float> autoStartDelay = new Value<Float>("StartDelay", new String[]{"AutoStartDelay", "startdelay", "autojumpdelay", "asd"}, "Delay(ms) between auto-start attempts.", 50.0f, 0.0f, 1000.0f, 10.0f);
|
||||
public final Value<Float> autoStartDelay = new Value<Float>("StartDelay", new String[]{"AutoStartDelay", "startdelay", "autojumpdelay", "asd"}, "Delay(ms) between auto-start attempts.", 20.0f, 0.0f, 1000.0f, 5.0f);
|
||||
public final Value<Boolean> autoEquip = new Value<Boolean>("AutoEquip", new String[]{"AutoEquipt", "AutoElytra", "Equip", "Equipt", "ae"}, "Automatically equips a durable elytra before or during flight. (inventory only, not hotbar!)", false);
|
||||
public final Value<Float> autoEquipDelay = new Value<Float>("EquipDelay", new String[]{"AutoEquipDelay", "AutoEquiptDelay", "equipdelay", "aed"}, "Delay(ms) between elytra equip swap attempts.", 200.0f, 0.0f, 1000.0f, 10.0f);
|
||||
public final Value<Boolean> stayAirborne = new Value<Boolean>("StayAirborne", new String[]{"Airborne", "StayInAir", "air", "sa"}, "Attempts to always keep the player airborne (only use when AutoEquip is enabled).", false);
|
||||
|
|
Loading…
Reference in New Issue