aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/dulkirmod/features/ViewBobbing.kt7
-rw-r--r--src/main/kotlin/dulkirmod/features/rift/IchorHighlight.kt58
-rw-r--r--src/main/kotlin/dulkirmod/features/rift/SteakDisplay.kt43
3 files changed, 108 insertions, 0 deletions
diff --git a/src/main/kotlin/dulkirmod/features/ViewBobbing.kt b/src/main/kotlin/dulkirmod/features/ViewBobbing.kt
new file mode 100644
index 0000000..cdb866b
--- /dev/null
+++ b/src/main/kotlin/dulkirmod/features/ViewBobbing.kt
@@ -0,0 +1,7 @@
+package dulkirmod.features
+
+object ViewBobbing {
+ fun renderBob(partialTicks: Float): Boolean {
+ return false
+ }
+} \ No newline at end of file
diff --git a/src/main/kotlin/dulkirmod/features/rift/IchorHighlight.kt b/src/main/kotlin/dulkirmod/features/rift/IchorHighlight.kt
new file mode 100644
index 0000000..72581d3
--- /dev/null
+++ b/src/main/kotlin/dulkirmod/features/rift/IchorHighlight.kt
@@ -0,0 +1,58 @@
+package dulkirmod.features.rift
+
+import dulkirmod.config.DulkirConfig
+import dulkirmod.utils.TabListUtils
+import dulkirmod.utils.WorldRenderUtils
+import net.minecraft.entity.item.EntityArmorStand
+import net.minecraft.init.Items
+import net.minecraftforge.client.event.RenderLivingEvent
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+import java.awt.Color
+
+object IchorHighlight {
+ private const val ichorTexture =
+ "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzAzNDA5MjNhNmRlNDgyNWExNzY4MTNkMTMzNTAzZWZmMTg2ZGIwODk2ZTMyYjY3MDQ5MjhjMmEyYmY2ODQyMiJ9fX0="
+
+ @SubscribeEvent
+ fun onRenderLiving(event: RenderLivingEvent.Post<*>) {
+ if (!DulkirConfig.ichorHighlight) return
+ if (TabListUtils.area != "The Rift") return
+ val entity = event.entity
+
+ val x =
+ entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * WorldRenderUtils.partialTicks
+ val y =
+ entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * WorldRenderUtils.partialTicks
+ val z =
+ entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * WorldRenderUtils.partialTicks
+
+ if (entity is EntityArmorStand) {
+ if (entity.getEquipmentInSlot(4) != null && entity.getEquipmentInSlot(4).item === Items.skull) {
+ val stack = entity.getEquipmentInSlot(4)
+ if (stack.hasTagCompound() && stack.tagCompound.hasKey("SkullOwner")) {
+ val skullOwner = stack.tagCompound.getCompoundTag("SkullOwner")
+ if (skullOwner.hasKey("Properties")) {
+ val properties = skullOwner.getCompoundTag("Properties")
+ if (properties.hasKey("textures")) {
+ if (ichorTexture == properties.getTagList("textures", 10).getCompoundTagAt(0)
+ .getString("Value")
+ ) {
+ WorldRenderUtils.drawCustomBox(
+ x - .5,
+ 1.0,
+ y - 2,
+ 1.0,
+ z - .5,
+ 1.0,
+ Color(15, 247, 236, 255),
+ 3f,
+ phase = false
+ )
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/main/kotlin/dulkirmod/features/rift/SteakDisplay.kt b/src/main/kotlin/dulkirmod/features/rift/SteakDisplay.kt
new file mode 100644
index 0000000..2489bba
--- /dev/null
+++ b/src/main/kotlin/dulkirmod/features/rift/SteakDisplay.kt
@@ -0,0 +1,43 @@
+package dulkirmod.features.rift
+
+import dulkirmod.config.DulkirConfig
+import dulkirmod.utils.TabListUtils
+import dulkirmod.utils.Utils
+import dulkirmod.utils.WorldRenderUtils
+import net.minecraft.entity.item.EntityArmorStand
+import net.minecraftforge.client.event.RenderLivingEvent
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+import java.awt.Color
+
+object SteakDisplay {
+ private const val char = "҉"
+
+ @SubscribeEvent
+ fun onRenderLiving(event: RenderLivingEvent.Post<*>) {
+ if (!DulkirConfig.steakDisplay) return
+ if (TabListUtils.area != "The Rift") return
+
+ if (event.entity is EntityArmorStand && event.entity.hasCustomName()) {
+ val name = Utils.stripColorCodes(event.entity.customNameTag)
+ val x =
+ event.entity.lastTickPosX + (event.entity.posX - event.entity.lastTickPosX) * WorldRenderUtils.partialTicks
+ val y =
+ event.entity.lastTickPosY + (event.entity.posY - event.entity.lastTickPosY) * WorldRenderUtils.partialTicks
+ val z =
+ event.entity.lastTickPosZ + (event.entity.posZ - event.entity.lastTickPosZ) * WorldRenderUtils.partialTicks
+ if (name.contains(char)) {
+ WorldRenderUtils.drawCustomBox(
+ x - .5,
+ 1.0,
+ y - 2,
+ 1.5,
+ z - .5,
+ 1.0,
+ Color(15, 247, 236, 255),
+ 3f,
+ phase = false
+ )
+ }
+ }
+ }
+} \ No newline at end of file