Bugfixes
This commit is contained in:
@@ -62,12 +62,12 @@ public class SchematicsDialog extends FloatingDialog{
|
||||
t.clear();
|
||||
int i = 0;
|
||||
|
||||
if(!schematics.all().contains(s -> search.isEmpty() || s.name().contains(search))){
|
||||
if(!schematics.all().contains(s -> search.isEmpty() || s.name().toLowerCase().contains(search.toLowerCase()))){
|
||||
t.add("$none");
|
||||
}
|
||||
|
||||
for(Schematic s : schematics.all()){
|
||||
if(!search.isEmpty() && !s.name().contains(search)) continue;
|
||||
if(!search.isEmpty() && !s.name().toLowerCase().contains(search.toLowerCase())) continue;
|
||||
|
||||
Button[] sel = {null};
|
||||
sel[0] = t.addButton(b -> {
|
||||
|
||||
@@ -296,7 +296,7 @@ public class Block extends BlockStorage{
|
||||
}
|
||||
|
||||
public void drawLight(Tile tile){
|
||||
if(hasLiquids && drawLiquidLight && tile.entity.liquids.current().lightColor.a > 0.001f){
|
||||
if(tile.entity != null && hasLiquids && drawLiquidLight && tile.entity.liquids.current().lightColor.a > 0.001f){
|
||||
drawLiquidLight(tile, tile.entity.liquids.current(), tile.entity.liquids.smoothAmount());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,10 +91,9 @@ public class NuclearReactor extends PowerGenerator{
|
||||
}
|
||||
|
||||
Liquid liquid = cliquid.liquid;
|
||||
float liquidAmount = cliquid.amount;
|
||||
|
||||
if(entity.heat > 0){
|
||||
float maxUsed = Math.min(Math.min(entity.liquids.get(liquid), entity.heat / coolantPower), liquidAmount * entity.delta());
|
||||
float maxUsed = Math.min(entity.liquids.get(liquid), entity.heat / coolantPower);
|
||||
entity.heat -= maxUsed * coolantPower;
|
||||
entity.liquids.remove(liquid, maxUsed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user