mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 10:56:42 +00:00
Implement more masks
This commit is contained in:
@ -4,6 +4,8 @@ import com.boydti.fawe.object.mask.ResettableMask;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.function.mask.AbstractExtentMask;
|
||||
import com.sk89q.worldedit.function.mask.Mask;
|
||||
import com.sk89q.worldedit.function.mask.MaskIntersection;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Collection;
|
||||
|
||||
@ -38,6 +40,18 @@ public class MaskTraverser {
|
||||
} catch (NoSuchFieldException | IllegalAccessException ignored) {
|
||||
}
|
||||
}
|
||||
if (mask instanceof MaskIntersection) {
|
||||
MaskIntersection mask1 = (MaskIntersection) mask;
|
||||
try {
|
||||
Field field = mask1.getClass().getDeclaredField("masks");
|
||||
field.setAccessible(true);
|
||||
Collection<Mask> masks = (Collection<Mask>) field.get(mask);
|
||||
for (Mask next : masks) {
|
||||
reset(next, newExtent);
|
||||
}
|
||||
} catch (NoSuchFieldException | IllegalAccessException ignored) {
|
||||
}
|
||||
}
|
||||
try {
|
||||
Field field = current.getDeclaredField("mask");
|
||||
field.setAccessible(true);
|
||||
|
Reference in New Issue
Block a user