Minor ban/unban instruction and join dialog changes (#9249)
* Make PlacementFragment update after world processor's ban/unban instructions, add buttons in community server list to add server as remote * Small world processor ban/unban optimization
This commit is contained in:
@@ -1459,7 +1459,8 @@ public class LExecutor{
|
||||
case ban -> {
|
||||
Object cont = exec.obj(value);
|
||||
if(cont instanceof Block b){
|
||||
state.rules.bannedBlocks.add(b);
|
||||
// Rebuild PlacementFragment if anything has changed
|
||||
if(state.rules.bannedBlocks.add(b) && !headless) ui.hudfrag.blockfrag.rebuild();
|
||||
}else if(cont instanceof UnitType u){
|
||||
state.rules.bannedUnits.add(u);
|
||||
}
|
||||
@@ -1467,7 +1468,7 @@ public class LExecutor{
|
||||
case unban -> {
|
||||
Object cont = exec.obj(value);
|
||||
if(cont instanceof Block b){
|
||||
state.rules.bannedBlocks.remove(b);
|
||||
if(state.rules.bannedBlocks.remove(b) && !headless) ui.hudfrag.blockfrag.rebuild();
|
||||
}else if(cont instanceof UnitType u){
|
||||
state.rules.bannedUnits.remove(u);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user