Refactor key binding registrations to be more easily expandable
This commit is contained in:
@@ -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 net.minecraft.client.options.KeyBinding;
|
||||
import net.minecraft.util.crash.CrashReport;
|
||||
import net.minecraft.util.crash.CrashException;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@@ -40,8 +39,8 @@ public class ReplayModSimplePathing extends EventRegistrations implements Module
|
||||
public static ReplayModSimplePathing instance;
|
||||
|
||||
private ReplayMod core;
|
||||
public KeyBinding keyPositionKeyframe;
|
||||
public KeyBinding keyTimeKeyframe;
|
||||
public KeyBindingRegistry.Binding keyPositionKeyframe;
|
||||
public KeyBindingRegistry.Binding keyTimeKeyframe;
|
||||
|
||||
public static Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ public class GuiPathing {
|
||||
label = "replaymod.gui.ingame.menu.removespeckeyframe";
|
||||
}
|
||||
}
|
||||
tooltip.setText(I18n.translate(label) + " (" + getBoundKey(mod.keyPositionKeyframe) + ")");
|
||||
tooltip.setText(I18n.translate(label) + " (" + mod.keyPositionKeyframe.getBoundKey() + ")");
|
||||
}
|
||||
return tooltip;
|
||||
}
|
||||
@@ -152,7 +152,7 @@ public class GuiPathing {
|
||||
} else { // Remove time keyframe
|
||||
label = "replaymod.gui.ingame.menu.removetimekeyframe";
|
||||
}
|
||||
tooltip.setText(I18n.translate(label) + " (" + getBoundKey(mod.keyTimeKeyframe) + ")");
|
||||
tooltip.setText(I18n.translate(label) + " (" + mod.keyTimeKeyframe.getBoundKey() + ")");
|
||||
}
|
||||
return tooltip;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user