- 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:
PepperCode1 2022-05-11 18:42:31 -07:00
parent eb52acdaa5
commit 5697567466
61 changed files with 99 additions and 156 deletions

View file

@ -1,9 +1,7 @@
package com.jozufozu.flywheel.api;
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;
public interface MaterialManager {

View file

@ -1,14 +1,13 @@
package com.jozufozu.flywheel.backend;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import org.slf4j.Logger;
import com.jozufozu.flywheel.api.FlywheelWorld;
import com.jozufozu.flywheel.backend.gl.versioned.GlCompat;
import com.jozufozu.flywheel.backend.instancing.ParallelTaskEngine;
import com.jozufozu.flywheel.config.FlwConfig;
import com.jozufozu.flywheel.config.BackendType;
import com.jozufozu.flywheel.config.FlwConfig;
import com.jozufozu.flywheel.core.shader.ProgramSpec;
import com.mojang.logging.LogUtils;

View file

@ -4,7 +4,7 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

View file

@ -4,7 +4,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.function.BooleanSupplier;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import net.minecraft.client.Camera;
import net.minecraft.client.renderer.culling.Frustum;

View file

@ -9,7 +9,7 @@ import net.minecraftforge.eventbus.api.EventPriority;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
@Mod.EventBusSubscriber(value = Dist.CLIENT)
@Mod.EventBusSubscriber(Dist.CLIENT)
public class RenderWork {
private static final Queue<Runnable> runs = new ConcurrentLinkedQueue<>();

View file

@ -6,14 +6,9 @@ import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import org.lwjgl.opengl.GL11;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
public enum GlNumericType {
FLOAT(4, "float", GL11.GL_FLOAT),
UBYTE(1, "ubyte", GL11.GL_UNSIGNED_BYTE),

View file

@ -7,8 +7,7 @@ import static org.lwjgl.opengl.GL20.glUniformMatrix4fv;
import java.nio.FloatBuffer;
import javax.annotation.Nonnull;
import org.jetbrains.annotations.NotNull;
import org.lwjgl.system.MemoryStack;
import com.jozufozu.flywheel.backend.Backend;
@ -91,7 +90,7 @@ public abstract class GlProgram extends GlObject {
*/
public interface Factory<P extends GlProgram> {
@Nonnull
@NotNull
P create(ResourceLocation name, int handle);
}
}

View file

@ -6,7 +6,6 @@ import java.util.function.Supplier;
import com.jozufozu.flywheel.api.InstanceData;
import com.jozufozu.flywheel.api.Instancer;
import com.jozufozu.flywheel.core.model.ModelSupplier;
public abstract class AbstractInstancer<D extends InstanceData> implements Instancer<D> {

View file

@ -7,7 +7,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import com.jozufozu.flywheel.api.MaterialManager;
import com.jozufozu.flywheel.api.instance.DynamicInstance;

View file

@ -19,12 +19,10 @@ import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
@OnlyIn(Dist.CLIENT)
@Mod.EventBusSubscriber(Dist.CLIENT)
public class InstancedRenderDispatcher {

View file

@ -4,7 +4,7 @@ import java.util.Objects;
import java.util.function.BiFunction;
import java.util.function.Predicate;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import com.jozufozu.flywheel.api.MaterialManager;
import com.jozufozu.flywheel.backend.instancing.blockentity.BlockEntityInstance;

View file

@ -7,7 +7,6 @@ import com.jozufozu.flywheel.api.InstanceData;
import com.jozufozu.flywheel.api.Instancer;
import com.jozufozu.flywheel.api.Material;
import com.jozufozu.flywheel.api.struct.Batched;
import com.jozufozu.flywheel.core.BasicModelSupplier;
import com.jozufozu.flywheel.core.model.ModelSupplier;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;

View file

@ -7,10 +7,8 @@ import com.jozufozu.flywheel.api.InstanceData;
import com.jozufozu.flywheel.api.MaterialGroup;
import com.jozufozu.flywheel.api.struct.Batched;
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.TaskEngine;
import com.jozufozu.flywheel.backend.model.DirectVertexConsumer;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.renderer.RenderType;

View file

@ -5,7 +5,6 @@ import com.jozufozu.flywheel.api.struct.Batched;
import com.jozufozu.flywheel.backend.instancing.AbstractInstancer;
import com.jozufozu.flywheel.backend.instancing.TaskEngine;
import com.jozufozu.flywheel.backend.model.DirectVertexConsumer;
import com.jozufozu.flywheel.core.BasicModelSupplier;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;

View file

@ -1,6 +1,6 @@
package com.jozufozu.flywheel.backend.instancing.blockentity;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import net.minecraft.world.level.block.entity.BlockEntity;

View file

@ -1,6 +1,6 @@
package com.jozufozu.flywheel.backend.instancing.entity;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import net.minecraft.world.entity.Entity;

View file

@ -6,7 +6,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nonnull;
import org.jetbrains.annotations.NotNull;
import com.jozufozu.flywheel.api.InstanceData;
import com.jozufozu.flywheel.api.struct.Instanced;
@ -55,7 +55,7 @@ public class InstancingEngine<P extends WorldProgram> implements Engine {
}
@SuppressWarnings("unchecked")
@Nonnull
@NotNull
@Override
public <D extends InstanceData> InstancedMaterial<D> material(StructType<D> type) {
if (type instanceof Instanced<D> instanced) {

View file

@ -5,7 +5,7 @@ import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
public enum BackendType {
OFF("Off"),

View file

@ -2,7 +2,7 @@ package com.jozufozu.flywheel.core;
import java.util.Map;
import javax.annotation.Nonnull;
import org.jetbrains.annotations.NotNull;
import com.google.common.collect.ImmutableMap;
import com.jozufozu.flywheel.core.model.Mesh;
@ -30,7 +30,7 @@ public class BasicModelSupplier implements ModelSupplier {
return setRenderType(RenderType.cutoutMipped());
}
public BasicModelSupplier setRenderType(@Nonnull RenderType renderType) {
public BasicModelSupplier setRenderType(@NotNull RenderType renderType) {
this.renderType = renderType;
return this;
}

View file

@ -11,10 +11,7 @@ import com.jozufozu.flywheel.event.GatherContextEvent;
import com.jozufozu.flywheel.util.ResourceUtil;
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
public class Contexts {
public static ProgramCompiler<WorldProgram> WORLD;

View file

@ -2,7 +2,6 @@ package com.jozufozu.flywheel.core;
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;

View file

@ -8,10 +8,7 @@ import com.jozufozu.flywheel.core.materials.oriented.OrientedData;
import com.jozufozu.flywheel.core.materials.oriented.OrientedType;
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
public class Materials {
public static final StructType<OrientedData> ORIENTED = new OrientedType();

View file

@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.annotation.Nonnull;
import org.jetbrains.annotations.NotNull;
import net.minecraft.client.resources.model.BakedModel;
import net.minecraft.resources.ResourceLocation;
@ -51,7 +51,7 @@ public class PartialModel {
partial.set(modelRegistry.get(partial.getLocation()));
}
@Nonnull
@NotNull
public String getName() {
return getLocation()
.toString();

View file

@ -6,9 +6,8 @@ import java.nio.ByteOrder;
import java.util.EnumMap;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.lwjgl.system.MemoryStack;
import org.lwjgl.system.MemoryUtil;
@ -34,7 +33,7 @@ public class QuadConverter {
private static QuadConverter INSTANCE;
@Nonnull
@NotNull
public static QuadConverter getInstance() {
if (INSTANCE == null) {
INSTANCE = new QuadConverter(STARTING_CAPACITY);

View file

@ -1,6 +1,6 @@
package com.jozufozu.flywheel.core;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import net.minecraft.client.renderer.RenderType;

View file

@ -3,7 +3,7 @@ package com.jozufozu.flywheel.core.crumbling;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import com.jozufozu.flywheel.mixin.atlas.SheetDataAccessor;

View file

@ -37,14 +37,12 @@ import net.minecraft.core.BlockPos;
import net.minecraft.server.level.BlockDestructionProgress;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
/**
* Responsible for rendering the block breaking overlay for instanced block entities.
*/
@OnlyIn(Dist.CLIENT)
@Mod.EventBusSubscriber(Dist.CLIENT)
public class CrumblingRenderer {

View file

@ -3,7 +3,6 @@ package com.jozufozu.flywheel.core.hardcoded;
import java.util.List;
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.model.Mesh;
import com.jozufozu.flywheel.core.vertex.PosTexNormalVertex;

View file

@ -3,7 +3,7 @@ package com.jozufozu.flywheel.core.instancing;
import java.util.Optional;
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.Instancer;

View file

@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import com.jozufozu.flywheel.api.InstanceData;
import com.jozufozu.flywheel.api.Instancer;

View file

@ -3,7 +3,7 @@ package com.jozufozu.flywheel.core.source;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import com.jozufozu.flywheel.backend.Backend;
import com.jozufozu.flywheel.core.source.error.ErrorBuilder;

View file

@ -6,7 +6,7 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import com.google.common.collect.Lists;
import com.jozufozu.flywheel.util.ResourceUtil;

View file

@ -1,6 +1,6 @@
package com.jozufozu.flywheel.core.source;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import net.minecraft.resources.ResourceLocation;

View file

@ -5,7 +5,7 @@ import java.util.List;
import java.util.regex.Matcher;
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.SourceFile;

View file

@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.List;
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.Resolver;

View file

@ -6,7 +6,7 @@ import java.util.Map;
import java.util.Set;
import java.util.stream.Stream;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import com.jozufozu.flywheel.util.Mods;

View file

@ -9,7 +9,7 @@ import java.util.Map;
import java.util.Set;
import java.util.function.Predicate;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import com.jozufozu.flywheel.api.FlywheelWorld;

View file

@ -1,6 +1,6 @@
package com.jozufozu.flywheel.event;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraftforge.eventbus.api.Event;

View file

@ -1,7 +1,6 @@
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.Unique;

View file

@ -2,9 +2,8 @@ package com.jozufozu.flywheel.mixin;
import java.nio.ByteBuffer;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.lwjgl.system.MemoryUtil;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@ -59,7 +58,7 @@ public abstract class BufferBuilderMixin implements BufferBuilderExtension {
}
@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.mode = VertexFormat.Mode.QUADS;

View file

@ -1,7 +1,6 @@
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.Shadow;
import org.spongepowered.asm.mixin.injection.At;

View file

@ -13,10 +13,7 @@ import com.jozufozu.flywheel.backend.instancing.InstancedRenderRegistry;
import net.minecraft.client.renderer.chunk.ChunkRenderDispatcher;
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")
public class ChunkRebuildHooksMixin {

View file

@ -1,7 +1,6 @@
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.Unique;

View file

@ -13,10 +13,7 @@ import net.minecraft.client.Camera;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.client.renderer.LevelRenderer;
import net.minecraft.client.renderer.LightTexture;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
@Mixin(LevelRenderer.class)
public class FixFabulousDepthMixin {

View file

@ -13,10 +13,7 @@ import com.jozufozu.flywheel.backend.instancing.InstancedRenderDispatcher;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntity;
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)
public class InstanceAddMixin {

View file

@ -1,7 +1,6 @@
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.Shadow;
import org.spongepowered.asm.mixin.injection.At;

View file

@ -29,11 +29,8 @@ import net.minecraft.client.renderer.RenderType;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.MinecraftForge;
@OnlyIn(Dist.CLIENT)
@Mixin(value = LevelRenderer.class, priority = 1001) // Higher priority to go after sodium
public class LevelRendererMixin {

View file

@ -1,7 +1,6 @@
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.Unique;
@ -17,7 +16,7 @@ public class RenderTypeMixin implements RenderTypeExtension {
private final DrawBuffer flywheel$drawBuffer = new DrawBuffer((RenderType) (Object) this);
@Override
@Nonnull
@NotNull
public DrawBuffer flywheel$getDrawBuffer() {
return flywheel$drawBuffer;
}

View file

@ -12,10 +12,7 @@ import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.core.SectionPos;
import net.minecraft.world.level.LightLayer;
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)
public abstract class LightUpdateMixin extends ChunkSource {

View file

@ -8,10 +8,6 @@ import com.jozufozu.flywheel.backend.gl.buffer.VecBuffer;
import com.jozufozu.flywheel.util.MatrixWrite;
import com.mojang.math.Matrix3f;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
@Mixin(Matrix3f.class)
public abstract class Matrix3fMixin implements MatrixWrite {

View file

@ -8,10 +8,6 @@ import com.jozufozu.flywheel.backend.gl.buffer.VecBuffer;
import com.jozufozu.flywheel.util.MatrixWrite;
import com.mojang.math.Matrix4f;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
@Mixin(Matrix4f.class)
public abstract class Matrix4fMixin implements MatrixWrite {

View file

@ -2,7 +2,7 @@ package com.jozufozu.flywheel.util;
import java.util.function.UnaryOperator;
import javax.annotation.Nonnull;
import org.jetbrains.annotations.NotNull;
import com.google.common.hash.Hashing;
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(
(int) (c1.getRed() + (c2.getRed() - c1.getRed()) * w),
(int) (c1.getGreen() + (c2.getGreen() - c1.getGreen()) * w),

View file

@ -5,7 +5,7 @@ import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;
import javax.annotation.Nonnull;
import org.jetbrains.annotations.NotNull;
public class Lazy<T> implements Supplier<T> {
@ -17,7 +17,7 @@ public class Lazy<T> implements Supplier<T> {
this.supplier = supplier;
}
@Nonnull
@NotNull
public T get() {
if (value == null) {
value = supplier.get();

View file

@ -1,10 +1,10 @@
package com.jozufozu.flywheel.util;
import javax.annotation.Nonnull;
import org.jetbrains.annotations.NotNull;
@FunctionalInterface
public interface NonNullSupplier<T> {
@Nonnull
@NotNull
T get();
}

View file

@ -1,7 +1,6 @@
package com.jozufozu.flywheel.util;
import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import org.lwjgl.opengl.GL32;
import com.mojang.blaze3d.systems.RenderSystem;

View file

@ -10,7 +10,7 @@ import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import javax.annotation.Nonnull;
import org.jetbrains.annotations.NotNull;
import net.minecraft.world.level.LevelAccessor;
@ -42,7 +42,7 @@ public class WorldAttached<T> {
}
}
@Nonnull
@NotNull
public T get(LevelAccessor world) {
T t = attached.get(world);
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.
*/
@Nonnull
@NotNull
public T replace(LevelAccessor 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.
*/
@Nonnull
@NotNull
public T replace(LevelAccessor world, Consumer<T> finalizer) {
T remove = attached.remove(world);

View file

@ -1,12 +1,12 @@
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.instance.DynamicInstance;
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.Materials;
import com.jozufozu.flywheel.core.hardcoded.ModelPart;
import com.jozufozu.flywheel.core.materials.oriented.OrientedData;
import com.jozufozu.flywheel.util.AnimationTickHolder;
@ -68,7 +68,7 @@ public class BellInstance extends BlockEntityInstance<BellBlockEntity> implement
.createInstance();
}
@Nonnull
@NotNull
private static ModelPart createBellModel() {
return ModelPart.builder("bell", 32, 32)
.sprite(BellRenderer.BELL_RESOURCE_LOCATION.sprite())

View file

@ -3,13 +3,13 @@ package com.jozufozu.flywheel.vanilla;
import java.util.Calendar;
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.instance.DynamicInstance;
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.Materials;
import com.jozufozu.flywheel.core.hardcoded.ModelPart;
import com.jozufozu.flywheel.core.materials.model.ModelData;
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 Material renderMaterial;
@Nonnull
@NotNull
private final ChestType chestType;
private final Quaternion baseRotation;

View file

@ -1,13 +1,13 @@
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.instance.DynamicInstance;
import com.jozufozu.flywheel.api.instance.TickableInstance;
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.Materials;
import com.jozufozu.flywheel.core.Models;
import com.jozufozu.flywheel.core.hardcoded.ModelPart;
import com.jozufozu.flywheel.core.materials.model.ModelData;
@ -158,7 +158,7 @@ public class MinecartInstance<T extends AbstractMinecart> extends EntityInstance
.createInstance();
}
@Nonnull
@NotNull
private static Mesh getBodyModel() {
int y = -3;
return ModelPart.builder("minecart", 64, 32)

View file

@ -5,8 +5,8 @@ import java.util.function.Function;
import com.jozufozu.flywheel.api.MaterialManager;
import com.jozufozu.flywheel.api.instance.DynamicInstance;
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.Materials;
import com.jozufozu.flywheel.core.hardcoded.ModelPart;
import com.jozufozu.flywheel.core.materials.model.ModelData;
import com.jozufozu.flywheel.util.AnimationTickHolder;

View file

@ -1,38 +1,38 @@
{
"required": true,
"minVersion": "0.8",
"package": "com.jozufozu.flywheel.mixin",
"compatibilityLevel": "JAVA_17",
"refmap": "flywheel.refmap.json",
"client": [
"BlockEntityRenderDispatcherAccessor",
"BlockEntityTypeMixin",
"BufferBuilderMixin",
"BufferUploaderMixin",
"CameraMixin",
"ChunkRebuildHooksMixin",
"ClientLevelMixin",
"EntityTypeMixin",
"FixFabulousDepthMixin",
"FrustumMixin",
"GlStateManagerMixin",
"InstanceAddMixin",
"InstanceRemoveMixin",
"LevelRendererAccessor",
"LevelRendererMixin",
"MultiBufferSourceMixin",
"PausedPartialTickAccessor",
"RenderTexturesMixin",
"RenderTypeMixin",
"atlas.AtlasDataMixin",
"atlas.SheetDataAccessor",
"light.LightUpdateMixin",
"light.NetworkLightUpdateMixin",
"matrix.Matrix3fMixin",
"matrix.Matrix4fMixin",
"matrix.PoseStackMixin"
],
"injectors": {
"defaultRequire": 1
"required": true,
"minVersion": "0.8",
"package": "com.jozufozu.flywheel.mixin",
"compatibilityLevel": "JAVA_17",
"refmap": "flywheel.refmap.json",
"client": [
"BlockEntityRenderDispatcherAccessor",
"BlockEntityTypeMixin",
"BufferBuilderMixin",
"BufferUploaderMixin",
"CameraMixin",
"ChunkRebuildHooksMixin",
"ClientLevelMixin",
"EntityTypeMixin",
"FixFabulousDepthMixin",
"FrustumMixin",
"GlStateManagerMixin",
"InstanceAddMixin",
"InstanceRemoveMixin",
"LevelRendererAccessor",
"LevelRendererMixin",
"MultiBufferSourceMixin",
"PausedPartialTickAccessor",
"RenderTexturesMixin",
"RenderTypeMixin",
"atlas.AtlasDataMixin",
"atlas.SheetDataAccessor",
"light.LightUpdateMixin",
"light.NetworkLightUpdateMixin",
"matrix.Matrix3fMixin",
"matrix.Matrix4fMixin",
"matrix.PoseStackMixin"
],
"injectors": {
"defaultRequire": 1
}
}