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:
@@ -5,9 +5,6 @@ import com.google.common.util.concurrent.SettableFuture;
|
||||
import com.replaymod.core.ReplayMod;
|
||||
import com.replaymod.core.versions.MCVer;
|
||||
import de.johni0702.minecraft.gui.versions.Image;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import com.mojang.blaze3d.platform.GlStateManager;
|
||||
import net.minecraft.client.util.ScreenshotUtils;
|
||||
@@ -26,13 +23,29 @@ import static com.replaymod.core.versions.MCVer.getWindow;
|
||||
//$$ import java.io.File;
|
||||
//#endif
|
||||
|
||||
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
@Getter
|
||||
public class NoGuiScreenshot {
|
||||
private final Image image;
|
||||
private final int width;
|
||||
private final int height;
|
||||
|
||||
private NoGuiScreenshot(Image image, int width, int height) {
|
||||
this.image = image;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public Image getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return width;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
public static ListenableFuture<NoGuiScreenshot> take(final MinecraftClient mc, final int width, final int height) {
|
||||
final SettableFuture<NoGuiScreenshot> future = SettableFuture.create();
|
||||
Runnable runnable = new Runnable() {
|
||||
|
||||
@@ -10,8 +10,6 @@ import com.replaymod.replay.ReplayModReplay;
|
||||
import com.replaymod.replay.Setting;
|
||||
import com.replaymod.replay.mixin.FirstPersonRendererAccessor;
|
||||
import com.replaymod.replaystudio.util.Location;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.network.AbstractClientPlayerEntity;
|
||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||
@@ -105,8 +103,6 @@ public class CameraEntity
|
||||
*/
|
||||
public float roll;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private CameraController cameraController;
|
||||
|
||||
private long lastControllerUpdate = System.currentTimeMillis();
|
||||
@@ -166,6 +162,14 @@ public class CameraEntity
|
||||
}
|
||||
}
|
||||
|
||||
public CameraController getCameraController() {
|
||||
return cameraController;
|
||||
}
|
||||
|
||||
public void setCameraController(CameraController cameraController) {
|
||||
this.cameraController = cameraController;
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves the camera by the specified delta.
|
||||
* @param x Delta in X direction
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.replaymod.replay.camera;
|
||||
|
||||
import com.replaymod.replay.ReplayModReplay;
|
||||
import com.replaymod.replay.mixin.EntityPlayerAccessor;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.options.KeyBinding;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -21,10 +20,13 @@ import java.util.Arrays;
|
||||
|
||||
import static com.replaymod.core.versions.MCVer.*;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class SpectatorCameraController implements CameraController {
|
||||
private final CameraEntity camera;
|
||||
|
||||
public SpectatorCameraController(CameraEntity camera) {
|
||||
this.camera = camera;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(float partialTicksPassed) {
|
||||
MinecraftClient mc = getMinecraft();
|
||||
|
||||
@@ -2,15 +2,19 @@
|
||||
//$$ package com.replaymod.replay.events;
|
||||
//$$
|
||||
//$$ import com.replaymod.replay.camera.CameraEntity;
|
||||
//$$ import lombok.Getter;
|
||||
//$$ import lombok.RequiredArgsConstructor;
|
||||
//$$ import net.minecraftforge.eventbus.api.Cancelable;
|
||||
//$$ import net.minecraftforge.eventbus.api.Event;
|
||||
//$$
|
||||
//$$ @Cancelable
|
||||
//$$ @RequiredArgsConstructor
|
||||
//$$ public class ReplayChatMessageEvent extends Event {
|
||||
//$$ @Getter
|
||||
//$$ private final CameraEntity cameraEntity;
|
||||
//$$
|
||||
//$$ public ReplayChatMessageEvent(CameraEntity cameraEntity) {
|
||||
//$$ this.cameraEntity = cameraEntity;
|
||||
//$$ }
|
||||
//$$
|
||||
//$$ public CameraEntity getCameraEntity() {
|
||||
//$$ return cameraEntity;
|
||||
//$$ }
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
@@ -35,7 +35,6 @@ import de.johni0702.minecraft.gui.utils.Consumer;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.Dimension;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.ReadableDimension;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.ReadablePoint;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.client.gui.screen.NoticeScreen;
|
||||
import net.minecraft.util.crash.CrashReport;
|
||||
import net.minecraft.util.crash.CrashException;
|
||||
@@ -252,16 +251,12 @@ public class GuiReplayViewer extends GuiScreen {
|
||||
return popup;
|
||||
}
|
||||
|
||||
@Getter
|
||||
private final SettableFuture<File> future = SettableFuture.create();
|
||||
|
||||
@Getter
|
||||
private final GuiReplayList list = new GuiReplayList(popup);
|
||||
|
||||
@Getter
|
||||
private final GuiButton acceptButton = new GuiButton(popup).setI18nLabel("gui.done").setSize(50, 20).setDisabled();
|
||||
|
||||
@Getter
|
||||
private final GuiButton cancelButton = new GuiButton(popup).setI18nLabel("gui.cancel").setSize(50, 20);
|
||||
|
||||
|
||||
@@ -301,6 +296,22 @@ public class GuiReplayViewer extends GuiScreen {
|
||||
});
|
||||
}
|
||||
|
||||
public SettableFuture<File> getFuture() {
|
||||
return future;
|
||||
}
|
||||
|
||||
public GuiReplayList getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public GuiButton getAcceptButton() {
|
||||
return acceptButton;
|
||||
}
|
||||
|
||||
public GuiButton getCancelButton() {
|
||||
return cancelButton;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GuiSelectReplayPopup getThis() {
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user