Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 02:20:07 +01:00
Fix binding order
Dieser Commit ist enthalten in:
Ursprung
64a134a9ee
Commit
c820406e8c
@ -357,7 +357,7 @@ public class ForwardExtentCopy implements Operation {
|
||||
.stream()
|
||||
.filter(entity -> entity.getState() != null &&
|
||||
!entity.getState().getType().getId().equals("minecraft:player") &&
|
||||
region.contains(entity.getLocation().toVector()))
|
||||
region.contains(entity.getLocation().toBlockPoint()))
|
||||
.collect(Collectors.toList());
|
||||
} else {
|
||||
entities = new ArrayList<>();
|
||||
|
@ -115,21 +115,26 @@ public class BindingMap implements Binding {
|
||||
*/
|
||||
private BoundMethod match(ParameterData pd) {
|
||||
Type type = pd.getType();
|
||||
BoundMethod result = null;
|
||||
while (type != null) {
|
||||
List<BoundMethod> methods = bindings.get(type);
|
||||
if (methods != null) {
|
||||
for (BoundMethod binding : methods) {
|
||||
if (binding.classifier != null) {
|
||||
if (pd.getClassifier() != null && pd.getClassifier().annotationType().equals(binding.classifier)) {
|
||||
if (binding.type == null || binding.type.equals(type)) {
|
||||
return binding;
|
||||
}
|
||||
}
|
||||
if (binding.type == null) {
|
||||
result = binding;
|
||||
} else if (binding.type.equals(type)) {
|
||||
return binding;
|
||||
}
|
||||
|
||||
}
|
||||
} else if (binding.type.equals(type)) {
|
||||
if (result == null) result = binding;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result != null) return result;
|
||||
type = (type instanceof Class) ? ((Class) type).getSuperclass() : null;
|
||||
}
|
||||
throw new RuntimeException("Unknown type " + pd.getType());
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren