File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/main/java/ch/njol/skript/entity Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -55,22 +55,22 @@ public class BoatData extends EntityData<Boat> {
55
55
}
56
56
57
57
58
-
58
+
59
59
public BoatData (){
60
60
this (0 );
61
61
}
62
-
62
+
63
63
public BoatData (@ Nullable TreeSpecies type ){
64
64
this (type != null ? type .ordinal () + 2 : 1 );
65
65
}
66
-
66
+
67
67
private BoatData (int type ){
68
68
matchedPattern = type ;
69
69
}
70
-
70
+
71
71
@ Override
72
72
protected boolean init (Literal <?>[] exprs , int matchedPattern , ParseResult parseResult ) {
73
-
73
+
74
74
return true ;
75
75
}
76
76
@@ -96,7 +96,7 @@ protected boolean match(Boat entity) {
96
96
97
97
@ Override
98
98
public Class <? extends Boat > getType () {
99
- if (IS_RUNNING_1_21_3 )
99
+ if (IS_RUNNING_1_21_3 && matchedPattern > 1 )
100
100
return typeToClassMap .get (TreeSpecies .values ()[matchedPattern - 2 ]);
101
101
return Boat .class ;
102
102
}
@@ -124,7 +124,7 @@ public boolean isSupertypeOf(EntityData<?> e) {
124
124
return matchedPattern <= 1 || matchedPattern == ((BoatData )e ).matchedPattern ;
125
125
return false ;
126
126
}
127
-
127
+
128
128
public boolean isOfItemType (ItemType i ){
129
129
int ordinal = -1 ;
130
130
@@ -142,7 +142,7 @@ else if (type == Material.ACACIA_BOAT)
142
142
else if (type == Material .DARK_OAK_BOAT )
143
143
ordinal = TreeSpecies .DARK_OAK .ordinal ();
144
144
return hashCode_i () == ordinal + 2 || (matchedPattern + ordinal == 0 ) || ordinal == 0 ;
145
-
145
+
146
146
}
147
147
148
148
}
You can’t perform that action at this time.
0 commit comments