Replace references to NEU with Firmament
This commit is contained in:
@@ -12,4 +12,4 @@ max_line_length = 120
|
|||||||
[*.kt]
|
[*.kt]
|
||||||
ij_kotlin_name_count_to_use_star_import = 99999
|
ij_kotlin_name_count_to_use_star_import = 99999
|
||||||
ij_kotlin_name_count_to_use_star_import_for_members = 99999
|
ij_kotlin_name_count_to_use_star_import_for_members = 99999
|
||||||
ij_kotlin_imports_layout = *, |, kotlinx.**, kotlin.**, net.minecraft.**, moe.nea.notenoughupdates.**, |, $*
|
ij_kotlin_imports_layout = *, |, kotlinx.**, kotlin.**, net.minecraft.**, moe.nea.firmament.**, |, $*
|
||||||
|
|||||||
@@ -13,13 +13,13 @@ plugins {
|
|||||||
|
|
||||||
loom {
|
loom {
|
||||||
clientOnlyMinecraftJar()
|
clientOnlyMinecraftJar()
|
||||||
accessWidenerPath.set(project.file("src/main/resources/notenoughupdates.accesswidener"))
|
accessWidenerPath.set(project.file("src/main/resources/firmament.accesswidener"))
|
||||||
runs {
|
runs {
|
||||||
removeIf { it.name != "client" }
|
removeIf { it.name != "client" }
|
||||||
named("client") {
|
named("client") {
|
||||||
property("devauth.enabled", "true")
|
property("devauth.enabled", "true")
|
||||||
property("fabric.log.level", "info")
|
property("fabric.log.level", "info")
|
||||||
property("notenoughupdates.debug", "true")
|
property("firmament.debug", "true")
|
||||||
/*
|
/*
|
||||||
vmArg("-XX:+AllowEnhancedClassRedefinition")
|
vmArg("-XX:+AllowEnhancedClassRedefinition")
|
||||||
vmArg("-XX:HotswapAgent=fatjar")
|
vmArg("-XX:HotswapAgent=fatjar")
|
||||||
@@ -145,6 +145,6 @@ tasks.processResources {
|
|||||||
|
|
||||||
tasks.license {
|
tasks.license {
|
||||||
scanConfiguration(project.configurations.compileClasspath.get())
|
scanConfiguration(project.configurations.compileClasspath.get())
|
||||||
outputFile.set(file("$buildDir/LICENSES-NEU.json"))
|
outputFile.set(file("$buildDir/LICENSES-FIRMAMENT.json"))
|
||||||
licenseFormatter.set(moe.nea.licenseextractificator.JsonLicenseFormatter())
|
licenseFormatter.set(moe.nea.licenseextractificator.JsonLicenseFormatter())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package moe.nea.notenoughupdates.init;
|
package moe.nea.firmament.init;
|
||||||
|
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates;
|
|
||||||
import org.objectweb.asm.tree.ClassNode;
|
import org.objectweb.asm.tree.ClassNode;
|
||||||
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
|
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
|
||||||
import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
|
import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
|
||||||
@@ -21,8 +20,8 @@ public class MixinPlugin implements IMixinConfigPlugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
|
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
|
||||||
return Boolean.getBoolean("notenoughupdates.debug") ||
|
return Boolean.getBoolean("firmament.debug") ||
|
||||||
!mixinClassName.startsWith("moe.nea.notenoughupdates.mixins.devenv");
|
!mixinClassName.startsWith("moe.nea.firmament.mixins.devenv");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package moe.nea.notenoughupdates.mixins;
|
package moe.nea.firmament.mixins;
|
||||||
|
|
||||||
import moe.nea.notenoughupdates.events.ParticleSpawnEvent;
|
import moe.nea.firmament.events.ParticleSpawnEvent;
|
||||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||||
import net.minecraft.network.packet.s2c.play.ParticleS2CPacket;
|
import net.minecraft.network.packet.s2c.play.ParticleS2CPacket;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package moe.nea.notenoughupdates.mixins;
|
package moe.nea.firmament.mixins;
|
||||||
|
|
||||||
import moe.nea.notenoughupdates.events.WorldReadyEvent;
|
import moe.nea.firmament.events.WorldReadyEvent;
|
||||||
import net.minecraft.client.gui.screen.DownloadingTerrainScreen;
|
import net.minecraft.client.gui.screen.DownloadingTerrainScreen;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package moe.nea.notenoughupdates.mixins;
|
package moe.nea.firmament.mixins;
|
||||||
|
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
import moe.nea.notenoughupdates.events.ServerChatLineReceivedEvent;
|
import moe.nea.firmament.events.ServerChatLineReceivedEvent;
|
||||||
import net.minecraft.client.network.message.MessageHandler;
|
import net.minecraft.client.network.message.MessageHandler;
|
||||||
import net.minecraft.network.message.MessageType;
|
import net.minecraft.network.message.MessageType;
|
||||||
import net.minecraft.network.message.SignedMessage;
|
import net.minecraft.network.message.SignedMessage;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package moe.nea.notenoughupdates.mixins;
|
package moe.nea.firmament.mixins;
|
||||||
|
|
||||||
import moe.nea.notenoughupdates.events.ScreenOpenEvent;
|
import moe.nea.firmament.events.ScreenOpenEvent;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package moe.nea.notenoughupdates.mixins;
|
package moe.nea.firmament.mixins;
|
||||||
|
|
||||||
import moe.nea.notenoughupdates.events.WorldRenderLastEvent;
|
import moe.nea.firmament.events.WorldRenderLastEvent;
|
||||||
import net.minecraft.client.render.Camera;
|
import net.minecraft.client.render.Camera;
|
||||||
import net.minecraft.client.render.GameRenderer;
|
import net.minecraft.client.render.GameRenderer;
|
||||||
import net.minecraft.client.render.LightmapTextureManager;
|
import net.minecraft.client.render.LightmapTextureManager;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.mixins.accessor;
|
package moe.nea.firmament.mixins.accessor;
|
||||||
|
|
||||||
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
||||||
import net.minecraft.screen.slot.Slot;
|
import net.minecraft.screen.slot.Slot;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.mixins.devenv;
|
package moe.nea.firmament.mixins.devenv;
|
||||||
|
|
||||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.mixins.devenv;
|
package moe.nea.firmament.mixins.devenv;
|
||||||
|
|
||||||
import net.minecraft.entity.projectile.FishingBobberEntity;
|
import net.minecraft.entity.projectile.FishingBobberEntity;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
package moe.nea.notenoughupdates.mixins.devenv;
|
package moe.nea.firmament.mixins.devenv;
|
||||||
|
|
||||||
import net.minecraft.scoreboard.Scoreboard;
|
import net.minecraft.scoreboard.Scoreboard;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
|
||||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
|
|
||||||
@Mixin(Scoreboard.class)
|
@Mixin(Scoreboard.class)
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates
|
package moe.nea.firmament
|
||||||
|
|
||||||
import com.mojang.brigadier.CommandDispatcher
|
import com.mojang.brigadier.CommandDispatcher
|
||||||
import io.ktor.client.*
|
import io.ktor.client.*
|
||||||
@@ -21,20 +21,20 @@ import kotlinx.coroutines.*
|
|||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlin.coroutines.EmptyCoroutineContext
|
import kotlin.coroutines.EmptyCoroutineContext
|
||||||
import net.minecraft.command.CommandRegistryAccess
|
import net.minecraft.command.CommandRegistryAccess
|
||||||
import moe.nea.notenoughupdates.commands.registerNeuCommand
|
import moe.nea.firmament.commands.registerFirmamentCommand
|
||||||
import moe.nea.notenoughupdates.dbus.NEUDbusObject
|
import moe.nea.firmament.dbus.FirmamentDbusObject
|
||||||
import moe.nea.notenoughupdates.features.FeatureManager
|
import moe.nea.firmament.features.FeatureManager
|
||||||
import moe.nea.notenoughupdates.repo.RepoManager
|
import moe.nea.firmament.repo.RepoManager
|
||||||
import moe.nea.notenoughupdates.util.SBData
|
import moe.nea.firmament.util.SBData
|
||||||
import moe.nea.notenoughupdates.util.data.IDataHolder
|
import moe.nea.firmament.util.data.IDataHolder
|
||||||
|
|
||||||
object NotEnoughUpdates : ModInitializer, ClientModInitializer {
|
object Firmament : ModInitializer, ClientModInitializer {
|
||||||
const val MOD_ID = "notenoughupdates"
|
const val MOD_ID = "firmament"
|
||||||
|
|
||||||
val DEBUG = System.getProperty("notenoughupdates.debug") == "true"
|
val DEBUG = System.getProperty("firmament.debug") == "true"
|
||||||
val DATA_DIR: Path = Path.of(".notenoughupdates").also { Files.createDirectories(it) }
|
val DATA_DIR: Path = Path.of(".firmament").also { Files.createDirectories(it) }
|
||||||
val CONFIG_DIR: Path = Path.of("config/notenoughupdates").also { Files.createDirectories(it) }
|
val CONFIG_DIR: Path = Path.of("config/firmament").also { Files.createDirectories(it) }
|
||||||
val logger = LogManager.getLogger("NotEnoughUpdates")
|
val logger = LogManager.getLogger("Firmament")
|
||||||
val metadata: ModMetadata by lazy { FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow().metadata }
|
val metadata: ModMetadata by lazy { FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow().metadata }
|
||||||
val version: Version by lazy { metadata.version }
|
val version: Version by lazy { metadata.version }
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ object NotEnoughUpdates : ModInitializer, ClientModInitializer {
|
|||||||
json(json)
|
json(json)
|
||||||
}
|
}
|
||||||
install(UserAgent) {
|
install(UserAgent) {
|
||||||
agent = "NotEnoughUpdates1.19/$version"
|
agent = "Firmament/$version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -59,20 +59,20 @@ object NotEnoughUpdates : ModInitializer, ClientModInitializer {
|
|||||||
val dbusConnection = DBusConnectionBuilder.forSessionBus()
|
val dbusConnection = DBusConnectionBuilder.forSessionBus()
|
||||||
.build()
|
.build()
|
||||||
val coroutineScope =
|
val coroutineScope =
|
||||||
CoroutineScope(EmptyCoroutineContext + CoroutineName("NotEnoughUpdates")) + SupervisorJob(globalJob)
|
CoroutineScope(EmptyCoroutineContext + CoroutineName("Firmament")) + SupervisorJob(globalJob)
|
||||||
|
|
||||||
private fun registerCommands(
|
private fun registerCommands(
|
||||||
dispatcher: CommandDispatcher<FabricClientCommandSource>,
|
dispatcher: CommandDispatcher<FabricClientCommandSource>,
|
||||||
@Suppress("UNUSED_PARAMETER")
|
@Suppress("UNUSED_PARAMETER")
|
||||||
ctx: CommandRegistryAccess
|
ctx: CommandRegistryAccess
|
||||||
) {
|
) {
|
||||||
registerNeuCommand(dispatcher)
|
registerFirmamentCommand(dispatcher)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onInitialize() {
|
override fun onInitialize() {
|
||||||
|
|
||||||
dbusConnection.requestBusName("moe.nea.notenoughupdates")
|
dbusConnection.requestBusName("moe.nea.firmament")
|
||||||
dbusConnection.exportObject(NEUDbusObject)
|
dbusConnection.exportObject(FirmamentDbusObject)
|
||||||
IDataHolder.registerEvents()
|
IDataHolder.registerEvents()
|
||||||
RepoManager.initialize()
|
RepoManager.initialize()
|
||||||
SBData.init()
|
SBData.init()
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.commands
|
package moe.nea.firmament.commands
|
||||||
|
|
||||||
import com.mojang.brigadier.arguments.ArgumentType
|
import com.mojang.brigadier.arguments.ArgumentType
|
||||||
import com.mojang.brigadier.builder.ArgumentBuilder
|
import com.mojang.brigadier.builder.ArgumentBuilder
|
||||||
@@ -7,7 +7,7 @@ import com.mojang.brigadier.builder.RequiredArgumentBuilder
|
|||||||
import com.mojang.brigadier.context.CommandContext
|
import com.mojang.brigadier.context.CommandContext
|
||||||
import java.lang.reflect.ParameterizedType
|
import java.lang.reflect.ParameterizedType
|
||||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource
|
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource
|
||||||
import moe.nea.notenoughupdates.util.iterate
|
import moe.nea.firmament.util.iterate
|
||||||
|
|
||||||
|
|
||||||
typealias DefaultSource = FabricClientCommandSource
|
typealias DefaultSource = FabricClientCommandSource
|
||||||
66
src/main/kotlin/moe/nea/firmament/commands/rome.kt
Normal file
66
src/main/kotlin/moe/nea/firmament/commands/rome.kt
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
package moe.nea.firmament.commands
|
||||||
|
|
||||||
|
import com.mojang.brigadier.CommandDispatcher
|
||||||
|
import io.github.cottonmc.cotton.gui.client.CottonClientScreen
|
||||||
|
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource
|
||||||
|
import net.minecraft.text.Text
|
||||||
|
import moe.nea.firmament.features.world.FairySouls
|
||||||
|
import moe.nea.firmament.gui.repoGui
|
||||||
|
import moe.nea.firmament.repo.RepoManager
|
||||||
|
import moe.nea.firmament.util.SBData
|
||||||
|
import moe.nea.firmament.util.ScreenUtil.setScreenLater
|
||||||
|
|
||||||
|
|
||||||
|
fun firmamentCommand() = literal("firmament") {
|
||||||
|
thenLiteral("repo") {
|
||||||
|
thenLiteral("reload") {
|
||||||
|
thenLiteral("fetch") {
|
||||||
|
thenExecute {
|
||||||
|
source.sendFeedback(Text.translatable("firmament.repo.reload.network")) // TODO better reporting
|
||||||
|
RepoManager.launchAsyncUpdate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
thenExecute {
|
||||||
|
source.sendFeedback(Text.translatable("firmament.repo.reload.disk"))
|
||||||
|
RepoManager.reload()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
thenExecute {
|
||||||
|
setScreenLater(CottonClientScreen(repoGui()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
thenLiteral("dev") {
|
||||||
|
thenLiteral("config") {
|
||||||
|
thenExecute {
|
||||||
|
FairySouls.TConfig.showConfigEditor()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
thenLiteral("sbdata") {
|
||||||
|
thenExecute {
|
||||||
|
source.sendFeedback(Text.translatable("firmament.sbinfo.profile", SBData.profileCuteName))
|
||||||
|
val locrawInfo = SBData.locraw
|
||||||
|
if (locrawInfo == null) {
|
||||||
|
source.sendFeedback(Text.translatable("firmament.sbinfo.nolocraw"))
|
||||||
|
} else {
|
||||||
|
source.sendFeedback(Text.translatable("firmament.sbinfo.server", locrawInfo.server))
|
||||||
|
source.sendFeedback(Text.translatable("firmament.sbinfo.gametype", locrawInfo.gametype))
|
||||||
|
source.sendFeedback(Text.translatable("firmament.sbinfo.mode", locrawInfo.mode))
|
||||||
|
source.sendFeedback(Text.translatable("firmament.sbinfo.map", locrawInfo.map))
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fun registerFirmamentCommand(dispatcher: CommandDispatcher<FabricClientCommandSource>) {
|
||||||
|
val firmament = dispatcher.register(firmamentCommand())
|
||||||
|
dispatcher.register(literal("firm") {
|
||||||
|
redirect(firmament)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package moe.nea.notenoughupdates.dbus
|
package moe.nea.firmament.dbus
|
||||||
|
|
||||||
import org.freedesktop.dbus.annotations.DBusInterfaceName
|
import org.freedesktop.dbus.annotations.DBusInterfaceName
|
||||||
import org.freedesktop.dbus.interfaces.DBusInterface
|
import org.freedesktop.dbus.interfaces.DBusInterface
|
||||||
|
|
||||||
@DBusInterfaceName("moe.nea.NotEnoughUpdates")
|
@DBusInterfaceName("moe.nea.Firmament")
|
||||||
interface NEUDbusInterface : DBusInterface {
|
interface FirmamentDbusInterface : DBusInterface {
|
||||||
fun sayHello(): String
|
fun sayHello(): String
|
||||||
fun getCurrentRepoCommit(): String
|
fun getCurrentRepoCommit(): String
|
||||||
fun requestRepoReDownload()
|
fun requestRepoReDownload()
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package moe.nea.notenoughupdates.dbus
|
package moe.nea.firmament.dbus
|
||||||
|
|
||||||
import moe.nea.notenoughupdates.repo.RepoManager
|
import moe.nea.firmament.repo.RepoManager
|
||||||
|
|
||||||
object NEUDbusObject : NEUDbusInterface {
|
object FirmamentDbusObject : FirmamentDbusInterface {
|
||||||
override fun sayHello(): String {
|
override fun sayHello(): String {
|
||||||
return "Hello from NEU"
|
return "Hello from Firmanet"
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getCurrentRepoCommit(): String {
|
override fun getCurrentRepoCommit(): String {
|
||||||
@@ -16,6 +16,6 @@ object NEUDbusObject : NEUDbusInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun getObjectPath(): String {
|
override fun getObjectPath(): String {
|
||||||
return "/moe/nea/NotEnoughUpdates"
|
return "/moe/nea/Firmament"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.events
|
package moe.nea.firmament.events
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An event that can be fired by a [NEUEventBus].
|
* An event that can be fired by a [NEUEventBus].
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package moe.nea.notenoughupdates.events
|
package moe.nea.firmament.events
|
||||||
|
|
||||||
import java.util.concurrent.CopyOnWriteArrayList
|
import java.util.concurrent.CopyOnWriteArrayList
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates
|
import moe.nea.firmament.Firmament
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A pubsub event bus.
|
* A pubsub event bus.
|
||||||
@@ -27,7 +27,7 @@ open class NEUEventBus<T : NEUEvent> {
|
|||||||
try {
|
try {
|
||||||
function.invocation(event)
|
function.invocation(event)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
NotEnoughUpdates.logger.error("Caught exception during processing event $event", e)
|
Firmament.logger.error("Caught exception during processing event $event", e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.events
|
package moe.nea.firmament.events
|
||||||
|
|
||||||
import net.minecraft.particle.ParticleEffect
|
import net.minecraft.particle.ParticleEffect
|
||||||
import net.minecraft.util.math.Vec3d
|
import net.minecraft.util.math.Vec3d
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.events
|
package moe.nea.firmament.events
|
||||||
|
|
||||||
import net.minecraft.client.gui.screen.Screen
|
import net.minecraft.client.gui.screen.Screen
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package moe.nea.notenoughupdates.events
|
package moe.nea.firmament.events
|
||||||
|
|
||||||
import net.minecraft.text.Text
|
import net.minecraft.text.Text
|
||||||
import moe.nea.notenoughupdates.util.unformattedString
|
import moe.nea.firmament.util.unformattedString
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event gets published whenever the client receives a chat message from the server.
|
* This event gets published whenever the client receives a chat message from the server.
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package moe.nea.notenoughupdates.events
|
package moe.nea.firmament.events
|
||||||
|
|
||||||
import moe.nea.notenoughupdates.util.Locraw
|
import moe.nea.firmament.util.Locraw
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event gets published whenever `/locraw` is queried and HyPixel returns a location different to the old one.
|
* This event gets published whenever `/locraw` is queried and HyPixel returns a location different to the old one.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.events
|
package moe.nea.firmament.events
|
||||||
|
|
||||||
class WorldReadyEvent : NEUEvent() {
|
class WorldReadyEvent : NEUEvent() {
|
||||||
companion object : NEUEventBus<WorldReadyEvent>()
|
companion object : NEUEventBus<WorldReadyEvent>()
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.events
|
package moe.nea.firmament.events
|
||||||
|
|
||||||
import org.joml.Matrix4f
|
import org.joml.Matrix4f
|
||||||
import net.minecraft.client.render.Camera
|
import net.minecraft.client.render.Camera
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package moe.nea.notenoughupdates.features
|
package moe.nea.firmament.features
|
||||||
|
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.serializer
|
import kotlinx.serialization.serializer
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates
|
import moe.nea.firmament.Firmament
|
||||||
import moe.nea.notenoughupdates.features.fishing.FishingWarning
|
import moe.nea.firmament.features.fishing.FishingWarning
|
||||||
import moe.nea.notenoughupdates.features.world.FairySouls
|
import moe.nea.firmament.features.world.FairySouls
|
||||||
import moe.nea.notenoughupdates.util.data.DataHolder
|
import moe.nea.firmament.util.data.DataHolder
|
||||||
|
|
||||||
object FeatureManager : DataHolder<FeatureManager.Config>(serializer(), "features", ::Config) {
|
object FeatureManager : DataHolder<FeatureManager.Config>(serializer(), "features", ::Config) {
|
||||||
@Serializable
|
@Serializable
|
||||||
@@ -33,7 +33,7 @@ object FeatureManager : DataHolder<FeatureManager.Config>(serializer(), "feature
|
|||||||
fun loadFeature(feature: NEUFeature) {
|
fun loadFeature(feature: NEUFeature) {
|
||||||
synchronized(features) {
|
synchronized(features) {
|
||||||
if (feature.identifier in features) {
|
if (feature.identifier in features) {
|
||||||
NotEnoughUpdates.logger.error("Double registering feature ${feature.identifier}. Ignoring second instance $feature")
|
Firmament.logger.error("Double registering feature ${feature.identifier}. Ignoring second instance $feature")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
features[feature.identifier] = feature
|
features[feature.identifier] = feature
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package moe.nea.notenoughupdates.features
|
package moe.nea.firmament.features
|
||||||
|
|
||||||
import moe.nea.notenoughupdates.util.config.ManagedConfig
|
import moe.nea.firmament.util.config.ManagedConfig
|
||||||
|
|
||||||
interface NEUFeature {
|
interface NEUFeature {
|
||||||
val name: String
|
val name: String
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.features.fishing
|
package moe.nea.firmament.features.fishing
|
||||||
|
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
import kotlin.math.absoluteValue
|
import kotlin.math.absoluteValue
|
||||||
@@ -10,14 +10,14 @@ import kotlin.time.Duration.Companion.seconds
|
|||||||
import net.minecraft.entity.projectile.FishingBobberEntity
|
import net.minecraft.entity.projectile.FishingBobberEntity
|
||||||
import net.minecraft.particle.ParticleTypes
|
import net.minecraft.particle.ParticleTypes
|
||||||
import net.minecraft.util.math.Vec3d
|
import net.minecraft.util.math.Vec3d
|
||||||
import moe.nea.notenoughupdates.events.ParticleSpawnEvent
|
import moe.nea.firmament.events.ParticleSpawnEvent
|
||||||
import moe.nea.notenoughupdates.events.WorldReadyEvent
|
import moe.nea.firmament.events.WorldReadyEvent
|
||||||
import moe.nea.notenoughupdates.events.WorldRenderLastEvent
|
import moe.nea.firmament.events.WorldRenderLastEvent
|
||||||
import moe.nea.notenoughupdates.features.NEUFeature
|
import moe.nea.firmament.features.NEUFeature
|
||||||
import moe.nea.notenoughupdates.util.MC
|
import moe.nea.firmament.util.MC
|
||||||
import moe.nea.notenoughupdates.util.TimeMark
|
import moe.nea.firmament.util.TimeMark
|
||||||
import moe.nea.notenoughupdates.util.config.ManagedConfig
|
import moe.nea.firmament.util.config.ManagedConfig
|
||||||
import moe.nea.notenoughupdates.util.render.RenderBlockContext.Companion.renderBlocks
|
import moe.nea.firmament.util.render.RenderBlockContext.Companion.renderBlocks
|
||||||
|
|
||||||
object FishingWarning : NEUFeature {
|
object FishingWarning : NEUFeature {
|
||||||
override val name: String
|
override val name: String
|
||||||
@@ -1,20 +1,20 @@
|
|||||||
package moe.nea.notenoughupdates.features.world
|
package moe.nea.firmament.features.world
|
||||||
|
|
||||||
import io.github.moulberry.repo.data.Coordinate
|
import io.github.moulberry.repo.data.Coordinate
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.serializer
|
import kotlinx.serialization.serializer
|
||||||
import moe.nea.notenoughupdates.events.ServerChatLineReceivedEvent
|
import moe.nea.firmament.events.ServerChatLineReceivedEvent
|
||||||
import moe.nea.notenoughupdates.events.SkyblockServerUpdateEvent
|
import moe.nea.firmament.events.SkyblockServerUpdateEvent
|
||||||
import moe.nea.notenoughupdates.events.WorldRenderLastEvent
|
import moe.nea.firmament.events.WorldRenderLastEvent
|
||||||
import moe.nea.notenoughupdates.features.NEUFeature
|
import moe.nea.firmament.features.NEUFeature
|
||||||
import moe.nea.notenoughupdates.repo.RepoManager
|
import moe.nea.firmament.repo.RepoManager
|
||||||
import moe.nea.notenoughupdates.util.MC
|
import moe.nea.firmament.util.MC
|
||||||
import moe.nea.notenoughupdates.util.SBData
|
import moe.nea.firmament.util.SBData
|
||||||
import moe.nea.notenoughupdates.util.blockPos
|
import moe.nea.firmament.util.blockPos
|
||||||
import moe.nea.notenoughupdates.util.config.ManagedConfig
|
import moe.nea.firmament.util.config.ManagedConfig
|
||||||
import moe.nea.notenoughupdates.util.data.ProfileSpecificDataHolder
|
import moe.nea.firmament.util.data.ProfileSpecificDataHolder
|
||||||
import moe.nea.notenoughupdates.util.render.RenderBlockContext.Companion.renderBlocks
|
import moe.nea.firmament.util.render.RenderBlockContext.Companion.renderBlocks
|
||||||
import moe.nea.notenoughupdates.util.unformattedString
|
import moe.nea.firmament.util.unformattedString
|
||||||
|
|
||||||
|
|
||||||
object FairySouls : NEUFeature {
|
object FairySouls : NEUFeature {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.gui
|
package moe.nea.firmament.gui
|
||||||
|
|
||||||
import io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
|
import io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
|
||||||
import io.github.cottonmc.cotton.gui.widget.WButton
|
import io.github.cottonmc.cotton.gui.widget.WButton
|
||||||
@@ -8,8 +8,8 @@ import io.github.cottonmc.cotton.gui.widget.WToggleButton
|
|||||||
import io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment
|
import io.github.cottonmc.cotton.gui.widget.data.HorizontalAlignment
|
||||||
import io.github.cottonmc.cotton.gui.widget.data.Insets
|
import io.github.cottonmc.cotton.gui.widget.data.Insets
|
||||||
import io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment
|
import io.github.cottonmc.cotton.gui.widget.data.VerticalAlignment
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates
|
import moe.nea.firmament.Firmament
|
||||||
import moe.nea.notenoughupdates.util.data.DataHolder
|
import moe.nea.firmament.util.data.DataHolder
|
||||||
import net.minecraft.text.Text
|
import net.minecraft.text.Text
|
||||||
import kotlin.reflect.KMutableProperty1
|
import kotlin.reflect.KMutableProperty1
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ class ConfigGui<K>(val holder: DataHolder<K>, val build: ConfigGui<K>.() -> Unit
|
|||||||
|
|
||||||
fun title(text: Text) {
|
fun title(text: Text) {
|
||||||
if (col != 0) {
|
if (col != 0) {
|
||||||
NotEnoughUpdates.logger.warn("Set title not at the top of the ConfigGui")
|
Firmament.logger.warn("Set title not at the top of the ConfigGui")
|
||||||
}
|
}
|
||||||
val label = WLabel(text)
|
val label = WLabel(text)
|
||||||
label.verticalAlignment = VerticalAlignment.TOP
|
label.verticalAlignment = VerticalAlignment.TOP
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.gui
|
package moe.nea.firmament.gui
|
||||||
|
|
||||||
import io.github.cottonmc.cotton.gui.widget.WPanelWithInsets
|
import io.github.cottonmc.cotton.gui.widget.WPanelWithInsets
|
||||||
import io.github.cottonmc.cotton.gui.widget.WWidget
|
import io.github.cottonmc.cotton.gui.widget.WWidget
|
||||||
36
src/main/kotlin/moe/nea/firmament/gui/repogui.kt
Normal file
36
src/main/kotlin/moe/nea/firmament/gui/repogui.kt
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
package moe.nea.firmament.gui
|
||||||
|
|
||||||
|
import net.minecraft.text.Text
|
||||||
|
import moe.nea.firmament.repo.RepoManager
|
||||||
|
|
||||||
|
fun repoGui(): ConfigGui<RepoManager.Config> {
|
||||||
|
return ConfigGui(RepoManager) {
|
||||||
|
title(Text.translatable("firmament.gui.repo.title"))
|
||||||
|
toggle(Text.translatable("firmament.gui.repo.autoupdate"), RepoManager.Config::autoUpdate)
|
||||||
|
textfield(
|
||||||
|
Text.translatable("firmament.gui.repo.username"),
|
||||||
|
Text.translatable("firmament.gui.repo.hint.username"),
|
||||||
|
RepoManager.Config::user,
|
||||||
|
maxLength = 255
|
||||||
|
)
|
||||||
|
textfield(
|
||||||
|
Text.translatable("firmament.gui.repo.reponame"),
|
||||||
|
Text.translatable("firmament.gui.repo.hint.reponame"),
|
||||||
|
RepoManager.Config::repo
|
||||||
|
)
|
||||||
|
textfield(
|
||||||
|
Text.translatable("firmament.gui.repo.branch"),
|
||||||
|
Text.translatable("firmament.gui.repo.hint.branch"),
|
||||||
|
RepoManager.Config::branch
|
||||||
|
)
|
||||||
|
button(
|
||||||
|
Text.translatable("firmament.gui.repo.reset.label"),
|
||||||
|
Text.translatable("firmament.gui.repo.reset"),
|
||||||
|
) {
|
||||||
|
RepoManager.data.user = "NotEnoughUpdates"
|
||||||
|
RepoManager.data.repo = "NotEnoughUpdates-REPO"
|
||||||
|
RepoManager.data.branch = "dangerous"
|
||||||
|
reload()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.hud
|
package moe.nea.firmament.hud
|
||||||
|
|
||||||
import io.github.cottonmc.cotton.gui.client.ScreenDrawing
|
import io.github.cottonmc.cotton.gui.client.ScreenDrawing
|
||||||
import io.github.cottonmc.cotton.gui.widget.WWidget
|
import io.github.cottonmc.cotton.gui.widget.WWidget
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.recipes
|
package moe.nea.firmament.recipes
|
||||||
|
|
||||||
import io.github.moulberry.repo.data.NEUCraftingRecipe
|
import io.github.moulberry.repo.data.NEUCraftingRecipe
|
||||||
import io.github.moulberry.repo.data.NEUIngredient
|
import io.github.moulberry.repo.data.NEUIngredient
|
||||||
@@ -12,14 +12,14 @@ import me.shedaniel.rei.api.common.category.CategoryIdentifier
|
|||||||
import me.shedaniel.rei.api.common.util.EntryStacks
|
import me.shedaniel.rei.api.common.util.EntryStacks
|
||||||
import net.minecraft.block.Blocks
|
import net.minecraft.block.Blocks
|
||||||
import net.minecraft.text.Text
|
import net.minecraft.text.Text
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates
|
import moe.nea.firmament.Firmament
|
||||||
import moe.nea.notenoughupdates.rei.SBItemEntryDefinition
|
import moe.nea.firmament.rei.SBItemEntryDefinition
|
||||||
|
|
||||||
class SBCraftingRecipe(override val neuRecipe: NEUCraftingRecipe) : SBRecipe() {
|
class SBCraftingRecipe(override val neuRecipe: NEUCraftingRecipe) : SBRecipe() {
|
||||||
override fun getCategoryIdentifier(): CategoryIdentifier<*> = Category.catIdentifier
|
override fun getCategoryIdentifier(): CategoryIdentifier<*> = Category.catIdentifier
|
||||||
|
|
||||||
object Category : DisplayCategory<SBCraftingRecipe> {
|
object Category : DisplayCategory<SBCraftingRecipe> {
|
||||||
val catIdentifier = CategoryIdentifier.of<SBCraftingRecipe>(NotEnoughUpdates.MOD_ID, "crafing_recipe")
|
val catIdentifier = CategoryIdentifier.of<SBCraftingRecipe>(Firmament.MOD_ID, "crafing_recipe")
|
||||||
override fun getCategoryIdentifier(): CategoryIdentifier<out SBCraftingRecipe> = catIdentifier
|
override fun getCategoryIdentifier(): CategoryIdentifier<out SBCraftingRecipe> = catIdentifier
|
||||||
|
|
||||||
override fun getTitle(): Text = Text.literal("SkyBlock Crafting")
|
override fun getTitle(): Text = Text.literal("SkyBlock Crafting")
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.recipes
|
package moe.nea.firmament.recipes
|
||||||
|
|
||||||
import io.github.moulberry.repo.data.NEUForgeRecipe
|
import io.github.moulberry.repo.data.NEUForgeRecipe
|
||||||
import me.shedaniel.math.Point
|
import me.shedaniel.math.Point
|
||||||
@@ -11,15 +11,15 @@ import me.shedaniel.rei.api.common.category.CategoryIdentifier
|
|||||||
import me.shedaniel.rei.api.common.util.EntryStacks
|
import me.shedaniel.rei.api.common.util.EntryStacks
|
||||||
import net.minecraft.block.Blocks
|
import net.minecraft.block.Blocks
|
||||||
import net.minecraft.text.Text
|
import net.minecraft.text.Text
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates
|
import moe.nea.firmament.Firmament
|
||||||
import moe.nea.notenoughupdates.rei.SBItemEntryDefinition
|
import moe.nea.firmament.rei.SBItemEntryDefinition
|
||||||
|
|
||||||
class SBForgeRecipe(override val neuRecipe: NEUForgeRecipe) : SBRecipe() {
|
class SBForgeRecipe(override val neuRecipe: NEUForgeRecipe) : SBRecipe() {
|
||||||
override fun getCategoryIdentifier(): CategoryIdentifier<*> = Category.categoryIdentifier
|
override fun getCategoryIdentifier(): CategoryIdentifier<*> = Category.categoryIdentifier
|
||||||
|
|
||||||
object Category : DisplayCategory<SBForgeRecipe> {
|
object Category : DisplayCategory<SBForgeRecipe> {
|
||||||
override fun getCategoryIdentifier(): CategoryIdentifier<SBForgeRecipe> =
|
override fun getCategoryIdentifier(): CategoryIdentifier<SBForgeRecipe> =
|
||||||
CategoryIdentifier.of(NotEnoughUpdates.MOD_ID, "forge_recipe")
|
CategoryIdentifier.of(Firmament.MOD_ID, "forge_recipe")
|
||||||
|
|
||||||
override fun getTitle(): Text = Text.literal("Forge Recipes")
|
override fun getTitle(): Text = Text.literal("Forge Recipes")
|
||||||
override fun getDisplayHeight(): Int {
|
override fun getDisplayHeight(): Int {
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package moe.nea.notenoughupdates.recipes
|
package moe.nea.firmament.recipes
|
||||||
|
|
||||||
import io.github.moulberry.repo.data.NEURecipe
|
import io.github.moulberry.repo.data.NEURecipe
|
||||||
import me.shedaniel.rei.api.common.display.Display
|
import me.shedaniel.rei.api.common.display.Display
|
||||||
import me.shedaniel.rei.api.common.entry.EntryIngredient
|
import me.shedaniel.rei.api.common.entry.EntryIngredient
|
||||||
import moe.nea.notenoughupdates.rei.SBItemEntryDefinition
|
import moe.nea.firmament.rei.SBItemEntryDefinition
|
||||||
import moe.nea.notenoughupdates.util.SkyblockId
|
import moe.nea.firmament.util.SkyblockId
|
||||||
|
|
||||||
abstract class SBRecipe() : Display {
|
abstract class SBRecipe() : Display {
|
||||||
abstract val neuRecipe: NEURecipe
|
abstract val neuRecipe: NEURecipe
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.rei
|
package moe.nea.firmament.rei
|
||||||
|
|
||||||
import io.github.moulberry.repo.data.NEUItem
|
import io.github.moulberry.repo.data.NEUItem
|
||||||
import me.shedaniel.rei.api.client.plugins.REIClientPlugin
|
import me.shedaniel.rei.api.client.plugins.REIClientPlugin
|
||||||
@@ -13,21 +13,21 @@ import me.shedaniel.rei.api.common.entry.type.VanillaEntryTypes
|
|||||||
import net.minecraft.item.ItemStack
|
import net.minecraft.item.ItemStack
|
||||||
import net.minecraft.text.Text
|
import net.minecraft.text.Text
|
||||||
import net.minecraft.util.Identifier
|
import net.minecraft.util.Identifier
|
||||||
import moe.nea.notenoughupdates.recipes.SBCraftingRecipe
|
import moe.nea.firmament.recipes.SBCraftingRecipe
|
||||||
import moe.nea.notenoughupdates.recipes.SBForgeRecipe
|
import moe.nea.firmament.recipes.SBForgeRecipe
|
||||||
import moe.nea.notenoughupdates.repo.ItemCache.asItemStack
|
import moe.nea.firmament.repo.ItemCache.asItemStack
|
||||||
import moe.nea.notenoughupdates.repo.RepoManager
|
import moe.nea.firmament.repo.RepoManager
|
||||||
import moe.nea.notenoughupdates.util.SkyblockId
|
import moe.nea.firmament.util.SkyblockId
|
||||||
|
|
||||||
|
|
||||||
class NEUReiPlugin : REIClientPlugin {
|
class FirmamentReiPlugin : REIClientPlugin {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun EntryStack<NEUItem>.asItemEntry(): EntryStack<ItemStack> {
|
fun EntryStack<NEUItem>.asItemEntry(): EntryStack<ItemStack> {
|
||||||
return EntryStack.of(VanillaEntryTypes.ITEM, value.asItemStack())
|
return EntryStack.of(VanillaEntryTypes.ITEM, value.asItemStack())
|
||||||
}
|
}
|
||||||
|
|
||||||
val SKYBLOCK_ITEM_TYPE_ID = Identifier("notenoughupdates", "skyblockitems")
|
val SKYBLOCK_ITEM_TYPE_ID = Identifier("firmament", "skyblockitems")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun registerEntryTypes(registry: EntryTypeRegistry) {
|
override fun registerEntryTypes(registry: EntryTypeRegistry) {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.rei
|
package moe.nea.firmament.rei
|
||||||
|
|
||||||
import io.github.moulberry.repo.data.NEUItem
|
import io.github.moulberry.repo.data.NEUItem
|
||||||
import me.shedaniel.math.Rectangle
|
import me.shedaniel.math.Rectangle
|
||||||
@@ -7,7 +7,7 @@ import me.shedaniel.rei.api.client.gui.widgets.Tooltip
|
|||||||
import me.shedaniel.rei.api.client.gui.widgets.TooltipContext
|
import me.shedaniel.rei.api.client.gui.widgets.TooltipContext
|
||||||
import me.shedaniel.rei.api.common.entry.EntryStack
|
import me.shedaniel.rei.api.common.entry.EntryStack
|
||||||
import net.minecraft.client.util.math.MatrixStack
|
import net.minecraft.client.util.math.MatrixStack
|
||||||
import moe.nea.notenoughupdates.rei.NEUReiPlugin.Companion.asItemEntry
|
import moe.nea.firmament.rei.FirmamentReiPlugin.Companion.asItemEntry
|
||||||
|
|
||||||
object NEUItemEntryRenderer : EntryRenderer<NEUItem> {
|
object NEUItemEntryRenderer : EntryRenderer<NEUItem> {
|
||||||
override fun render(
|
override fun render(
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package moe.nea.notenoughupdates.rei
|
package moe.nea.firmament.rei
|
||||||
|
|
||||||
import io.github.moulberry.repo.data.NEUItem
|
import io.github.moulberry.repo.data.NEUItem
|
||||||
import me.shedaniel.rei.api.common.entry.EntrySerializer
|
import me.shedaniel.rei.api.common.entry.EntrySerializer
|
||||||
import me.shedaniel.rei.api.common.entry.EntryStack
|
import me.shedaniel.rei.api.common.entry.EntryStack
|
||||||
import net.minecraft.nbt.NbtCompound
|
import net.minecraft.nbt.NbtCompound
|
||||||
import moe.nea.notenoughupdates.repo.RepoManager
|
import moe.nea.firmament.repo.RepoManager
|
||||||
import moe.nea.notenoughupdates.util.SkyblockId
|
import moe.nea.firmament.util.SkyblockId
|
||||||
|
|
||||||
object NEUItemEntrySerializer : EntrySerializer<NEUItem?> {
|
object NEUItemEntrySerializer : EntrySerializer<NEUItem?> {
|
||||||
const val SKYBLOCK_ID_ENTRY = "SKYBLOCK_ID"
|
const val SKYBLOCK_ID_ENTRY = "SKYBLOCK_ID"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.rei
|
package moe.nea.firmament.rei
|
||||||
|
|
||||||
import io.github.moulberry.repo.data.NEUIngredient
|
import io.github.moulberry.repo.data.NEUIngredient
|
||||||
import io.github.moulberry.repo.data.NEUItem
|
import io.github.moulberry.repo.data.NEUItem
|
||||||
@@ -14,11 +14,11 @@ import net.minecraft.item.ItemStack
|
|||||||
import net.minecraft.registry.tag.TagKey
|
import net.minecraft.registry.tag.TagKey
|
||||||
import net.minecraft.text.Text
|
import net.minecraft.text.Text
|
||||||
import net.minecraft.util.Identifier
|
import net.minecraft.util.Identifier
|
||||||
import moe.nea.notenoughupdates.rei.NEUReiPlugin.Companion.asItemEntry
|
import moe.nea.firmament.rei.FirmamentReiPlugin.Companion.asItemEntry
|
||||||
import moe.nea.notenoughupdates.repo.ItemCache.asItemStack
|
import moe.nea.firmament.repo.ItemCache.asItemStack
|
||||||
import moe.nea.notenoughupdates.repo.ItemCache.getIdentifier
|
import moe.nea.firmament.repo.ItemCache.getIdentifier
|
||||||
import moe.nea.notenoughupdates.repo.RepoManager
|
import moe.nea.firmament.repo.RepoManager
|
||||||
import moe.nea.notenoughupdates.util.SkyblockId
|
import moe.nea.firmament.util.SkyblockId
|
||||||
|
|
||||||
// TODO: allow stackable entries
|
// TODO: allow stackable entries
|
||||||
object SBItemEntryDefinition : EntryDefinition<NEUItem> {
|
object SBItemEntryDefinition : EntryDefinition<NEUItem> {
|
||||||
@@ -31,7 +31,7 @@ object SBItemEntryDefinition : EntryDefinition<NEUItem> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun getValueType(): Class<NEUItem> = NEUItem::class.java
|
override fun getValueType(): Class<NEUItem> = NEUItem::class.java
|
||||||
override fun getType(): EntryType<NEUItem> = EntryType.deferred(NEUReiPlugin.SKYBLOCK_ITEM_TYPE_ID)
|
override fun getType(): EntryType<NEUItem> = EntryType.deferred(FirmamentReiPlugin.SKYBLOCK_ITEM_TYPE_ID)
|
||||||
|
|
||||||
override fun getRenderer(): EntryRenderer<NEUItem> = NEUItemEntryRenderer
|
override fun getRenderer(): EntryRenderer<NEUItem> = NEUItemEntryRenderer
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.rei
|
package moe.nea.firmament.rei
|
||||||
|
|
||||||
import io.github.moulberry.repo.data.NEUCraftingRecipe
|
import io.github.moulberry.repo.data.NEUCraftingRecipe
|
||||||
import io.github.moulberry.repo.data.NEUForgeRecipe
|
import io.github.moulberry.repo.data.NEUForgeRecipe
|
||||||
@@ -9,10 +9,10 @@ import me.shedaniel.rei.api.client.registry.display.DynamicDisplayGenerator
|
|||||||
import me.shedaniel.rei.api.client.view.ViewSearchBuilder
|
import me.shedaniel.rei.api.client.view.ViewSearchBuilder
|
||||||
import me.shedaniel.rei.api.common.display.Display
|
import me.shedaniel.rei.api.common.display.Display
|
||||||
import me.shedaniel.rei.api.common.entry.EntryStack
|
import me.shedaniel.rei.api.common.entry.EntryStack
|
||||||
import moe.nea.notenoughupdates.recipes.SBCraftingRecipe
|
import moe.nea.firmament.recipes.SBCraftingRecipe
|
||||||
import moe.nea.notenoughupdates.recipes.SBForgeRecipe
|
import moe.nea.firmament.recipes.SBForgeRecipe
|
||||||
import moe.nea.notenoughupdates.repo.RepoManager
|
import moe.nea.firmament.repo.RepoManager
|
||||||
import moe.nea.notenoughupdates.util.skyblockId
|
import moe.nea.firmament.util.skyblockId
|
||||||
|
|
||||||
|
|
||||||
val SkyblockCraftingRecipeDynamicGenerator = neuDisplayGenerator<SBCraftingRecipe, NEUCraftingRecipe> {
|
val SkyblockCraftingRecipeDynamicGenerator = neuDisplayGenerator<SBCraftingRecipe, NEUCraftingRecipe> {
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
package moe.nea.notenoughupdates.rei
|
package moe.nea.firmament.rei
|
||||||
|
|
||||||
import dev.architectury.event.CompoundEventResult
|
import dev.architectury.event.CompoundEventResult
|
||||||
import me.shedaniel.math.Point
|
import me.shedaniel.math.Point
|
||||||
import me.shedaniel.rei.api.client.registry.screen.FocusedStackProvider
|
import me.shedaniel.rei.api.client.registry.screen.FocusedStackProvider
|
||||||
import me.shedaniel.rei.api.common.entry.EntryStack
|
import me.shedaniel.rei.api.common.entry.EntryStack
|
||||||
import moe.nea.notenoughupdates.mixins.accessor.AccessorHandledScreen
|
import moe.nea.firmament.mixins.accessor.AccessorHandledScreen
|
||||||
import moe.nea.notenoughupdates.repo.RepoManager
|
import moe.nea.firmament.repo.RepoManager
|
||||||
import moe.nea.notenoughupdates.util.skyBlockId
|
import moe.nea.firmament.util.skyBlockId
|
||||||
import net.minecraft.client.gui.screen.Screen
|
import net.minecraft.client.gui.screen.Screen
|
||||||
import net.minecraft.client.gui.screen.ingame.HandledScreen
|
import net.minecraft.client.gui.screen.ingame.HandledScreen
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.repo
|
package moe.nea.firmament.repo
|
||||||
|
|
||||||
import com.mojang.serialization.Dynamic
|
import com.mojang.serialization.Dynamic
|
||||||
import io.github.cottonmc.cotton.gui.client.CottonHud
|
import io.github.cottonmc.cotton.gui.client.CottonHud
|
||||||
@@ -21,10 +21,10 @@ import net.minecraft.item.Items
|
|||||||
import net.minecraft.nbt.NbtCompound
|
import net.minecraft.nbt.NbtCompound
|
||||||
import net.minecraft.nbt.NbtOps
|
import net.minecraft.nbt.NbtOps
|
||||||
import net.minecraft.text.Text
|
import net.minecraft.text.Text
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates
|
import moe.nea.firmament.Firmament
|
||||||
import moe.nea.notenoughupdates.util.LegacyTagParser
|
import moe.nea.firmament.util.LegacyTagParser
|
||||||
import moe.nea.notenoughupdates.util.appendLore
|
import moe.nea.firmament.util.appendLore
|
||||||
import moe.nea.notenoughupdates.util.skyblockId
|
import moe.nea.firmament.util.skyblockId
|
||||||
|
|
||||||
object ItemCache : IReloadable {
|
object ItemCache : IReloadable {
|
||||||
val dfuLog = Path.of("logs/dfulog.txt")
|
val dfuLog = Path.of("logs/dfulog.txt")
|
||||||
@@ -51,7 +51,7 @@ object ItemCache : IReloadable {
|
|||||||
).value as NbtCompound
|
).value as NbtCompound
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
if (isFlawless)
|
if (isFlawless)
|
||||||
NotEnoughUpdates.logger.error("Failed to run data fixer an item. Check ${dfuLog.absolutePathString()} for more information")
|
Firmament.logger.error("Failed to run data fixer an item. Check ${dfuLog.absolutePathString()} for more information")
|
||||||
isFlawless = false
|
isFlawless = false
|
||||||
e.printStackTrace(dfuHandle)
|
e.printStackTrace(dfuHandle)
|
||||||
null
|
null
|
||||||
@@ -60,7 +60,7 @@ object ItemCache : IReloadable {
|
|||||||
fun brokenItemStack(neuItem: NEUItem?): ItemStack {
|
fun brokenItemStack(neuItem: NEUItem?): ItemStack {
|
||||||
return ItemStack(Items.PAINTING).apply {
|
return ItemStack(Items.PAINTING).apply {
|
||||||
setCustomName(Text.literal(neuItem?.displayName ?: "null"))
|
setCustomName(Text.literal(neuItem?.displayName ?: "null"))
|
||||||
appendLore(listOf(Text.translatable("notenoughupdates.repo.brokenitem", neuItem?.skyblockItemId)))
|
appendLore(listOf(Text.translatable("firmament.repo.brokenitem", neuItem?.skyblockItemId)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,13 +103,13 @@ object ItemCache : IReloadable {
|
|||||||
cache.clear()
|
cache.clear()
|
||||||
isFlawless = true
|
isFlawless = true
|
||||||
|
|
||||||
job = NotEnoughUpdates.coroutineScope.launch {
|
job = Firmament.coroutineScope.launch {
|
||||||
val items = repository.items?.items
|
val items = repository.items?.items
|
||||||
if (items == null) {
|
if (items == null) {
|
||||||
CottonHud.remove(RepoManager.progressBar)
|
CottonHud.remove(RepoManager.progressBar)
|
||||||
return@launch
|
return@launch
|
||||||
}
|
}
|
||||||
val recacheItems = I18n.translate("notenoughupdates.repo.cache")
|
val recacheItems = I18n.translate("firmament.repo.cache")
|
||||||
RepoManager.progressBar.reportProgress(recacheItems, 0, items.size)
|
RepoManager.progressBar.reportProgress(recacheItems, 0, items.size)
|
||||||
CottonHud.add(RepoManager.progressBar)
|
CottonHud.add(RepoManager.progressBar)
|
||||||
var i = 0
|
var i = 0
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.repo
|
package moe.nea.firmament.repo
|
||||||
|
|
||||||
import io.ktor.client.call.*
|
import io.ktor.client.call.*
|
||||||
import io.ktor.client.request.*
|
import io.ktor.client.request.*
|
||||||
@@ -8,9 +8,9 @@ import kotlinx.coroutines.CoroutineName
|
|||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates
|
import moe.nea.firmament.Firmament
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates.logger
|
import moe.nea.firmament.Firmament.logger
|
||||||
import moe.nea.notenoughupdates.util.iterate
|
import moe.nea.firmament.util.iterate
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
@@ -21,8 +21,8 @@ import kotlin.io.path.*
|
|||||||
|
|
||||||
object RepoDownloadManager {
|
object RepoDownloadManager {
|
||||||
|
|
||||||
val repoSavedLocation = NotEnoughUpdates.DATA_DIR.resolve("repo-extracted")
|
val repoSavedLocation = Firmament.DATA_DIR.resolve("repo-extracted")
|
||||||
val repoMetadataLocation = NotEnoughUpdates.DATA_DIR.resolve("loaded-repo-sha.txt")
|
val repoMetadataLocation = Firmament.DATA_DIR.resolve("loaded-repo-sha.txt")
|
||||||
|
|
||||||
private fun loadSavedVersionHash(): String? =
|
private fun loadSavedVersionHash(): String? =
|
||||||
if (repoSavedLocation.exists()) {
|
if (repoSavedLocation.exists()) {
|
||||||
@@ -50,7 +50,7 @@ object RepoDownloadManager {
|
|||||||
|
|
||||||
private suspend fun requestLatestGithubSha(): String? {
|
private suspend fun requestLatestGithubSha(): String? {
|
||||||
val response =
|
val response =
|
||||||
NotEnoughUpdates.httpClient.get("https://api.github.com/repos/${RepoManager.data.user}/${RepoManager.data.repo}/commits/${RepoManager.data.branch}")
|
Firmament.httpClient.get("https://api.github.com/repos/${RepoManager.data.user}/${RepoManager.data.repo}/commits/${RepoManager.data.branch}")
|
||||||
if (response.status.value != 200) {
|
if (response.status.value != 200) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
@@ -58,8 +58,8 @@ object RepoDownloadManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun downloadGithubArchive(url: String): Path = withContext(IO) {
|
private suspend fun downloadGithubArchive(url: String): Path = withContext(IO) {
|
||||||
val response = NotEnoughUpdates.httpClient.get(url)
|
val response = Firmament.httpClient.get(url)
|
||||||
val targetFile = Files.createTempFile("notenoughupdates-repo", ".zip")
|
val targetFile = Files.createTempFile("firmament-repo", ".zip")
|
||||||
val outputChannel = Files.newByteChannel(targetFile, StandardOpenOption.CREATE, StandardOpenOption.WRITE)
|
val outputChannel = Files.newByteChannel(targetFile, StandardOpenOption.CREATE, StandardOpenOption.WRITE)
|
||||||
response.bodyAsChannel().copyTo(outputChannel)
|
response.bodyAsChannel().copyTo(outputChannel)
|
||||||
targetFile
|
targetFile
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.repo
|
package moe.nea.firmament.repo
|
||||||
|
|
||||||
import io.github.cottonmc.cotton.gui.client.CottonHud
|
import io.github.cottonmc.cotton.gui.client.CottonHud
|
||||||
import io.github.moulberry.repo.NEURecipeCache
|
import io.github.moulberry.repo.NEURecipeCache
|
||||||
@@ -12,11 +12,11 @@ import kotlinx.serialization.serializer
|
|||||||
import net.minecraft.client.MinecraftClient
|
import net.minecraft.client.MinecraftClient
|
||||||
import net.minecraft.network.packet.s2c.play.SynchronizeRecipesS2CPacket
|
import net.minecraft.network.packet.s2c.play.SynchronizeRecipesS2CPacket
|
||||||
import net.minecraft.text.Text
|
import net.minecraft.text.Text
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates
|
import moe.nea.firmament.Firmament
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates.logger
|
import moe.nea.firmament.Firmament.logger
|
||||||
import moe.nea.notenoughupdates.hud.ProgressBar
|
import moe.nea.firmament.hud.ProgressBar
|
||||||
import moe.nea.notenoughupdates.util.SkyblockId
|
import moe.nea.firmament.util.SkyblockId
|
||||||
import moe.nea.notenoughupdates.util.data.DataHolder
|
import moe.nea.firmament.util.data.DataHolder
|
||||||
|
|
||||||
object RepoManager : DataHolder<RepoManager.Config>(serializer(), "repo", ::Config) {
|
object RepoManager : DataHolder<RepoManager.Config>(serializer(), "repo", ::Config) {
|
||||||
@Serializable
|
@Serializable
|
||||||
@@ -68,7 +68,7 @@ object RepoManager : DataHolder<RepoManager.Config>(serializer(), "repo", ::Conf
|
|||||||
fun getNEUItem(skyblockId: SkyblockId) = neuRepo.items.getItemBySkyblockId(skyblockId.neuItem)
|
fun getNEUItem(skyblockId: SkyblockId) = neuRepo.items.getItemBySkyblockId(skyblockId.neuItem)
|
||||||
|
|
||||||
fun launchAsyncUpdate(force: Boolean = false) {
|
fun launchAsyncUpdate(force: Boolean = false) {
|
||||||
NotEnoughUpdates.coroutineScope.launch {
|
Firmament.coroutineScope.launch {
|
||||||
progressBar.reportProgress("Downloading", 0, null)
|
progressBar.reportProgress("Downloading", 0, null)
|
||||||
CottonHud.add(progressBar)
|
CottonHud.add(progressBar)
|
||||||
RepoDownloadManager.downloadUpdate(force)
|
RepoDownloadManager.downloadUpdate(force)
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.util
|
package moe.nea.firmament.util
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack
|
import net.minecraft.item.ItemStack
|
||||||
import net.minecraft.nbt.NbtCompound
|
import net.minecraft.nbt.NbtCompound
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.util
|
package moe.nea.firmament.util
|
||||||
|
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import net.minecraft.nbt.AbstractNbtNumber
|
import net.minecraft.nbt.AbstractNbtNumber
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.util
|
package moe.nea.firmament.util
|
||||||
|
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.util
|
package moe.nea.firmament.util
|
||||||
|
|
||||||
import io.github.moulberry.repo.data.Coordinate
|
import io.github.moulberry.repo.data.Coordinate
|
||||||
import net.minecraft.client.MinecraftClient
|
import net.minecraft.client.MinecraftClient
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.util
|
package moe.nea.firmament.util
|
||||||
|
|
||||||
import kotlinx.coroutines.CoroutineDispatcher
|
import kotlinx.coroutines.CoroutineDispatcher
|
||||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||||
@@ -1,15 +1,13 @@
|
|||||||
package moe.nea.notenoughupdates.util
|
package moe.nea.firmament.util
|
||||||
|
|
||||||
import kotlinx.serialization.SerializationException
|
import kotlinx.serialization.SerializationException
|
||||||
import kotlinx.serialization.decodeFromString
|
import kotlinx.serialization.decodeFromString
|
||||||
import kotlin.time.Duration
|
import kotlin.time.Duration
|
||||||
import kotlin.time.Duration.Companion.seconds
|
import kotlin.time.Duration.Companion.seconds
|
||||||
import kotlin.time.ExperimentalTime
|
import moe.nea.firmament.Firmament
|
||||||
import kotlin.time.TimeSource
|
import moe.nea.firmament.events.ServerChatLineReceivedEvent
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates
|
import moe.nea.firmament.events.SkyblockServerUpdateEvent
|
||||||
import moe.nea.notenoughupdates.events.ServerChatLineReceivedEvent
|
import moe.nea.firmament.events.WorldReadyEvent
|
||||||
import moe.nea.notenoughupdates.events.SkyblockServerUpdateEvent
|
|
||||||
import moe.nea.notenoughupdates.events.WorldReadyEvent
|
|
||||||
|
|
||||||
object SBData {
|
object SBData {
|
||||||
val profileRegex = "(?:Your profile was changed to: |You are playing on profile: )(.+)".toRegex()
|
val profileRegex = "(?:Your profile was changed to: |You are playing on profile: )(.+)".toRegex()
|
||||||
@@ -43,7 +41,7 @@ object SBData {
|
|||||||
|
|
||||||
private fun tryReceiveLocraw(unformattedString: String): Boolean = try {
|
private fun tryReceiveLocraw(unformattedString: String): Boolean = try {
|
||||||
val lastLocraw = locraw
|
val lastLocraw = locraw
|
||||||
locraw = NotEnoughUpdates.json.decodeFromString<Locraw>(unformattedString)
|
locraw = Firmament.json.decodeFromString<Locraw>(unformattedString)
|
||||||
SkyblockServerUpdateEvent.publish(SkyblockServerUpdateEvent(lastLocraw, locraw))
|
SkyblockServerUpdateEvent.publish(SkyblockServerUpdateEvent(lastLocraw, locraw))
|
||||||
true
|
true
|
||||||
} catch (e: SerializationException) {
|
} catch (e: SerializationException) {
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package moe.nea.notenoughupdates.util
|
package moe.nea.firmament.util
|
||||||
|
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates
|
import moe.nea.firmament.Firmament
|
||||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents
|
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents
|
||||||
import net.minecraft.client.MinecraftClient
|
import net.minecraft.client.MinecraftClient
|
||||||
import net.minecraft.client.gui.screen.Screen
|
import net.minecraft.client.gui.screen.Screen
|
||||||
@@ -26,7 +26,7 @@ object ScreenUtil {
|
|||||||
fun setScreenLater(nextScreen: Screen) {
|
fun setScreenLater(nextScreen: Screen) {
|
||||||
val nog = nextOpenedGui
|
val nog = nextOpenedGui
|
||||||
if (nog != null) {
|
if (nog != null) {
|
||||||
NotEnoughUpdates.logger.warn("Setting screen ${nextScreen::class.qualifiedName} to be opened later, but ${nog::class.qualifiedName} is already queued.")
|
Firmament.logger.warn("Setting screen ${nextScreen::class.qualifiedName} to be opened later, but ${nog::class.qualifiedName} is already queued.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
nextOpenedGui = nextScreen
|
nextOpenedGui = nextScreen
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.util
|
package moe.nea.firmament.util
|
||||||
|
|
||||||
fun <T : Any> T.iterate(iterator: (T) -> T?): Sequence<T> = sequence {
|
fun <T : Any> T.iterate(iterator: (T) -> T?): Sequence<T> = sequence {
|
||||||
var x: T? = this@iterate
|
var x: T? = this@iterate
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.util
|
package moe.nea.firmament.util
|
||||||
|
|
||||||
import io.github.moulberry.repo.data.NEUItem
|
import io.github.moulberry.repo.data.NEUItem
|
||||||
import io.github.moulberry.repo.data.Rarity
|
import io.github.moulberry.repo.data.Rarity
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.util
|
package moe.nea.firmament.util
|
||||||
|
|
||||||
import kotlin.time.Duration
|
import kotlin.time.Duration
|
||||||
import kotlin.time.ExperimentalTime
|
import kotlin.time.ExperimentalTime
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.util
|
package moe.nea.firmament.util
|
||||||
|
|
||||||
import kotlin.time.Duration
|
import kotlin.time.Duration
|
||||||
import kotlin.time.ExperimentalTime
|
import kotlin.time.ExperimentalTime
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
package moe.nea.notenoughupdates.util.config
|
package moe.nea.firmament.util.config
|
||||||
|
|
||||||
import io.github.cottonmc.cotton.gui.client.CottonClientScreen
|
import io.github.cottonmc.cotton.gui.client.CottonClientScreen
|
||||||
import io.github.cottonmc.cotton.gui.client.LibGui
|
|
||||||
import io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
|
import io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
|
||||||
import io.github.cottonmc.cotton.gui.widget.WButton
|
import io.github.cottonmc.cotton.gui.widget.WButton
|
||||||
import io.github.cottonmc.cotton.gui.widget.WLabel
|
import io.github.cottonmc.cotton.gui.widget.WLabel
|
||||||
@@ -20,11 +19,10 @@ import kotlin.io.path.readText
|
|||||||
import kotlin.io.path.writeText
|
import kotlin.io.path.writeText
|
||||||
import kotlin.properties.ReadOnlyProperty
|
import kotlin.properties.ReadOnlyProperty
|
||||||
import kotlin.reflect.KProperty
|
import kotlin.reflect.KProperty
|
||||||
import net.minecraft.client.MinecraftClient
|
|
||||||
import net.minecraft.text.Text
|
import net.minecraft.text.Text
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates
|
import moe.nea.firmament.Firmament
|
||||||
import moe.nea.notenoughupdates.gui.WGridPanelWithPadding
|
import moe.nea.firmament.gui.WGridPanelWithPadding
|
||||||
import moe.nea.notenoughupdates.util.ScreenUtil.setScreenLater
|
import moe.nea.firmament.util.ScreenUtil.setScreenLater
|
||||||
|
|
||||||
abstract class ManagedConfig(val name: String) {
|
abstract class ManagedConfig(val name: String) {
|
||||||
|
|
||||||
@@ -92,7 +90,7 @@ abstract class ManagedConfig(val name: String) {
|
|||||||
try {
|
try {
|
||||||
value = handler.fromJson(data[propertyName]!!)
|
value = handler.fromJson(data[propertyName]!!)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
NotEnoughUpdates.logger.error(
|
Firmament.logger.error(
|
||||||
"Exception during loading of config file $name. This will reset this config.",
|
"Exception during loading of config file $name. This will reset this config.",
|
||||||
e
|
e
|
||||||
)
|
)
|
||||||
@@ -110,14 +108,14 @@ abstract class ManagedConfig(val name: String) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val file = NotEnoughUpdates.CONFIG_DIR.resolve("$name.json")
|
val file = Firmament.CONFIG_DIR.resolve("$name.json")
|
||||||
val data: JsonObject by lazy {
|
val data: JsonObject by lazy {
|
||||||
try {
|
try {
|
||||||
NotEnoughUpdates.json.decodeFromString(
|
Firmament.json.decodeFromString(
|
||||||
file.readText()
|
file.readText()
|
||||||
)
|
)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
NotEnoughUpdates.logger.info("Could not read config $name. Loading empty config.")
|
Firmament.logger.info("Could not read config $name. Loading empty config.")
|
||||||
JsonObject(mutableMapOf())
|
JsonObject(mutableMapOf())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -129,7 +127,7 @@ abstract class ManagedConfig(val name: String) {
|
|||||||
}
|
}
|
||||||
}.toMap())
|
}.toMap())
|
||||||
file.parent.createDirectories()
|
file.parent.createDirectories()
|
||||||
file.writeText(NotEnoughUpdates.json.encodeToString(data))
|
file.writeText(Firmament.json.encodeToString(data))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -155,7 +153,7 @@ abstract class ManagedConfig(val name: String) {
|
|||||||
|
|
||||||
override fun emitGuiElements(opt: Option<Boolean>, guiAppender: GuiAppender) {
|
override fun emitGuiElements(opt: Option<Boolean>, guiAppender: GuiAppender) {
|
||||||
guiAppender.appendFullRow(
|
guiAppender.appendFullRow(
|
||||||
WToggleButton(Text.translatable("neu.config.${config.name}.${opt.propertyName}")).apply {
|
WToggleButton(Text.translatable("firmament.config.${config.name}.${opt.propertyName}")).apply {
|
||||||
guiAppender.onReload { toggle = opt.value }
|
guiAppender.onReload { toggle = opt.value }
|
||||||
setOnToggle {
|
setOnToggle {
|
||||||
opt.value = it
|
opt.value = it
|
||||||
@@ -175,8 +173,8 @@ abstract class ManagedConfig(val name: String) {
|
|||||||
|
|
||||||
override fun emitGuiElements(opt: Option<Unit>, guiAppender: GuiAppender) {
|
override fun emitGuiElements(opt: Option<Unit>, guiAppender: GuiAppender) {
|
||||||
guiAppender.appendSplitRow(
|
guiAppender.appendSplitRow(
|
||||||
WLabel(Text.translatable("neu.config.${config.name}.${opt.propertyName}")),
|
WLabel(Text.translatable("firmament.config.${config.name}.${opt.propertyName}")),
|
||||||
WButton(Text.translatable("neu.config.${config.name}.${opt.propertyName}")).apply {
|
WButton(Text.translatable("firmament.config.${config.name}.${opt.propertyName}")).apply {
|
||||||
setOnClick {
|
setOnClick {
|
||||||
runnable()
|
runnable()
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package moe.nea.notenoughupdates.util.data
|
package moe.nea.firmament.util.data
|
||||||
|
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
import kotlinx.serialization.KSerializer
|
import kotlinx.serialization.KSerializer
|
||||||
import kotlin.io.path.exists
|
import kotlin.io.path.exists
|
||||||
import kotlin.io.path.readText
|
import kotlin.io.path.readText
|
||||||
import kotlin.io.path.writeText
|
import kotlin.io.path.writeText
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates
|
import moe.nea.firmament.Firmament
|
||||||
|
|
||||||
abstract class DataHolder<T>(
|
abstract class DataHolder<T>(
|
||||||
val serializer: KSerializer<T>,
|
val serializer: KSerializer<T>,
|
||||||
@@ -22,18 +22,18 @@ abstract class DataHolder<T>(
|
|||||||
IDataHolder.putDataHolder(this::class, this)
|
IDataHolder.putDataHolder(this::class, this)
|
||||||
}
|
}
|
||||||
|
|
||||||
private val file: Path get() = NotEnoughUpdates.CONFIG_DIR.resolve("$name.json")
|
private val file: Path get() = Firmament.CONFIG_DIR.resolve("$name.json")
|
||||||
|
|
||||||
protected fun readValueOrDefault(): T {
|
protected fun readValueOrDefault(): T {
|
||||||
if (file.exists())
|
if (file.exists())
|
||||||
try {
|
try {
|
||||||
return NotEnoughUpdates.json.decodeFromString(
|
return Firmament.json.decodeFromString(
|
||||||
serializer,
|
serializer,
|
||||||
file.readText()
|
file.readText()
|
||||||
)
|
)
|
||||||
} catch (e: Exception) {/* Expecting IOException and SerializationException, but Kotlin doesn't allow multi catches*/
|
} catch (e: Exception) {/* Expecting IOException and SerializationException, but Kotlin doesn't allow multi catches*/
|
||||||
IDataHolder.badLoads.add(name)
|
IDataHolder.badLoads.add(name)
|
||||||
NotEnoughUpdates.logger.error(
|
Firmament.logger.error(
|
||||||
"Exception during loading of config file $name. This will reset this config.",
|
"Exception during loading of config file $name. This will reset this config.",
|
||||||
e
|
e
|
||||||
)
|
)
|
||||||
@@ -42,7 +42,7 @@ abstract class DataHolder<T>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun writeValue(t: T) {
|
private fun writeValue(t: T) {
|
||||||
file.writeText(NotEnoughUpdates.json.encodeToString(serializer, t))
|
file.writeText(Firmament.json.encodeToString(serializer, t))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun save() {
|
override fun save() {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.util.data
|
package moe.nea.firmament.util.data
|
||||||
|
|
||||||
import java.util.concurrent.CopyOnWriteArrayList
|
import java.util.concurrent.CopyOnWriteArrayList
|
||||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents
|
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents
|
||||||
@@ -6,8 +6,8 @@ import kotlin.reflect.KClass
|
|||||||
import net.minecraft.client.MinecraftClient
|
import net.minecraft.client.MinecraftClient
|
||||||
import net.minecraft.server.command.CommandOutput
|
import net.minecraft.server.command.CommandOutput
|
||||||
import net.minecraft.text.Text
|
import net.minecraft.text.Text
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates
|
import moe.nea.firmament.Firmament
|
||||||
import moe.nea.notenoughupdates.events.ScreenOpenEvent
|
import moe.nea.firmament.events.ScreenOpenEvent
|
||||||
|
|
||||||
interface IDataHolder<T> {
|
interface IDataHolder<T> {
|
||||||
companion object {
|
companion object {
|
||||||
@@ -21,7 +21,7 @@ interface IDataHolder<T> {
|
|||||||
|
|
||||||
fun <T : IDataHolder<K>, K> markDirty(kClass: KClass<T>) {
|
fun <T : IDataHolder<K>, K> markDirty(kClass: KClass<T>) {
|
||||||
if (kClass !in allConfigs) {
|
if (kClass !in allConfigs) {
|
||||||
NotEnoughUpdates.logger.error("Tried to markDirty '${kClass.qualifiedName}', which isn't registered as 'IConfigHolder'")
|
Firmament.logger.error("Tried to markDirty '${kClass.qualifiedName}', which isn't registered as 'IConfigHolder'")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
dirty.add(kClass)
|
dirty.add(kClass)
|
||||||
@@ -34,7 +34,7 @@ interface IDataHolder<T> {
|
|||||||
for (it in toSave) {
|
for (it in toSave) {
|
||||||
val obj = allConfigs[it]
|
val obj = allConfigs[it]
|
||||||
if (obj == null) {
|
if (obj == null) {
|
||||||
NotEnoughUpdates.logger.error("Tried to save '${it}', which isn't registered as 'ConfigHolder'")
|
Firmament.logger.error("Tried to save '${it}', which isn't registered as 'ConfigHolder'")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
obj.save()
|
obj.save()
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.util.data
|
package moe.nea.firmament.util.data
|
||||||
|
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
import kotlinx.serialization.KSerializer
|
import kotlinx.serialization.KSerializer
|
||||||
@@ -10,8 +10,8 @@ import kotlin.io.path.listDirectoryEntries
|
|||||||
import kotlin.io.path.nameWithoutExtension
|
import kotlin.io.path.nameWithoutExtension
|
||||||
import kotlin.io.path.readText
|
import kotlin.io.path.readText
|
||||||
import kotlin.io.path.writeText
|
import kotlin.io.path.writeText
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates
|
import moe.nea.firmament.Firmament
|
||||||
import moe.nea.notenoughupdates.util.SBData
|
import moe.nea.firmament.util.SBData
|
||||||
|
|
||||||
abstract class ProfileSpecificDataHolder<S>(
|
abstract class ProfileSpecificDataHolder<S>(
|
||||||
private val dataSerializer: KSerializer<S>,
|
private val dataSerializer: KSerializer<S>,
|
||||||
@@ -32,7 +32,7 @@ abstract class ProfileSpecificDataHolder<S>(
|
|||||||
IDataHolder.putDataHolder(this::class, this)
|
IDataHolder.putDataHolder(this::class, this)
|
||||||
}
|
}
|
||||||
|
|
||||||
private val configDirectory: Path get() = NotEnoughUpdates.CONFIG_DIR.resolve("profiles").resolve(configName)
|
private val configDirectory: Path get() = Firmament.CONFIG_DIR.resolve("profiles").resolve(configName)
|
||||||
|
|
||||||
private fun readValues(): MutableMap<String, S> {
|
private fun readValues(): MutableMap<String, S> {
|
||||||
if (!configDirectory.exists()) {
|
if (!configDirectory.exists()) {
|
||||||
@@ -43,10 +43,10 @@ abstract class ProfileSpecificDataHolder<S>(
|
|||||||
.filter { it.extension == "json" }
|
.filter { it.extension == "json" }
|
||||||
.mapNotNull {
|
.mapNotNull {
|
||||||
try {
|
try {
|
||||||
it.nameWithoutExtension to NotEnoughUpdates.json.decodeFromString(dataSerializer, it.readText())
|
it.nameWithoutExtension to Firmament.json.decodeFromString(dataSerializer, it.readText())
|
||||||
} catch (e: Exception) { /* Expecting IOException and SerializationException, but Kotlin doesn't allow multi catches*/
|
} catch (e: Exception) { /* Expecting IOException and SerializationException, but Kotlin doesn't allow multi catches*/
|
||||||
IDataHolder.badLoads.add(configName)
|
IDataHolder.badLoads.add(configName)
|
||||||
NotEnoughUpdates.logger.error(
|
Firmament.logger.error(
|
||||||
"Exception during loading of profile specific config file $it ($configName). This will reset that profiles config.",
|
"Exception during loading of profile specific config file $it ($configName). This will reset that profiles config.",
|
||||||
e
|
e
|
||||||
)
|
)
|
||||||
@@ -67,7 +67,7 @@ abstract class ProfileSpecificDataHolder<S>(
|
|||||||
}
|
}
|
||||||
c.forEach { (name, value) ->
|
c.forEach { (name, value) ->
|
||||||
val f = configDirectory.resolve("$name.json")
|
val f = configDirectory.resolve("$name.json")
|
||||||
f.writeText(NotEnoughUpdates.json.encodeToString(dataSerializer, value))
|
f.writeText(Firmament.json.encodeToString(dataSerializer, value))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package moe.nea.notenoughupdates.util.render
|
package moe.nea.firmament.util.render
|
||||||
|
|
||||||
import com.mojang.blaze3d.systems.RenderSystem
|
import com.mojang.blaze3d.systems.RenderSystem
|
||||||
import org.joml.Matrix4f
|
import org.joml.Matrix4f
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package moe.nea.notenoughupdates.util
|
package moe.nea.firmament.util
|
||||||
|
|
||||||
import net.minecraft.text.LiteralTextContent
|
import net.minecraft.text.LiteralTextContent
|
||||||
import net.minecraft.text.Text
|
import net.minecraft.text.Text
|
||||||
import net.minecraft.text.TextContent
|
import net.minecraft.text.TextContent
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates
|
import moe.nea.firmament.Firmament
|
||||||
|
|
||||||
|
|
||||||
class TextMatcher(text: Text) {
|
class TextMatcher(text: Text) {
|
||||||
@@ -29,7 +29,7 @@ class TextMatcher(text: Text) {
|
|||||||
is LiteralTextContent -> content.string
|
is LiteralTextContent -> content.string
|
||||||
TextContent.EMPTY -> ""
|
TextContent.EMPTY -> ""
|
||||||
else -> {
|
else -> {
|
||||||
NotEnoughUpdates.logger.warn("TextContent of type ${content.javaClass} not understood.")
|
Firmament.logger.warn("TextContent of type ${content.javaClass} not understood.")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
package moe.nea.notenoughupdates.commands
|
|
||||||
|
|
||||||
import com.mojang.brigadier.CommandDispatcher
|
|
||||||
import io.github.cottonmc.cotton.gui.client.CottonClientScreen
|
|
||||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource
|
|
||||||
import net.minecraft.text.Text
|
|
||||||
import moe.nea.notenoughupdates.features.world.FairySouls
|
|
||||||
import moe.nea.notenoughupdates.gui.repoGui
|
|
||||||
import moe.nea.notenoughupdates.repo.RepoManager
|
|
||||||
import moe.nea.notenoughupdates.util.SBData
|
|
||||||
import moe.nea.notenoughupdates.util.ScreenUtil.setScreenLater
|
|
||||||
|
|
||||||
|
|
||||||
fun neuCommand() = literal("neu") {
|
|
||||||
thenLiteral("repo") {
|
|
||||||
thenLiteral("reload") {
|
|
||||||
thenLiteral("fetch") {
|
|
||||||
thenExecute {
|
|
||||||
source.sendFeedback(Text.translatable("notenoughupdates.repo.reload.network")) // TODO better reporting
|
|
||||||
RepoManager.launchAsyncUpdate()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
thenExecute {
|
|
||||||
source.sendFeedback(Text.translatable("notenoughupdates.repo.reload.disk"))
|
|
||||||
RepoManager.reload()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
thenExecute {
|
|
||||||
setScreenLater(CottonClientScreen(repoGui()))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
thenLiteral("dev") {
|
|
||||||
thenLiteral("config") {
|
|
||||||
thenExecute {
|
|
||||||
FairySouls.TConfig.showConfigEditor()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
thenLiteral("sbdata") {
|
|
||||||
thenExecute {
|
|
||||||
source.sendFeedback(Text.translatable("notenoughupdates.sbinfo.profile", SBData.profileCuteName))
|
|
||||||
val locrawInfo = SBData.locraw
|
|
||||||
if (locrawInfo == null) {
|
|
||||||
source.sendFeedback(Text.translatable("notenoughupdates.sbinfo.nolocraw"))
|
|
||||||
} else {
|
|
||||||
source.sendFeedback(Text.translatable("notenoughupdates.sbinfo.server", locrawInfo.server))
|
|
||||||
source.sendFeedback(Text.translatable("notenoughupdates.sbinfo.gametype", locrawInfo.gametype))
|
|
||||||
source.sendFeedback(Text.translatable("notenoughupdates.sbinfo.mode", locrawInfo.mode))
|
|
||||||
source.sendFeedback(Text.translatable("notenoughupdates.sbinfo.map", locrawInfo.map))
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fun registerNeuCommand(dispatcher: CommandDispatcher<FabricClientCommandSource>) {
|
|
||||||
val neu = dispatcher.register(neuCommand())
|
|
||||||
dispatcher.register(literal("alsoneu") {
|
|
||||||
redirect(neu)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
package moe.nea.notenoughupdates.gui
|
|
||||||
|
|
||||||
import net.minecraft.text.Text
|
|
||||||
import moe.nea.notenoughupdates.repo.RepoManager
|
|
||||||
|
|
||||||
fun repoGui(): ConfigGui<RepoManager.Config> {
|
|
||||||
return ConfigGui(RepoManager) {
|
|
||||||
title(Text.translatable("notenoughupdates.gui.repo.title"))
|
|
||||||
toggle(Text.translatable("notenoughupdates.gui.repo.autoupdate"), RepoManager.Config::autoUpdate)
|
|
||||||
textfield(
|
|
||||||
Text.translatable("notenoughupdates.gui.repo.username"),
|
|
||||||
Text.translatable("notenoughupdates.gui.repo.hint.username"),
|
|
||||||
RepoManager.Config::user,
|
|
||||||
maxLength = 255
|
|
||||||
)
|
|
||||||
textfield(
|
|
||||||
Text.translatable("notenoughupdates.gui.repo.reponame"),
|
|
||||||
Text.translatable("notenoughupdates.gui.repo.hint.reponame"),
|
|
||||||
RepoManager.Config::repo
|
|
||||||
)
|
|
||||||
textfield(
|
|
||||||
Text.translatable("notenoughupdates.gui.repo.branch"),
|
|
||||||
Text.translatable("notenoughupdates.gui.repo.hint.branch"),
|
|
||||||
RepoManager.Config::branch
|
|
||||||
)
|
|
||||||
button(
|
|
||||||
Text.translatable("notenoughupdates.gui.repo.reset.label"),
|
|
||||||
Text.translatable("notenoughupdates.gui.repo.reset"),
|
|
||||||
) {
|
|
||||||
RepoManager.data.user = "NotEnoughUpdates"
|
|
||||||
RepoManager.data.repo = "NotEnoughUpdates-REPO"
|
|
||||||
RepoManager.data.branch = "dangerous"
|
|
||||||
reload()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
26
src/main/resources/assets/firmament/lang/en_us.json
Normal file
26
src/main/resources/assets/firmament/lang/en_us.json
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"firmament.repo.reload.network": "Trying to redownload the repository",
|
||||||
|
"firmament.repo.reload.disk": "Reloading repository from disk. This may lag a bit.",
|
||||||
|
"firmament.repo.cache": "Recaching items",
|
||||||
|
"firmament.repo.brokenitem": "Failed to render item: %s",
|
||||||
|
"firmament.gui.repo.title": "firmament Repo Settings",
|
||||||
|
"firmament.gui.repo.autoupdate": "Auto Update",
|
||||||
|
"firmament.gui.repo.username": "Repo Username",
|
||||||
|
"firmament.gui.repo.hint.username": "NotEnoughUpdates",
|
||||||
|
"firmament.gui.repo.reponame": "Repo Name",
|
||||||
|
"firmament.gui.repo.hint.reponame": "NotEnoughUpdates-REPO",
|
||||||
|
"firmament.gui.repo.branch": "Repo Branch",
|
||||||
|
"firmament.gui.repo.hint.branch": "dangerous",
|
||||||
|
"firmament.gui.repo.reset": "Reset",
|
||||||
|
"firmament.gui.repo.reset.label": "Reset to Defaults",
|
||||||
|
"firmament.sbinfo.nolocraw": "No locraw data available",
|
||||||
|
"firmament.sbinfo.profile": "Current profile cutename: %s",
|
||||||
|
"firmament.sbinfo.server": "Locraw Server: %s",
|
||||||
|
"firmament.sbinfo.gametype": "Locraw Gametype: %s",
|
||||||
|
"firmament.sbinfo.mode": "Locraw Mode: %s",
|
||||||
|
"firmament.sbinfo.map": "Locraw Map: %s",
|
||||||
|
"firmament.config.fairy-souls.show": "Show Fairy Soul Waypoints",
|
||||||
|
"firmament.config.fairy-souls.reset": "Reset Collected Fairy Souls",
|
||||||
|
"firmament.config.fishing-warning.display-warning": "Display a warning when you are about to hook a fish",
|
||||||
|
"firmament.config.fishing-warning.highlight-wake-chain": "Highlight fishing particles"
|
||||||
|
}
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"notenoughupdates.repo.reload.network": "Trying to redownload the repository",
|
|
||||||
"notenoughupdates.repo.reload.disk": "Reloading repository from disk. This may lag a bit.",
|
|
||||||
"notenoughupdates.repo.cache": "Recaching items",
|
|
||||||
"notenoughupdates.repo.brokenitem": "Failed to render item: %s",
|
|
||||||
"notenoughupdates.gui.repo.title": "NotEnoughUpdates Repo Settings",
|
|
||||||
"notenoughupdates.gui.repo.autoupdate": "Auto Update",
|
|
||||||
"notenoughupdates.gui.repo.username": "Repo Username",
|
|
||||||
"notenoughupdates.gui.repo.hint.username": "NotEnoughUpdates",
|
|
||||||
"notenoughupdates.gui.repo.reponame": "Repo Name",
|
|
||||||
"notenoughupdates.gui.repo.hint.reponame": "NotEnoughUpdates-REPO",
|
|
||||||
"notenoughupdates.gui.repo.branch": "Repo Branch",
|
|
||||||
"notenoughupdates.gui.repo.hint.branch": "dangerous",
|
|
||||||
"notenoughupdates.gui.repo.reset": "Reset",
|
|
||||||
"notenoughupdates.gui.repo.reset.label": "Reset to Defaults",
|
|
||||||
"notenoughupdates.sbinfo.nolocraw": "No locraw data available",
|
|
||||||
"notenoughupdates.sbinfo.profile": "Current profile cutename: %s",
|
|
||||||
"notenoughupdates.sbinfo.server": "Locraw Server: %s",
|
|
||||||
"notenoughupdates.sbinfo.gametype": "Locraw Gametype: %s",
|
|
||||||
"notenoughupdates.sbinfo.mode": "Locraw Mode: %s",
|
|
||||||
"notenoughupdates.sbinfo.map": "Locraw Map: %s",
|
|
||||||
"neu.config.fairy-souls.show": "Show Fairy Soul Waypoints",
|
|
||||||
"neu.config.fairy-souls.reset": "Reset Collected Fairy Souls",
|
|
||||||
"neu.config.fishing-warning.display-warning": "Display a warning when you are about to hook a fish",
|
|
||||||
"neu.config.fishing-warning.highlight-wake-chain": "Highlight fishing particles"
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": 1,
|
"schemaVersion": 1,
|
||||||
"id": "notenoughupdates",
|
"id": "firmament",
|
||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
"name": "Not Enough Updates",
|
"name": "Firmament",
|
||||||
"description": "Not Enough Updates - A mod for Hypixel Skyblock",
|
"description": "Firmament powered by NEU",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Linnea Gräf",
|
"name": "Linnea Gräf",
|
||||||
@@ -14,30 +14,30 @@
|
|||||||
],
|
],
|
||||||
"contact": {
|
"contact": {
|
||||||
"discord": "https://discord.gg/moulberry",
|
"discord": "https://discord.gg/moulberry",
|
||||||
"sources": "https://git.nea.moe/nea/NotEnoughUpdates1.19/"
|
"sources": "https://git.nea.moe/nea/firmament/"
|
||||||
},
|
},
|
||||||
"license": "ARR",
|
"license": "ARR",
|
||||||
"icon": "assets/notenoughupdates/icon.png",
|
"icon": "assets/firmament/icon.png",
|
||||||
"environment": "client",
|
"environment": "client",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"main": [
|
"main": [
|
||||||
{
|
{
|
||||||
"adapter": "kotlin",
|
"adapter": "kotlin",
|
||||||
"value": "moe.nea.notenoughupdates.NotEnoughUpdates"
|
"value": "moe.nea.firmament.NotEnoughUpdates"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"client": [
|
"client": [
|
||||||
{
|
{
|
||||||
"adapter": "kotlin",
|
"adapter": "kotlin",
|
||||||
"value": "moe.nea.notenoughupdates.NotEnoughUpdates"
|
"value": "moe.nea.firmament.NotEnoughUpdates"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"rei_client": [
|
"rei_client": [
|
||||||
"moe.nea.notenoughupdates.rei.NEUReiPlugin"
|
"moe.nea.firmament.rei.FirmamentReiPlugin"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"notenoughupdates.mixins.json"
|
"firmament.mixins.json"
|
||||||
],
|
],
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabric": "*",
|
"fabric": "*",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"plugin": "moe.nea.notenoughupdates.init.MixinPlugin",
|
"plugin": "moe.nea.firmament.init.MixinPlugin",
|
||||||
"package": "moe.nea.notenoughupdates.mixins",
|
"package": "moe.nea.firmament.mixins",
|
||||||
"compatibilityLevel": "JAVA_16",
|
"compatibilityLevel": "JAVA_16",
|
||||||
"client": [
|
"client": [
|
||||||
"MixinDownloadingTerrainScreen",
|
"MixinDownloadingTerrainScreen",
|
||||||
Reference in New Issue
Block a user