diff --git a/README.md b/README.md index 3de6e12e7..95d7ba6ba 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Logo by @voxel_dani on Twitter

Flywheel

A modern engine for modded Minecraft.
-Jenkins +Jenkins Discord Curseforge Downloads
diff --git a/src/main/java/com/jozufozu/flywheel/api/instance/IDynamicInstance.java b/src/main/java/com/jozufozu/flywheel/api/instance/IDynamicInstance.java index fdc684913..75b4bdc15 100644 --- a/src/main/java/com/jozufozu/flywheel/api/instance/IDynamicInstance.java +++ b/src/main/java/com/jozufozu/flywheel/api/instance/IDynamicInstance.java @@ -1,7 +1,7 @@ package com.jozufozu.flywheel.api.instance; -import com.jozufozu.flywheel.api.Instancer; import com.jozufozu.flywheel.api.InstanceData; +import com.jozufozu.flywheel.api.Instancer; import com.jozufozu.flywheel.backend.instancing.tile.TileEntityInstance; /** diff --git a/src/main/java/com/jozufozu/flywheel/backend/Backend.java b/src/main/java/com/jozufozu/flywheel/backend/Backend.java index 2be21c97e..2a14e44ff 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/Backend.java +++ b/src/main/java/com/jozufozu/flywheel/backend/Backend.java @@ -14,9 +14,9 @@ import org.lwjgl.opengl.GL; import org.lwjgl.opengl.GLCapabilities; import com.jozufozu.flywheel.api.FlywheelWorld; -import com.jozufozu.flywheel.backend.gl.versioned.GlCompat; import com.jozufozu.flywheel.api.InstanceData; import com.jozufozu.flywheel.api.struct.StructType; +import com.jozufozu.flywheel.backend.gl.versioned.GlCompat; import com.jozufozu.flywheel.config.FlwConfig; import com.jozufozu.flywheel.core.shader.spec.ProgramSpec; diff --git a/src/main/java/com/jozufozu/flywheel/backend/gl/GLSLVersion.java b/src/main/java/com/jozufozu/flywheel/backend/gl/GLSLVersion.java index 5473de7ad..978a6ecbd 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/gl/GLSLVersion.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/GLSLVersion.java @@ -1,10 +1,6 @@ package com.jozufozu.flywheel.backend.gl; public enum GLSLVersion { - @Deprecated - V110(110), - @Deprecated - V120(120), V150(150), V330(330), ; diff --git a/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/MappedGlBuffer.java b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/MappedGlBuffer.java index 8fe3ba243..8df8ebea0 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/MappedGlBuffer.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/MappedGlBuffer.java @@ -7,7 +7,6 @@ import org.lwjgl.opengl.GL30; import com.jozufozu.flywheel.backend.gl.error.GlError; import com.jozufozu.flywheel.backend.gl.error.GlException; -import com.jozufozu.flywheel.util.StringUtil; public class MappedGlBuffer extends GlBuffer implements Mappable { diff --git a/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/VecBuffer.java b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/VecBuffer.java index ab957169c..8d5a14eb6 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/VecBuffer.java +++ b/src/main/java/com/jozufozu/flywheel/backend/gl/buffer/VecBuffer.java @@ -5,8 +5,6 @@ import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; -import javax.annotation.Nullable; - public class VecBuffer { protected ByteBuffer internal; diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/AbstractInstance.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/AbstractInstance.java index 1feadfa37..3bf0c14b2 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/AbstractInstance.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/AbstractInstance.java @@ -3,14 +3,14 @@ package com.jozufozu.flywheel.backend.instancing; import java.util.Arrays; import java.util.stream.Stream; +import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.api.instance.IDynamicInstance; import com.jozufozu.flywheel.api.instance.IInstance; import com.jozufozu.flywheel.api.instance.ITickableInstance; import com.jozufozu.flywheel.backend.instancing.tile.TileInstanceManager; -import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.core.materials.FlatLit; -import com.jozufozu.flywheel.light.LightListener; import com.jozufozu.flywheel.light.ImmutableBox; +import com.jozufozu.flywheel.light.LightListener; import com.jozufozu.flywheel.light.LightProvider; import com.jozufozu.flywheel.light.ListenerStatus; diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceManager.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceManager.java index ba55db9f5..14c51f360 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceManager.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceManager.java @@ -8,10 +8,10 @@ import java.util.Set; import javax.annotation.Nullable; -import com.jozufozu.flywheel.backend.Backend; +import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.api.instance.IDynamicInstance; import com.jozufozu.flywheel.api.instance.ITickableInstance; -import com.jozufozu.flywheel.api.MaterialManager; +import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.backend.instancing.instancing.InstancingEngine; import com.jozufozu.flywheel.light.LightUpdater; import com.mojang.math.Vector3f; diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceWorld.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceWorld.java index 278fbe7cf..7f127021f 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceWorld.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceWorld.java @@ -2,10 +2,10 @@ package com.jozufozu.flywheel.backend.instancing; import com.jozufozu.flywheel.api.instance.IDynamicInstance; import com.jozufozu.flywheel.api.instance.ITickableInstance; -import com.jozufozu.flywheel.backend.instancing.entity.EntityInstanceManager; -import com.jozufozu.flywheel.backend.instancing.tile.TileInstanceManager; import com.jozufozu.flywheel.backend.instancing.batching.BatchingEngine; +import com.jozufozu.flywheel.backend.instancing.entity.EntityInstanceManager; import com.jozufozu.flywheel.backend.instancing.instancing.InstancingEngine; +import com.jozufozu.flywheel.backend.instancing.tile.TileInstanceManager; import com.jozufozu.flywheel.core.Contexts; import com.jozufozu.flywheel.core.shader.WorldProgram; import com.jozufozu.flywheel.event.BeginFrameEvent; diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedRenderRegistry.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedRenderRegistry.java index 524b03e78..db0c325a4 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedRenderRegistry.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedRenderRegistry.java @@ -6,11 +6,11 @@ import javax.annotation.Nullable; import com.google.common.collect.Maps; import com.jozufozu.flywheel.api.FlywheelRendered; +import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.backend.instancing.entity.EntityInstance; import com.jozufozu.flywheel.backend.instancing.entity.IEntityInstanceFactory; import com.jozufozu.flywheel.backend.instancing.tile.ITileInstanceFactory; import com.jozufozu.flywheel.backend.instancing.tile.TileEntityInstance; -import com.jozufozu.flywheel.api.MaterialManager; import it.unimi.dsi.fastutil.objects.Object2BooleanLinkedOpenHashMap; import it.unimi.dsi.fastutil.objects.Object2BooleanMap; @@ -58,24 +58,6 @@ public class InstancedRenderRegistry { return new EntityConfig<>(type); } - /** - * @deprecated will be removed in 0.3.0, use {@link #tile} - */ - @Deprecated - public void register(BlockEntityType type, ITileInstanceFactory rendererFactory) { - this.tile(type) - .factory(rendererFactory); - } - - /** - * @deprecated will be removed in 0.3.0, use {@link #entity} - */ - @Deprecated - public void register(EntityType type, IEntityInstanceFactory rendererFactory) { - this.entity(type) - .factory(rendererFactory); - } - @SuppressWarnings("unchecked") @Nullable public TileEntityInstance create(MaterialManager manager, T tile) { @@ -110,7 +92,6 @@ public class InstancedRenderRegistry { public class TileConfig implements Config, ITileInstanceFactory> { - private final BlockEntityType type; public TileConfig(BlockEntityType type) { @@ -121,14 +102,15 @@ public class InstancedRenderRegistry { tiles.put(type, rendererFactory); return this; } + public TileConfig setSkipRender(boolean skipRender) { InstancedRenderRegistry.this.skipRender.put(type, skipRender); return this; } } - public class EntityConfig implements Config, IEntityInstanceFactory> { + public class EntityConfig implements Config, IEntityInstanceFactory> { private final EntityType type; @@ -140,6 +122,7 @@ public class InstancedRenderRegistry { entities.put(type, rendererFactory); return this; } + public EntityConfig setSkipRender(boolean skipRender) { InstancedRenderRegistry.this.skipRender.put(type, skipRender); diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/BatchingEngine.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/BatchingEngine.java index 427115dde..27535864a 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/BatchingEngine.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/BatchingEngine.java @@ -4,9 +4,9 @@ import java.util.EnumMap; import java.util.HashMap; import java.util.Map; -import com.jozufozu.flywheel.backend.instancing.Engine; import com.jozufozu.flywheel.api.MaterialGroup; import com.jozufozu.flywheel.backend.RenderLayer; +import com.jozufozu.flywheel.backend.instancing.Engine; import com.jozufozu.flywheel.event.RenderLayerEvent; import net.minecraft.client.Camera; diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/CPUInstancer.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/CPUInstancer.java index 270812f92..955c52a1c 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/CPUInstancer.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/batching/CPUInstancer.java @@ -1,9 +1,9 @@ package com.jozufozu.flywheel.backend.instancing.batching; -import com.jozufozu.flywheel.backend.instancing.AbstractInstancer; import com.jozufozu.flywheel.api.InstanceData; import com.jozufozu.flywheel.api.struct.BatchingTransformer; import com.jozufozu.flywheel.api.struct.StructType; +import com.jozufozu.flywheel.backend.instancing.AbstractInstancer; import com.jozufozu.flywheel.core.model.Model; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; 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 f8e84e2fc..ac6443bf0 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 @@ -1,14 +1,14 @@ package com.jozufozu.flywheel.backend.instancing.entity; -import com.jozufozu.flywheel.backend.instancing.AbstractInstance; +import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.api.instance.IDynamicInstance; import com.jozufozu.flywheel.api.instance.ITickableInstance; +import com.jozufozu.flywheel.backend.instancing.AbstractInstance; import com.jozufozu.flywheel.backend.instancing.tile.TileInstanceManager; -import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.light.GridAlignedBB; import com.jozufozu.flywheel.light.LightListener; -import com.jozufozu.flywheel.light.MovingListener; import com.jozufozu.flywheel.light.LightProvider; +import com.jozufozu.flywheel.light.MovingListener; import com.mojang.math.Vector3f; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/entity/EntityInstanceManager.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/entity/EntityInstanceManager.java index 95bef0093..223f725fb 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/entity/EntityInstanceManager.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/entity/EntityInstanceManager.java @@ -1,10 +1,10 @@ package com.jozufozu.flywheel.backend.instancing.entity; +import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.backend.instancing.AbstractInstance; import com.jozufozu.flywheel.backend.instancing.InstanceManager; import com.jozufozu.flywheel.backend.instancing.InstancedRenderRegistry; -import com.jozufozu.flywheel.api.MaterialManager; import net.minecraft.core.BlockPos; import net.minecraft.world.entity.Entity; diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/GPUInstancer.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/GPUInstancer.java index a2c0075d3..879f35785 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/GPUInstancer.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/GPUInstancer.java @@ -3,6 +3,9 @@ package com.jozufozu.flywheel.backend.instancing.instancing; import java.util.BitSet; import com.jozufozu.flywheel.Flywheel; +import com.jozufozu.flywheel.api.InstanceData; +import com.jozufozu.flywheel.api.struct.StructType; +import com.jozufozu.flywheel.api.struct.StructWriter; import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.backend.gl.GlVertexArray; import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat; @@ -11,11 +14,8 @@ import com.jozufozu.flywheel.backend.gl.buffer.GlBufferType; import com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer; import com.jozufozu.flywheel.backend.gl.error.GlError; import com.jozufozu.flywheel.backend.instancing.AbstractInstancer; -import com.jozufozu.flywheel.api.InstanceData; import com.jozufozu.flywheel.backend.model.IBufferedModel; import com.jozufozu.flywheel.backend.model.ModelAllocator; -import com.jozufozu.flywheel.api.struct.StructType; -import com.jozufozu.flywheel.api.struct.StructWriter; import com.jozufozu.flywheel.core.model.Model; import com.jozufozu.flywheel.util.AttribUtil; diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancedMaterial.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancedMaterial.java index 791dea79d..24b569b30 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancedMaterial.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancedMaterial.java @@ -5,15 +5,15 @@ import java.util.function.Supplier; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; -import com.jozufozu.flywheel.backend.Backend; -import com.jozufozu.flywheel.backend.RenderWork; import com.jozufozu.flywheel.api.InstanceData; import com.jozufozu.flywheel.api.Instancer; import com.jozufozu.flywheel.api.Material; +import com.jozufozu.flywheel.api.struct.StructType; +import com.jozufozu.flywheel.backend.Backend; +import com.jozufozu.flywheel.backend.RenderWork; import com.jozufozu.flywheel.backend.model.ImmediateAllocator; import com.jozufozu.flywheel.backend.model.ModelAllocator; import com.jozufozu.flywheel.backend.model.ModelPool; -import com.jozufozu.flywheel.api.struct.StructType; import com.jozufozu.flywheel.core.Formats; import com.jozufozu.flywheel.core.model.Model; diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancingEngine.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancingEngine.java index e257a381f..7d1fa1cbe 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancingEngine.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/instancing/InstancingEngine.java @@ -8,11 +8,11 @@ import java.util.stream.Stream; import javax.annotation.Nullable; +import com.jozufozu.flywheel.api.MaterialGroup; +import com.jozufozu.flywheel.backend.RenderLayer; import com.jozufozu.flywheel.backend.gl.GlVertexArray; import com.jozufozu.flywheel.backend.gl.buffer.GlBufferType; import com.jozufozu.flywheel.backend.instancing.Engine; -import com.jozufozu.flywheel.api.MaterialGroup; -import com.jozufozu.flywheel.backend.RenderLayer; import com.jozufozu.flywheel.core.WorldContext; import com.jozufozu.flywheel.core.shader.WorldProgram; import com.jozufozu.flywheel.event.RenderLayerEvent; diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/tile/TileEntityInstance.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/tile/TileEntityInstance.java index 506b220a4..b064d214f 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/tile/TileEntityInstance.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/tile/TileEntityInstance.java @@ -1,10 +1,10 @@ package com.jozufozu.flywheel.backend.instancing.tile; -import com.jozufozu.flywheel.backend.instancing.AbstractInstance; -import com.jozufozu.flywheel.api.instance.IDynamicInstance; -import com.jozufozu.flywheel.api.instance.ITickableInstance; import com.jozufozu.flywheel.api.Material; import com.jozufozu.flywheel.api.MaterialManager; +import com.jozufozu.flywheel.api.instance.IDynamicInstance; +import com.jozufozu.flywheel.api.instance.ITickableInstance; +import com.jozufozu.flywheel.backend.instancing.AbstractInstance; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.model.ModelData; import com.jozufozu.flywheel.core.materials.oriented.OrientedData; diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/tile/TileInstanceManager.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/tile/TileInstanceManager.java index 57eb8c8e9..aa4e6c274 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/instancing/tile/TileInstanceManager.java +++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/tile/TileInstanceManager.java @@ -1,10 +1,10 @@ package com.jozufozu.flywheel.backend.instancing.tile; +import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.backend.instancing.AbstractInstance; import com.jozufozu.flywheel.backend.instancing.InstanceManager; import com.jozufozu.flywheel.backend.instancing.InstancedRenderRegistry; -import com.jozufozu.flywheel.api.MaterialManager; import net.minecraft.core.BlockPos; import net.minecraft.world.level.BlockGetter; diff --git a/src/main/java/com/jozufozu/flywheel/backend/pipeline/WorldShaderPipeline.java b/src/main/java/com/jozufozu/flywheel/backend/pipeline/WorldShaderPipeline.java index 985a60ad7..9129cb514 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/pipeline/WorldShaderPipeline.java +++ b/src/main/java/com/jozufozu/flywheel/backend/pipeline/WorldShaderPipeline.java @@ -7,9 +7,9 @@ import javax.annotation.Nullable; import com.jozufozu.flywheel.backend.gl.shader.ShaderType; import com.jozufozu.flywheel.backend.source.FileResolution; import com.jozufozu.flywheel.backend.source.SourceFile; +import com.jozufozu.flywheel.core.shader.ContextAwareProgram; import com.jozufozu.flywheel.core.shader.ExtensibleGlProgram; import com.jozufozu.flywheel.core.shader.GameStateProgram; -import com.jozufozu.flywheel.core.shader.ContextAwareProgram; import com.jozufozu.flywheel.core.shader.WorldProgram; import com.jozufozu.flywheel.core.shader.spec.ProgramSpec; import com.jozufozu.flywheel.core.shader.spec.ProgramState; diff --git a/src/main/java/com/jozufozu/flywheel/core/Contexts.java b/src/main/java/com/jozufozu/flywheel/core/Contexts.java index 49821aaf9..5c702124a 100644 --- a/src/main/java/com/jozufozu/flywheel/core/Contexts.java +++ b/src/main/java/com/jozufozu/flywheel/core/Contexts.java @@ -3,8 +3,8 @@ package com.jozufozu.flywheel.core; import com.jozufozu.flywheel.Flywheel; import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.backend.GameStateRegistry; -import com.jozufozu.flywheel.backend.pipeline.ShaderPipeline; import com.jozufozu.flywheel.backend.pipeline.InstancingTemplate; +import com.jozufozu.flywheel.backend.pipeline.ShaderPipeline; import com.jozufozu.flywheel.backend.pipeline.WorldShaderPipeline; import com.jozufozu.flywheel.backend.source.FileResolution; import com.jozufozu.flywheel.backend.source.Resolver; diff --git a/src/main/java/com/jozufozu/flywheel/core/FullscreenQuad.java b/src/main/java/com/jozufozu/flywheel/core/FullscreenQuad.java index a1269b613..1436dab6c 100644 --- a/src/main/java/com/jozufozu/flywheel/core/FullscreenQuad.java +++ b/src/main/java/com/jozufozu/flywheel/core/FullscreenQuad.java @@ -1,8 +1,9 @@ package com.jozufozu.flywheel.core; -import static org.lwjgl.opengl.GL20.*; - -import org.lwjgl.opengl.GL20; +import static org.lwjgl.opengl.GL11.GL_TRIANGLES; +import static org.lwjgl.opengl.GL11.glDrawArrays; +import static org.lwjgl.opengl.GL20.glEnableVertexAttribArray; +import static org.lwjgl.opengl.GL20.glVertexAttribPointer; import com.jozufozu.flywheel.Flywheel; import com.jozufozu.flywheel.backend.gl.GlNumericType; diff --git a/src/main/java/com/jozufozu/flywheel/core/Materials.java b/src/main/java/com/jozufozu/flywheel/core/Materials.java index ccae21eaf..3de4d5f1b 100644 --- a/src/main/java/com/jozufozu/flywheel/core/Materials.java +++ b/src/main/java/com/jozufozu/flywheel/core/Materials.java @@ -1,7 +1,7 @@ package com.jozufozu.flywheel.core; -import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.api.struct.StructType; +import com.jozufozu.flywheel.backend.Backend; import com.jozufozu.flywheel.core.materials.model.ModelData; import com.jozufozu.flywheel.core.materials.model.ModelType; import com.jozufozu.flywheel.core.materials.oriented.OrientedData; 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 63ee63425..30e427f6b 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.instancing.tile.TileInstanceManager; import com.jozufozu.flywheel.api.MaterialManager; +import com.jozufozu.flywheel.backend.instancing.tile.TileInstanceManager; import net.minecraft.core.BlockPos; diff --git a/src/main/java/com/jozufozu/flywheel/core/materials/model/ModelType.java b/src/main/java/com/jozufozu/flywheel/core/materials/model/ModelType.java index 6b824890f..c815df2f9 100644 --- a/src/main/java/com/jozufozu/flywheel/core/materials/model/ModelType.java +++ b/src/main/java/com/jozufozu/flywheel/core/materials/model/ModelType.java @@ -1,11 +1,11 @@ package com.jozufozu.flywheel.core.materials.model; -import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat; -import com.jozufozu.flywheel.backend.gl.buffer.VecBuffer; import com.jozufozu.flywheel.api.struct.Batched; import com.jozufozu.flywheel.api.struct.BatchingTransformer; -import com.jozufozu.flywheel.api.struct.StructWriter; import com.jozufozu.flywheel.api.struct.Instanced; +import com.jozufozu.flywheel.api.struct.StructWriter; +import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat; +import com.jozufozu.flywheel.backend.gl.buffer.VecBuffer; import com.jozufozu.flywheel.core.Formats; import com.jozufozu.flywheel.core.Programs; import com.jozufozu.flywheel.core.materials.model.writer.UnsafeModelWriter; diff --git a/src/main/java/com/jozufozu/flywheel/core/materials/model/writer/UnsafeModelWriter.java b/src/main/java/com/jozufozu/flywheel/core/materials/model/writer/UnsafeModelWriter.java index f7dba06ad..9b04a8534 100644 --- a/src/main/java/com/jozufozu/flywheel/core/materials/model/writer/UnsafeModelWriter.java +++ b/src/main/java/com/jozufozu/flywheel/core/materials/model/writer/UnsafeModelWriter.java @@ -2,8 +2,8 @@ package com.jozufozu.flywheel.core.materials.model.writer; import org.lwjgl.system.MemoryUtil; -import com.jozufozu.flywheel.backend.gl.buffer.VecBuffer; import com.jozufozu.flywheel.api.struct.StructType; +import com.jozufozu.flywheel.backend.gl.buffer.VecBuffer; import com.jozufozu.flywheel.backend.struct.UnsafeBufferWriter; import com.jozufozu.flywheel.core.materials.model.ModelData; import com.jozufozu.flywheel.util.WriteUnsafe; diff --git a/src/main/java/com/jozufozu/flywheel/core/materials/oriented/OrientedType.java b/src/main/java/com/jozufozu/flywheel/core/materials/oriented/OrientedType.java index f5203d69c..55f0097f4 100644 --- a/src/main/java/com/jozufozu/flywheel/core/materials/oriented/OrientedType.java +++ b/src/main/java/com/jozufozu/flywheel/core/materials/oriented/OrientedType.java @@ -1,11 +1,11 @@ package com.jozufozu.flywheel.core.materials.oriented; -import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat; -import com.jozufozu.flywheel.backend.gl.buffer.VecBuffer; import com.jozufozu.flywheel.api.struct.Batched; import com.jozufozu.flywheel.api.struct.BatchingTransformer; -import com.jozufozu.flywheel.api.struct.StructWriter; import com.jozufozu.flywheel.api.struct.Instanced; +import com.jozufozu.flywheel.api.struct.StructWriter; +import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat; +import com.jozufozu.flywheel.backend.gl.buffer.VecBuffer; import com.jozufozu.flywheel.core.Formats; import com.jozufozu.flywheel.core.Programs; import com.jozufozu.flywheel.core.materials.oriented.writer.UnsafeOrientedWriter; diff --git a/src/main/java/com/jozufozu/flywheel/core/materials/oriented/writer/UnsafeOrientedWriter.java b/src/main/java/com/jozufozu/flywheel/core/materials/oriented/writer/UnsafeOrientedWriter.java index b33cefa58..3818985e0 100644 --- a/src/main/java/com/jozufozu/flywheel/core/materials/oriented/writer/UnsafeOrientedWriter.java +++ b/src/main/java/com/jozufozu/flywheel/core/materials/oriented/writer/UnsafeOrientedWriter.java @@ -2,8 +2,8 @@ package com.jozufozu.flywheel.core.materials.oriented.writer; import org.lwjgl.system.MemoryUtil; -import com.jozufozu.flywheel.backend.gl.buffer.VecBuffer; import com.jozufozu.flywheel.api.struct.StructType; +import com.jozufozu.flywheel.backend.gl.buffer.VecBuffer; import com.jozufozu.flywheel.backend.struct.UnsafeBufferWriter; import com.jozufozu.flywheel.core.materials.oriented.OrientedData; 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 9edb6e721..0fb6f2383 100644 --- a/src/main/java/com/jozufozu/flywheel/core/model/PartBuilder.java +++ b/src/main/java/com/jozufozu/flywheel/core/model/PartBuilder.java @@ -1,13 +1,10 @@ package com.jozufozu.flywheel.core.model; -import static com.jozufozu.flywheel.util.RenderMath.nb; - import java.util.ArrayList; import java.util.EnumSet; import java.util.List; import java.util.Set; -import com.jozufozu.flywheel.backend.gl.buffer.VecBuffer; import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.math.Matrix3f; import com.mojang.math.Quaternion; diff --git a/src/main/java/com/jozufozu/flywheel/light/GPULightVolume.java b/src/main/java/com/jozufozu/flywheel/light/GPULightVolume.java index cb7d3727e..68985220b 100644 --- a/src/main/java/com/jozufozu/flywheel/light/GPULightVolume.java +++ b/src/main/java/com/jozufozu/flywheel/light/GPULightVolume.java @@ -11,16 +11,12 @@ import static org.lwjgl.opengl.GL11.GL_UNPACK_SKIP_PIXELS; import static org.lwjgl.opengl.GL11.GL_UNPACK_SKIP_ROWS; import static org.lwjgl.opengl.GL11.GL_UNSIGNED_BYTE; import static org.lwjgl.opengl.GL11.glPixelStorei; -import static org.lwjgl.opengl.GL11.glTexParameteri; import static org.lwjgl.opengl.GL12.GL_TEXTURE_3D; import static org.lwjgl.opengl.GL12.GL_TEXTURE_WRAP_R; import static org.lwjgl.opengl.GL12.GL_UNPACK_IMAGE_HEIGHT; import static org.lwjgl.opengl.GL12.GL_UNPACK_SKIP_IMAGES; import static org.lwjgl.opengl.GL12.glTexImage3D; import static org.lwjgl.opengl.GL12.glTexSubImage3D; -import static org.lwjgl.opengl.GL13.GL_TEXTURE0; -import static org.lwjgl.opengl.GL13.GL_TEXTURE4; -import static org.lwjgl.opengl.GL13.glActiveTexture; import static org.lwjgl.opengl.GL14.GL_MIRRORED_REPEAT; import org.lwjgl.opengl.GL30; diff --git a/src/main/java/com/jozufozu/flywheel/mixin/RenderHooksMixin.java b/src/main/java/com/jozufozu/flywheel/mixin/RenderHooksMixin.java index 5f67b4d83..f0c0d2851 100644 --- a/src/main/java/com/jozufozu/flywheel/mixin/RenderHooksMixin.java +++ b/src/main/java/com/jozufozu/flywheel/mixin/RenderHooksMixin.java @@ -15,7 +15,6 @@ 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; -import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Matrix4f; diff --git a/src/main/java/com/jozufozu/flywheel/mixin/matrix/PoseStackMixin.java b/src/main/java/com/jozufozu/flywheel/mixin/matrix/PoseStackMixin.java index 40db441c4..781540838 100644 --- a/src/main/java/com/jozufozu/flywheel/mixin/matrix/PoseStackMixin.java +++ b/src/main/java/com/jozufozu/flywheel/mixin/matrix/PoseStackMixin.java @@ -1,7 +1,6 @@ package com.jozufozu.flywheel.mixin.matrix; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; import com.jozufozu.flywheel.util.transform.TransformStack; import com.mojang.blaze3d.vertex.PoseStack; diff --git a/src/main/java/com/jozufozu/flywheel/vanilla/BellInstance.java b/src/main/java/com/jozufozu/flywheel/vanilla/BellInstance.java index 1574a5fb4..5cfd8eb60 100644 --- a/src/main/java/com/jozufozu/flywheel/vanilla/BellInstance.java +++ b/src/main/java/com/jozufozu/flywheel/vanilla/BellInstance.java @@ -1,8 +1,8 @@ package com.jozufozu.flywheel.vanilla; +import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.api.instance.IDynamicInstance; import com.jozufozu.flywheel.backend.instancing.tile.TileEntityInstance; -import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.oriented.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 1935c5406..0dddeefb7 100644 --- a/src/main/java/com/jozufozu/flywheel/vanilla/ChestInstance.java +++ b/src/main/java/com/jozufozu/flywheel/vanilla/ChestInstance.java @@ -4,9 +4,9 @@ import java.util.Calendar; import javax.annotation.Nonnull; +import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.api.instance.IDynamicInstance; import com.jozufozu.flywheel.backend.instancing.tile.TileEntityInstance; -import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.model.ModelData; import com.jozufozu.flywheel.core.materials.oriented.OrientedData; diff --git a/src/main/java/com/jozufozu/flywheel/vanilla/MinecartInstance.java b/src/main/java/com/jozufozu/flywheel/vanilla/MinecartInstance.java index f14e7dfde..bf53ae248 100644 --- a/src/main/java/com/jozufozu/flywheel/vanilla/MinecartInstance.java +++ b/src/main/java/com/jozufozu/flywheel/vanilla/MinecartInstance.java @@ -1,9 +1,9 @@ package com.jozufozu.flywheel.vanilla; +import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.api.instance.IDynamicInstance; import com.jozufozu.flywheel.api.instance.ITickableInstance; import com.jozufozu.flywheel.backend.instancing.entity.EntityInstance; -import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.model.ModelData; import com.jozufozu.flywheel.core.model.Model; diff --git a/src/main/java/com/jozufozu/flywheel/vanilla/ShulkerBoxInstance.java b/src/main/java/com/jozufozu/flywheel/vanilla/ShulkerBoxInstance.java index f96710d8e..1f3ecbfe1 100644 --- a/src/main/java/com/jozufozu/flywheel/vanilla/ShulkerBoxInstance.java +++ b/src/main/java/com/jozufozu/flywheel/vanilla/ShulkerBoxInstance.java @@ -1,8 +1,8 @@ package com.jozufozu.flywheel.vanilla; +import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.api.instance.IDynamicInstance; import com.jozufozu.flywheel.backend.instancing.tile.TileEntityInstance; -import com.jozufozu.flywheel.api.MaterialManager; import com.jozufozu.flywheel.core.Materials; import com.jozufozu.flywheel.core.materials.model.ModelData; import com.jozufozu.flywheel.core.model.ModelPart; diff --git a/src/main/java/com/jozufozu/flywheel/vanilla/VanillaInstances.java b/src/main/java/com/jozufozu/flywheel/vanilla/VanillaInstances.java index c14a6ed04..2e759d1ea 100644 --- a/src/main/java/com/jozufozu/flywheel/vanilla/VanillaInstances.java +++ b/src/main/java/com/jozufozu/flywheel/vanilla/VanillaInstances.java @@ -8,21 +8,21 @@ import net.minecraft.world.level.block.entity.BlockEntityType; /** * TODO: * - * - * - * - * - * - * - * + * + * + * + * + * + * + * * - * - * - * - * - * - * - * + * + * + * + * + * + * + * *
{@link TileEntityType#SIGN} {@link net.minecraft.client.renderer.tileentity.SignTileEntityRenderer SignTileEntityRenderer}
{@link TileEntityType#PISTON} {@link net.minecraft.client.renderer.tileentity.PistonTileEntityRenderer PistonTileEntityRenderer}
{@link TileEntityType#CONDUIT} {@link net.minecraft.client.renderer.tileentity.ConduitTileEntityRenderer ConduitTileEntityRenderer}
{@link TileEntityType#ENCHANTING_TABLE} {@link net.minecraft.client.renderer.tileentity.EnchantmentTableTileEntityRenderer EnchantmentTableTileEntityRenderer}
{@link TileEntityType#LECTERN} {@link net.minecraft.client.renderer.tileentity.LecternTileEntityRenderer LecternTileEntityRenderer}
{@link TileEntityType#MOB_SPAWNER} {@link net.minecraft.client.renderer.tileentity.MobSpawnerTileEntityRenderer MobSpawnerTileEntityRenderer}
{@link TileEntityType#BED} {@link net.minecraft.client.renderer.tileentity.BedTileEntityRenderer BedTileEntityRenderer}
{@link BlockEntityType#SIGN} {@link net.minecraft.client.renderer.blockentity.SignRenderer SignRenderer}
{@link BlockEntityType#PISTON} {@link net.minecraft.client.renderer.blockentity.PistonHeadRenderer PistonHeadRenderer}
{@link BlockEntityType#CONDUIT} {@link net.minecraft.client.renderer.blockentity.ConduitRenderer ConduitRenderer}
{@link BlockEntityType#ENCHANTING_TABLE} {@link net.minecraft.client.renderer.blockentity.EnchantTableRenderer EnchantTableRenderer}
{@link BlockEntityType#LECTERN} {@link net.minecraft.client.renderer.blockentity.LecternRenderer LecternRenderer}
{@link BlockEntityType#MOB_SPAWNER} {@link net.minecraft.client.renderer.blockentity.SpawnerRenderer SpawnerRenderer}
{@link BlockEntityType#BED} {@link net.minecraft.client.renderer.blockentity.BedRenderer BedRenderer}
^^ Interesting - Major vv
{@link TileEntityType#END_PORTAL} {@link net.minecraft.client.renderer.tileentity.EndPortalTileEntityRenderer EndPortalTileEntityRenderer}
{@link TileEntityType#END_GATEWAY} {@link net.minecraft.client.renderer.tileentity.EndGatewayTileEntityRenderer EndGatewayTileEntityRenderer}
{@link TileEntityType#BEACON} {@link net.minecraft.client.renderer.tileentity.BeaconTileEntityRenderer BeaconTileEntityRenderer}
{@link TileEntityType#SKULL} {@link net.minecraft.client.renderer.tileentity.SkullTileEntityRenderer SkullTileEntityRenderer}
{@link TileEntityType#BANNER} {@link net.minecraft.client.renderer.tileentity.BannerTileEntityRenderer BannerTileEntityRenderer}
{@link TileEntityType#STRUCTURE_BLOCK} {@link net.minecraft.client.renderer.tileentity.StructureTileEntityRenderer StructureTileEntityRenderer}
{@link TileEntityType#CAMPFIRE} {@link net.minecraft.client.renderer.tileentity.CampfireTileEntityRenderer CampfireTileEntityRenderer}
{@link BlockEntityType#END_PORTAL} {@link net.minecraft.client.renderer.blockentity.TheEndPortalRenderer TheEndPortalRenderer}
{@link BlockEntityType#END_GATEWAY} {@link net.minecraft.client.renderer.blockentity.TheEndGatewayRenderer TheEndGatewayRenderer}
{@link BlockEntityType#BEACON} {@link net.minecraft.client.renderer.blockentity.BeaconRenderer BeaconRenderer}
{@link BlockEntityType#SKULL} {@link net.minecraft.client.renderer.blockentity.SkullBlockRenderer SkullBlockRenderer}
{@link BlockEntityType#BANNER} {@link net.minecraft.client.renderer.blockentity.BannerRenderer BannerRenderer}
{@link BlockEntityType#STRUCTURE_BLOCK} {@link net.minecraft.client.renderer.debug.StructureRenderer StructureRenderer}
{@link BlockEntityType#CAMPFIRE} {@link net.minecraft.client.renderer.blockentity.CampfireRenderer CampfireRenderer}
*/ public class VanillaInstances { diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index a9069afef..2d8d4da03 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { "description": "Flywheel resources", - "pack_format": 7 + "pack_format": 8 } }