From 650b77cff32dd45585fb363c3daa6d21e8e601b9 Mon Sep 17 00:00:00 2001 From: Anthony Hilyard Date: Thu, 30 Dec 2021 14:00:33 -0800 Subject: Ported 1.0.32 to 1.18.1. Added tooltip index to tooltip events, fixed text color alpha limitation. --- .../iceberg/events/GatherComponentsExtEvent.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/main/java/com/anthonyhilyard/iceberg/events/GatherComponentsExtEvent.java (limited to 'src/main/java/com/anthonyhilyard/iceberg/events/GatherComponentsExtEvent.java') 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> tooltipElements, int maxWidth, int index) + { + super(itemStack, screenWidth, screenHeight, tooltipElements, maxWidth); + this.index = index; + } + public int getIndex() { return index; } +} -- cgit