Fixed world border enable
This commit is contained in:
Binary file not shown.
@@ -445,6 +445,15 @@ public class World{
|
|||||||
return 0;
|
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!
|
//TODO optimize; this is very slow and called too often!
|
||||||
public float getDarkness(int x, int y){
|
public float getDarkness(int x, int y){
|
||||||
float dark = 0;
|
float dark = 0;
|
||||||
|
|||||||
@@ -1338,6 +1338,7 @@ public class LExecutor{
|
|||||||
if(!headless){
|
if(!headless){
|
||||||
renderer.updateAllDarkness();
|
renderer.updateAllDarkness();
|
||||||
}
|
}
|
||||||
|
world.checkMapArea();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1351,6 +1352,7 @@ public class LExecutor{
|
|||||||
state.rules.limitY = y;
|
state.rules.limitY = y;
|
||||||
state.rules.limitWidth = w;
|
state.rules.limitWidth = w;
|
||||||
state.rules.limitHeight = h;
|
state.rules.limitHeight = h;
|
||||||
|
world.checkMapArea();
|
||||||
|
|
||||||
if(!headless){
|
if(!headless){
|
||||||
renderer.updateAllDarkness();
|
renderer.updateAllDarkness();
|
||||||
|
|||||||
Reference in New Issue
Block a user