Various crash fixes
This commit is contained in:
@@ -71,7 +71,9 @@ public class BlockRenderer{
|
||||
Block block = tile.block();
|
||||
|
||||
if(!expanded && block != Blocks.air && world.isAccessible(worldx, worldy)){
|
||||
block.drawShadow(tile);
|
||||
synchronized (Tile.tileSetLock) {
|
||||
block.drawShadow(tile);
|
||||
}
|
||||
}
|
||||
|
||||
if(!(block instanceof StaticBlock)){
|
||||
@@ -130,12 +132,14 @@ public class BlockRenderer{
|
||||
layerBegins(req.layer);
|
||||
}
|
||||
|
||||
if(req.layer == Layer.block){
|
||||
block.draw(req.tile);
|
||||
}else if(req.layer == block.layer){
|
||||
block.drawLayer(req.tile);
|
||||
}else if(req.layer == block.layer2){
|
||||
block.drawLayer2(req.tile);
|
||||
synchronized (Tile.tileSetLock) {
|
||||
if (req.layer == Layer.block) {
|
||||
block.draw(req.tile);
|
||||
} else if (req.layer == block.layer) {
|
||||
block.drawLayer(req.tile);
|
||||
} else if (req.layer == block.layer2) {
|
||||
block.drawLayer2(req.tile);
|
||||
}
|
||||
}
|
||||
|
||||
lastLayer = req.layer;
|
||||
|
||||
@@ -94,6 +94,8 @@ public class MinimapRenderer implements Disposable{
|
||||
}
|
||||
|
||||
public TextureRegion getRegion() {
|
||||
if(texture == null) return null;
|
||||
|
||||
int sz = Mathf.clamp(baseSize * zoom, baseSize, Math.min(world.width(), world.height()));
|
||||
float dx = (Core.camera.position.x / tilesize);
|
||||
float dy = (Core.camera.position.y / tilesize);
|
||||
|
||||
@@ -50,7 +50,10 @@ public class OverlayRenderer {
|
||||
//draw config selected block
|
||||
if(input.frag.config.isShown()){
|
||||
Tile tile = input.frag.config.getSelectedTile();
|
||||
tile.block().drawConfigure(tile);
|
||||
|
||||
synchronized (Tile.tileSetLock) {
|
||||
tile.block().drawConfigure(tile);
|
||||
}
|
||||
}
|
||||
|
||||
input.drawTop();
|
||||
@@ -132,7 +135,9 @@ public class OverlayRenderer {
|
||||
drawbars.run();
|
||||
}
|
||||
|
||||
target.block().drawSelect(target);
|
||||
synchronized (Tile.tileSetLock) {
|
||||
target.block().drawSelect(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user