Split and move render classes
This commit is contained in:
parent
f4149b5797
commit
ea42b19e21
@ -19,8 +19,8 @@ import net.minecraft.world.item.ItemStack
|
||||
import net.minecraft.world.item.crafting.Ingredient
|
||||
import net.minecraft.world.level.ItemLike
|
||||
import net.minecraftforge.registries.ForgeRegistries
|
||||
import ru.dbotthepony.mc.otm.client.render.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.SpriteType
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.SpriteType
|
||||
import ru.dbotthepony.mc.otm.core.collect.ListSet
|
||||
import ru.dbotthepony.mc.otm.core.TranslatableComponent
|
||||
import ru.dbotthepony.mc.otm.core.isActuallyEmpty
|
||||
|
@ -33,7 +33,7 @@ import ru.dbotthepony.mc.otm.capability.matteryPlayer
|
||||
import ru.dbotthepony.mc.otm.client.render.DynamicBufferSource
|
||||
import ru.dbotthepony.mc.otm.client.render.ResearchIcons
|
||||
import ru.dbotthepony.mc.otm.client.render.linesIgnoreZRenderType
|
||||
import ru.dbotthepony.mc.otm.client.render.sprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.sprite
|
||||
import ru.dbotthepony.mc.otm.config.AndroidConfig
|
||||
import ru.dbotthepony.mc.otm.core.genericPositions
|
||||
import ru.dbotthepony.mc.otm.core.holder
|
||||
|
@ -11,7 +11,6 @@ import org.lwjgl.glfw.GLFW.GLFW_CURSOR
|
||||
import ru.dbotthepony.mc.otm.isClient
|
||||
import java.nio.ByteBuffer
|
||||
import java.nio.ByteOrder
|
||||
import java.nio.DoubleBuffer
|
||||
import java.util.function.BooleanSupplier
|
||||
|
||||
inline val minecraft: Minecraft get() = Minecraft.getInstance()
|
@ -22,6 +22,8 @@ import ru.dbotthepony.mc.otm.capability.MatteryCapability
|
||||
import ru.dbotthepony.mc.otm.capability.MatteryPlayerCapability
|
||||
import ru.dbotthepony.mc.otm.capability.matteryPlayer
|
||||
import ru.dbotthepony.mc.otm.client.render.*
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.MatteryAtlas
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.MatterySprite
|
||||
import ru.dbotthepony.mc.otm.config.ClientConfig
|
||||
import ru.dbotthepony.mc.otm.core.TextComponent
|
||||
import ru.dbotthepony.mc.otm.core.math.RGBAColor
|
||||
|
@ -1,75 +1,18 @@
|
||||
package ru.dbotthepony.mc.otm.client.render
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack
|
||||
import com.mojang.blaze3d.vertex.Tesselator
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer
|
||||
import com.mojang.blaze3d.vertex.VertexSorting
|
||||
import net.minecraft.client.gui.Font
|
||||
import net.minecraft.client.gui.GuiGraphics
|
||||
import net.minecraft.client.renderer.MultiBufferSource
|
||||
import net.minecraft.core.Vec3i
|
||||
import net.minecraft.network.chat.Component
|
||||
import net.minecraft.util.FormattedCharSequence
|
||||
import org.joml.Matrix4f
|
||||
import org.joml.Vector3f
|
||||
import ru.dbotthepony.mc.otm.core.FloatSupplier
|
||||
import ru.dbotthepony.mc.otm.core.math.IAngle
|
||||
import ru.dbotthepony.mc.otm.core.math.RGBAColor
|
||||
import ru.dbotthepony.mc.otm.core.math.Vector
|
||||
import ru.dbotthepony.mc.otm.core.math.component1
|
||||
import ru.dbotthepony.mc.otm.core.math.component2
|
||||
import ru.dbotthepony.mc.otm.core.math.component3
|
||||
import ru.dbotthepony.mc.otm.core.math.rotateAroundPoint
|
||||
import ru.dbotthepony.mc.otm.core.math.rotateAroundThis
|
||||
import ru.dbotthepony.mc.otm.core.math.times
|
||||
import ru.dbotthepony.mc.otm.core.math.translation
|
||||
import ru.dbotthepony.mc.otm.core.math.unaryMinus
|
||||
|
||||
val tesselator: Tesselator get() = Tesselator.getInstance()
|
||||
|
||||
fun VertexConsumer.normal(vector: Vector): VertexConsumer = normal(vector.x.toFloat(), vector.y.toFloat(), vector.z.toFloat())
|
||||
fun VertexConsumer.vertex(matrix4f: Matrix4f, vector: Vector): VertexConsumer = vertex(matrix4f, vector.x.toFloat(), vector.y.toFloat(), vector.z.toFloat())
|
||||
fun VertexConsumer.color(color: RGBAColor?): VertexConsumer {
|
||||
if (color != null)
|
||||
color(color.redInt, color.greenInt, color.blueInt, color.alphaInt)
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
fun PoseStack.translate(vector: Vector) = translate(vector.x, vector.y, vector.z)
|
||||
fun PoseStack.translate(vector: Vec3i) = translate(vector.x.toDouble(), vector.y.toDouble(), vector.z.toDouble())
|
||||
fun PoseStack.translate(vector: Vector3f) = translate(vector.x(), vector.y(), vector.z()) // TODO: 1.19.3
|
||||
|
||||
fun PoseStack.rotateAroundPoint(point: Vector, axis: Vector, rotation: Float, isDegrees: Boolean = false) {
|
||||
val last = last()
|
||||
last.pose().rotateAroundPoint(point, axis, rotation, isDegrees)
|
||||
last.normal().rotate(axis.rotateAroundThis(rotation, isDegrees))
|
||||
}
|
||||
|
||||
fun PoseStack.rotateAroundPoint(point: Vector, rotation: IAngle) {
|
||||
val last = last()
|
||||
last.pose().rotateAroundPoint(point, rotation)
|
||||
// last.normal().mul(rotation.forward().rotateAroundThis(rotation))
|
||||
}
|
||||
|
||||
fun PoseStack.rotateAroundPoint(point: Vector3f, axis: Vector, rotation: Float, isDegrees: Boolean = false) {
|
||||
val last = last()
|
||||
last.pose().rotateAroundPoint(point, axis, rotation, isDegrees)
|
||||
last.normal().rotate(axis.rotateAroundThis(rotation, isDegrees))
|
||||
}
|
||||
|
||||
fun PoseStack.rotateAroundPoint(point: Vector3f, rotation: IAngle) {
|
||||
val last = last()
|
||||
last.pose().rotateAroundPoint(point, rotation)
|
||||
// last.normal().mul(rotation.forward().rotateAroundThis(rotation))
|
||||
}
|
||||
|
||||
fun PoseStack.translation(): Vector3f {
|
||||
return last().pose().translation
|
||||
}
|
||||
|
||||
inline val PoseStack.last: PoseStack.Pose get() = last()
|
||||
inline val PoseStack.Pose.pose: Matrix4f get() = pose()
|
||||
|
||||
private val buffer = DynamicBufferSource(vertexSorting = VertexSorting.ORTHOGRAPHIC_Z)
|
||||
private fun buffer() = buffer
|
||||
@ -262,7 +205,7 @@ private fun Font.drawInternal(
|
||||
if (outlineZ != 0f) {
|
||||
poseStack.translate(0f, 0f, -outlineZ)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val width = drawInBatch(
|
||||
text,
|
@ -0,0 +1,60 @@
|
||||
package ru.dbotthepony.mc.otm.client.render
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack
|
||||
import com.mojang.blaze3d.vertex.Tesselator
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer
|
||||
import net.minecraft.core.Vec3i
|
||||
import org.joml.Matrix4f
|
||||
import org.joml.Vector3f
|
||||
import ru.dbotthepony.mc.otm.core.math.IAngle
|
||||
import ru.dbotthepony.mc.otm.core.math.RGBAColor
|
||||
import ru.dbotthepony.mc.otm.core.math.Vector
|
||||
import ru.dbotthepony.mc.otm.core.math.rotateAroundPoint
|
||||
import ru.dbotthepony.mc.otm.core.math.rotateAroundThis
|
||||
import ru.dbotthepony.mc.otm.core.math.translation
|
||||
|
||||
val tesselator: Tesselator get() = Tesselator.getInstance()
|
||||
|
||||
fun VertexConsumer.normal(vector: Vector): VertexConsumer = normal(vector.x.toFloat(), vector.y.toFloat(), vector.z.toFloat())
|
||||
fun VertexConsumer.vertex(matrix4f: Matrix4f, vector: Vector): VertexConsumer = vertex(matrix4f, vector.x.toFloat(), vector.y.toFloat(), vector.z.toFloat())
|
||||
fun VertexConsumer.color(color: RGBAColor?): VertexConsumer {
|
||||
if (color != null)
|
||||
color(color.redInt, color.greenInt, color.blueInt, color.alphaInt)
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
fun PoseStack.translate(vector: Vector) = translate(vector.x, vector.y, vector.z)
|
||||
fun PoseStack.translate(vector: Vec3i) = translate(vector.x.toDouble(), vector.y.toDouble(), vector.z.toDouble())
|
||||
fun PoseStack.translate(vector: Vector3f) = translate(vector.x(), vector.y(), vector.z())
|
||||
|
||||
fun PoseStack.rotateAroundPoint(point: Vector, axis: Vector, rotation: Float, isDegrees: Boolean = false) {
|
||||
val last = last()
|
||||
last.pose().rotateAroundPoint(point, axis, rotation, isDegrees)
|
||||
last.normal().rotate(axis.rotateAroundThis(rotation, isDegrees))
|
||||
}
|
||||
|
||||
fun PoseStack.rotateAroundPoint(point: Vector, rotation: IAngle) {
|
||||
val last = last()
|
||||
last.pose().rotateAroundPoint(point, rotation)
|
||||
// last.normal().mul(rotation.forward().rotateAroundThis(rotation))
|
||||
}
|
||||
|
||||
fun PoseStack.rotateAroundPoint(point: Vector3f, axis: Vector, rotation: Float, isDegrees: Boolean = false) {
|
||||
val last = last()
|
||||
last.pose().rotateAroundPoint(point, axis, rotation, isDegrees)
|
||||
last.normal().rotate(axis.rotateAroundThis(rotation, isDegrees))
|
||||
}
|
||||
|
||||
fun PoseStack.rotateAroundPoint(point: Vector3f, rotation: IAngle) {
|
||||
val last = last()
|
||||
last.pose().rotateAroundPoint(point, rotation)
|
||||
// last.normal().mul(rotation.forward().rotateAroundThis(rotation))
|
||||
}
|
||||
|
||||
fun PoseStack.translation(): Vector3f {
|
||||
return last().pose().translation
|
||||
}
|
||||
|
||||
inline val PoseStack.last: PoseStack.Pose get() = last()
|
||||
inline val PoseStack.Pose.pose: Matrix4f get() = pose()
|
@ -2,6 +2,9 @@ package ru.dbotthepony.mc.otm.client.render
|
||||
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import ru.dbotthepony.mc.otm.OverdriveThatMatters
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.GridAtlas
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.sprite
|
||||
|
||||
object ResearchIcons {
|
||||
val ICON_TRANSFER: AbstractMatterySprite
|
||||
|
@ -2,6 +2,7 @@ package ru.dbotthepony.mc.otm.client.render
|
||||
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import ru.dbotthepony.mc.otm.OverdriveThatMatters
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.MatteryAtlas
|
||||
|
||||
object WidgetLocation {
|
||||
val LARGE_BUTTON = MatteryAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets/large_button.png"), 72f, 18f)
|
||||
|
@ -2,6 +2,9 @@ package ru.dbotthepony.mc.otm.client.render
|
||||
|
||||
import ru.dbotthepony.mc.otm.block.entity.MatteryDeviceBlockEntity
|
||||
import ru.dbotthepony.mc.otm.capability.FlowDirection
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.GridAtlas
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.StretchingRectangleElement
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.sprite
|
||||
import ru.dbotthepony.mc.otm.core.immutableMap
|
||||
import ru.dbotthepony.mc.otm.core.math.RelativeSide
|
||||
|
||||
|
@ -2,6 +2,7 @@ package ru.dbotthepony.mc.otm.client.render
|
||||
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import ru.dbotthepony.mc.otm.OverdriveThatMatters
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.GridAtlas
|
||||
|
||||
object Widgets8 {
|
||||
val GRID = GridAtlas(ResourceLocation(OverdriveThatMatters.MOD_ID, "textures/gui/widgets_8.png"), 8f, 8f, columns = 64 / 8, rows = 32 / 8)
|
||||
|
@ -15,7 +15,7 @@ import ru.dbotthepony.mc.otm.block.entity.MatteryDeviceBlockEntity
|
||||
import ru.dbotthepony.mc.otm.block.entity.matter.MatterCapacitorBankBlockEntity
|
||||
import ru.dbotthepony.mc.otm.block.entity.tech.BatteryBankBlockEntity
|
||||
import ru.dbotthepony.mc.otm.client.minecraft
|
||||
import ru.dbotthepony.mc.otm.client.render.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.DynamicBufferSource
|
||||
import ru.dbotthepony.mc.otm.client.screen.widget.MatterGaugePanel
|
||||
import ru.dbotthepony.mc.otm.client.screen.widget.PowerGaugePanel
|
||||
@ -28,7 +28,6 @@ import ru.dbotthepony.mc.otm.core.math.rotate
|
||||
import ru.dbotthepony.mc.otm.core.math.rotateY
|
||||
import ru.dbotthepony.mc.otm.nanoTime
|
||||
import java.util.function.BooleanSupplier
|
||||
import java.util.function.Supplier
|
||||
import kotlin.math.PI
|
||||
|
||||
abstract class BankRenderer<T : MatteryDeviceBlockEntity>(private val context: BlockEntityRendererProvider.Context) : BlockEntityRenderer<T> {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.client.render
|
||||
package ru.dbotthepony.mc.otm.client.render.sprites
|
||||
|
||||
import com.google.gson.JsonObject
|
||||
import com.mojang.blaze3d.systems.RenderSystem
|
||||
@ -13,6 +13,11 @@ import net.minecraft.client.renderer.RenderType
|
||||
import net.minecraft.network.FriendlyByteBuf
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import org.lwjgl.opengl.GL11.GL_ALWAYS
|
||||
import ru.dbotthepony.mc.otm.client.render.IGUIRenderable
|
||||
import ru.dbotthepony.mc.otm.client.render.IUVCoords
|
||||
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
|
||||
import ru.dbotthepony.mc.otm.client.render.color
|
||||
import ru.dbotthepony.mc.otm.client.render.renderTexturedRect
|
||||
import ru.dbotthepony.mc.otm.core.math.RGBAColor
|
||||
import ru.dbotthepony.mc.otm.core.math.linearInterpolation
|
||||
import java.util.concurrent.ConcurrentHashMap
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.client.render
|
||||
package ru.dbotthepony.mc.otm.client.render.sprites
|
||||
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.client.render
|
||||
package ru.dbotthepony.mc.otm.client.render.sprites
|
||||
|
||||
@Suppress("unused")
|
||||
data class GridInSprite(
|
@ -1,6 +1,7 @@
|
||||
package ru.dbotthepony.mc.otm.client.render
|
||||
package ru.dbotthepony.mc.otm.client.render.sprites
|
||||
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
|
||||
|
||||
fun ResourceLocation.atlas(
|
||||
width: Float,
|
@ -1,6 +1,7 @@
|
||||
package ru.dbotthepony.mc.otm.client.render
|
||||
package ru.dbotthepony.mc.otm.client.render.sprites
|
||||
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
|
||||
|
||||
fun ResourceLocation.sprite(
|
||||
x: Float,
|
@ -1,11 +1,11 @@
|
||||
package ru.dbotthepony.mc.otm.client.render
|
||||
package ru.dbotthepony.mc.otm.client.render.sprites
|
||||
|
||||
import com.google.gson.JsonObject
|
||||
import com.google.gson.JsonPrimitive
|
||||
import com.google.gson.JsonSyntaxException
|
||||
import net.minecraft.network.FriendlyByteBuf
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import ru.dbotthepony.mc.otm.core.nbt.set
|
||||
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
|
||||
import ru.dbotthepony.mc.otm.core.set
|
||||
|
||||
enum class SpriteType {
|
@ -1,4 +1,4 @@
|
||||
package ru.dbotthepony.mc.otm.client.render
|
||||
package ru.dbotthepony.mc.otm.client.render.sprites
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack
|
||||
import net.minecraft.client.gui.GuiGraphics
|
@ -1,6 +1,7 @@
|
||||
package ru.dbotthepony.mc.otm.client.render
|
||||
package ru.dbotthepony.mc.otm.client.render.sprites
|
||||
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
|
||||
|
||||
class SubMatterySprite(
|
||||
val parent: AbstractMatterySprite,
|
@ -9,7 +9,7 @@ import ru.dbotthepony.mc.otm.client.moveMousePosScaled
|
||||
import ru.dbotthepony.mc.otm.client.render.ItemStackIcon
|
||||
import ru.dbotthepony.mc.otm.client.render.Widgets18
|
||||
import ru.dbotthepony.mc.otm.core.TranslatableComponent
|
||||
import ru.dbotthepony.mc.otm.client.render.sprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.sprite
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.*
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.button.LargeRectangleButtonPanel
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.slot.AbstractSlotPanel
|
||||
|
@ -9,7 +9,7 @@ import net.minecraft.network.chat.Component
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import ru.dbotthepony.mc.otm.OverdriveThatMatters
|
||||
import ru.dbotthepony.mc.otm.client.playGuiClickSound
|
||||
import ru.dbotthepony.mc.otm.client.render.MatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.MatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.RenderGravity
|
||||
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
|
||||
import ru.dbotthepony.mc.otm.client.render.WidgetLocation
|
||||
|
@ -13,10 +13,9 @@ import ru.dbotthepony.mc.otm.client.minecraft
|
||||
import ru.dbotthepony.mc.otm.client.render.RenderGravity
|
||||
import ru.dbotthepony.mc.otm.client.render.determineTooltipPosition
|
||||
import ru.dbotthepony.mc.otm.client.render.draw
|
||||
import ru.dbotthepony.mc.otm.client.render.sprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.sprite
|
||||
import ru.dbotthepony.mc.otm.client.render.render
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.util.DiscreteScrollBarPanel
|
||||
import ru.dbotthepony.mc.otm.core.TextComponent
|
||||
import ru.dbotthepony.mc.otm.core.math.RGBAColor
|
||||
import ru.dbotthepony.mc.otm.core.TranslatableComponent
|
||||
import ru.dbotthepony.mc.otm.core.util.formatTickDuration
|
||||
|
@ -1,8 +1,5 @@
|
||||
package ru.dbotthepony.mc.otm.client.screen.panels
|
||||
|
||||
import com.mojang.blaze3d.platform.InputConstants
|
||||
import it.unimi.dsi.fastutil.booleans.BooleanConsumer
|
||||
import net.minecraft.ChatFormatting
|
||||
import net.minecraft.client.gui.GuiGraphics
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen
|
||||
@ -12,7 +9,7 @@ import net.minecraft.world.entity.player.Player
|
||||
import ru.dbotthepony.mc.otm.capability.MatteryPlayerCapability
|
||||
import ru.dbotthepony.mc.otm.capability.matteryPlayer
|
||||
import ru.dbotthepony.mc.otm.client.render.Widgets8
|
||||
import ru.dbotthepony.mc.otm.client.render.sprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.sprite
|
||||
import ru.dbotthepony.mc.otm.client.screen.ExoPackInventoryScreen
|
||||
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.button.ButtonPanel
|
||||
@ -22,9 +19,7 @@ import ru.dbotthepony.mc.otm.client.screen.panels.button.SmallRectangleButtonPan
|
||||
import ru.dbotthepony.mc.otm.compat.cos.CosmeticToggleRenderButton
|
||||
import ru.dbotthepony.mc.otm.compat.cos.isCosmeticArmorLoaded
|
||||
import ru.dbotthepony.mc.otm.core.GetterSetter
|
||||
import ru.dbotthepony.mc.otm.core.TextComponent
|
||||
import ru.dbotthepony.mc.otm.core.TranslatableComponent
|
||||
import ru.dbotthepony.mc.otm.core.asGetterOnly
|
||||
import ru.dbotthepony.mc.otm.core.math.RGBAColor
|
||||
import ru.dbotthepony.mc.otm.network.DisableExopackGlowPacket
|
||||
import ru.dbotthepony.mc.otm.network.DisplayExopackPacket
|
||||
|
@ -10,6 +10,7 @@ import net.minecraft.client.gui.screens.Screen
|
||||
import net.minecraft.network.chat.Component
|
||||
import org.lwjgl.opengl.GL30
|
||||
import ru.dbotthepony.mc.otm.client.render.*
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.StretchingRectangleElement
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.button.AbstractButtonPanel
|
||||
import ru.dbotthepony.mc.otm.core.TranslatableComponent
|
||||
import ru.dbotthepony.mc.otm.core.math.RGBAColor
|
||||
|
@ -2,7 +2,7 @@ package ru.dbotthepony.mc.otm.client.screen.panels
|
||||
|
||||
import net.minecraft.client.gui.GuiGraphics
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
import ru.dbotthepony.mc.otm.client.render.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
|
||||
|
||||
class SpritePanel<out S : Screen>(
|
||||
|
@ -13,7 +13,7 @@ import ru.dbotthepony.mc.otm.capability.addUpgradeTooltipLines
|
||||
import ru.dbotthepony.mc.otm.client.isCtrlDown
|
||||
import ru.dbotthepony.mc.otm.client.isShiftDown
|
||||
import ru.dbotthepony.mc.otm.client.minecraft
|
||||
import ru.dbotthepony.mc.otm.client.render.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.ItemStackIcon
|
||||
import ru.dbotthepony.mc.otm.client.render.Widgets18
|
||||
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
|
||||
|
@ -2,7 +2,7 @@ package ru.dbotthepony.mc.otm.client.screen.panels.button
|
||||
|
||||
import net.minecraft.client.gui.GuiGraphics
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
import ru.dbotthepony.mc.otm.client.render.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.WidgetLocation
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
|
||||
import ru.dbotthepony.mc.otm.core.GetterSetter
|
||||
|
@ -1,13 +1,11 @@
|
||||
package ru.dbotthepony.mc.otm.client.screen.panels.button
|
||||
|
||||
import com.mojang.blaze3d.platform.InputConstants
|
||||
import com.mojang.blaze3d.vertex.PoseStack
|
||||
import net.minecraft.ChatFormatting
|
||||
import net.minecraft.client.gui.GuiGraphics
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
import net.minecraft.network.chat.Component
|
||||
import ru.dbotthepony.mc.otm.client.minecraft
|
||||
import ru.dbotthepony.mc.otm.client.render.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.IGUIRenderable
|
||||
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
|
||||
|
@ -2,12 +2,10 @@ package ru.dbotthepony.mc.otm.client.screen.panels.button
|
||||
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
import net.minecraft.network.chat.Component
|
||||
import ru.dbotthepony.mc.otm.client.minecraft
|
||||
import ru.dbotthepony.mc.otm.client.render.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.Widgets18
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
|
||||
import ru.dbotthepony.mc.otm.core.GetterSetter
|
||||
import ru.dbotthepony.mc.otm.menu.input.IPlayerInputWithFeedback
|
||||
|
||||
open class LargeBooleanRectangleButtonPanel<out S : Screen>(
|
||||
screen: S,
|
||||
|
@ -1,9 +1,7 @@
|
||||
package ru.dbotthepony.mc.otm.client.screen.panels.button
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack
|
||||
import net.minecraft.client.gui.GuiGraphics
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
import ru.dbotthepony.mc.otm.client.render.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.IGUIRenderable
|
||||
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
|
||||
import ru.dbotthepony.mc.otm.client.render.Widgets18
|
||||
|
@ -1,13 +1,9 @@
|
||||
package ru.dbotthepony.mc.otm.client.screen.panels.button
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack
|
||||
import net.minecraft.client.gui.GuiGraphics
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
import ru.dbotthepony.mc.otm.client.playGuiClickSound
|
||||
import ru.dbotthepony.mc.otm.client.render.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.IGUIRenderable
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
|
||||
import ru.dbotthepony.mc.otm.core.TextComponent
|
||||
import java.util.function.IntConsumer
|
||||
|
||||
@Suppress("PropertyName")
|
||||
|
@ -2,6 +2,7 @@ package ru.dbotthepony.mc.otm.client.screen.panels.button
|
||||
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
import ru.dbotthepony.mc.otm.client.render.*
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
|
||||
import ru.dbotthepony.mc.otm.core.GetterSetter
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
package ru.dbotthepony.mc.otm.client.screen.panels.button
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack
|
||||
import net.minecraft.client.gui.GuiGraphics
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
import ru.dbotthepony.mc.otm.client.render.MatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.MatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.UVWindingOrder
|
||||
import ru.dbotthepony.mc.otm.client.render.Widgets8
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
|
||||
|
@ -6,7 +6,6 @@ import net.minecraft.world.item.Item
|
||||
import ru.dbotthepony.mc.otm.client.isAltDown
|
||||
import ru.dbotthepony.mc.otm.client.minecraft
|
||||
import ru.dbotthepony.mc.otm.client.playGuiClickSound
|
||||
import ru.dbotthepony.mc.otm.client.render.MatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.Widgets18
|
||||
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
|
||||
|
@ -1,9 +1,8 @@
|
||||
package ru.dbotthepony.mc.otm.client.screen.panels.util
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack
|
||||
import net.minecraft.client.gui.GuiGraphics
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
import ru.dbotthepony.mc.otm.client.render.StretchingRectangleElement
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.StretchingRectangleElement
|
||||
import ru.dbotthepony.mc.otm.client.render.WidgetLocation
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.DockProperty
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
|
||||
|
@ -2,7 +2,7 @@ package ru.dbotthepony.mc.otm.client.screen.panels.util
|
||||
|
||||
import com.mojang.blaze3d.platform.InputConstants
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
import ru.dbotthepony.mc.otm.client.render.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.AbstractMatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.Widgets
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.Dock
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
|
||||
|
@ -2,8 +2,8 @@ package ru.dbotthepony.mc.otm.client.screen.panels.util
|
||||
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import ru.dbotthepony.mc.otm.OverdriveThatMatters
|
||||
import ru.dbotthepony.mc.otm.client.render.MatteryAtlas
|
||||
import ru.dbotthepony.mc.otm.client.render.sprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.MatteryAtlas
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.sprite
|
||||
|
||||
object ScrollBarConstants {
|
||||
const val WIDTH = 14f
|
||||
|
@ -7,7 +7,7 @@ import net.minecraft.resources.ResourceLocation
|
||||
import net.minecraft.world.entity.player.Inventory
|
||||
import ru.dbotthepony.mc.otm.OverdriveThatMatters
|
||||
import ru.dbotthepony.mc.otm.client.isShiftDown
|
||||
import ru.dbotthepony.mc.otm.client.render.MatteryAtlas
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.MatteryAtlas
|
||||
import ru.dbotthepony.mc.otm.client.render.RenderGravity
|
||||
import ru.dbotthepony.mc.otm.client.screen.MatteryScreen
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.Dock
|
||||
|
@ -2,7 +2,6 @@ package ru.dbotthepony.mc.otm.client.screen.widget
|
||||
|
||||
import com.mojang.blaze3d.systems.RenderSystem
|
||||
import com.mojang.blaze3d.vertex.DefaultVertexFormat
|
||||
import com.mojang.blaze3d.vertex.PoseStack
|
||||
import com.mojang.blaze3d.vertex.VertexFormat
|
||||
import net.minecraft.client.gui.GuiGraphics
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
@ -15,9 +14,8 @@ import org.lwjgl.opengl.GL11
|
||||
import ru.dbotthepony.mc.otm.OverdriveThatMatters
|
||||
import ru.dbotthepony.mc.otm.client.ShiftPressedCond
|
||||
import ru.dbotthepony.mc.otm.client.minecraft
|
||||
import ru.dbotthepony.mc.otm.client.render.MatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.MatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.tesselator
|
||||
import ru.dbotthepony.mc.otm.client.render.vertex
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
|
||||
import ru.dbotthepony.mc.otm.core.TextComponent
|
||||
import ru.dbotthepony.mc.otm.core.TranslatableComponent
|
||||
|
@ -1,7 +1,6 @@
|
||||
package ru.dbotthepony.mc.otm.compat.cos
|
||||
|
||||
import com.mojang.blaze3d.platform.InputConstants
|
||||
import com.mojang.blaze3d.vertex.PoseStack
|
||||
import lain.mods.cos.impl.ModObjects
|
||||
import lain.mods.cos.impl.client.PlayerRenderHandler
|
||||
import lain.mods.cos.impl.client.gui.GuiCosArmorInventory
|
||||
@ -18,8 +17,8 @@ import net.minecraft.world.inventory.Slot
|
||||
import net.minecraft.world.item.ItemStack
|
||||
import net.minecraftforge.fml.ModList
|
||||
import ru.dbotthepony.mc.otm.client.minecraft
|
||||
import ru.dbotthepony.mc.otm.client.render.MatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.MatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.sprite
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.EditablePanel
|
||||
import ru.dbotthepony.mc.otm.client.screen.panels.button.RectangleButtonPanel
|
||||
import ru.dbotthepony.mc.otm.compat.cos.CosmeticToggleButton.Companion.BUTTON_ACTIVE
|
||||
|
@ -2,7 +2,7 @@ package ru.dbotthepony.mc.otm.compat.jei
|
||||
|
||||
import mezz.jei.api.gui.drawable.IDrawable
|
||||
import net.minecraft.client.gui.GuiGraphics
|
||||
import ru.dbotthepony.mc.otm.client.render.MatterySprite
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.MatterySprite
|
||||
|
||||
class SkinDrawable(val element: MatterySprite) : IDrawable {
|
||||
override fun getWidth(): Int {
|
||||
|
@ -2,7 +2,7 @@ package ru.dbotthepony.mc.otm.compat.jei
|
||||
|
||||
import mezz.jei.api.gui.drawable.IDrawable
|
||||
import net.minecraft.client.gui.GuiGraphics
|
||||
import ru.dbotthepony.mc.otm.client.render.StretchingRectangleElement
|
||||
import ru.dbotthepony.mc.otm.client.render.sprites.StretchingRectangleElement
|
||||
|
||||
class StretchingDrawable(val element: StretchingRectangleElement, val rectWidth: Int, val rectHeight: Int) : IDrawable {
|
||||
override fun getWidth(): Int {
|
||||
|
Loading…
Reference in New Issue
Block a user