diff options
Diffstat (limited to 'src/main/java/com/anthonyhilyard/iceberg/events')
4 files changed, 27 insertions, 19 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/events/CriterionEvent.java b/src/main/java/com/anthonyhilyard/iceberg/events/CriterionEvent.java index fe20cec..fed7ec2 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/events/CriterionEvent.java +++ b/src/main/java/com/anthonyhilyard/iceberg/events/CriterionEvent.java @@ -2,7 +2,7 @@ package com.anthonyhilyard.iceberg.events; import net.minecraftforge.event.entity.player.PlayerEvent; import net.minecraft.advancements.Advancement; -import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.world.entity.player.Player; import net.minecraftforge.common.MinecraftForge; /** @@ -19,7 +19,7 @@ public class CriterionEvent extends PlayerEvent private final Advancement advancement; private final String criterionKey; - public CriterionEvent(PlayerEntity player, Advancement advancement, String criterionKey) + public CriterionEvent(Player player, Advancement advancement, String criterionKey) { super(player); this.advancement = advancement; diff --git a/src/main/java/com/anthonyhilyard/iceberg/events/EntityFluidEvent.java b/src/main/java/com/anthonyhilyard/iceberg/events/EntityFluidEvent.java index aa91fa5..d2abcb2 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/events/EntityFluidEvent.java +++ b/src/main/java/com/anthonyhilyard/iceberg/events/EntityFluidEvent.java @@ -1,7 +1,7 @@ package com.anthonyhilyard.iceberg.events; -import net.minecraft.entity.Entity; -import net.minecraft.fluid.Fluid; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.level.material.Fluid; import net.minecraftforge.event.entity.EntityEvent; public class EntityFluidEvent extends EntityEvent diff --git a/src/main/java/com/anthonyhilyard/iceberg/events/NewItemPickupEvent.java b/src/main/java/com/anthonyhilyard/iceberg/events/NewItemPickupEvent.java index a758769..48f2faf 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/events/NewItemPickupEvent.java +++ b/src/main/java/com/anthonyhilyard/iceberg/events/NewItemPickupEvent.java @@ -5,8 +5,8 @@ import net.minecraftforge.event.entity.player.PlayerEvent; import java.util.UUID; import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; import net.minecraftforge.common.MinecraftForge; /** @@ -22,7 +22,7 @@ public class NewItemPickupEvent extends PlayerEvent { private final ItemStack itemStack; - public NewItemPickupEvent(PlayerEntity player, ItemStack itemStack) + public NewItemPickupEvent(Player player, ItemStack itemStack) { super(player); this.itemStack = itemStack; diff --git a/src/main/java/com/anthonyhilyard/iceberg/events/RenderTooltipExtEvent.java b/src/main/java/com/anthonyhilyard/iceberg/events/RenderTooltipExtEvent.java index dfb1364..3ca2d37 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/events/RenderTooltipExtEvent.java +++ b/src/main/java/com/anthonyhilyard/iceberg/events/RenderTooltipExtEvent.java @@ -2,11 +2,11 @@ package com.anthonyhilyard.iceberg.events; import java.util.List; -import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.PoseStack; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.text.ITextProperties; +import net.minecraft.client.gui.Font; +import net.minecraft.world.item.ItemStack; +import net.minecraft.network.chat.FormattedText; import net.minecraftforge.client.event.RenderTooltipEvent; public class RenderTooltipExtEvent @@ -14,31 +14,37 @@ public class RenderTooltipExtEvent public static class Pre extends RenderTooltipEvent.Pre { private boolean comparisonTooltip = false; - public Pre(ItemStack stack, List<? extends ITextProperties> lines, MatrixStack matrixStack, int x, int y, int screenWidth, int screenHeight, int maxWidth, FontRenderer font, boolean comparison) + + @SuppressWarnings("removal") + public Pre(ItemStack stack, List<? extends FormattedText> lines, PoseStack PoseStack, int x, int y, int screenWidth, int screenHeight, int maxWidth, Font font, boolean comparison) { - super(stack, lines, matrixStack, x, y, screenWidth, screenHeight, maxWidth, font); + super(stack, lines, PoseStack, x, y, screenWidth, screenHeight, maxWidth, font); comparisonTooltip = comparison; } public boolean isComparison() { return comparisonTooltip; } } + @SuppressWarnings("removal") public static class PostBackground extends RenderTooltipEvent.PostBackground { private boolean comparisonTooltip = false; - public PostBackground(ItemStack stack, List<? extends ITextProperties> textLines, MatrixStack matrixStack, int x, int y, FontRenderer font, int width, int height, boolean comparison) + + public PostBackground(ItemStack stack, List<? extends FormattedText> textLines, PoseStack PoseStack, int x, int y, Font font, int width, int height, boolean comparison) { - super(stack, textLines, matrixStack, x, y, font, width, height); + super(stack, textLines, PoseStack, x, y, font, width, height); comparisonTooltip = comparison; } public boolean isComparison() { return comparisonTooltip; } } + @SuppressWarnings("removal") public static class PostText extends RenderTooltipEvent.PostText { private boolean comparisonTooltip = false; - public PostText(ItemStack stack, List<? extends ITextProperties> textLines, MatrixStack matrixStack, int x, int y, FontRenderer font, int width, int height, boolean comparison) + + public PostText(ItemStack stack, List<? extends FormattedText> textLines, PoseStack PoseStack, int x, int y, Font font, int width, int height, boolean comparison) { - super(stack, textLines, matrixStack, x, y, font, width, height); + super(stack, textLines, PoseStack, x, y, font, width, height); comparisonTooltip = comparison; } public boolean isComparison() { return comparisonTooltip; } @@ -47,9 +53,11 @@ public class RenderTooltipExtEvent public static class Color extends RenderTooltipEvent.Color { private boolean comparisonTooltip = false; - public Color(ItemStack stack, List<? extends ITextProperties> textLines, MatrixStack matrixStack, int x, int y, FontRenderer font, int background, int borderStart, int borderEnd, boolean comparison) + + @SuppressWarnings("removal") + public Color(ItemStack stack, List<? extends FormattedText> textLines, PoseStack PoseStack, int x, int y, Font font, int background, int borderStart, int borderEnd, boolean comparison) { - super(stack, textLines, matrixStack, x, y, font, background, borderStart, borderEnd); + super(stack, textLines, PoseStack, x, y, font, background, borderStart, borderEnd); comparisonTooltip = comparison; } public boolean isComparison() { return comparisonTooltip; } |