File tree 1 file changed +15
-0
lines changed
src/main/java/com/ldtteam/structurize/util
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 32
32
import net .minecraft .world .item .Items ;
33
33
import net .minecraft .world .item .context .BlockPlaceContext ;
34
34
import net .minecraft .world .item .context .UseOnContext ;
35
+ import net .minecraft .world .level .ChunkPos ;
35
36
import net .minecraft .world .level .Level ;
36
37
import net .minecraft .world .level .LevelReader ;
37
38
import net .minecraft .world .level .block .*;
@@ -767,6 +768,20 @@ public boolean hasChunk(int p_9574_, int p_9575_)
767
768
{
768
769
return level .hasChunk (p_9574_ , p_9575_ );
769
770
}
771
+
772
+ @ Override
773
+ public boolean isOldChunkAround (ChunkPos pos , int radius )
774
+ {
775
+ final int minX = pos .x - radius ;
776
+ final int maxX = pos .x + radius ;
777
+ final int minZ = pos .z - radius ;
778
+ final int maxZ = pos .z + radius ;
779
+
780
+ return chunks .contains (minX , minZ ) &&
781
+ chunks .contains (minX , maxZ ) &&
782
+ chunks .contains (maxX , minZ ) &&
783
+ chunks .contains (maxX , maxZ );
784
+ }
770
785
}
771
786
772
787
/**
You can’t perform that action at this time.
0 commit comments