File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
worldedit-core/src/main/java/com/sk89q/worldedit/function/mask Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 1919
2020package com .sk89q .worldedit .function .mask ;
2121
22+ import com .fastasyncworldedit .core .math .MutableBlockVector3 ;
2223import com .sk89q .worldedit .WorldEdit ;
2324import com .sk89q .worldedit .extension .platform .Capability ;
2425import com .sk89q .worldedit .math .BlockVector3 ;
@@ -115,6 +116,10 @@ public void setOffset(BlockVector3 offset) {
115116 @ Override
116117 public boolean test (BlockVector3 vector ) {
117118 //FAWE start - ignore resultant position outside world height range
119+ if (vector instanceof MutableBlockVector3 ) {
120+ // make sure we don't modify a vector passed from the outside
121+ vector = vector .toImmutable ();
122+ }
118123 BlockVector3 testPos = vector .add (offset );
119124 if (testPos .y () < minY || testPos .y () > maxY ) {
120125 return false ;
You can’t perform that action at this time.
0 commit comments