This commit is contained in:
Anuken
2020-03-06 16:07:07 -05:00
parent f8b554aff8
commit 60d28fb01b
9 changed files with 2072 additions and 2459 deletions

View File

@@ -559,7 +559,10 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
/** Handles tile tap events that are not platform specific. */
boolean tileTapped(@Nullable Tilec tile){
if(tile == null) return false;
if(tile == null){
frag.inv.hide();
return false;
}
boolean consumed = false, showedInventory = false;
//check if tapped block is configurable

View File

@@ -485,10 +485,12 @@ public class Tile implements Position{
int offsety = -(size - 1) / 2;
for(int dx = 0; dx < size; dx++){
for(int dy = 0; dy < size; dy++){
Tile other = world.tile(entity.tileX() + dx + offsetx, entity.tileY() + dy + offsety);
Tile other = world.tile(x + dx + offsetx, y + dy + offsety);
if(other != null){
//reset entity and block *manually* - thus, preChanged() will not be called anywhere else, for multiblocks
other.entity = null;
if(other != this){ //do not remove own entity so it can be processed in changed()
other.entity = null;
}
other.block = Blocks.air;
}
}