mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-23 03:17:53 +01:00
optimize imports
This commit is contained in:
parent
52d99e3a61
commit
47e80a66a0
14 changed files with 35 additions and 56 deletions
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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<Boolean> IS_SODIUM_LOADED = Suppliers.memoize(() -> LoadingModList.get().getModFileById("embeddium") != null);
|
||||
|
||||
|
|
Loading…
Reference in a new issue