aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/anthonyhilyard/iceberg/events/GatherComponentsExtEvent.java
diff options
context:
space:
mode:
authorAnthony Hilyard <anthony.hilyard@gmail.com>2021-12-30 14:00:33 -0800
committerAnthony Hilyard <anthony.hilyard@gmail.com>2021-12-30 14:00:33 -0800
commit650b77cff32dd45585fb363c3daa6d21e8e601b9 (patch)
tree3e067c56c1f698c5563801a8eb1a5a1ef107df32 /src/main/java/com/anthonyhilyard/iceberg/events/GatherComponentsExtEvent.java
parentbe7a696f1ed6a6e9fc902fd4599dbc9ce71c466c (diff)
downloadIceberg-650b77cff32dd45585fb363c3daa6d21e8e601b9.tar.gz
Iceberg-650b77cff32dd45585fb363c3daa6d21e8e601b9.tar.bz2
Iceberg-650b77cff32dd45585fb363c3daa6d21e8e601b9.zip
Ported 1.0.32 to 1.18.1. Added tooltip index to tooltip events, fixed
text color alpha limitation.
Diffstat (limited to 'src/main/java/com/anthonyhilyard/iceberg/events/GatherComponentsExtEvent.java')
-rw-r--r--src/main/java/com/anthonyhilyard/iceberg/events/GatherComponentsExtEvent.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/events/GatherComponentsExtEvent.java b/src/main/java/com/anthonyhilyard/iceberg/events/GatherComponentsExtEvent.java
new file mode 100644
index 0000000..753c7c0
--- /dev/null
+++ b/src/main/java/com/anthonyhilyard/iceberg/events/GatherComponentsExtEvent.java
@@ -0,0 +1,21 @@
+package com.anthonyhilyard.iceberg.events;
+
+import java.util.List;
+
+import com.mojang.datafixers.util.Either;
+
+import net.minecraft.network.chat.FormattedText;
+import net.minecraft.world.inventory.tooltip.TooltipComponent;
+import net.minecraft.world.item.ItemStack;
+import net.minecraftforge.client.event.RenderTooltipEvent.GatherComponents;
+
+public class GatherComponentsExtEvent extends GatherComponents
+{
+ private final int index;
+ public GatherComponentsExtEvent(ItemStack itemStack, int screenWidth, int screenHeight, List<Either<FormattedText, TooltipComponent>> tooltipElements, int maxWidth, int index)
+ {
+ super(itemStack, screenWidth, screenHeight, tooltipElements, maxWidth);
+ this.index = index;
+ }
+ public int getIndex() { return index; }
+}