2
2
3
3
import kotlin .Pair ;
4
4
import top .mcfpp .lang .*;
5
+ import top .mcfpp .lib .OneIntConcreteRange ;
5
6
6
7
public class SelectorConcreteData extends BaseMNIMethodContainer {
7
8
8
9
public static final NBTListConcreteData INSTANCE = new NBTListConcreteData ();
9
10
10
11
static {
11
- //selector.x< int x>
12
+ //selector.x( int x)
12
13
methods .put ("x" , (readOnlyVar , normalVar , caller , returnVar ) -> {
13
14
var x = (MCIntConcrete )readOnlyVar [0 ];
14
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
15
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
15
16
qwq .getValue ().setX (x .getValue ());
16
17
returnVar .setValue (qwq );
17
18
return null ;
18
19
});
19
20
//selector.y<int y>
20
21
methods .put ("y" , (readOnlyVar , normalVar , caller , returnVar ) -> {
21
22
var y = (MCIntConcrete )readOnlyVar [0 ];
22
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
23
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
23
24
qwq .getValue ().setY (y .getValue ());
24
25
returnVar .setValue (qwq );
25
26
return null ;
26
27
});
27
28
//selector.z<int z>
28
29
methods .put ("z" , (readOnlyVar , normalVar , caller , returnVar ) -> {
29
30
var z = (MCIntConcrete )readOnlyVar [0 ];
30
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
31
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
31
32
qwq .getValue ().setZ (z .getValue ());
32
33
returnVar .setValue (qwq );
33
34
return null ;
34
35
});
35
36
//selector.distance<int distance>
36
37
methods .put ("distance" , (readOnlyVar , normalVar , caller , returnVar ) -> {
37
38
var distance = (MCIntConcrete )readOnlyVar [0 ];
38
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
39
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
39
40
qwq .getValue ().setDistance (new OneIntConcreteRange (distance .getValue ()));
40
41
returnVar .setValue (qwq );
41
42
return null ;
@@ -44,23 +45,23 @@ public class SelectorConcreteData extends BaseMNIMethodContainer {
44
45
//dx
45
46
methods .put ("dx" , (readOnlyVar , normalVar , caller , returnVar ) -> {
46
47
var dx = (MCIntConcrete )readOnlyVar [0 ];
47
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
48
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
48
49
qwq .getValue ().setDx (dx .getValue ());
49
50
returnVar .setValue (qwq );
50
51
return null ;
51
52
});
52
53
//dy
53
54
methods .put ("dy" , (readOnlyVar , normalVar , caller , returnVar ) -> {
54
55
var dy = (MCIntConcrete )readOnlyVar [0 ];
55
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
56
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
56
57
qwq .getValue ().setDy (dy .getValue ());
57
58
returnVar .setValue (qwq );
58
59
return null ;
59
60
});
60
61
//dz
61
62
methods .put ("dz" , (readOnlyVar , normalVar , caller , returnVar ) -> {
62
63
var dz = (MCIntConcrete )readOnlyVar [0 ];
63
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
64
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
64
65
qwq .getValue ().setDz (dz .getValue ());
65
66
returnVar .setValue (qwq );
66
67
return null ;
@@ -69,127 +70,127 @@ public class SelectorConcreteData extends BaseMNIMethodContainer {
69
70
//tag
70
71
methods .put ("tag" , (readOnlyVar , normalVar , caller , returnVar ) -> {
71
72
var tag = (MCStringConcrete )readOnlyVar [0 ];
72
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
73
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
73
74
qwq .getValue ().getTag ().put (tag .getValue ().getValue (), true );
74
75
returnVar .setValue (qwq );
75
76
return null ;
76
77
});
77
78
//tag!
78
79
methods .put ("tagNot" , (readOnlyVar , normalVar , caller , returnVar ) -> {
79
80
var tag = (MCStringConcrete )readOnlyVar [0 ];
80
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
81
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
81
82
qwq .getValue ().getTag ().put (tag .getValue ().getValue (), false );
82
83
returnVar .setValue (qwq );
83
84
return null ;
84
85
});
85
86
//team
86
87
methods .put ("team" , (readOnlyVar , normalVar , caller , returnVar ) -> {
87
88
var team = (MCStringConcrete )readOnlyVar [0 ];
88
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
89
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
89
90
qwq .getValue ().getTeam ().put (team .getValue ().getValue (), true );
90
91
returnVar .setValue (qwq );
91
92
return null ;
92
93
});
93
94
//team!
94
95
methods .put ("teamNot" , (readOnlyVar , normalVar , caller , returnVar ) -> {
95
96
var team = (MCStringConcrete )readOnlyVar [0 ];
96
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
97
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
97
98
qwq .getValue ().getTeam ().put (team .getValue ().getValue (), false );
98
99
returnVar .setValue (qwq );
99
100
return null ;
100
101
});
101
102
//name
102
103
methods .put ("name" , (readOnlyVar , normalVar , caller , returnVar ) -> {
103
104
var name = (MCStringConcrete )readOnlyVar [0 ];
104
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
105
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
105
106
qwq .getValue ().setName (new Pair <>(name .getValue ().getValue (), true ));
106
107
returnVar .setValue (qwq );
107
108
return null ;
108
109
});
109
110
//name!
110
111
methods .put ("nameNot" , (readOnlyVar , normalVar , caller , returnVar ) -> {
111
112
var name = (MCStringConcrete )readOnlyVar [0 ];
112
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
113
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
113
114
qwq .getValue ().setName (new Pair <>(name .getValue ().getValue (), false ));
114
115
returnVar .setValue (qwq );
115
116
return null ;
116
117
});
117
118
//type
118
119
methods .put ("type" , (readOnlyVar , normalVar , caller , returnVar ) -> {
119
120
var type = (MCStringConcrete )readOnlyVar [0 ];
120
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
121
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
121
122
qwq .getValue ().setType (new Pair <>(type .getValue ().getValue (), false ));
122
123
returnVar .setValue (qwq );
123
124
return null ;
124
125
});
125
126
//type!
126
127
methods .put ("typeNot" , (readOnlyVar , normalVar , caller , returnVar ) -> {
127
128
var type = (MCStringConcrete )readOnlyVar [0 ];
128
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
129
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
129
130
qwq .getValue ().setType (new Pair <>(type .getValue ().getValue (), true ));
130
131
returnVar .setValue (qwq );
131
132
return null ;
132
133
});
133
134
//predicate
134
135
methods .put ("predicate" , (readOnlyVar , normalVar , caller , returnVar ) -> {
135
136
var predicate = (MCStringConcrete )readOnlyVar [0 ];
136
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
137
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
137
138
qwq .getValue ().getPredicate ().put (predicate .getValue ().getValue (), true );
138
139
returnVar .setValue (qwq );
139
140
return null ;
140
141
});
141
142
//tag!
142
143
methods .put ("predicateNot" , (readOnlyVar , normalVar , caller , returnVar ) -> {
143
144
var predicate = (MCStringConcrete )readOnlyVar [0 ];
144
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
145
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
145
146
qwq .getValue ().getPredicate ().put (predicate .getValue ().getValue (), false );
146
147
returnVar .setValue (qwq );
147
148
return null ;
148
149
});
149
150
//x_rotation
150
151
methods .put ("xRotation" , (readOnlyVar , normalVar , caller , returnVar ) -> {
151
152
var xRotation = (MCIntConcrete )readOnlyVar [0 ];
152
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
153
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
153
154
qwq .getValue ().setX_rotation (new OneIntConcreteRange (xRotation .getValue ()));
154
155
returnVar .setValue (qwq );
155
156
return null ;
156
157
});
157
158
//y_rotation
158
159
methods .put ("yRotation" , (readOnlyVar , normalVar , caller , returnVar ) -> {
159
160
var yRotation = (MCIntConcrete )readOnlyVar [0 ];
160
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
161
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
161
162
qwq .getValue ().setY_rotation (new OneIntConcreteRange (yRotation .getValue ()));
162
163
returnVar .setValue (qwq );
163
164
return null ;
164
165
});
165
166
//nbt
166
167
methods .put ("nbt" , (readOnlyVar , normalVar , caller , returnVar ) -> {
167
168
var nbt = (NBTBasedDataConcrete )readOnlyVar [0 ];
168
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
169
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
169
170
qwq .getValue ().setNbt (nbt .getValue ());
170
171
returnVar .setValue (qwq );
171
172
return null ;
172
173
});
173
174
//level
174
175
methods .put ("level" , (readOnlyVar , normalVar , caller , returnVar ) -> {
175
176
var level = (MCIntConcrete )readOnlyVar [0 ];
176
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
177
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
177
178
qwq .getValue ().setLevel (new OneIntConcreteRange (level .getValue ()));
178
179
returnVar .setValue (qwq );
179
180
return null ;
180
181
});
181
182
//gamemode
182
183
methods .put ("gamemode" , (readOnlyVar , normalVar , caller , returnVar ) -> {
183
184
var gamemode = (MCStringConcrete )readOnlyVar [0 ];
184
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
185
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
185
186
qwq .getValue ().setGamemode (new Pair <>(gamemode .getValue ().getValue (), true ));
186
187
returnVar .setValue (qwq );
187
188
return null ;
188
189
});
189
190
//gamemode!
190
191
methods .put ("gamemodeNot" , (readOnlyVar , normalVar , caller , returnVar ) -> {
191
192
var gamemode = (MCStringConcrete )readOnlyVar [0 ];
192
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
193
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
193
194
qwq .getValue ().setGamemode (new Pair <>(gamemode .getValue ().getValue (), false ));
194
195
returnVar .setValue (qwq );
195
196
return null ;
@@ -198,23 +199,23 @@ public class SelectorConcreteData extends BaseMNIMethodContainer {
198
199
methods .put ("advancements" , (readOnlyVar , normalVar , caller , returnVar ) -> {
199
200
var advancements = (MCStringConcrete )readOnlyVar [0 ];
200
201
var value = (MCBoolConcrete )readOnlyVar [1 ];
201
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
202
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
202
203
qwq .getValue ().getAdvancements ().put (advancements .getValue ().getValue (), value .getValue ());
203
204
returnVar .setValue (qwq );
204
205
return null ;
205
206
});
206
207
//limit
207
208
methods .put ("limit" , (readOnlyVar , normalVar , caller , returnVar ) -> {
208
209
var limit = (MCIntConcrete )readOnlyVar [0 ];
209
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
210
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
210
211
qwq .getValue ().setLimit (limit .getValue ());
211
212
returnVar .setValue (qwq );
212
213
return null ;
213
214
});
214
215
//sort
215
216
methods .put ("sort" , (readOnlyVar , normalVar , caller , returnVar ) -> {
216
217
var sort = (MCStringConcrete )readOnlyVar [0 ];
217
- SelectorConcrete qwq = (SelectorConcrete )((SelectorConcrete )caller ).clone ();
218
+ SelectorVarConcrete qwq = (SelectorVarConcrete )((SelectorVarConcrete )caller ).clone ();
218
219
qwq .getValue ().setSort (sort .getValue ().getValue ());
219
220
returnVar .setValue (qwq );
220
221
return null ;
0 commit comments