1
1
package net .caffeinemc .mods .lithium .common .entity .pushable ;
2
2
3
+ import java .util .function .Supplier ;
4
+
3
5
import net .caffeinemc .mods .lithium .common .entity .EntityClassGroup ;
4
6
import net .caffeinemc .mods .lithium .common .reflection .ReflectionUtil ;
5
7
import net .caffeinemc .mods .lithium .common .services .PlatformMappingInformation ;
9
11
import net .minecraft .world .entity .ambient .Bat ;
10
12
import net .minecraft .world .entity .boss .enderdragon .EnderDragon ;
11
13
import net .minecraft .world .entity .decoration .ArmorStand ;
14
+ import net .minecraft .world .entity .monster .creaking .Creaking ;
15
+ import net .minecraft .world .entity .monster .warden .Warden ;
12
16
import net .minecraft .world .entity .player .Player ;
13
17
14
- import java .util .function .Supplier ;
15
-
16
18
public class PushableEntityClassGroup {
17
19
18
20
/**
@@ -36,10 +38,13 @@ public class PushableEntityClassGroup {
36
38
CACHABLE_UNPUSHABILITY = new EntityClassGroup (
37
39
(Class <?> entityClass , Supplier <EntityType <?>> entityType ) -> {
38
40
if (LivingEntity .class .isAssignableFrom (entityClass ) && !Player .class .isAssignableFrom (entityClass )) {
39
- if (!ReflectionUtil .hasMethodOverride (entityClass , LivingEntity .class , true , remapped_isPushable )) {
40
- if (!ReflectionUtil .hasMethodOverride (entityClass , LivingEntity .class , true , remapped_isClimbing )) {
41
- return true ;
41
+ if (!ReflectionUtil .hasMethodOverride (entityClass , LivingEntity .class , true , remapped_isClimbing )) {
42
+ if (Creaking .class .isAssignableFrom (entityClass )) {
43
+ return !ReflectionUtil .hasMethodOverride (entityClass , Creaking .class , true , remapped_isPushable );
44
+ } else if (Warden .class .isAssignableFrom (entityClass )) {
45
+ return !ReflectionUtil .hasMethodOverride (entityClass , Warden .class , true , remapped_isPushable );
42
46
}
47
+ return !ReflectionUtil .hasMethodOverride (entityClass , LivingEntity .class , true , remapped_isPushable );
43
48
}
44
49
}
45
50
return false ;
0 commit comments