Update PlacementFragment.java

This commit is contained in:
Anuken
2019-11-18 19:21:43 -05:00
committed by GitHub
parent 4a987677ac
commit 7e5c276e7f

View File

@@ -131,13 +131,16 @@ public class PlacementFragment extends Fragment{
}
}
}else if(blockSelectEnd || Time.timeSinceMillis(blockSelectSeqMillis) > Core.settings.getInt("blockselecttimeout")){ //1st number of combo, select category
currentCategory = Category.all[i];
if(input.block != null){
input.block = getSelectedBlock(currentCategory);
//select only visible categories
if(!getByCategory(Category.all[i]).isEmpty()){
currentCategory = Category.all[i];
if(input.block != null){
input.block = getSelectedBlock(currentCategory);
}
blockSelectEnd = false;
blockSelectSeq = 0;
blockSelectSeqMillis = Time.millis();
}
blockSelectEnd = false;
blockSelectSeq = 0;
blockSelectSeqMillis = Time.millis();
}else{ //select block
if(blockSelectSeq == 0){ //2nd number of combo
blockSelectSeq = i + 1;
@@ -459,4 +462,4 @@ public class PlacementFragment extends Fragment{
Block tileDisplayBlock(){
return hoverTile == null ? null : hoverTile.block().synthetic() ? hoverTile.block() : hoverTile.drop() != null ? hoverTile.overlay().itemDrop != null ? hoverTile.overlay() : hoverTile.floor() : null;
}
}
}