diff --git a/forge/src/api/java/dev/engine_room/flywheel/api/event/ReloadLevelRendererEvent.java b/forge/src/api/java/dev/engine_room/flywheel/api/event/ReloadLevelRendererEvent.java index a6a9ed00c..ae4a0077f 100644 --- a/forge/src/api/java/dev/engine_room/flywheel/api/event/ReloadLevelRendererEvent.java +++ b/forge/src/api/java/dev/engine_room/flywheel/api/event/ReloadLevelRendererEvent.java @@ -1,10 +1,9 @@ package dev.engine_room.flywheel.api.event; -import net.neoforged.bus.api.Event; - import org.jetbrains.annotations.Nullable; import net.minecraft.client.multiplayer.ClientLevel; +import net.neoforged.bus.api.Event; /** * This event is posted to the Forge event bus. diff --git a/forge/src/api/java/dev/engine_room/flywheel/api/event/RenderStageEvent.java b/forge/src/api/java/dev/engine_room/flywheel/api/event/RenderStageEvent.java index d9c27aad7..1062e93e8 100644 --- a/forge/src/api/java/dev/engine_room/flywheel/api/event/RenderStageEvent.java +++ b/forge/src/api/java/dev/engine_room/flywheel/api/event/RenderStageEvent.java @@ -1,7 +1,5 @@ package dev.engine_room.flywheel.api.event; -import net.neoforged.bus.api.Event; - import org.joml.Matrix4f; import com.mojang.blaze3d.vertex.PoseStack; @@ -9,6 +7,7 @@ import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.Camera; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.renderer.RenderBuffers; +import net.neoforged.bus.api.Event; /** * This event is posted to the Forge event bus. diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java index 4453ec5b8..8709e20a1 100644 --- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java +++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java @@ -3,9 +3,6 @@ package dev.engine_room.flywheel.lib.model.baked; import java.util.Iterator; import java.util.function.Function; -import net.neoforged.neoforge.client.ChunkRenderTypeSet; -import net.neoforged.neoforge.client.model.data.ModelData; - import org.jetbrains.annotations.Nullable; import com.mojang.blaze3d.vertex.BufferBuilder.RenderedBuffer; @@ -23,6 +20,8 @@ import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.FluidState; +import net.neoforged.neoforge.client.ChunkRenderTypeSet; +import net.neoforged.neoforge.client.model.data.ModelData; final class BakedModelBufferer { static final RenderType[] CHUNK_LAYERS = RenderType.chunkBufferLayers().toArray(RenderType[]::new); diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBakedModelBuilder.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBakedModelBuilder.java index 3d9cf4885..dccefefec 100644 --- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBakedModelBuilder.java +++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBakedModelBuilder.java @@ -2,8 +2,6 @@ package dev.engine_room.flywheel.lib.model.baked; import java.util.function.BiFunction; -import net.neoforged.neoforge.client.model.data.ModelData; - import org.jetbrains.annotations.Nullable; import com.mojang.blaze3d.vertex.PoseStack; @@ -18,6 +16,7 @@ import net.minecraft.client.resources.model.BakedModel; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; +import net.neoforged.neoforge.client.model.data.ModelData; public final class ForgeBakedModelBuilder extends BakedModelBuilder { @Nullable diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBlockModelBuilder.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBlockModelBuilder.java index d09730dc7..fabe098f6 100644 --- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBlockModelBuilder.java +++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBlockModelBuilder.java @@ -2,8 +2,6 @@ package dev.engine_room.flywheel.lib.model.baked; import java.util.function.BiFunction; -import net.neoforged.neoforge.client.model.data.ModelData; - import org.jetbrains.annotations.Nullable; import com.mojang.blaze3d.vertex.PoseStack; @@ -16,6 +14,7 @@ import dev.engine_room.flywheel.lib.model.SimpleModel; import net.minecraft.client.renderer.RenderType; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.state.BlockState; +import net.neoforged.neoforge.client.model.data.ModelData; public final class ForgeBlockModelBuilder extends BlockModelBuilder { @Nullable diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeMultiBlockModelBuilder.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeMultiBlockModelBuilder.java index 9bbf47079..e8fd93325 100644 --- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeMultiBlockModelBuilder.java +++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeMultiBlockModelBuilder.java @@ -3,8 +3,6 @@ package dev.engine_room.flywheel.lib.model.baked; import java.util.function.BiFunction; import java.util.function.Function; -import net.neoforged.neoforge.client.model.data.ModelData; - import org.jetbrains.annotations.Nullable; import com.mojang.blaze3d.vertex.PoseStack; @@ -17,6 +15,7 @@ import dev.engine_room.flywheel.lib.model.SimpleModel; import net.minecraft.client.renderer.RenderType; import net.minecraft.core.BlockPos; import net.minecraft.world.level.BlockAndTintGetter; +import net.neoforged.neoforge.client.model.data.ModelData; public final class ForgeMultiBlockModelBuilder extends MultiBlockModelBuilder { @Nullable diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java index f84fc5ff3..0e2189468 100644 --- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java +++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java @@ -2,12 +2,11 @@ package dev.engine_room.flywheel.lib.model.baked; import java.util.Map; -import net.neoforged.neoforge.client.event.ModelEvent; - import org.jetbrains.annotations.ApiStatus; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.resources.ResourceLocation; +import net.neoforged.neoforge.client.event.ModelEvent; @ApiStatus.Internal public final class PartialModelEventHandler { diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java index a9bf69df4..3ff42e291 100644 --- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java +++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java @@ -16,7 +16,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.Entity; import net.neoforged.neoforge.client.event.RegisterClientCommandsEvent; -import net.neoforged.neoforge.common.ModConfigSpec; import net.neoforged.neoforge.common.ModConfigSpec.BooleanValue; import net.neoforged.neoforge.common.ModConfigSpec.ConfigValue; diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java index cddd85e4e..dcbcce71c 100644 --- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java +++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java @@ -1,7 +1,5 @@ package dev.engine_room.flywheel.impl; -import net.neoforged.neoforge.common.NeoForge; - import org.jetbrains.annotations.Nullable; import dev.engine_room.flywheel.api.event.BeginFrameEvent; @@ -10,6 +8,7 @@ import dev.engine_room.flywheel.api.event.RenderContext; import dev.engine_room.flywheel.api.event.RenderStage; import dev.engine_room.flywheel.api.event.RenderStageEvent; import net.minecraft.client.multiplayer.ClientLevel; +import net.neoforged.neoforge.common.NeoForge; public class FlwImplXplatImpl implements FlwImplXplat { @Override diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java index c4bc9ffae..2557efc45 100644 --- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java +++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java @@ -2,9 +2,6 @@ package dev.engine_room.flywheel.impl; import java.lang.reflect.Field; -import net.neoforged.fml.ModList; -import net.neoforged.fml.util.ObfuscationReflectionHelper; - import org.jetbrains.annotations.Nullable; import dev.engine_room.flywheel.lib.internal.FlwLibXplat; @@ -23,6 +20,8 @@ import net.minecraft.client.resources.model.BakedModel; import net.minecraft.core.BlockPos; import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.block.state.BlockState; +import net.neoforged.fml.ModList; +import net.neoforged.fml.util.ObfuscationReflectionHelper; public class FlwLibXplatImpl implements FlwLibXplat { @Override diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java index cc1c871a3..e60ade889 100644 --- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java +++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java @@ -1,30 +1,5 @@ package dev.engine_room.flywheel.impl; -import net.minecraft.core.registries.Registries; -import net.neoforged.api.distmarker.Dist; -import net.neoforged.bus.api.IEventBus; -import net.neoforged.fml.CrashReportCallables; -import net.neoforged.fml.DistExecutor; -import net.neoforged.fml.LogicalSide; -import net.neoforged.fml.ModContainer; -import net.neoforged.fml.ModLoadingContext; - -import net.neoforged.fml.common.Mod; - -import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent; -import net.neoforged.neoforge.client.event.CustomizeGuiOverlayEvent; -import net.neoforged.neoforge.client.event.RegisterClientReloadListenersEvent; -import net.neoforged.neoforge.common.NeoForge; - -import net.neoforged.neoforge.event.TickEvent; - -import net.neoforged.neoforge.event.entity.EntityJoinLevelEvent; - -import net.neoforged.neoforge.event.entity.EntityLeaveLevelEvent; - -import net.neoforged.neoforge.event.level.LevelEvent; -import net.neoforged.neoforge.registries.RegisterEvent; - import org.apache.maven.artifact.versioning.ArtifactVersion; import org.jetbrains.annotations.UnknownNullability; @@ -42,6 +17,24 @@ import dev.engine_room.flywheel.lib.model.baked.PartialModelEventHandler; import dev.engine_room.flywheel.lib.util.LevelAttached; import net.minecraft.client.Minecraft; import net.minecraft.commands.synchronization.ArgumentTypeInfos; +import net.minecraft.core.registries.Registries; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.fml.CrashReportCallables; +import net.neoforged.fml.DistExecutor; +import net.neoforged.fml.LogicalSide; +import net.neoforged.fml.ModContainer; +import net.neoforged.fml.ModLoadingContext; +import net.neoforged.fml.common.Mod; +import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent; +import net.neoforged.neoforge.client.event.CustomizeGuiOverlayEvent; +import net.neoforged.neoforge.client.event.RegisterClientReloadListenersEvent; +import net.neoforged.neoforge.common.NeoForge; +import net.neoforged.neoforge.event.TickEvent; +import net.neoforged.neoforge.event.entity.EntityJoinLevelEvent; +import net.neoforged.neoforge.event.entity.EntityLeaveLevelEvent; +import net.neoforged.neoforge.event.level.LevelEvent; +import net.neoforged.neoforge.registries.RegisterEvent; @Mod(Flywheel.ID) public final class FlywheelForge { diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java b/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java index 60832455d..9ef397337 100644 --- a/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java +++ b/forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java @@ -1,9 +1,5 @@ package dev.engine_room.flywheel.impl; -import net.neoforged.fml.ModLoadingContext; -import net.neoforged.fml.config.ModConfig; -import net.neoforged.neoforge.common.ModConfigSpec; - import org.apache.commons.lang3.tuple.Pair; import org.jetbrains.annotations.Nullable; @@ -11,6 +7,9 @@ import dev.engine_room.flywheel.api.backend.Backend; import dev.engine_room.flywheel.api.backend.BackendManager; import net.minecraft.ResourceLocationException; import net.minecraft.resources.ResourceLocation; +import net.neoforged.fml.ModLoadingContext; +import net.neoforged.fml.config.ModConfig; +import net.neoforged.neoforge.common.ModConfigSpec; public class ForgeFlwConfig implements FlwConfig { public static final ForgeFlwConfig INSTANCE = new ForgeFlwConfig(); diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java index 174a9a766..a6c82dd10 100644 --- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java +++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/MinecraftMixin.java @@ -4,8 +4,6 @@ import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; -import net.neoforged.fml.ModLoader; - import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; @@ -15,12 +13,11 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.ModifyArg; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import com.mojang.realmsclient.client.RealmsClient; - import dev.engine_room.flywheel.api.event.EndClientResourceReloadEvent; import dev.engine_room.flywheel.impl.FlwImpl; import net.minecraft.client.Minecraft; import net.minecraft.server.packs.resources.ReloadableResourceManager; +import net.neoforged.fml.ModLoader; @Mixin(Minecraft.class) abstract class MinecraftMixin { diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java index d5dda574a..c2fe3df02 100644 --- a/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java +++ b/forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java @@ -4,14 +4,14 @@ import java.util.List; import java.util.Set; import java.util.function.Supplier; -import net.neoforged.fml.loading.LoadingModList; - import org.objectweb.asm.tree.ClassNode; import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; import org.spongepowered.asm.mixin.extensibility.IMixinInfo; import com.google.common.base.Suppliers; +import net.neoforged.fml.loading.LoadingModList; + public class SodiumMixinPlugin implements IMixinConfigPlugin { private static final Supplier IS_SODIUM_LOADED = Suppliers.memoize(() -> LoadingModList.get().getModFileById("embeddium") != null);