Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.

Commit 5a2a53c

Browse files
committed
add missing function for 1.20.4
1 parent e8a07b9 commit 5a2a53c

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

src/main/java/dev/nyon/skylper/asm/invokers/BeaconRendererInvoker.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ static void renderBeaconBeam(
1717
long gameTime,
1818
int yOffset,
1919
int height,
20-
/*? if >=1.21 {*/ int color /*?} else {*//* float[] colors *//*?}*/
20+
/*? if >=1.21 {*/ int color /*?} else {*/ /*float[] colors *//*?}*/
2121
) {
2222
}
2323
}

src/main/java/dev/nyon/skylper/asm/mixins/GuiGraphicsMixin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ private float useItemStackCooldownPercentage(
3939
@Nullable
4040
String text
4141
) {
42-
return ((AbilityCooldownIdentifier) instance).skylper$getCooldownPercent(stack, /*? if >=1.21 {*/ minecraft.getFrameTimeNs() /*?} else {*//* minecraft.getFrameTime() *//*?}*/);
42+
return ((AbilityCooldownIdentifier) instance).skylper$getCooldownPercent(stack, /*? if >=1.21 {*/ minecraft.getFrameTimeNs() /*?} else {*/ /*minecraft.getFrameTime() *//*?}*/);
4343
}
4444
}

src/main/java/dev/nyon/skylper/asm/mixins/GuiMixin.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ public void onInit(
3232
}
3333
}
3434

35-
/*?} else {*//*
36-
import dev.nyon.skylper.extensions.EventHandler;
35+
/*?} else {*/
36+
/*import dev.nyon.skylper.extensions.EventHandler;
3737
import dev.nyon.skylper.extensions.RenderHudEvent;
3838
import net.minecraft.client.gui.Gui;
3939
import net.minecraft.client.gui.GuiGraphics;

src/main/kotlin/dev/nyon/skylper/extensions/Invokers.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ fun internalRenderBeaconBeam(
1414
yOffset: Int = 0
1515
) {
1616
BeaconRendererInvoker.renderBeaconBeam(
17-
poseStack, bufferSource, partialTick, gameTime, yOffset, height, /*? if >=1.21 {*/ color /*?} else {*//* color.color.getRGBComponents(null) *//*?}*/
17+
poseStack, bufferSource, partialTick, gameTime, yOffset, height, /*? if >=1.21 {*/ color /*?} else {*/ /*color.color.getRGBComponents(null) *//*?}*/
1818
)
1919
}

src/main/kotlin/dev/nyon/skylper/extensions/Items.kt

+7-2
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,18 @@ val ItemStack.lore: List<Component>
4040
get() {
4141
val lines = getTooltipLines(Item.TooltipContext.EMPTY, minecraft.player!!, TooltipFlag.ADVANCED)
4242
return lines.drop(1)
43-
}/*?} else {*//*
44-
import dev.nyon.skylper.minecraft
43+
}/*?} else {*/
44+
/*import dev.nyon.skylper.minecraft
4545
import net.minecraft.nbt.CompoundTag
4646
import net.minecraft.network.chat.Component
4747
import net.minecraft.world.item.ItemStack
4848
import net.minecraft.world.item.TooltipFlag
4949
50+
val ItemStack.nameAsString: String
51+
get() {
52+
return displayName.string.replace("[", "").replace("]", "")
53+
}
54+
5055
val ItemStack.extraAttributes: CompoundTag?
5156
get() {
5257
tag ?: return null

0 commit comments

Comments
 (0)