Move UV stuff to render package

This commit is contained in:
DBotThePony 2022-01-19 12:53:43 +07:00
parent 71aaf98bb1
commit 35e8b554c5
Signed by: DBot
GPG Key ID: DCC23B5715498507
6 changed files with 5 additions and 9 deletions

View File

@ -7,13 +7,10 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.resources.ResourceLocation;
import ru.dbotthepony.mc.otm.OverdriveThatMatters;
import ru.dbotthepony.mc.otm.client.screen.UVCoords;
import ru.dbotthepony.mc.otm.client.screen.UVWindingOrder;
import java.util.Stack;
import static org.lwjgl.opengl.GL11.GL_ALWAYS;
import static ru.dbotthepony.mc.otm.client.render.SkinElementKt.*;
/**
* I am too lazy to learn how Mojang's API works

View File

@ -1,4 +1,4 @@
package ru.dbotthepony.mc.otm.client.screen;
package ru.dbotthepony.mc.otm.client.render;
public record UVCoords(float u0, float v0, float u1, float v1) {
}

View File

@ -1,4 +1,4 @@
package ru.dbotthepony.mc.otm.client.screen;
package ru.dbotthepony.mc.otm.client.render;
public enum UVWindingOrder {
U0_V0_U1_V1(0, 1, 2, 3), // normal operation

View File

@ -44,7 +44,7 @@ class BlockGravitationStabilizer : BlockMatteryRotatable(Properties.of(Material.
}
override fun getStateForPlacement(context: BlockPlaceContext): BlockState? {
var state = super.getStateForPlacement(context) ?: return null
val state = super.getStateForPlacement(context) ?: return null
val blockPos = context.clickedPos
val level = context.level
@ -58,7 +58,7 @@ class BlockGravitationStabilizer : BlockMatteryRotatable(Properties.of(Material.
if (!getState.isAir) {
if (chunk.getBlockEntity(pos) is BlockEntityBlackHole) {
state = state.setValue(FACING_FULL, face)
return state.setValue(FACING_FULL, face)
}
}
}

View File

@ -3,7 +3,6 @@ package ru.dbotthepony.mc.otm.client.render
import com.mojang.blaze3d.systems.RenderSystem
import com.mojang.blaze3d.vertex.PoseStack
import net.minecraft.resources.ResourceLocation
import ru.dbotthepony.mc.otm.client.screen.UVWindingOrder
@JvmRecord
data class SkinElement @JvmOverloads constructor(

View File

@ -7,7 +7,7 @@ import net.minecraft.network.chat.Component
import net.minecraft.network.chat.TranslatableComponent
import ru.dbotthepony.mc.otm.client.render.SkinElement
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
import ru.dbotthepony.mc.otm.client.screen.UVWindingOrder
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
import ru.dbotthepony.mc.otm.menu.FormattingHelper
import ru.dbotthepony.mc.otm.menu.widget.LevelGaugeWidget