Fixed world border enable
This commit is contained in:
@@ -445,6 +445,15 @@ public class World{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void checkMapArea(){
|
||||
for(var build : Groups.build){
|
||||
//reset map-area-based disabled blocks.
|
||||
if(build.allowUpdate() && !build.enabled){
|
||||
build.enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO optimize; this is very slow and called too often!
|
||||
public float getDarkness(int x, int y){
|
||||
float dark = 0;
|
||||
|
||||
@@ -1338,6 +1338,7 @@ public class LExecutor{
|
||||
if(!headless){
|
||||
renderer.updateAllDarkness();
|
||||
}
|
||||
world.checkMapArea();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1351,6 +1352,7 @@ public class LExecutor{
|
||||
state.rules.limitY = y;
|
||||
state.rules.limitWidth = w;
|
||||
state.rules.limitHeight = h;
|
||||
world.checkMapArea();
|
||||
|
||||
if(!headless){
|
||||
renderer.updateAllDarkness();
|
||||
|
||||
Reference in New Issue
Block a user