Fixed empty inventories showing, debug blocks getting unlocked

This commit is contained in:
Anuken
2018-06-24 21:58:04 -04:00
parent 27cf4b0218
commit c7ec7db61a
2 changed files with 2 additions and 2 deletions

View File

@@ -284,7 +284,7 @@ public class Control extends Module{
for(int i = 0 ; i < Recipe.all().size; i ++){ for(int i = 0 ; i < Recipe.all().size; i ++){
Recipe recipe = Recipe.all().get(i); Recipe recipe = Recipe.all().get(i);
if(entity.items.hasItems(recipe.requirements)){ if(!recipe.debugOnly && entity.items.hasItems(recipe.requirements)){
if(control.database().unlockContent(recipe)){ if(control.database().unlockContent(recipe)){
ui.hudfrag.showUnlock(recipe); ui.hudfrag.showUnlock(recipe);
} }

View File

@@ -70,7 +70,7 @@ public class BlockInventoryFragment implements Fragment {
table.background("clear"); table.background("clear");
table.setTouchable(Touchable.enabled); table.setTouchable(Touchable.enabled);
table.update(() -> { table.update(() -> {
if(tile == null || tile.entity == null || !tile.block().isAccessible()){ if(tile == null || tile.entity == null || !tile.block().isAccessible() || tile.entity.items.totalItems() == 0){
hide(); hide();
}else { }else {
updateTablePosition(); updateTablePosition();