Skip to content

Commit 2d2e490

Browse files
Version 1.3.8
1 parent 3a55da0 commit 2d2e490

File tree

27 files changed

+687
-256
lines changed

27 files changed

+687
-256
lines changed

changelog/release-1.3.7.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Title: Drag & Drop Update
2-
Description: Drag and drop resource packs and servers
2+
Summary: Drag and drop resource packs and servers
33

44
## Improvements
55
- Added drag and drop functionality to the resource packs, data packs and server list screens

changelog/release-1.3.8.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Title: Nameplate Improvements
2+
Summary: Improved nameplate icon and design
3+
4+
## Improvements
5+
- Improved the nameplate design
6+
- Improved the Essential icon on nameplates and the tab-list
7+
8+
## Essential Settings
9+
- Added setting to see your own nameplate in third person

features.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
always=true
2+
nameplate_improvements=true
23
server_discovery=true
34
updated_gifting_modal=true
45
updated_coins_purchase_modal=true

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ minecraftVersion=11202
1010
# TODO remove once upgrading to Loom 1.10
1111
# fabric-api 1.21.5 was built with Loom 1.10, seems to work well enough in dev with our current 1.7 though
1212
loom.ignoreDependencyLoomVersionValidation=true
13-
version=1.3.7
13+
version=1.3.8

gui/essential/src/main/kotlin/gg/essential/config/EssentialConfig.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ object EssentialConfig : Vigilant2(), GuiEssentialPlatform.Config {
262262

263263
val hideCosmeticParticlesInFirstPerson = property("Cosmetics.General.Hide cosmetic particles in first person", false)
264264

265+
val showOwnNametag = property("Quality of Life.Nameplate.Show my nameplate in third-person", true)
266+
265267
override val migrations = listOf(
266268
Migration { config ->
267269
val overrideGuiScale = config.remove("general.general.gui_scale") as Boolean? ?: return@Migration
@@ -529,6 +531,10 @@ object EssentialConfig : Vigilant2(), GuiEssentialPlatform.Config {
529531
}
530532

531533
subcategory("Nameplates") {
534+
switch(showOwnNametag) {
535+
name = "Nameplate in third-person"
536+
description = "Shows your own nameplate when in third-person perspective."
537+
}
532538
switch(showEssentialIndicatorOnNametagState) {
533539
name = "Essential icon on nameplates"
534540
description = "Shows the Essential icon on Essential players’ nameplates."

gui/essential/src/main/kotlin/gg/essential/gui/wardrobe/components/cosmeticItem.kt

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -508,36 +508,36 @@ private fun LayoutScope.lockedIcons(item: Item, owned: State<Boolean>) {
508508
Modifier.width(13f).height(13f).color(EssentialPalette.LOCKED_ORANGE).hoverTooltip(data.actionDescription).hoverScope(),
509509
Modifier.shadow(EssentialPalette.BLACK_SHADOW),
510510
)
511+
}
511512

512-
val actionModifier = Modifier.width(13f).height(13f).color(EssentialPalette.BANNER_BLUE).hoverScope()
513-
514-
when (data) {
515-
is CosmeticProperty.RequiresUnlockAction.Data.JoinServer -> {
516-
iconButton(
517-
EssentialPalette.JOIN_ARROW_5X,
518-
actionModifier.hoverTooltip("Join ${data.serverAddress}"),
519-
Modifier.shadow(EssentialPalette.BLACK_SHADOW),
520-
onLeftClick = {
521-
platform.connectToServer(data.serverAddress, data.serverAddress)
522-
it.stopPropagation()
523-
}
524-
)
525-
}
513+
val actionModifier = Modifier.width(13f).height(13f).color(EssentialPalette.BANNER_BLUE).hoverScope()
526514

527-
is CosmeticProperty.RequiresUnlockAction.Data.OpenLink -> {
528-
iconButton(
529-
EssentialPalette.JOIN_ARROW_5X,
530-
actionModifier.hoverTooltip(data.linkShort),
531-
Modifier.shadow(EssentialPalette.BLACK_SHADOW),
532-
onLeftClick = {
533-
OpenLinkModal.openUrl(URI(data.linkAddress))
534-
it.stopPropagation()
535-
}
536-
)
537-
}
515+
when (data) {
516+
is CosmeticProperty.RequiresUnlockAction.Data.JoinServer -> {
517+
iconButton(
518+
EssentialPalette.JOIN_ARROW_5X,
519+
actionModifier.hoverTooltip("Join ${data.serverAddress}"),
520+
Modifier.shadow(EssentialPalette.BLACK_SHADOW),
521+
onLeftClick = {
522+
platform.connectToServer(data.serverAddress, data.serverAddress)
523+
it.stopPropagation()
524+
}
525+
)
526+
}
538527

539-
else -> {}
528+
is CosmeticProperty.RequiresUnlockAction.Data.OpenLink -> {
529+
iconButton(
530+
EssentialPalette.JOIN_ARROW_5X,
531+
actionModifier.hoverTooltip(data.linkShort),
532+
Modifier.shadow(EssentialPalette.BLACK_SHADOW),
533+
onLeftClick = {
534+
OpenLinkModal.openUrl(URI(data.linkAddress))
535+
it.stopPropagation()
536+
}
537+
)
540538
}
539+
540+
else -> {}
541541
}
542542
}
543543

gui/essential/src/main/kotlin/gg/essential/gui/wardrobe/components/cosmeticOrEmoteItemFunctions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ fun handleCosmeticOrEmoteLeftClick(item: Item.CosmeticOrEmote, category: Wardrob
113113
}
114114

115115
if (wardrobeState.equippedCosmeticsState.get()[slot] == cosmetic.id) {
116-
if ((!startedInEmoteWheel && !bundleWasSelected && !emoteWasSelected)) {
116+
if (!(slot == CosmeticSlot.ICON) && (!startedInEmoteWheel && !bundleWasSelected && !emoteWasSelected)) {
117117
// Only unequip the cosmetic if the emote wheel preview was not open when the cosmetic was clicked and a bundle was not selected
118118
outfitManager.updateEquippedCosmetic(selectedOutfitId, slot, null)
119119
wardrobeState.selectedItem.set(null)

src/main/java/gg/essential/cosmetics/CosmeticsRenderState.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
import gg.essential.gui.common.EmulatedUI3DPlayer;
1818
import gg.essential.mixins.impl.client.entity.AbstractClientPlayerExt;
1919
import gg.essential.mixins.impl.client.renderer.entity.ArmorRenderingUtil;
20+
import gg.essential.mod.cosmetics.CosmeticSlot;
21+
import gg.essential.model.ModelInstance;
2022
import gg.essential.model.backend.PlayerPose;
2123
import gg.essential.model.util.PlayerPoseManager;
2224
import gg.essential.network.connectionmanager.profile.ProfileManager;
@@ -43,6 +45,7 @@ public interface CosmeticsRenderState {
4345
ResourceLocation emissiveCapeTexture();
4446

4547
boolean onlineIndicator();
48+
ModelInstance nametagIcon();
4649

4750
boolean isSneaking();
4851

@@ -124,6 +127,14 @@ public boolean onlineIndicator() {
124127
return status != ProfileStatus.OFFLINE;
125128
}
126129

130+
@Override
131+
public ModelInstance nametagIcon() {
132+
if (!EssentialConfig.INSTANCE.getShowEssentialIndicatorOnNametag()) return null;
133+
EquippedCosmetic cosmetic = playerExt().getCosmeticsState().getCosmetics().get(CosmeticSlot.ICON);
134+
if (cosmetic == null) return null;
135+
return playerExt().getWearablesManager().getModels().get(cosmetic.getCosmetic());
136+
}
137+
127138
@Override
128139
public boolean isSneaking() {
129140
return player.isSneaking();
@@ -167,6 +178,7 @@ final class Snapshot implements CosmeticsRenderState {
167178
private ResourceLocation skinTexture;
168179
private ResourceLocation emissiveCapeTexture;
169180
private boolean onlineIndicator;
181+
private ModelInstance nametagIcon;
170182
private boolean isSneaking;
171183
private float cosmeticFrozenYaw;
172184

@@ -200,6 +212,11 @@ public boolean onlineIndicator() {
200212
return onlineIndicator;
201213
}
202214

215+
@Override
216+
public ModelInstance nametagIcon() {
217+
return nametagIcon;
218+
}
219+
203220
@Override
204221
public float cosmeticFrozenYaw() {
205222
return cosmeticFrozenYaw;
@@ -219,6 +236,7 @@ public void update(AbstractClientPlayer entity) {
219236
skinTexture = live.skinTexture();
220237
emissiveCapeTexture = live.emissiveCapeTexture();
221238
onlineIndicator = live.onlineIndicator();
239+
nametagIcon = live.nametagIcon();
222240
isSneaking = live.isSneaking();
223241
cosmeticFrozenYaw = live.cosmeticFrozenYaw();
224242
}

0 commit comments

Comments
 (0)