Skip to content

Commit

Permalink
Version 1.3.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
EssentialGGBot committed Oct 23, 2024
1 parent 11244c7 commit 5d56c80
Show file tree
Hide file tree
Showing 297 changed files with 5,083 additions and 1,535 deletions.
14 changes: 7 additions & 7 deletions api/api/api.api
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,13 @@ public abstract interface class gg/essential/api/utils/GuiUtil {
public abstract fun openScreen (Lnet/minecraft/client/gui/screens/Screen;)V
@1.17.1-forge,1.18.2-forge,1.19.2-forge,1.19.3-forge,1.19.4-forge,1.20.1-forge,1.20.2-forge,1.20.4-forge
public abstract fun openedScreen ()Lnet/minecraft/client/gui/screens/Screen;
@1.16.2-fabric,1.16.2-forge,1.17.1-fabric,1.18.1-fabric,1.18.2-fabric,1.19-fabric,1.19.2-fabric,1.19.3-fabric,1.19.4-fabric,1.20-fabric,1.20.1-fabric,1.20.2-fabric,1.20.4-fabric,1.20.6-fabric,1.21-fabric
@1.16.2-fabric,1.16.2-forge,1.17.1-fabric,1.18.1-fabric,1.18.2-fabric,1.19-fabric,1.19.2-fabric,1.19.3-fabric,1.19.4-fabric,1.20-fabric,1.20.1-fabric,1.20.2-fabric,1.20.4-fabric,1.20.6-fabric,1.21-fabric,1.21.2-fabric
public static fun getOpenedScreen ()Lnet/minecraft/client/gui/screen/Screen;
@1.16.2-fabric,1.16.2-forge,1.17.1-fabric,1.18.1-fabric,1.18.2-fabric,1.19-fabric,1.19.2-fabric,1.19.3-fabric,1.19.4-fabric,1.20-fabric,1.20.1-fabric,1.20.2-fabric,1.20.4-fabric,1.20.6-fabric,1.21-fabric
@1.16.2-fabric,1.16.2-forge,1.17.1-fabric,1.18.1-fabric,1.18.2-fabric,1.19-fabric,1.19.2-fabric,1.19.3-fabric,1.19.4-fabric,1.20-fabric,1.20.1-fabric,1.20.2-fabric,1.20.4-fabric,1.20.6-fabric,1.21-fabric,1.21.2-fabric
public static fun open (Lnet/minecraft/client/gui/screen/Screen;)V
@1.16.2-fabric,1.16.2-forge,1.17.1-fabric,1.18.1-fabric,1.18.2-fabric,1.19-fabric,1.19.2-fabric,1.19.3-fabric,1.19.4-fabric,1.20-fabric,1.20.1-fabric,1.20.2-fabric,1.20.4-fabric,1.20.6-fabric,1.21-fabric
@1.16.2-fabric,1.16.2-forge,1.17.1-fabric,1.18.1-fabric,1.18.2-fabric,1.19-fabric,1.19.2-fabric,1.19.3-fabric,1.19.4-fabric,1.20-fabric,1.20.1-fabric,1.20.2-fabric,1.20.4-fabric,1.20.6-fabric,1.21-fabric,1.21.2-fabric
public abstract fun openScreen (Lnet/minecraft/client/gui/screen/Screen;)V
@1.16.2-fabric,1.16.2-forge,1.17.1-fabric,1.18.1-fabric,1.18.2-fabric,1.19-fabric,1.19.2-fabric,1.19.3-fabric,1.19.4-fabric,1.20-fabric,1.20.1-fabric,1.20.2-fabric,1.20.4-fabric,1.20.6-fabric,1.21-fabric
@1.16.2-fabric,1.16.2-forge,1.17.1-fabric,1.18.1-fabric,1.18.2-fabric,1.19-fabric,1.19.2-fabric,1.19.3-fabric,1.19.4-fabric,1.20-fabric,1.20.1-fabric,1.20.2-fabric,1.20.4-fabric,1.20.6-fabric,1.21-fabric,1.21.2-fabric
public abstract fun openedScreen ()Lnet/minecraft/client/gui/screen/Screen;
@1.12.2-forge,1.8.9-forge
public static fun getOpenedScreen ()Lnet/minecraft/client/gui/GuiScreen;
Expand All @@ -446,9 +446,9 @@ public final class gg/essential/api/utils/GuiUtil$Companion {
public final fun getOpenedScreen ()Lnet/minecraft/client/gui/screens/Screen;
@1.17.1-forge,1.18.2-forge,1.19.2-forge,1.19.3-forge,1.19.4-forge,1.20.1-forge,1.20.2-forge,1.20.4-forge
public final fun open (Lnet/minecraft/client/gui/screens/Screen;)V
@1.16.2-fabric,1.16.2-forge,1.17.1-fabric,1.18.1-fabric,1.18.2-fabric,1.19-fabric,1.19.2-fabric,1.19.3-fabric,1.19.4-fabric,1.20-fabric,1.20.1-fabric,1.20.2-fabric,1.20.4-fabric,1.20.6-fabric,1.21-fabric
@1.16.2-fabric,1.16.2-forge,1.17.1-fabric,1.18.1-fabric,1.18.2-fabric,1.19-fabric,1.19.2-fabric,1.19.3-fabric,1.19.4-fabric,1.20-fabric,1.20.1-fabric,1.20.2-fabric,1.20.4-fabric,1.20.6-fabric,1.21-fabric,1.21.2-fabric
public final fun getOpenedScreen ()Lnet/minecraft/client/gui/screen/Screen;
@1.16.2-fabric,1.16.2-forge,1.17.1-fabric,1.18.1-fabric,1.18.2-fabric,1.19-fabric,1.19.2-fabric,1.19.3-fabric,1.19.4-fabric,1.20-fabric,1.20.1-fabric,1.20.2-fabric,1.20.4-fabric,1.20.6-fabric,1.21-fabric
@1.16.2-fabric,1.16.2-forge,1.17.1-fabric,1.18.1-fabric,1.18.2-fabric,1.19-fabric,1.19.2-fabric,1.19.3-fabric,1.19.4-fabric,1.20-fabric,1.20.1-fabric,1.20.2-fabric,1.20.4-fabric,1.20.6-fabric,1.21-fabric,1.21.2-fabric
public final fun open (Lnet/minecraft/client/gui/screen/Screen;)V
@1.12.2-forge,1.8.9-forge
public final fun getOpenedScreen ()Lnet/minecraft/client/gui/GuiScreen;
Expand Down Expand Up @@ -512,7 +512,7 @@ public final class gg/essential/api/utils/KotlinAdapter : net/minecraftforge/fml
public abstract interface class gg/essential/api/utils/MinecraftUtils {
@1.17.1-forge,1.18.2-forge,1.19.2-forge,1.19.3-forge,1.19.4-forge,1.20.1-forge,1.20.2-forge,1.20.4-forge
public abstract fun getResourceImage (Lnet/minecraft/resources/ResourceLocation;)Ljava/awt/image/BufferedImage;
@1.16.2-fabric,1.17.1-fabric,1.18.1-fabric,1.18.2-fabric,1.19-fabric,1.19.2-fabric,1.19.3-fabric,1.19.4-fabric,1.20-fabric,1.20.1-fabric,1.20.2-fabric,1.20.4-fabric,1.20.6-fabric,1.21-fabric
@1.16.2-fabric,1.17.1-fabric,1.18.1-fabric,1.18.2-fabric,1.19-fabric,1.19.2-fabric,1.19.3-fabric,1.19.4-fabric,1.20-fabric,1.20.1-fabric,1.20.2-fabric,1.20.4-fabric,1.20.6-fabric,1.21-fabric,1.21.2-fabric
public abstract fun getResourceImage (Lnet/minecraft/util/Identifier;)Ljava/awt/image/BufferedImage;
@1.12.2-forge,1.16.2-forge,1.8.9-forge
public abstract fun getResourceImage (Lnet/minecraft/util/ResourceLocation;)Ljava/awt/image/BufferedImage;
Expand Down
2 changes: 1 addition & 1 deletion build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies {
implementation("org.ow2.asm:asm-commons:9.3")
implementation ("com.google.guava:guava:30.1.1-jre")

implementation("gg.essential:essential-gradle-toolkit:0.6.2")
implementation("gg.essential:essential-gradle-toolkit:0.6.3")
}

gradlePlugin {
Expand Down
2 changes: 2 additions & 0 deletions build-logic/src/main/kotlin/essential/preprocessor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ fun Project.configurePreprocessTree(versions: File) {
configure<RootPreprocessExtension> {
strictExtraMappings.set(true)

val fabric12102 = createNode("1.21.2-fabric", 12102, "yarn")
val fabric12100 = createNode("1.21-fabric", 12100, "yarn")
val fabric12006 = createNode("1.20.6-fabric", 12006, "yarn")
val forge12004 = createNode("1.20.4-forge", 12004, "srg")
Expand All @@ -46,6 +47,7 @@ fun Project.configurePreprocessTree(versions: File) {
val forge11202 = createNode("1.12.2-forge", 11202, "srg")
val forge10809 = createNode("1.8.9-forge", 10809, "srg")

fabric12102.link(fabric12100)
fabric12100.link(fabric12006)
fabric12006.link(fabric12004)
forge12004.link(fabric12004)
Expand Down
5 changes: 4 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ dependencies {
implementation(bundle(project(":feature-flags"))!!)
implementation(bundle(project(":libs"))!!)
implementation(bundle(project(":infra"))!!)
implementation(bundle(project(":vigilance2"))!!)
implementation(bundle(project(":gui:elementa"))!!)
implementation(bundle(project(":gui:essential"))!!)
implementation(bundle(project(":gui:vigilance"))!!)
Expand All @@ -59,6 +60,7 @@ dependencies {
implementation(bundle(project(":lwjgl3"))!!)
runtimeOnly(bundle(project(":lwjgl3:impl"))!!)


// In order to get proper IDE support, we want to use a non-relocated MixinExtras version in dev.
// This gets transformed by `relocatedJar` to use our bundled relocated version for production.
implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${libs.versions.mixinextras.get()}")!!)
Expand Down Expand Up @@ -124,6 +126,7 @@ dependencies {
val fapiVersion = when (platform.mcVersion) {
12006 -> "0.97.8+1.20.6"
12100 -> "0.99.2+1.21"
12102 -> "0.106.0+1.21.2"
else -> error("No fabric API version configured!")
}
include(modImplementation(fabricApi.module("fabric-api-base", fapiVersion))!!)
Expand Down Expand Up @@ -166,7 +169,7 @@ tasks.jar {
if (!platform.isFabric) {
manifest {
if (mcVersion >= 11400) {
attributes("MixinConfigs" to "mixins.essential.json,mixins.essential.init.json,mixins.essential.modcompat.json")
attributes("MixinConfigs" to "mixins.essential.json,mixins.essential.init.json,mixins.essential.modcompat.json,mixins.essential.tests.json")
attributes("Requires-Essential-Stage2-Version" to "1.6.0")
}
}
Expand Down
19 changes: 19 additions & 0 deletions changelog/release-1.3.4.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Title: Bug Patch
Summary: Minor bug fixes

## New Versions
- Added support for 1.21.2 Fabric

## Wardrobe
- Added slow rotation to some bundle items so they can be more easily seen from all sides

## Bug Fixes
- Fixed servers in the featured tab displaying as infinitely pinging on 1.20.6+
- Fixed replacing selected text sometimes inserting the new text in the wrong position, potentially crashing the game on Ctrl+Z
- Fixed outer skin layer sometimes being visible over cosmetics when it shouldn't be
- Fixed the re-invite button remaining visible for players already online
- Fixed emote getting stuck as active when switching outfit while emote is active
- Fixed the Screenshot Browser freezing under certain circumstances

## Compatibility
- Fixed emotes not playing properly with the Fresh Moves resource pack installed
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* commercialize, or otherwise exploit, or create derivative works based
* upon, this file or any other in this repository, all of which is reserved by Essential.
*/
package gg.essential.gui.elementa.effects
package gg.essential.gui.effects

import gg.essential.elementa.effects.Effect
import gg.essential.elementa.state.State
Expand All @@ -19,7 +19,6 @@ import gg.essential.universal.UResolution
import gg.essential.universal.shader.BlendState
import gg.essential.universal.shader.SamplerUniform
import gg.essential.universal.shader.UShader
import gg.essential.util.GuiElementaPlatform.Companion.platform
import org.lwjgl.opengl.GL11
import java.io.Closeable
import java.lang.ref.PhantomReference
Expand Down Expand Up @@ -99,10 +98,10 @@ class AlphaEffect(private val alphaState: State<Float>) : Effect() {

var prevAlphaTestFunc = 0
var prevAlphaTestRef = 0f
if (!platform.isCoreProfile) {
if (!UGraphics.isCoreProfile()) {
prevAlphaTestFunc = GL11.glGetInteger(GL11.GL_ALPHA_TEST_FUNC)
prevAlphaTestRef = GL11.glGetFloat(GL11.GL_ALPHA_TEST_REF)
platform.glAlphaFunc(GL11.GL_ALWAYS, 0f)
UGraphics.alphaFunc(GL11.GL_ALWAYS, 0f)
}

shader.bind()
Expand All @@ -118,8 +117,8 @@ class AlphaEffect(private val alphaState: State<Float>) : Effect() {

shader.unbind()

if (!platform.isCoreProfile) {
platform.glAlphaFunc(prevAlphaTestFunc, prevAlphaTestRef)
if (!UGraphics.isCoreProfile()) {
UGraphics.alphaFunc(prevAlphaTestFunc, prevAlphaTestRef)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@
* commercialize, or otherwise exploit, or create derivative works based
* upon, this file or any other in this repository, all of which is reserved by Essential.
*/
package gg.essential.gui.elementa.effects
package gg.essential.gui.effects

import gg.essential.elementa.effects.Effect
import gg.essential.gui.elementa.state.v2.State
import gg.essential.universal.UGraphics
import gg.essential.universal.UMatrixStack
import gg.essential.universal.shader.BlendState
import gg.essential.universal.shader.UShader
import gg.essential.util.GuiElementaPlatform.Companion.platform
import org.intellij.lang.annotations.Language
import org.lwjgl.opengl.GL11
import java.awt.Color
Expand Down Expand Up @@ -66,10 +65,10 @@ class GradientEffect(

var prevAlphaTestFunc = 0
var prevAlphaTestRef = 0f
if (!platform.isCoreProfile) {
if (!UGraphics.isCoreProfile()) {
prevAlphaTestFunc = GL11.glGetInteger(GL11.GL_ALPHA_TEST_FUNC)
prevAlphaTestRef = GL11.glGetFloat(GL11.GL_ALPHA_TEST_REF)
platform.glAlphaFunc(GL11.GL_ALWAYS, 0f)
UGraphics.alphaFunc(GL11.GL_ALWAYS, 0f)
}

// See UIBlock.drawBlock for why we use this depth function
Expand All @@ -79,8 +78,8 @@ class GradientEffect(
UGraphics.disableDepth()
UGraphics.depthFunc(GL11.GL_LEQUAL)

if (!platform.isCoreProfile) {
platform.glAlphaFunc(prevAlphaTestFunc, prevAlphaTestRef)
if (!UGraphics.isCoreProfile()) {
UGraphics.alphaFunc(prevAlphaTestFunc, prevAlphaTestRef)
}

if (dither) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
package gg.essential.gui.layoutdsl

import gg.essential.elementa.effects.Effect
import gg.essential.gui.elementa.effects.GradientEffect
import gg.essential.gui.effects.GradientEffect
import gg.essential.gui.elementa.state.v2.State
import gg.essential.gui.elementa.state.v2.stateOf
import java.awt.Color
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
* commercialize, or otherwise exploit, or create derivative works based
* upon, this file or any other in this repository, all of which is reserved by Essential.
*/
package gg.essential.gui.elementa.transitions
package gg.essential.gui.transitions

import gg.essential.elementa.constraints.animation.AnimatingConstraints
import gg.essential.elementa.constraints.animation.Animations
import gg.essential.elementa.state.BasicState
import gg.essential.elementa.transitions.BoundTransition
import gg.essential.gui.elementa.effects.AlphaEffect
import gg.essential.gui.effects.AlphaEffect
import kotlin.properties.Delegates

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright (c) 2024 ModCore Inc. All rights reserved.
*
* This code is part of ModCore Inc.'s Essential Mod repository and is protected
* under copyright registration # TX0009138511. For the full license, see:
* https://github.com/EssentialGG/Essential/blob/main/LICENSE
*
* You may not use, copy, reproduce, modify, sell, license, distribute,
* commercialize, or otherwise exploit, or create derivative works based
* upon, this file or any other in this repository, all of which is reserved by Essential.
*/
package gg.essential.gui.transitions

import gg.essential.elementa.constraints.animation.AnimatingConstraints
import gg.essential.elementa.constraints.animation.Animations
import gg.essential.elementa.state.BasicState
import gg.essential.elementa.transitions.BoundTransition
import gg.essential.gui.effects.AlphaEffect
import kotlin.properties.Delegates

/**
* Fades a component and all of its children out. This is done using
* [AlphaEffect]. When the transition is finished, the effect is removed.
* Typically, one would hide the component after this transition is finished.
*/
class FadeOutTransition @JvmOverloads constructor(
private val time: Float = 1f,
private val animationType: Animations = Animations.OUT_EXP,
) : BoundTransition() {

private val alphaState = BasicState(1f)
private var alpha by Delegates.observable(1f) { _, _, newValue ->
alphaState.set(newValue)
}

private val effect = AlphaEffect(alphaState)

override fun beforeTransition() {
boundComponent.enableEffect(effect)
}

override fun doTransition(constraints: AnimatingConstraints) {
constraints.setExtraDelay(time)
boundComponent.apply {
::alpha.animate(animationType, time, 0f)
}
}

override fun afterTransition() {
boundComponent.removeEffect(effect)
effect.cleanup()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ import java.util.function.Consumer
import gg.essential.elementa.state.State as V1State

private class V2AsV1State<T>(private val v2State: State<T>, owner: ReferenceHolder) : V1State<T>() {
// Stored in a field, so the listener is kept alive at least as long as this legacy state instance exists
private val listener: (T) -> Unit = { super.set(it) }

init {
v2State.onSetValue(owner, listener)
}
@Suppress("unused") // keep effect alive at least as long as this legacy state instance exists
private val effect = effect(owner) { super.set(v2State()) }

override fun get(): T = v2State.get()

Expand All @@ -43,7 +39,7 @@ private class V2AsV1State<T>(private val v2State: State<T>, owner: ReferenceHold
*
* Note that as with any listener on a v2 state, the returned v1 state may be garbage collected once there are no more
* strong references to it. This v2 state will not by itself keep it alive.
* The [owner] argument serves to prevent this from happening too early, see [State.onSetValue].
* The [owner] argument serves to prevent this from happening too early, see [effect].
*/
fun <T> State<T>.toV1(owner: ReferenceHolder): V1State<T> = V2AsV1State(this, owner)

Expand Down Expand Up @@ -72,7 +68,10 @@ fun <T> V1State<T>.toV2(): MutableState<T> {
}
})

return v2
return object : MutableState<T> by v2 {
@Suppress("unused") // keep this alive for as long as the returned v2 state
val referenceHolder = referenceHolder
}
}

/**
Expand Down
Loading

0 comments on commit 5d56c80

Please sign in to comment.