mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-02-13 05:35:01 +01:00
Clean up
- Remove OnlyIn annotations - Replace JSR305 Nullable and Nonnull with Jetbrains Nullable and NotNull - Fix indentation in flywheel.mixins.json - Organize imports
This commit is contained in:
parent
eb52acdaa5
commit
5697567466
61 changed files with 99 additions and 156 deletions
|
@ -1,9 +1,7 @@
|
||||||
package com.jozufozu.flywheel.api;
|
package com.jozufozu.flywheel.api;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.api.struct.StructType;
|
import com.jozufozu.flywheel.api.struct.StructType;
|
||||||
import com.jozufozu.flywheel.backend.instancing.instancing.InstancedMaterial;
|
|
||||||
|
|
||||||
import net.minecraft.client.renderer.RenderType;
|
|
||||||
import net.minecraft.core.Vec3i;
|
import net.minecraft.core.Vec3i;
|
||||||
|
|
||||||
public interface MaterialManager {
|
public interface MaterialManager {
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
package com.jozufozu.flywheel.backend;
|
package com.jozufozu.flywheel.backend;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.api.FlywheelWorld;
|
import com.jozufozu.flywheel.api.FlywheelWorld;
|
||||||
import com.jozufozu.flywheel.backend.gl.versioned.GlCompat;
|
import com.jozufozu.flywheel.backend.gl.versioned.GlCompat;
|
||||||
import com.jozufozu.flywheel.backend.instancing.ParallelTaskEngine;
|
import com.jozufozu.flywheel.backend.instancing.ParallelTaskEngine;
|
||||||
import com.jozufozu.flywheel.config.FlwConfig;
|
|
||||||
import com.jozufozu.flywheel.config.BackendType;
|
import com.jozufozu.flywheel.config.BackendType;
|
||||||
|
import com.jozufozu.flywheel.config.FlwConfig;
|
||||||
import com.jozufozu.flywheel.core.shader.ProgramSpec;
|
import com.jozufozu.flywheel.core.shader.ProgramSpec;
|
||||||
import com.mojang.logging.LogUtils;
|
import com.mojang.logging.LogUtils;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.function.BooleanSupplier;
|
import java.util.function.BooleanSupplier;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import net.minecraft.client.Camera;
|
import net.minecraft.client.Camera;
|
||||||
import net.minecraft.client.renderer.culling.Frustum;
|
import net.minecraft.client.renderer.culling.Frustum;
|
||||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraftforge.eventbus.api.EventPriority;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
|
||||||
@Mod.EventBusSubscriber(value = Dist.CLIENT)
|
@Mod.EventBusSubscriber(Dist.CLIENT)
|
||||||
public class RenderWork {
|
public class RenderWork {
|
||||||
private static final Queue<Runnable> runs = new ConcurrentLinkedQueue<>();
|
private static final Queue<Runnable> runs = new ConcurrentLinkedQueue<>();
|
||||||
|
|
||||||
|
|
|
@ -6,14 +6,9 @@ import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
|
||||||
public enum GlNumericType {
|
public enum GlNumericType {
|
||||||
FLOAT(4, "float", GL11.GL_FLOAT),
|
FLOAT(4, "float", GL11.GL_FLOAT),
|
||||||
UBYTE(1, "ubyte", GL11.GL_UNSIGNED_BYTE),
|
UBYTE(1, "ubyte", GL11.GL_UNSIGNED_BYTE),
|
||||||
|
|
|
@ -7,8 +7,7 @@ import static org.lwjgl.opengl.GL20.glUniformMatrix4fv;
|
||||||
|
|
||||||
import java.nio.FloatBuffer;
|
import java.nio.FloatBuffer;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import org.lwjgl.system.MemoryStack;
|
import org.lwjgl.system.MemoryStack;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.backend.Backend;
|
import com.jozufozu.flywheel.backend.Backend;
|
||||||
|
@ -91,7 +90,7 @@ public abstract class GlProgram extends GlObject {
|
||||||
*/
|
*/
|
||||||
public interface Factory<P extends GlProgram> {
|
public interface Factory<P extends GlProgram> {
|
||||||
|
|
||||||
@Nonnull
|
@NotNull
|
||||||
P create(ResourceLocation name, int handle);
|
P create(ResourceLocation name, int handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ import java.util.function.Supplier;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.api.InstanceData;
|
import com.jozufozu.flywheel.api.InstanceData;
|
||||||
import com.jozufozu.flywheel.api.Instancer;
|
import com.jozufozu.flywheel.api.Instancer;
|
||||||
import com.jozufozu.flywheel.core.model.ModelSupplier;
|
|
||||||
|
|
||||||
public abstract class AbstractInstancer<D extends InstanceData> implements Instancer<D> {
|
public abstract class AbstractInstancer<D extends InstanceData> implements Instancer<D> {
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.api.MaterialManager;
|
import com.jozufozu.flywheel.api.MaterialManager;
|
||||||
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
||||||
|
|
|
@ -19,12 +19,10 @@ import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.level.LevelAccessor;
|
import net.minecraft.world.level.LevelAccessor;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
||||||
import net.minecraftforge.event.TickEvent;
|
import net.minecraftforge.event.TickEvent;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
|
||||||
@Mod.EventBusSubscriber(Dist.CLIENT)
|
@Mod.EventBusSubscriber(Dist.CLIENT)
|
||||||
public class InstancedRenderDispatcher {
|
public class InstancedRenderDispatcher {
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.Objects;
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.api.MaterialManager;
|
import com.jozufozu.flywheel.api.MaterialManager;
|
||||||
import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance;
|
import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance;
|
||||||
|
|
|
@ -7,7 +7,6 @@ import com.jozufozu.flywheel.api.InstanceData;
|
||||||
import com.jozufozu.flywheel.api.Instancer;
|
import com.jozufozu.flywheel.api.Instancer;
|
||||||
import com.jozufozu.flywheel.api.Material;
|
import com.jozufozu.flywheel.api.Material;
|
||||||
import com.jozufozu.flywheel.api.struct.Batched;
|
import com.jozufozu.flywheel.api.struct.Batched;
|
||||||
import com.jozufozu.flywheel.core.BasicModelSupplier;
|
|
||||||
import com.jozufozu.flywheel.core.model.ModelSupplier;
|
import com.jozufozu.flywheel.core.model.ModelSupplier;
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||||
|
|
|
@ -7,10 +7,8 @@ import com.jozufozu.flywheel.api.InstanceData;
|
||||||
import com.jozufozu.flywheel.api.MaterialGroup;
|
import com.jozufozu.flywheel.api.MaterialGroup;
|
||||||
import com.jozufozu.flywheel.api.struct.Batched;
|
import com.jozufozu.flywheel.api.struct.Batched;
|
||||||
import com.jozufozu.flywheel.api.struct.StructType;
|
import com.jozufozu.flywheel.api.struct.StructType;
|
||||||
import com.jozufozu.flywheel.backend.OptifineHandler;
|
|
||||||
import com.jozufozu.flywheel.backend.instancing.BatchDrawingTracker;
|
import com.jozufozu.flywheel.backend.instancing.BatchDrawingTracker;
|
||||||
import com.jozufozu.flywheel.backend.instancing.TaskEngine;
|
import com.jozufozu.flywheel.backend.instancing.TaskEngine;
|
||||||
import com.jozufozu.flywheel.backend.model.DirectVertexConsumer;
|
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.RenderType;
|
import net.minecraft.client.renderer.RenderType;
|
||||||
|
|
|
@ -5,7 +5,6 @@ import com.jozufozu.flywheel.api.struct.Batched;
|
||||||
import com.jozufozu.flywheel.backend.instancing.AbstractInstancer;
|
import com.jozufozu.flywheel.backend.instancing.AbstractInstancer;
|
||||||
import com.jozufozu.flywheel.backend.instancing.TaskEngine;
|
import com.jozufozu.flywheel.backend.instancing.TaskEngine;
|
||||||
import com.jozufozu.flywheel.backend.model.DirectVertexConsumer;
|
import com.jozufozu.flywheel.backend.model.DirectVertexConsumer;
|
||||||
import com.jozufozu.flywheel.core.BasicModelSupplier;
|
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.jozufozu.flywheel.backend.instancing.blockentity;
|
package com.jozufozu.flywheel.backend.instancing.blockentity;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.jozufozu.flywheel.backend.instancing.entity;
|
package com.jozufozu.flywheel.backend.instancing.entity;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.api.InstanceData;
|
import com.jozufozu.flywheel.api.InstanceData;
|
||||||
import com.jozufozu.flywheel.api.struct.Instanced;
|
import com.jozufozu.flywheel.api.struct.Instanced;
|
||||||
|
@ -55,7 +55,7 @@ public class InstancingEngine<P extends WorldProgram> implements Engine {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Nonnull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public <D extends InstanceData> InstancedMaterial<D> material(StructType<D> type) {
|
public <D extends InstanceData> InstancedMaterial<D> material(StructType<D> type) {
|
||||||
if (type instanceof Instanced<D> instanced) {
|
if (type instanceof Instanced<D> instanced) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import java.util.HashMap;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public enum BackendType {
|
public enum BackendType {
|
||||||
OFF("Off"),
|
OFF("Off"),
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.jozufozu.flywheel.core;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import com.jozufozu.flywheel.core.model.Mesh;
|
import com.jozufozu.flywheel.core.model.Mesh;
|
||||||
|
@ -30,7 +30,7 @@ public class BasicModelSupplier implements ModelSupplier {
|
||||||
return setRenderType(RenderType.cutoutMipped());
|
return setRenderType(RenderType.cutoutMipped());
|
||||||
}
|
}
|
||||||
|
|
||||||
public BasicModelSupplier setRenderType(@Nonnull RenderType renderType) {
|
public BasicModelSupplier setRenderType(@NotNull RenderType renderType) {
|
||||||
this.renderType = renderType;
|
this.renderType = renderType;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,10 +11,7 @@ import com.jozufozu.flywheel.event.GatherContextEvent;
|
||||||
import com.jozufozu.flywheel.util.ResourceUtil;
|
import com.jozufozu.flywheel.util.ResourceUtil;
|
||||||
|
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
|
||||||
public class Contexts {
|
public class Contexts {
|
||||||
|
|
||||||
public static ProgramCompiler<WorldProgram> WORLD;
|
public static ProgramCompiler<WorldProgram> WORLD;
|
||||||
|
|
|
@ -2,7 +2,6 @@ package com.jozufozu.flywheel.core;
|
||||||
|
|
||||||
import static org.lwjgl.opengl.GL11.GL_TRIANGLES;
|
import static org.lwjgl.opengl.GL11.GL_TRIANGLES;
|
||||||
import static org.lwjgl.opengl.GL11.glDrawArrays;
|
import static org.lwjgl.opengl.GL11.glDrawArrays;
|
||||||
import static org.lwjgl.opengl.GL20.glEnableVertexAttribArray;
|
|
||||||
import static org.lwjgl.opengl.GL20.glVertexAttribPointer;
|
import static org.lwjgl.opengl.GL20.glVertexAttribPointer;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.Flywheel;
|
import com.jozufozu.flywheel.Flywheel;
|
||||||
|
|
|
@ -8,10 +8,7 @@ import com.jozufozu.flywheel.core.materials.oriented.OrientedData;
|
||||||
import com.jozufozu.flywheel.core.materials.oriented.OrientedType;
|
import com.jozufozu.flywheel.core.materials.oriented.OrientedType;
|
||||||
|
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
|
||||||
public class Materials {
|
public class Materials {
|
||||||
|
|
||||||
public static final StructType<OrientedData> ORIENTED = new OrientedType();
|
public static final StructType<OrientedData> ORIENTED = new OrientedType();
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import net.minecraft.client.resources.model.BakedModel;
|
import net.minecraft.client.resources.model.BakedModel;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
@ -51,7 +51,7 @@ public class PartialModel {
|
||||||
partial.set(modelRegistry.get(partial.getLocation()));
|
partial.set(modelRegistry.get(partial.getLocation()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@NotNull
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return getLocation()
|
return getLocation()
|
||||||
.toString();
|
.toString();
|
||||||
|
|
|
@ -6,9 +6,8 @@ import java.nio.ByteOrder;
|
||||||
import java.util.EnumMap;
|
import java.util.EnumMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import org.lwjgl.system.MemoryStack;
|
import org.lwjgl.system.MemoryStack;
|
||||||
import org.lwjgl.system.MemoryUtil;
|
import org.lwjgl.system.MemoryUtil;
|
||||||
|
|
||||||
|
@ -34,7 +33,7 @@ public class QuadConverter {
|
||||||
|
|
||||||
private static QuadConverter INSTANCE;
|
private static QuadConverter INSTANCE;
|
||||||
|
|
||||||
@Nonnull
|
@NotNull
|
||||||
public static QuadConverter getInstance() {
|
public static QuadConverter getInstance() {
|
||||||
if (INSTANCE == null) {
|
if (INSTANCE == null) {
|
||||||
INSTANCE = new QuadConverter(STARTING_CAPACITY);
|
INSTANCE = new QuadConverter(STARTING_CAPACITY);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.jozufozu.flywheel.core;
|
package com.jozufozu.flywheel.core;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.RenderType;
|
import net.minecraft.client.renderer.RenderType;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.jozufozu.flywheel.core.crumbling;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.mixin.atlas.SheetDataAccessor;
|
import com.jozufozu.flywheel.mixin.atlas.SheetDataAccessor;
|
||||||
|
|
||||||
|
|
|
@ -37,14 +37,12 @@ import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.server.level.BlockDestructionProgress;
|
import net.minecraft.server.level.BlockDestructionProgress;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Responsible for rendering the block breaking overlay for instanced block entities.
|
* Responsible for rendering the block breaking overlay for instanced block entities.
|
||||||
*/
|
*/
|
||||||
@OnlyIn(Dist.CLIENT)
|
|
||||||
@Mod.EventBusSubscriber(Dist.CLIENT)
|
@Mod.EventBusSubscriber(Dist.CLIENT)
|
||||||
public class CrumblingRenderer {
|
public class CrumblingRenderer {
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ package com.jozufozu.flywheel.core.hardcoded;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.api.vertex.VertexList;
|
import com.jozufozu.flywheel.api.vertex.VertexList;
|
||||||
import com.jozufozu.flywheel.api.vertex.VertexType;
|
|
||||||
import com.jozufozu.flywheel.core.Formats;
|
import com.jozufozu.flywheel.core.Formats;
|
||||||
import com.jozufozu.flywheel.core.model.Mesh;
|
import com.jozufozu.flywheel.core.model.Mesh;
|
||||||
import com.jozufozu.flywheel.core.vertex.PosTexNormalVertex;
|
import com.jozufozu.flywheel.core.vertex.PosTexNormalVertex;
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.jozufozu.flywheel.core.instancing;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.api.InstanceData;
|
import com.jozufozu.flywheel.api.InstanceData;
|
||||||
import com.jozufozu.flywheel.api.Instancer;
|
import com.jozufozu.flywheel.api.Instancer;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.api.InstanceData;
|
import com.jozufozu.flywheel.api.InstanceData;
|
||||||
import com.jozufozu.flywheel.api.Instancer;
|
import com.jozufozu.flywheel.api.Instancer;
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.jozufozu.flywheel.core.source;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.backend.Backend;
|
import com.jozufozu.flywheel.backend.Backend;
|
||||||
import com.jozufozu.flywheel.core.source.error.ErrorBuilder;
|
import com.jozufozu.flywheel.core.source.error.ErrorBuilder;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.jozufozu.flywheel.util.ResourceUtil;
|
import com.jozufozu.flywheel.util.ResourceUtil;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.jozufozu.flywheel.core.source;
|
package com.jozufozu.flywheel.core.source;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.core.source.FileIndex;
|
import com.jozufozu.flywheel.core.source.FileIndex;
|
||||||
import com.jozufozu.flywheel.core.source.SourceFile;
|
import com.jozufozu.flywheel.core.source.SourceFile;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.core.source.FileResolution;
|
import com.jozufozu.flywheel.core.source.FileResolution;
|
||||||
import com.jozufozu.flywheel.core.source.Resolver;
|
import com.jozufozu.flywheel.core.source.Resolver;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.util.Mods;
|
import com.jozufozu.flywheel.util.Mods;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.api.FlywheelWorld;
|
import com.jozufozu.flywheel.api.FlywheelWorld;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.jozufozu.flywheel.event;
|
package com.jozufozu.flywheel.event;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import net.minecraft.client.multiplayer.ClientLevel;
|
import net.minecraft.client.multiplayer.ClientLevel;
|
||||||
import net.minecraftforge.eventbus.api.Event;
|
import net.minecraftforge.eventbus.api.Event;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.jozufozu.flywheel.mixin;
|
package com.jozufozu.flywheel.mixin;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Unique;
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,8 @@ package com.jozufozu.flywheel.mixin;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import org.lwjgl.system.MemoryUtil;
|
import org.lwjgl.system.MemoryUtil;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
@ -59,7 +58,7 @@ public abstract class BufferBuilderMixin implements BufferBuilderExtension {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void flywheel$injectForRender(@Nonnull ByteBuffer buffer, @Nonnull VertexFormat format, int vertexCount) {
|
public void flywheel$injectForRender(@NotNull ByteBuffer buffer, @NotNull VertexFormat format, int vertexCount) {
|
||||||
this.building = true;
|
this.building = true;
|
||||||
this.mode = VertexFormat.Mode.QUADS;
|
this.mode = VertexFormat.Mode.QUADS;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.jozufozu.flywheel.mixin;
|
package com.jozufozu.flywheel.mixin;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
|
|
@ -13,10 +13,7 @@ import com.jozufozu.flywheel.backend.instancing.InstancedRenderRegistry;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.chunk.ChunkRenderDispatcher;
|
import net.minecraft.client.renderer.chunk.ChunkRenderDispatcher;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
|
||||||
@Mixin(targets = "net.minecraft.client.renderer.chunk.ChunkRenderDispatcher$RenderChunk$RebuildTask")
|
@Mixin(targets = "net.minecraft.client.renderer.chunk.ChunkRenderDispatcher$RenderChunk$RebuildTask")
|
||||||
public class ChunkRebuildHooksMixin {
|
public class ChunkRebuildHooksMixin {
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.jozufozu.flywheel.mixin;
|
package com.jozufozu.flywheel.mixin;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Unique;
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,7 @@ import net.minecraft.client.Camera;
|
||||||
import net.minecraft.client.renderer.GameRenderer;
|
import net.minecraft.client.renderer.GameRenderer;
|
||||||
import net.minecraft.client.renderer.LevelRenderer;
|
import net.minecraft.client.renderer.LevelRenderer;
|
||||||
import net.minecraft.client.renderer.LightTexture;
|
import net.minecraft.client.renderer.LightTexture;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
|
||||||
@Mixin(LevelRenderer.class)
|
@Mixin(LevelRenderer.class)
|
||||||
public class FixFabulousDepthMixin {
|
public class FixFabulousDepthMixin {
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,7 @@ import com.jozufozu.flywheel.backend.instancing.InstancedRenderDispatcher;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
import net.minecraft.world.level.chunk.LevelChunk;
|
import net.minecraft.world.level.chunk.LevelChunk;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
|
||||||
@Mixin(LevelChunk.class)
|
@Mixin(LevelChunk.class)
|
||||||
public class InstanceAddMixin {
|
public class InstanceAddMixin {
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.jozufozu.flywheel.mixin;
|
package com.jozufozu.flywheel.mixin;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
|
|
@ -29,11 +29,8 @@ import net.minecraft.client.renderer.RenderType;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
|
||||||
@Mixin(value = LevelRenderer.class, priority = 1001) // Higher priority to go after sodium
|
@Mixin(value = LevelRenderer.class, priority = 1001) // Higher priority to go after sodium
|
||||||
public class LevelRendererMixin {
|
public class LevelRendererMixin {
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.jozufozu.flywheel.mixin;
|
package com.jozufozu.flywheel.mixin;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Unique;
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
|
|
||||||
|
@ -17,7 +16,7 @@ public class RenderTypeMixin implements RenderTypeExtension {
|
||||||
private final DrawBuffer flywheel$drawBuffer = new DrawBuffer((RenderType) (Object) this);
|
private final DrawBuffer flywheel$drawBuffer = new DrawBuffer((RenderType) (Object) this);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nonnull
|
@NotNull
|
||||||
public DrawBuffer flywheel$getDrawBuffer() {
|
public DrawBuffer flywheel$getDrawBuffer() {
|
||||||
return flywheel$drawBuffer;
|
return flywheel$drawBuffer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,10 +12,7 @@ import net.minecraft.client.multiplayer.ClientLevel;
|
||||||
import net.minecraft.core.SectionPos;
|
import net.minecraft.core.SectionPos;
|
||||||
import net.minecraft.world.level.LightLayer;
|
import net.minecraft.world.level.LightLayer;
|
||||||
import net.minecraft.world.level.chunk.ChunkSource;
|
import net.minecraft.world.level.chunk.ChunkSource;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
|
||||||
@Mixin(ClientChunkCache.class)
|
@Mixin(ClientChunkCache.class)
|
||||||
public abstract class LightUpdateMixin extends ChunkSource {
|
public abstract class LightUpdateMixin extends ChunkSource {
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,6 @@ import com.jozufozu.flywheel.backend.gl.buffer.VecBuffer;
|
||||||
import com.jozufozu.flywheel.util.MatrixWrite;
|
import com.jozufozu.flywheel.util.MatrixWrite;
|
||||||
import com.mojang.math.Matrix3f;
|
import com.mojang.math.Matrix3f;
|
||||||
|
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
|
||||||
@Mixin(Matrix3f.class)
|
@Mixin(Matrix3f.class)
|
||||||
public abstract class Matrix3fMixin implements MatrixWrite {
|
public abstract class Matrix3fMixin implements MatrixWrite {
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,6 @@ import com.jozufozu.flywheel.backend.gl.buffer.VecBuffer;
|
||||||
import com.jozufozu.flywheel.util.MatrixWrite;
|
import com.jozufozu.flywheel.util.MatrixWrite;
|
||||||
import com.mojang.math.Matrix4f;
|
import com.mojang.math.Matrix4f;
|
||||||
|
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
|
||||||
@Mixin(Matrix4f.class)
|
@Mixin(Matrix4f.class)
|
||||||
public abstract class Matrix4fMixin implements MatrixWrite {
|
public abstract class Matrix4fMixin implements MatrixWrite {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.jozufozu.flywheel.util;
|
||||||
|
|
||||||
import java.util.function.UnaryOperator;
|
import java.util.function.UnaryOperator;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import com.google.common.hash.Hashing;
|
import com.google.common.hash.Hashing;
|
||||||
import com.mojang.math.Vector3f;
|
import com.mojang.math.Vector3f;
|
||||||
|
@ -253,7 +253,7 @@ public class Color {
|
||||||
|
|
||||||
// ********* //
|
// ********* //
|
||||||
|
|
||||||
public static Color mixColors(@Nonnull Color c1, @Nonnull Color c2, float w) {
|
public static Color mixColors(@NotNull Color c1, @NotNull Color c2, float w) {
|
||||||
return new Color(
|
return new Color(
|
||||||
(int) (c1.getRed() + (c2.getRed() - c1.getRed()) * w),
|
(int) (c1.getRed() + (c2.getRed() - c1.getRed()) * w),
|
||||||
(int) (c1.getGreen() + (c2.getGreen() - c1.getGreen()) * w),
|
(int) (c1.getGreen() + (c2.getGreen() - c1.getGreen()) * w),
|
||||||
|
|
|
@ -5,7 +5,7 @@ import java.util.function.Consumer;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class Lazy<T> implements Supplier<T> {
|
public class Lazy<T> implements Supplier<T> {
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ public class Lazy<T> implements Supplier<T> {
|
||||||
this.supplier = supplier;
|
this.supplier = supplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@NotNull
|
||||||
public T get() {
|
public T get() {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
value = supplier.get();
|
value = supplier.get();
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package com.jozufozu.flywheel.util;
|
package com.jozufozu.flywheel.util;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
public interface NonNullSupplier<T> {
|
public interface NonNullSupplier<T> {
|
||||||
|
|
||||||
@Nonnull
|
@NotNull
|
||||||
T get();
|
T get();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.jozufozu.flywheel.util;
|
package com.jozufozu.flywheel.util;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL32;
|
import org.lwjgl.opengl.GL32;
|
||||||
|
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import java.util.function.BiConsumer;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import net.minecraft.world.level.LevelAccessor;
|
import net.minecraft.world.level.LevelAccessor;
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ public class WorldAttached<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@NotNull
|
||||||
public T get(LevelAccessor world) {
|
public T get(LevelAccessor world) {
|
||||||
T t = attached.get(world);
|
T t = attached.get(world);
|
||||||
if (t != null) return t;
|
if (t != null) return t;
|
||||||
|
@ -58,7 +58,7 @@ public class WorldAttached<T> {
|
||||||
/**
|
/**
|
||||||
* Replaces the entry with a new one from the factory and returns the new entry.
|
* Replaces the entry with a new one from the factory and returns the new entry.
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@NotNull
|
||||||
public T replace(LevelAccessor world) {
|
public T replace(LevelAccessor world) {
|
||||||
attached.remove(world);
|
attached.remove(world);
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ public class WorldAttached<T> {
|
||||||
/**
|
/**
|
||||||
* Replaces the entry with a new one from the factory and returns the new entry.
|
* Replaces the entry with a new one from the factory and returns the new entry.
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@NotNull
|
||||||
public T replace(LevelAccessor world, Consumer<T> finalizer) {
|
public T replace(LevelAccessor world, Consumer<T> finalizer) {
|
||||||
T remove = attached.remove(world);
|
T remove = attached.remove(world);
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package com.jozufozu.flywheel.vanilla;
|
package com.jozufozu.flywheel.vanilla;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.api.MaterialManager;
|
import com.jozufozu.flywheel.api.MaterialManager;
|
||||||
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
||||||
import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance;
|
import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance;
|
||||||
import com.jozufozu.flywheel.core.Materials;
|
|
||||||
import com.jozufozu.flywheel.core.BasicModelSupplier;
|
import com.jozufozu.flywheel.core.BasicModelSupplier;
|
||||||
|
import com.jozufozu.flywheel.core.Materials;
|
||||||
import com.jozufozu.flywheel.core.hardcoded.ModelPart;
|
import com.jozufozu.flywheel.core.hardcoded.ModelPart;
|
||||||
import com.jozufozu.flywheel.core.materials.oriented.OrientedData;
|
import com.jozufozu.flywheel.core.materials.oriented.OrientedData;
|
||||||
import com.jozufozu.flywheel.util.AnimationTickHolder;
|
import com.jozufozu.flywheel.util.AnimationTickHolder;
|
||||||
|
@ -68,7 +68,7 @@ public class BellInstance extends BlockEntityInstance<BellBlockEntity> implement
|
||||||
.createInstance();
|
.createInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@NotNull
|
||||||
private static ModelPart createBellModel() {
|
private static ModelPart createBellModel() {
|
||||||
return ModelPart.builder("bell", 32, 32)
|
return ModelPart.builder("bell", 32, 32)
|
||||||
.sprite(BellRenderer.BELL_RESOURCE_LOCATION.sprite())
|
.sprite(BellRenderer.BELL_RESOURCE_LOCATION.sprite())
|
||||||
|
|
|
@ -3,13 +3,13 @@ package com.jozufozu.flywheel.vanilla;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.api.MaterialManager;
|
import com.jozufozu.flywheel.api.MaterialManager;
|
||||||
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
||||||
import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance;
|
import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance;
|
||||||
import com.jozufozu.flywheel.core.Materials;
|
|
||||||
import com.jozufozu.flywheel.core.BasicModelSupplier;
|
import com.jozufozu.flywheel.core.BasicModelSupplier;
|
||||||
|
import com.jozufozu.flywheel.core.Materials;
|
||||||
import com.jozufozu.flywheel.core.hardcoded.ModelPart;
|
import com.jozufozu.flywheel.core.hardcoded.ModelPart;
|
||||||
import com.jozufozu.flywheel.core.materials.model.ModelData;
|
import com.jozufozu.flywheel.core.materials.model.ModelData;
|
||||||
import com.jozufozu.flywheel.core.materials.oriented.OrientedData;
|
import com.jozufozu.flywheel.core.materials.oriented.OrientedData;
|
||||||
|
@ -41,7 +41,7 @@ public class ChestInstance<T extends BlockEntity & LidBlockEntity> extends Block
|
||||||
|
|
||||||
private final Float2FloatFunction lidProgress;
|
private final Float2FloatFunction lidProgress;
|
||||||
private final Material renderMaterial;
|
private final Material renderMaterial;
|
||||||
@Nonnull
|
@NotNull
|
||||||
private final ChestType chestType;
|
private final ChestType chestType;
|
||||||
private final Quaternion baseRotation;
|
private final Quaternion baseRotation;
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package com.jozufozu.flywheel.vanilla;
|
package com.jozufozu.flywheel.vanilla;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import com.jozufozu.flywheel.api.MaterialManager;
|
import com.jozufozu.flywheel.api.MaterialManager;
|
||||||
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
||||||
import com.jozufozu.flywheel.api.instance.TickableInstance;
|
import com.jozufozu.flywheel.api.instance.TickableInstance;
|
||||||
import com.jozufozu.flywheel.backend.instancing.entity.EntityInstance;
|
import com.jozufozu.flywheel.backend.instancing.entity.EntityInstance;
|
||||||
import com.jozufozu.flywheel.core.Materials;
|
|
||||||
import com.jozufozu.flywheel.core.BasicModelSupplier;
|
import com.jozufozu.flywheel.core.BasicModelSupplier;
|
||||||
|
import com.jozufozu.flywheel.core.Materials;
|
||||||
import com.jozufozu.flywheel.core.Models;
|
import com.jozufozu.flywheel.core.Models;
|
||||||
import com.jozufozu.flywheel.core.hardcoded.ModelPart;
|
import com.jozufozu.flywheel.core.hardcoded.ModelPart;
|
||||||
import com.jozufozu.flywheel.core.materials.model.ModelData;
|
import com.jozufozu.flywheel.core.materials.model.ModelData;
|
||||||
|
@ -158,7 +158,7 @@ public class MinecartInstance<T extends AbstractMinecart> extends EntityInstance
|
||||||
.createInstance();
|
.createInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@NotNull
|
||||||
private static Mesh getBodyModel() {
|
private static Mesh getBodyModel() {
|
||||||
int y = -3;
|
int y = -3;
|
||||||
return ModelPart.builder("minecart", 64, 32)
|
return ModelPart.builder("minecart", 64, 32)
|
||||||
|
|
|
@ -5,8 +5,8 @@ import java.util.function.Function;
|
||||||
import com.jozufozu.flywheel.api.MaterialManager;
|
import com.jozufozu.flywheel.api.MaterialManager;
|
||||||
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
import com.jozufozu.flywheel.api.instance.DynamicInstance;
|
||||||
import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance;
|
import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance;
|
||||||
import com.jozufozu.flywheel.core.Materials;
|
|
||||||
import com.jozufozu.flywheel.core.BasicModelSupplier;
|
import com.jozufozu.flywheel.core.BasicModelSupplier;
|
||||||
|
import com.jozufozu.flywheel.core.Materials;
|
||||||
import com.jozufozu.flywheel.core.hardcoded.ModelPart;
|
import com.jozufozu.flywheel.core.hardcoded.ModelPart;
|
||||||
import com.jozufozu.flywheel.core.materials.model.ModelData;
|
import com.jozufozu.flywheel.core.materials.model.ModelData;
|
||||||
import com.jozufozu.flywheel.util.AnimationTickHolder;
|
import com.jozufozu.flywheel.util.AnimationTickHolder;
|
||||||
|
|
|
@ -1,38 +1,38 @@
|
||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"minVersion": "0.8",
|
"minVersion": "0.8",
|
||||||
"package": "com.jozufozu.flywheel.mixin",
|
"package": "com.jozufozu.flywheel.mixin",
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"refmap": "flywheel.refmap.json",
|
"refmap": "flywheel.refmap.json",
|
||||||
"client": [
|
"client": [
|
||||||
"BlockEntityRenderDispatcherAccessor",
|
"BlockEntityRenderDispatcherAccessor",
|
||||||
"BlockEntityTypeMixin",
|
"BlockEntityTypeMixin",
|
||||||
"BufferBuilderMixin",
|
"BufferBuilderMixin",
|
||||||
"BufferUploaderMixin",
|
"BufferUploaderMixin",
|
||||||
"CameraMixin",
|
"CameraMixin",
|
||||||
"ChunkRebuildHooksMixin",
|
"ChunkRebuildHooksMixin",
|
||||||
"ClientLevelMixin",
|
"ClientLevelMixin",
|
||||||
"EntityTypeMixin",
|
"EntityTypeMixin",
|
||||||
"FixFabulousDepthMixin",
|
"FixFabulousDepthMixin",
|
||||||
"FrustumMixin",
|
"FrustumMixin",
|
||||||
"GlStateManagerMixin",
|
"GlStateManagerMixin",
|
||||||
"InstanceAddMixin",
|
"InstanceAddMixin",
|
||||||
"InstanceRemoveMixin",
|
"InstanceRemoveMixin",
|
||||||
"LevelRendererAccessor",
|
"LevelRendererAccessor",
|
||||||
"LevelRendererMixin",
|
"LevelRendererMixin",
|
||||||
"MultiBufferSourceMixin",
|
"MultiBufferSourceMixin",
|
||||||
"PausedPartialTickAccessor",
|
"PausedPartialTickAccessor",
|
||||||
"RenderTexturesMixin",
|
"RenderTexturesMixin",
|
||||||
"RenderTypeMixin",
|
"RenderTypeMixin",
|
||||||
"atlas.AtlasDataMixin",
|
"atlas.AtlasDataMixin",
|
||||||
"atlas.SheetDataAccessor",
|
"atlas.SheetDataAccessor",
|
||||||
"light.LightUpdateMixin",
|
"light.LightUpdateMixin",
|
||||||
"light.NetworkLightUpdateMixin",
|
"light.NetworkLightUpdateMixin",
|
||||||
"matrix.Matrix3fMixin",
|
"matrix.Matrix3fMixin",
|
||||||
"matrix.Matrix4fMixin",
|
"matrix.Matrix4fMixin",
|
||||||
"matrix.PoseStackMixin"
|
"matrix.PoseStackMixin"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue