From 172971d73237b5841ce9d667aa9abc9fe6890a9d Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Fri, 23 Jul 2021 23:46:30 -0700 Subject: [PATCH] Optimize imports --- src/main/java/com/jozufozu/flywheel/Flywheel.java | 3 --- .../java/com/jozufozu/flywheel/backend/ShaderSources.java | 2 +- .../com/jozufozu/flywheel/backend/gl/GlTextureUnit.java | 1 - .../com/jozufozu/flywheel/backend/instancing/Instancer.java | 2 -- .../flywheel/backend/instancing/entity/EntityInstance.java | 2 +- .../flywheel/backend/material/InstanceMaterial.java | 6 ------ .../com/jozufozu/flywheel/backend/state/IRenderState.java | 3 --- src/main/java/com/jozufozu/flywheel/core/WorldContext.java | 2 +- .../flywheel/core/crumbling/CrumblingInstanceManager.java | 2 +- .../jozufozu/flywheel/core/crumbling/CrumblingProgram.java | 1 - .../jozufozu/flywheel/core/crumbling/CrumblingRenderer.java | 3 --- .../java/com/jozufozu/flywheel/core/model/BlockModel.java | 2 -- .../java/com/jozufozu/flywheel/core/model/ModelPart.java | 1 - .../java/com/jozufozu/flywheel/core/model/PartBuilder.java | 1 - .../com/jozufozu/flywheel/core/shader/WorldProgram.java | 1 - .../java/com/jozufozu/flywheel/mixin/RenderHooksMixin.java | 2 +- src/main/java/com/jozufozu/flywheel/util/Lazy.java | 1 - .../java/com/jozufozu/flywheel/vanilla/BellInstance.java | 3 +-- .../java/com/jozufozu/flywheel/vanilla/ChestInstance.java | 3 +-- .../java/com/jozufozu/flywheel/vanilla/RenderStates.java | 5 ----- .../com/jozufozu/flywheel/vanilla/ShulkerBoxInstance.java | 3 +-- 21 files changed, 8 insertions(+), 41 deletions(-) diff --git a/src/main/java/com/jozufozu/flywheel/Flywheel.java b/src/main/java/com/jozufozu/flywheel/Flywheel.java index c92fb3017..fb80e35c0 100644 --- a/src/main/java/com/jozufozu/flywheel/Flywheel.java +++ b/src/main/java/com/jozufozu/flywheel/Flywheel.java @@ -1,8 +1,5 @@ package com.jozufozu.flywheel; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - import com.jozufozu.flywheel.config.FlwCommands; import com.jozufozu.flywheel.config.FlwConfig; import com.jozufozu.flywheel.config.FlwPackets; diff --git a/src/main/java/com/jozufozu/flywheel/backend/ShaderSources.java b/src/main/java/com/jozufozu/flywheel/backend/ShaderSources.java index e9e75c023..538fe258d 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/ShaderSources.java +++ b/src/main/java/com/jozufozu/flywheel/backend/ShaderSources.java @@ -26,10 +26,10 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonElement; import com.jozufozu.flywheel.backend.gl.shader.ShaderType; -import com.jozufozu.flywheel.core.crumbling.CrumblingRenderer; import com.jozufozu.flywheel.backend.instancing.InstancedRenderDispatcher; import com.jozufozu.flywheel.backend.loading.Shader; import com.jozufozu.flywheel.backend.loading.ShaderLoadingException; +import com.jozufozu.flywheel.core.crumbling.CrumblingRenderer; import com.jozufozu.flywheel.core.shader.spec.ProgramSpec; import com.jozufozu.flywheel.event.GatherContextEvent; import com.mojang.blaze3d.systems.RenderSystem; diff --git a/src/main/java/com/jozufozu/flywheel/backend/gl/GlTextureUnit.java b/src/main/java/com/jozufozu/flywheel/backend/gl/GlTextureUnit.java index bdae7486a..fbd28c63a 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/gl/GlTextureUnit.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/GlTextureUnit.java @@ -1,7 +1,6 @@ package com.jozufozu.flywheel.backend.gl; import static org.lwjgl.opengl.GL13.GL_TEXTURE0; -import static org.lwjgl.opengl.GL13.glActiveTexture; import com.mojang.blaze3d.platform.GlStateManager; diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/Instancer.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/Instancer.java index 3bb08d58e..babec0d6e 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/Instancer.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/Instancer.java @@ -5,8 +5,6 @@ import java.util.ArrayList; import java.util.BitSet; import java.util.function.Supplier; -import javax.annotation.Nonnull; - import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.backend.gl.GlVertexArray; import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat; diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/entity/EntityInstance.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/entity/EntityInstance.java index d06dcb125..c3e93fcdb 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/entity/EntityInstance.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/entity/EntityInstance.java @@ -6,9 +6,9 @@ import java.util.stream.Stream; import com.jozufozu.flywheel.backend.instancing.IDynamicInstance; import com.jozufozu.flywheel.backend.instancing.IInstance; import com.jozufozu.flywheel.backend.instancing.ITickableInstance; +import com.jozufozu.flywheel.backend.instancing.tile.TileInstanceManager; import com.jozufozu.flywheel.backend.material.InstanceMaterial; import com.jozufozu.flywheel.backend.material.MaterialManager; -import com.jozufozu.flywheel.backend.instancing.tile.TileInstanceManager; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.IFlatLight; import com.jozufozu.flywheel.core.materials.ModelData; diff --git a/src/main/java/com/jozufozu/flywheel/backend/material/InstanceMaterial.java b/src/main/java/com/jozufozu/flywheel/backend/material/InstanceMaterial.java index cc647c28b..2f55c4c9a 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/material/InstanceMaterial.java +++ b/src/main/java/com/jozufozu/flywheel/backend/material/InstanceMaterial.java @@ -1,8 +1,5 @@ package com.jozufozu.flywheel.backend.material; -import java.nio.Buffer; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; import java.util.concurrent.ExecutionException; import java.util.function.Consumer; import java.util.function.Supplier; @@ -13,11 +10,8 @@ import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import com.jozufozu.flywheel.backend.RenderWork; import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat; -import com.jozufozu.flywheel.backend.gl.buffer.VecBuffer; import com.jozufozu.flywheel.backend.instancing.InstanceData; import com.jozufozu.flywheel.backend.instancing.Instancer; -import com.jozufozu.flywheel.backend.model.BufferedModel; -import com.jozufozu.flywheel.backend.model.IndexedModel; import com.jozufozu.flywheel.core.PartialModel; import com.jozufozu.flywheel.core.model.BlockModel; import com.jozufozu.flywheel.core.model.IModel; diff --git a/src/main/java/com/jozufozu/flywheel/backend/state/IRenderState.java b/src/main/java/com/jozufozu/flywheel/backend/state/IRenderState.java index 4d0fd024e..f312ab881 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/state/IRenderState.java +++ b/src/main/java/com/jozufozu/flywheel/backend/state/IRenderState.java @@ -3,9 +3,6 @@ package com.jozufozu.flywheel.backend.state; import javax.annotation.Nullable; import com.jozufozu.flywheel.backend.gl.GlTextureUnit; -import com.jozufozu.flywheel.backend.material.MaterialManager; -import com.jozufozu.flywheel.backend.material.MaterialGroup; -import com.jozufozu.flywheel.core.shader.WorldProgram; import net.minecraft.util.ResourceLocation; diff --git a/src/main/java/com/jozufozu/flywheel/core/WorldContext.java b/src/main/java/com/jozufozu/flywheel/core/WorldContext.java index f0b63ed64..4f81b2a2d 100644 --- a/src/main/java/com/jozufozu/flywheel/core/WorldContext.java +++ b/src/main/java/com/jozufozu/flywheel/core/WorldContext.java @@ -12,13 +12,13 @@ import com.jozufozu.flywheel.backend.ResourceUtil; import com.jozufozu.flywheel.backend.ShaderContext; import com.jozufozu.flywheel.backend.ShaderSources; import com.jozufozu.flywheel.backend.gl.shader.ShaderType; -import com.jozufozu.flywheel.backend.material.MaterialSpec; import com.jozufozu.flywheel.backend.loading.InstancedArraysTemplate; import com.jozufozu.flywheel.backend.loading.Program; import com.jozufozu.flywheel.backend.loading.ProgramTemplate; import com.jozufozu.flywheel.backend.loading.Shader; import com.jozufozu.flywheel.backend.loading.ShaderLoadingException; import com.jozufozu.flywheel.backend.loading.ShaderTransformer; +import com.jozufozu.flywheel.backend.material.MaterialSpec; import com.jozufozu.flywheel.core.shader.ExtensibleGlProgram; import com.jozufozu.flywheel.core.shader.StateSensitiveMultiProgram; import com.jozufozu.flywheel.core.shader.WorldProgram; diff --git a/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingInstanceManager.java b/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingInstanceManager.java index cad068663..27447a0fe 100644 --- a/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingInstanceManager.java +++ b/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingInstanceManager.java @@ -1,7 +1,7 @@ package com.jozufozu.flywheel.core.crumbling; -import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.backend.instancing.tile.TileInstanceManager; +import com.jozufozu.flywheel.backend.material.MaterialManager; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingProgram.java b/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingProgram.java index c1b51e6aa..58278ddb9 100644 --- a/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingProgram.java +++ b/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingProgram.java @@ -6,7 +6,6 @@ import java.util.List; import com.jozufozu.flywheel.backend.loading.Program; import com.jozufozu.flywheel.core.atlas.AtlasInfo; -import com.jozufozu.flywheel.core.atlas.SheetData; import com.jozufozu.flywheel.core.shader.WorldProgram; import com.jozufozu.flywheel.core.shader.extension.IProgramExtension; diff --git a/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingRenderer.java b/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingRenderer.java index b95741afe..caca38784 100644 --- a/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingRenderer.java +++ b/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingRenderer.java @@ -2,9 +2,6 @@ package com.jozufozu.flywheel.core.crumbling; import static org.lwjgl.opengl.GL11.GL_TEXTURE_2D; import static org.lwjgl.opengl.GL11.glBindTexture; -import static org.lwjgl.opengl.GL13.GL_TEXTURE0; -import static org.lwjgl.opengl.GL13.GL_TEXTURE4; -import static org.lwjgl.opengl.GL13.glActiveTexture; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/jozufozu/flywheel/core/model/BlockModel.java b/src/main/java/com/jozufozu/flywheel/core/model/BlockModel.java index 114b6d488..3a30847c6 100644 --- a/src/main/java/com/jozufozu/flywheel/core/model/BlockModel.java +++ b/src/main/java/com/jozufozu/flywheel/core/model/BlockModel.java @@ -2,8 +2,6 @@ package com.jozufozu.flywheel.core.model; import java.util.Arrays; -import javax.annotation.Nullable; - import org.lwjgl.opengl.GL11; import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat; diff --git a/src/main/java/com/jozufozu/flywheel/core/model/ModelPart.java b/src/main/java/com/jozufozu/flywheel/core/model/ModelPart.java index a7534600a..fff356878 100644 --- a/src/main/java/com/jozufozu/flywheel/core/model/ModelPart.java +++ b/src/main/java/com/jozufozu/flywheel/core/model/ModelPart.java @@ -1,6 +1,5 @@ package com.jozufozu.flywheel.core.model; -import java.util.ArrayList; import java.util.List; import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat; diff --git a/src/main/java/com/jozufozu/flywheel/core/model/PartBuilder.java b/src/main/java/com/jozufozu/flywheel/core/model/PartBuilder.java index 801f18729..f7a4bfe8e 100644 --- a/src/main/java/com/jozufozu/flywheel/core/model/PartBuilder.java +++ b/src/main/java/com/jozufozu/flywheel/core/model/PartBuilder.java @@ -6,7 +6,6 @@ import java.util.ArrayList; import java.util.EnumSet; import java.util.List; import java.util.Set; -import java.util.function.Supplier; import com.jozufozu.flywheel.backend.gl.buffer.VecBuffer; diff --git a/src/main/java/com/jozufozu/flywheel/core/shader/WorldProgram.java b/src/main/java/com/jozufozu/flywheel/core/shader/WorldProgram.java index b3a6b9868..60b6589cb 100644 --- a/src/main/java/com/jozufozu/flywheel/core/shader/WorldProgram.java +++ b/src/main/java/com/jozufozu/flywheel/core/shader/WorldProgram.java @@ -5,7 +5,6 @@ import static org.lwjgl.opengl.GL20.glUniform3f; import java.util.List; -import com.jozufozu.flywheel.backend.gl.shader.GlProgram; import com.jozufozu.flywheel.backend.loading.Program; import com.jozufozu.flywheel.core.shader.extension.IProgramExtension; import com.jozufozu.flywheel.util.AnimationTickHolder; diff --git a/src/main/java/com/jozufozu/flywheel/mixin/RenderHooksMixin.java b/src/main/java/com/jozufozu/flywheel/mixin/RenderHooksMixin.java index f78584cf8..056efaa7b 100644 --- a/src/main/java/com/jozufozu/flywheel/mixin/RenderHooksMixin.java +++ b/src/main/java/com/jozufozu/flywheel/mixin/RenderHooksMixin.java @@ -9,8 +9,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.backend.OptifineHandler; -import com.jozufozu.flywheel.core.crumbling.CrumblingRenderer; import com.jozufozu.flywheel.backend.instancing.InstancedRenderDispatcher; +import com.jozufozu.flywheel.core.crumbling.CrumblingRenderer; import com.jozufozu.flywheel.event.BeginFrameEvent; import com.jozufozu.flywheel.event.ReloadRenderersEvent; import com.jozufozu.flywheel.event.RenderLayerEvent; diff --git a/src/main/java/com/jozufozu/flywheel/util/Lazy.java b/src/main/java/com/jozufozu/flywheel/util/Lazy.java index 6594a313f..344a07976 100644 --- a/src/main/java/com/jozufozu/flywheel/util/Lazy.java +++ b/src/main/java/com/jozufozu/flywheel/util/Lazy.java @@ -1,7 +1,6 @@ package com.jozufozu.flywheel.util; import java.util.function.Consumer; -import java.util.function.Supplier; import javax.annotation.Nonnull; diff --git a/src/main/java/com/jozufozu/flywheel/vanilla/BellInstance.java b/src/main/java/com/jozufozu/flywheel/vanilla/BellInstance.java index 1392c32d9..42358f7e1 100644 --- a/src/main/java/com/jozufozu/flywheel/vanilla/BellInstance.java +++ b/src/main/java/com/jozufozu/flywheel/vanilla/BellInstance.java @@ -1,9 +1,8 @@ package com.jozufozu.flywheel.vanilla; import com.jozufozu.flywheel.backend.instancing.IDynamicInstance; -import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.backend.instancing.tile.TileEntityInstance; -import com.jozufozu.flywheel.backend.model.BufferedModel; +import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.OrientedData; import com.jozufozu.flywheel.core.model.ModelPart; diff --git a/src/main/java/com/jozufozu/flywheel/vanilla/ChestInstance.java b/src/main/java/com/jozufozu/flywheel/vanilla/ChestInstance.java index 1c54ea07f..d859d3d5b 100644 --- a/src/main/java/com/jozufozu/flywheel/vanilla/ChestInstance.java +++ b/src/main/java/com/jozufozu/flywheel/vanilla/ChestInstance.java @@ -5,9 +5,8 @@ import java.util.Calendar; import javax.annotation.Nonnull; import com.jozufozu.flywheel.backend.instancing.IDynamicInstance; -import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.backend.instancing.tile.TileEntityInstance; -import com.jozufozu.flywheel.backend.model.BufferedModel; +import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.backend.state.TextureRenderState; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.ModelData; diff --git a/src/main/java/com/jozufozu/flywheel/vanilla/RenderStates.java b/src/main/java/com/jozufozu/flywheel/vanilla/RenderStates.java index f9c96ca24..54b6389c9 100644 --- a/src/main/java/com/jozufozu/flywheel/vanilla/RenderStates.java +++ b/src/main/java/com/jozufozu/flywheel/vanilla/RenderStates.java @@ -1,15 +1,10 @@ package com.jozufozu.flywheel.vanilla; -import java.util.List; -import java.util.stream.Collectors; - import com.jozufozu.flywheel.backend.state.IRenderState; import com.jozufozu.flywheel.backend.state.NoCullRenderState; import com.jozufozu.flywheel.backend.state.RenderState; -import com.jozufozu.flywheel.backend.state.TextureRenderState; import net.minecraft.client.renderer.Atlases; -import net.minecraft.client.renderer.model.RenderMaterial; public class RenderStates { public static final IRenderState SHULKER = RenderState.builder() diff --git a/src/main/java/com/jozufozu/flywheel/vanilla/ShulkerBoxInstance.java b/src/main/java/com/jozufozu/flywheel/vanilla/ShulkerBoxInstance.java index 94c91571a..4b01400c1 100644 --- a/src/main/java/com/jozufozu/flywheel/vanilla/ShulkerBoxInstance.java +++ b/src/main/java/com/jozufozu/flywheel/vanilla/ShulkerBoxInstance.java @@ -1,9 +1,8 @@ package com.jozufozu.flywheel.vanilla; import com.jozufozu.flywheel.backend.instancing.IDynamicInstance; -import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.backend.instancing.tile.TileEntityInstance; -import com.jozufozu.flywheel.backend.model.BufferedModel; +import com.jozufozu.flywheel.backend.material.MaterialManager; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.ModelData; import com.jozufozu.flywheel.core.model.ModelPart;