mirror of
https://github.com/darksaid98/draggable_lists.git
synced 2026-12-01 14:38:47 +00:00
Fix build issues with 1.21.6
This commit is contained in:
5 files changed
+22
-31
No files matched your search
@@ -1,9 +1,9 @@
|
||||
package com.mrmelon54.DraggableLists;
|
||||
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.minecraft.Util;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.gui.components.ObjectSelectionList;
|
||||
import net.minecraft.util.ARGB;
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
public class DragManager<T, E extends ObjectSelectionList.Entry<?>> {
|
||||
@@ -114,13 +114,11 @@ public class DragManager<T, E extends ObjectSelectionList.Entry<?>> {
|
||||
int entryHeight = dragList.draggable_lists$getItemHeight() - 4;
|
||||
int entryWidth = dragList.draggable_lists$getRowWidth();
|
||||
|
||||
guiGraphics.pose().pushPose();
|
||||
guiGraphics.pose().pushMatrix();
|
||||
float shaderColorValue = 191f / 255f;
|
||||
RenderSystem.setShaderColor(shaderColorValue, shaderColorValue, shaderColorValue, 0.5f);
|
||||
guiGraphics.fill(x - 1, y - 1, x + entryWidth - 2, y + entryHeight + 1, 0xbfbfbfff);
|
||||
guiGraphics.fill(x - 1, y - 1, x + entryWidth - 2, y + entryHeight + 1, ARGB.colorFromFloat(0.5f, shaderColorValue, shaderColorValue, shaderColorValue));
|
||||
selectedItem.draggable_lists$render(guiGraphics, 0, y, x, entryWidth, entryHeight, mouseX, mouseY, false, delta);
|
||||
RenderSystem.setShaderColor(1, 1, 1, 1);
|
||||
guiGraphics.pose().popPose();
|
||||
guiGraphics.pose().popMatrix();
|
||||
|
||||
if (y < z) {
|
||||
if (softScrollingTimer == 0) {
|
||||
|
||||
-1
@@ -4,7 +4,6 @@ import com.mrmelon54.DraggableLists.DragItem;
|
||||
import com.mrmelon54.DraggableLists.DragList;
|
||||
import com.mrmelon54.DraggableLists.DragManager;
|
||||
import com.mrmelon54.DraggableLists.DraggableLists;
|
||||
import com.mrmelon54.DraggableLists.config.ConfigStructure;
|
||||
import com.mrmelon54.DraggableLists.duck.AbstractPackDuckProvider;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
+9
-11
@@ -1,13 +1,13 @@
|
||||
package com.mrmelon54.DraggableLists.mixin.packs;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.v2.WrapWithCondition;
|
||||
import com.mojang.blaze3d.pipeline.RenderPipeline;
|
||||
import com.mrmelon54.DraggableLists.DragItem;
|
||||
import com.mrmelon54.DraggableLists.DraggableLists;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.gui.components.ObjectSelectionList;
|
||||
import net.minecraft.client.gui.screens.packs.PackSelectionModel;
|
||||
import net.minecraft.client.gui.screens.packs.TransferableSelectionList;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -17,8 +17,6 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
@Mixin(TransferableSelectionList.PackEntry.class)
|
||||
public abstract class TransferableSelectionList_PackEntryMixin extends ObjectSelectionList.Entry<TransferableSelectionList.PackEntry> implements DragItem<PackSelectionModel.Entry, TransferableSelectionList.PackEntry> {
|
||||
@Shadow
|
||||
@@ -32,23 +30,23 @@ public abstract class TransferableSelectionList_PackEntryMixin extends ObjectSel
|
||||
@Unique
|
||||
private boolean draggable_lists$isBeingDragged = false;
|
||||
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Ljava/util/function/Function;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 4))
|
||||
public boolean removeOnUpArrowButtons(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 4))
|
||||
public boolean removeOnUpArrowButtons(GuiGraphics instance, RenderPipeline renderPipeline, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
return !DraggableLists.CONFIG.disableResourcePackArrows;
|
||||
}
|
||||
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Ljava/util/function/Function;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 5))
|
||||
public boolean removeOffUpArrowButtons(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 5))
|
||||
public boolean removeOffUpArrowButtons(GuiGraphics instance, RenderPipeline renderPipeline, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
return !DraggableLists.CONFIG.disableResourcePackArrows;
|
||||
}
|
||||
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Ljava/util/function/Function;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 6))
|
||||
public boolean removeOnDownArrowButtons(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 6))
|
||||
public boolean removeOnDownArrowButtons(GuiGraphics instance, RenderPipeline renderPipeline, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
return !DraggableLists.CONFIG.disableResourcePackArrows;
|
||||
}
|
||||
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Ljava/util/function/Function;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 7))
|
||||
public boolean removeOffDownArrowButtons(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 7))
|
||||
public boolean removeOffDownArrowButtons(GuiGraphics instance, RenderPipeline renderPipeline, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
return !DraggableLists.CONFIG.disableResourcePackArrows;
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -1,13 +1,13 @@
|
||||
package com.mrmelon54.DraggableLists.mixin.server;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.v2.WrapWithCondition;
|
||||
import com.mojang.blaze3d.pipeline.RenderPipeline;
|
||||
import com.mrmelon54.DraggableLists.DragItem;
|
||||
import com.mrmelon54.DraggableLists.DraggableLists;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.gui.components.ObjectSelectionList;
|
||||
import net.minecraft.client.gui.screens.multiplayer.ServerSelectionList;
|
||||
import net.minecraft.client.multiplayer.ServerData;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -38,23 +38,23 @@ public abstract class OnlineServerEntryMixin extends ObjectSelectionList.Entry<S
|
||||
@Unique
|
||||
private boolean draggable_lists$isBeingDragged;
|
||||
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Ljava/util/function/Function;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 3))
|
||||
public boolean removeUpOnButton(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 3))
|
||||
public boolean removeUpOnButton(GuiGraphics instance, RenderPipeline renderPipeline, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
return !DraggableLists.CONFIG.disableServerArrows;
|
||||
}
|
||||
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Ljava/util/function/Function;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 4))
|
||||
public boolean removeUpButton(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 4))
|
||||
public boolean removeUpButton(GuiGraphics instance, RenderPipeline renderPipeline, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
return !DraggableLists.CONFIG.disableServerArrows;
|
||||
}
|
||||
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Ljava/util/function/Function;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 5))
|
||||
public boolean removeDownOnButton(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 5))
|
||||
public boolean removeDownOnButton(GuiGraphics instance, RenderPipeline renderPipeline, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
return !DraggableLists.CONFIG.disableServerArrows;
|
||||
}
|
||||
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Ljava/util/function/Function;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 6))
|
||||
public boolean removeDownButton(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lcom/mojang/blaze3d/pipeline/RenderPipeline;Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 6))
|
||||
public boolean removeDownButton(GuiGraphics instance, RenderPipeline renderPipeline, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||
return !DraggableLists.CONFIG.disableServerArrows;
|
||||
}
|
||||
|
||||
|
||||
-4
@@ -7,7 +7,6 @@ import com.mrmelon54.DraggableLists.DraggableLists;
|
||||
import com.mrmelon54.DraggableLists.duck.ServerListDuckProvider;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.Util;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.gui.components.ObjectSelectionList;
|
||||
@@ -28,9 +27,6 @@ public abstract class ServerSelectionListMixin extends ObjectSelectionList<Serve
|
||||
@Final
|
||||
private JoinMultiplayerScreen screen;
|
||||
|
||||
@Unique
|
||||
long lastClickTime;
|
||||
|
||||
@Shadow
|
||||
public abstract void setSelected(@Nullable ServerSelectionList.Entry entry);
|
||||
|
||||
|
||||
Reference in new issue
Block a user