Merge branch '1.18/fabric/dev' into 1.19/fabric/dev

This commit is contained in:
PepperCode1 2023-02-22 13:08:09 -08:00
commit f72642c27e

View file

@ -1,5 +1,8 @@
package com.jozufozu.flywheel.core.virtual;
import org.jetbrains.annotations.Nullable;
import net.fabricmc.fabric.api.rendering.data.v1.RenderAttachedBlockView;
import net.minecraft.client.Minecraft;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
@ -22,7 +25,7 @@ import net.minecraft.world.level.lighting.LevelLightEngine;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.material.Fluids;
public interface VirtualEmptyBlockGetter extends BlockAndTintGetter {
public interface VirtualEmptyBlockGetter extends RenderAttachedBlockView {
public static final VirtualEmptyBlockGetter INSTANCE = new StaticLightImpl(0, 15);
public static final VirtualEmptyBlockGetter FULL_BRIGHT = new StaticLightImpl(15, 15);
public static final VirtualEmptyBlockGetter FULL_DARK = new StaticLightImpl(0, 0);
@ -67,6 +70,12 @@ public interface VirtualEmptyBlockGetter extends BlockAndTintGetter {
return resolver.getColor(plainsBiome, pos.getX(), pos.getZ());
}
@Override
@Nullable
default Object getBlockEntityRenderAttachment(BlockPos pos) {
return null;
}
public static class StaticLightImpl implements VirtualEmptyBlockGetter {
private final LevelLightEngine lightEngine;