SteamWar/BauSystem2.0
Archiviert
12
0

Added count, fuse and time flags
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed

Dieser Commit ist enthalten in:
D4rkr34lm 2024-03-13 23:18:57 +01:00
Ursprung 8a78dcbc78
Commit 1282f6066c

Datei anzeigen

@ -100,7 +100,42 @@ public abstract class ViewFlag {
new RFallingBlockEntity(server, pos, Material.WHITE_STAINED_GLASS); new RFallingBlockEntity(server, pos, Material.WHITE_STAINED_GLASS);
} }
} }
};
public static ViewFlag COUNT = new ViewFlag(true, false, "count") {
@Override
public List<TNTRecord> filter(List<TNTRecord> records) { return records; }
@Override
public void modify(REntityServer server, List<TraceEntity> entities) {
for(TraceEntity entity: entities){
entity.setDisplayName(String.valueOf(entity.getRecords().size()));
}
}
};
public static ViewFlag FUSE = new ViewFlag(true, false, "fuse") {
@Override
public List<TNTRecord> filter(List<TNTRecord> records) { return records; }
@Override
public void modify(REntityServer server, List<TraceEntity> entities) {
for(TraceEntity entity: entities){
entity.setDisplayName(String.valueOf(entity.getRecords().get(0).getFuse()));
}
}
};
public static ViewFlag TIME = new ViewFlag(true, false, "time") {
@Override
public List<TNTRecord> filter(List<TNTRecord> records) { return records; }
@Override
public void modify(REntityServer server, List<TraceEntity> entities) {
for(TraceEntity entity: entities){
entity.setDisplayName(String.valueOf(entity.getRecords().get(0).getTicksSinceStart()));
}
}
}; };
/** /**