Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 02:20:07 +01:00
Added a SolidBlockMask (#solid).
Dieser Commit ist enthalten in:
Ursprung
02de320980
Commit
627e029fbb
@ -84,6 +84,7 @@ import com.sk89q.worldedit.masks.InvertedMask;
|
||||
import com.sk89q.worldedit.masks.Mask;
|
||||
import com.sk89q.worldedit.masks.RandomMask;
|
||||
import com.sk89q.worldedit.masks.RegionMask;
|
||||
import com.sk89q.worldedit.masks.SolidBlockMask;
|
||||
import com.sk89q.worldedit.masks.UnderOverlayMask;
|
||||
import com.sk89q.worldedit.patterns.BlockChance;
|
||||
import com.sk89q.worldedit.patterns.ClipboardPattern;
|
||||
@ -731,6 +732,8 @@ public class WorldEdit {
|
||||
case '#':
|
||||
if (component.equalsIgnoreCase("#existing")) {
|
||||
return new ExistingBlockMask();
|
||||
} else if (component.equalsIgnoreCase("#solid")) {
|
||||
return new SolidBlockMask();
|
||||
} else if (component.equalsIgnoreCase("#dregion")
|
||||
|| component.equalsIgnoreCase("#dselection")
|
||||
|| component.equalsIgnoreCase("#dsel")) {
|
||||
|
15
src/main/java/com/sk89q/worldedit/masks/SolidBlockMask.java
Normale Datei
15
src/main/java/com/sk89q/worldedit/masks/SolidBlockMask.java
Normale Datei
@ -0,0 +1,15 @@
|
||||
package com.sk89q.worldedit.masks;
|
||||
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.blocks.BlockType;
|
||||
|
||||
/**
|
||||
* Works like {@link ExistingBlockMask}, except also dealing with non-solid non-air blocks the same way as with air.
|
||||
*/
|
||||
public class SolidBlockMask extends AbstractMask {
|
||||
@Override
|
||||
public boolean matches(EditSession editSession, Vector pos) {
|
||||
return !BlockType.canPassThrough(editSession.getBlockType(pos), editSession.getBlockData(pos));
|
||||
}
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren