@@ -15,7 +15,7 @@ import net.minecraftforge.fml.common.gameevent.TickEvent
15
15
16
16
object AutoRemount : Module(
17
17
name = " AutoRemount" ,
18
- description = " Automatically remounts your ridable entity" ,
18
+ description = " Automatically remounts your rideable entity" ,
19
19
category = Category .MOVEMENT
20
20
) {
21
21
private val boat by setting(" Boats" , true )
@@ -28,7 +28,7 @@ object AutoRemount : Module(
28
28
private val llama by setting(" Llama" , true )
29
29
private val range by setting(" Range" , 2.0f , 1.0f .. 5.0f , 0.5f )
30
30
private val remountDelay by setting(" Remount Delay" , 5 , 0 .. 10 , 1 )
31
-
31
+
32
32
private val remountTimer = TickTimer (TimeUnit .TICKS )
33
33
34
34
init {
@@ -54,19 +54,17 @@ object AutoRemount : Module(
54
54
55
55
private fun isValidEntity (entity : Entity ): Boolean {
56
56
// check if entity is an animal and not a child
57
- var matureAnimalCheck: Boolean = entity is EntityAnimal && ! entity.isChild; // FBI moment
58
- when (entity){
59
- is EntityBoat -> return boat;
60
- is EntityMinecartEmpty -> return minecart;
61
-
62
- is EntityHorse -> return horse && matureAnimalCheck;
63
- is EntitySkeletonHorse -> return skeletonHorse && matureAnimalCheck;
64
- is EntityDonkey -> return donkey && matureAnimalCheck;
65
- is EntityMule -> return mule && matureAnimalCheck;
66
- is EntityPig -> return pig && entity.saddled && matureAnimalCheck;
67
- is EntityLlama -> return llama && matureAnimalCheck;
68
- else -> return false ;
69
-
57
+ val matureAnimalCheck: Boolean = entity is EntityAnimal && ! entity.isChild // FBI moment
58
+ return when (entity) {
59
+ is EntityBoat -> boat
60
+ is EntityMinecartEmpty -> minecart
61
+ is EntityHorse -> horse && matureAnimalCheck
62
+ is EntitySkeletonHorse -> skeletonHorse && matureAnimalCheck
63
+ is EntityDonkey -> donkey && matureAnimalCheck
64
+ is EntityMule -> mule && matureAnimalCheck
65
+ is EntityPig -> pig && entity.saddled && matureAnimalCheck
66
+ is EntityLlama -> llama && matureAnimalCheck
67
+ else -> false
70
68
}
71
69
}
72
70
}
0 commit comments