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()
|
.stream()
|
||||||
.filter(entity -> entity.getState() != null &&
|
.filter(entity -> entity.getState() != null &&
|
||||||
!entity.getState().getType().getId().equals("minecraft:player") &&
|
!entity.getState().getType().getId().equals("minecraft:player") &&
|
||||||
region.contains(entity.getLocation().toVector()))
|
region.contains(entity.getLocation().toBlockPoint()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
} else {
|
} else {
|
||||||
entities = new ArrayList<>();
|
entities = new ArrayList<>();
|
||||||
|
@ -115,21 +115,26 @@ public class BindingMap implements Binding {
|
|||||||
*/
|
*/
|
||||||
private BoundMethod match(ParameterData pd) {
|
private BoundMethod match(ParameterData pd) {
|
||||||
Type type = pd.getType();
|
Type type = pd.getType();
|
||||||
|
BoundMethod result = null;
|
||||||
while (type != null) {
|
while (type != null) {
|
||||||
List<BoundMethod> methods = bindings.get(type);
|
List<BoundMethod> methods = bindings.get(type);
|
||||||
if (methods != null) {
|
if (methods != null) {
|
||||||
for (BoundMethod binding : methods) {
|
for (BoundMethod binding : methods) {
|
||||||
if (binding.classifier != null) {
|
if (binding.classifier != null) {
|
||||||
if (pd.getClassifier() != null && pd.getClassifier().annotationType().equals(binding.classifier)) {
|
if (pd.getClassifier() != null && pd.getClassifier().annotationType().equals(binding.classifier)) {
|
||||||
if (binding.type == null || binding.type.equals(type)) {
|
if (binding.type == null) {
|
||||||
|
result = binding;
|
||||||
|
} else if (binding.type.equals(type)) {
|
||||||
return binding;
|
return binding;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if (binding.type.equals(type)) {
|
} else if (binding.type.equals(type)) {
|
||||||
return binding;
|
if (result == null) result = binding;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (result != null) return result;
|
||||||
type = (type instanceof Class) ? ((Class) type).getSuperclass() : null;
|
type = (type instanceof Class) ? ((Class) type).getSuperclass() : null;
|
||||||
}
|
}
|
||||||
throw new RuntimeException("Unknown type " + pd.getType());
|
throw new RuntimeException("Unknown type " + pd.getType());
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren