Drop lombok, it has been causing too much confusion
Basically the result of the Delombok function, except we use IntelliJ's equals, hashCode and toString and don't re-organize imports (cause that breaks the preprocessor) and a bunch of manual cleanup was necessary (and half the classes weren't even converted).
This commit is contained in:
@@ -4,26 +4,31 @@ import com.replaymod.replaystudio.pathing.interpolation.CatmullRomSplineInterpol
|
||||
import com.replaymod.replaystudio.pathing.interpolation.CubicSplineInterpolator;
|
||||
import com.replaymod.replaystudio.pathing.interpolation.Interpolator;
|
||||
import com.replaymod.replaystudio.pathing.interpolation.LinearInterpolator;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@AllArgsConstructor
|
||||
public enum InterpolatorType {
|
||||
DEFAULT("default", null, null),
|
||||
CATMULL_ROM("catmullrom", CatmullRomSplineInterpolator.class, () -> new CatmullRomSplineInterpolator(0.5)),
|
||||
CUBIC("cubic", CubicSplineInterpolator.class, CubicSplineInterpolator::new),
|
||||
LINEAR("linear", LinearInterpolator.class, LinearInterpolator::new);
|
||||
|
||||
@Getter
|
||||
private String localizationKey;
|
||||
|
||||
@Getter
|
||||
private Class<? extends Interpolator> interpolatorClass;
|
||||
|
||||
private Supplier<Interpolator> interpolatorConstructor;
|
||||
|
||||
InterpolatorType(String localizationKey, Class<? extends Interpolator> interpolatorClass, Supplier<Interpolator> interpolatorConstructor) {
|
||||
this.localizationKey = localizationKey;
|
||||
this.interpolatorClass = interpolatorClass;
|
||||
this.interpolatorConstructor = interpolatorConstructor;
|
||||
}
|
||||
|
||||
public String getLocalizationKey() {
|
||||
return localizationKey;
|
||||
}
|
||||
|
||||
public String getI18nName() {
|
||||
return String.format("replaymod.gui.editkeyframe.interpolator.%1$s.name", localizationKey);
|
||||
}
|
||||
@@ -32,6 +37,10 @@ public enum InterpolatorType {
|
||||
return String.format("replaymod.gui.editkeyframe.interpolator.%1$s.desc", localizationKey);
|
||||
}
|
||||
|
||||
public Class<? extends Interpolator> getInterpolatorClass() {
|
||||
return interpolatorClass;
|
||||
}
|
||||
|
||||
public static InterpolatorType fromString(String string) {
|
||||
for (InterpolatorType t : values()) {
|
||||
if (t.getI18nName().equals(string)) return t;
|
||||
|
||||
@@ -21,7 +21,6 @@ import com.replaymod.replaystudio.replay.ReplayFile;
|
||||
import com.replaymod.simplepathing.SPTimeline.SPPath;
|
||||
import com.replaymod.simplepathing.gui.GuiPathing;
|
||||
import com.replaymod.simplepathing.preview.PathPreview;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.util.crash.CrashReport;
|
||||
import net.minecraft.util.crash.CrashException;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@@ -149,7 +148,6 @@ public class ReplayModSimplePathing extends EventRegistrations implements Module
|
||||
private SPTimeline currentTimeline;
|
||||
|
||||
private SPPath selectedPath;
|
||||
@Getter
|
||||
private long selectedTime;
|
||||
|
||||
public SPPath getSelectedPath() {
|
||||
@@ -160,6 +158,10 @@ public class ReplayModSimplePathing extends EventRegistrations implements Module
|
||||
return selectedPath;
|
||||
}
|
||||
|
||||
public long getSelectedTime() {
|
||||
return selectedTime;
|
||||
}
|
||||
|
||||
public boolean isSelected(Keyframe keyframe) {
|
||||
return getSelectedPath() != null && currentTimeline.getKeyframe(selectedPath, selectedTime) == keyframe;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ import com.replaymod.replaystudio.pathing.property.Property;
|
||||
import com.replaymod.replaystudio.util.EntityPositionTracker;
|
||||
import com.replaymod.replaystudio.util.Location;
|
||||
import com.replaymod.simplepathing.properties.ExplicitInterpolationProperty;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.util.crash.CrashReport;
|
||||
import net.minecraft.util.crash.CrashReportSection;
|
||||
import net.minecraft.util.crash.CrashException;
|
||||
@@ -63,14 +62,10 @@ public class SPTimeline implements PathingRegistry {
|
||||
POSITION,
|
||||
}
|
||||
|
||||
@Getter
|
||||
private final Timeline timeline;
|
||||
@Getter
|
||||
private final Path timePath;
|
||||
@Getter
|
||||
private final Path positionPath;
|
||||
|
||||
@Getter
|
||||
private EntityPositionTracker entityTracker;
|
||||
private InterpolatorType defaultInterpolatorType;
|
||||
|
||||
@@ -84,6 +79,22 @@ public class SPTimeline implements PathingRegistry {
|
||||
this.positionPath = timeline.getPaths().get(SPPath.POSITION.ordinal());
|
||||
}
|
||||
|
||||
public Timeline getTimeline() {
|
||||
return timeline;
|
||||
}
|
||||
|
||||
public Path getTimePath() {
|
||||
return timePath;
|
||||
}
|
||||
|
||||
public Path getPositionPath() {
|
||||
return positionPath;
|
||||
}
|
||||
|
||||
public EntityPositionTracker getEntityTracker() {
|
||||
return entityTracker;
|
||||
}
|
||||
|
||||
public Path getPath(SPPath path) {
|
||||
switch (path) {
|
||||
case TIME:
|
||||
|
||||
@@ -34,7 +34,6 @@ import de.johni0702.minecraft.gui.popup.AbstractGuiPopup;
|
||||
import de.johni0702.minecraft.gui.utils.Colors;
|
||||
import de.johni0702.minecraft.gui.utils.Consumer;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.ReadablePoint;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.client.resource.language.I18n;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -283,7 +282,6 @@ public abstract class GuiEditKeyframe<T extends GuiEditKeyframe<T>> extends Abst
|
||||
|
||||
public class InterpolationPanel extends AbstractGuiContainer<InterpolationPanel> {
|
||||
|
||||
@Getter
|
||||
private SettingsPanel settingsPanel;
|
||||
|
||||
private GuiDropdownMenu<InterpolatorType> dropdown;
|
||||
@@ -330,6 +328,10 @@ public abstract class GuiEditKeyframe<T extends GuiEditKeyframe<T>> extends Abst
|
||||
}
|
||||
}
|
||||
|
||||
public SettingsPanel getSettingsPanel() {
|
||||
return settingsPanel;
|
||||
}
|
||||
|
||||
public void setSettingsPanel(InterpolatorType type) {
|
||||
removeElement(this.settingsPanel);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.replaymod.replaystudio.pathing.property.AbstractProperty;
|
||||
import com.replaymod.replaystudio.pathing.property.PropertyPart;
|
||||
import lombok.NonNull;
|
||||
import de.johni0702.minecraft.gui.utils.NonNull;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
Reference in New Issue
Block a user