You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var autoRemount by setting("Auto Remount", false, description ="Automatically remounts if you get off")
38
49
var autoMountEntities by setting("Auto Mount Entities", true, description ="Automatically mounts nearby entities in range")
39
-
var autoMountEntityList by setting("Auto Mount Entity List", mutableListOf<EntityType<*>>(), mutableListOf(Registries.ENTITY_TYPE.toList())) { autoMountEntities }
50
+
var autoMountEntityList by setting("Auto Mount Entity List",
51
+
mutableListOf(),
52
+
Registries.ENTITY_TYPE.toList()
53
+
) { autoMountEntities }
40
54
41
55
var interval by setting("Interval", 50, 1..200, 1, unit ="ms", description ="Interact interval")
42
-
var range by setting("Range", 5.0, 1.0..10.0, 0.1, description ="Mount range")
56
+
var range by setting("Range", 4.0, 1.0..20.0, 0.1, description ="Mount range")
57
+
58
+
overridevar automationConfig =AutomationConfig(
59
+
name ="AutoMount"
60
+
)
43
61
44
62
val intervalTimer =Timer()
45
63
var lastEntity:Entity?=null
46
64
47
65
init {
66
+
onEnable {
67
+
intervalTimer.reset()
68
+
lastEntity =null
69
+
}
70
+
48
71
listen<TickEvent.Pre> {
49
72
if (!intervalTimer.timePassed(interval.milliseconds)) {
50
73
return@listen
51
74
}
52
-
if (autoMountEntities &&!player.isRiding) {
53
-
val entity = fastEntitySearch<Entity>(range) {
54
-
autoMountEntityList.contains(it.type) && canRide(it) && it.distanceTo(player) <= range
0 commit comments