SteamWar/BauSystem2.0
Archiviert
12
0

Hotfix Tracer
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-04-24 16:24:31 +02:00
Ursprung 37b76eff30
Commit b494f0bf3a
5 geänderte Dateien mit 6 neuen und 17 gelöschten Zeilen

Datei anzeigen

@ -209,11 +209,10 @@ public class TraceCommand extends SWCommand {
@AllArgsConstructor @AllArgsConstructor
private enum ShowModeType { private enum ShowModeType {
ENTITY((player, showModeParameter) -> new EntityShowMode(player, showModeParameter, 10), new ShowModeParameterType[]{}), ENTITY((player, showModeParameter) -> new EntityShowMode(player, showModeParameter, 10)),
RAW((player, showModeParameter) -> new EntityShowMode(player, showModeParameter, -1), new ShowModeParameterType[]{}); RAW((player, showModeParameter) -> new EntityShowMode(player, showModeParameter, -1));
private BiFunction<Player, ShowModeParameter, ShowMode<TNTPosition>> showModeBiFunction; private BiFunction<Player, ShowModeParameter, ShowMode<TNTPosition>> showModeBiFunction;
private ShowModeParameterType[] removedTypes;
} }
@ClassMapper(value = ShowModeParameterType.class, local = true) @ClassMapper(value = ShowModeParameterType.class, local = true)
@ -235,9 +234,6 @@ public class TraceCommand extends SWCommand {
@Override @Override
public List<String> tabCompletes(CommandSender commandSender, PreviousArguments previousArguments, String s) { public List<String> tabCompletes(CommandSender commandSender, PreviousArguments previousArguments, String s) {
Set<ShowModeParameterType> showModeParameterTypeSet = new HashSet<>(); Set<ShowModeParameterType> showModeParameterTypeSet = new HashSet<>();
previousArguments.getAll(ShowModeType.class).forEach(showModeType -> {
showModeParameterTypeSet.addAll(Arrays.asList(showModeType.removedTypes));
});
Arrays.stream(previousArguments.userArgs).map(showModeParameterTypesMap::get).forEach(showModeParameterTypeSet::add); Arrays.stream(previousArguments.userArgs).map(showModeParameterTypesMap::get).forEach(showModeParameterTypeSet::add);
showModeParameterTypeSet.remove(null); showModeParameterTypeSet.remove(null);

Datei anzeigen

@ -70,10 +70,9 @@ public abstract class AutoTraceRecorder implements TraceRecorder {
} }
@Override @Override
public Record postClear() { public void postClear() {
recordMap.clear(); recordMap.clear();
record = recordSupplier.get(); record = recordSupplier.get();
return record;
} }
@Override @Override

Datei anzeigen

@ -147,11 +147,7 @@ public class Recorder implements Listener {
} }
public void postClear(Region region) { public void postClear(Region region) {
TraceRecorder traceRecorder = get(region); get(region).postClear();
Record record = traceRecorder.postClear();
if (record != null) {
StoredRecords.add(region, record);
}
} }
@EventHandler @EventHandler

Datei anzeigen

@ -46,9 +46,8 @@ public class SimpleTraceRecorder implements TraceRecorder, ActiveTracer {
} }
@Override @Override
public Record postClear() { public void postClear() {
recordMap.clear(); recordMap.clear();
return record;
} }
private Record.TNTRecord getRecord(TNTPrimed tntPrimed) { private Record.TNTRecord getRecord(TNTPrimed tntPrimed) {

Datei anzeigen

@ -30,8 +30,7 @@ public interface TraceRecorder {
String scoreboard(Player player); String scoreboard(Player player);
default void recordSupplier(Supplier<Record> recordSupplier) { default void recordSupplier(Supplier<Record> recordSupplier) {
} }
default Record postClear() { default void postClear() {
return null;
} }
void spawn(TNTPrimed tntPrimed); void spawn(TNTPrimed tntPrimed);
void tick(TNTPrimed tntPrimed); void tick(TNTPrimed tntPrimed);