mirror of
https://github.com/darksaid98/draggable_lists.git
synced 2026-12-02 22:16:55 +00:00
Update to 1.21.3
This commit is contained in:
1 parent
5e4159ba88
commit
edfb2dae9f
4 files changed
+30
-26
No files matched your search
+11
-8
@@ -7,6 +7,7 @@ import net.minecraft.client.gui.GuiGraphics;
|
|||||||
import net.minecraft.client.gui.components.ObjectSelectionList;
|
import net.minecraft.client.gui.components.ObjectSelectionList;
|
||||||
import net.minecraft.client.gui.screens.packs.PackSelectionModel;
|
import net.minecraft.client.gui.screens.packs.PackSelectionModel;
|
||||||
import net.minecraft.client.gui.screens.packs.TransferableSelectionList;
|
import net.minecraft.client.gui.screens.packs.TransferableSelectionList;
|
||||||
|
import net.minecraft.client.renderer.RenderType;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
@@ -16,6 +17,8 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
@Mixin(TransferableSelectionList.PackEntry.class)
|
@Mixin(TransferableSelectionList.PackEntry.class)
|
||||||
public abstract class TransferableSelectionList_PackEntryMixin extends ObjectSelectionList.Entry<TransferableSelectionList.PackEntry> implements DragItem<PackSelectionModel.Entry, TransferableSelectionList.PackEntry> {
|
public abstract class TransferableSelectionList_PackEntryMixin extends ObjectSelectionList.Entry<TransferableSelectionList.PackEntry> implements DragItem<PackSelectionModel.Entry, TransferableSelectionList.PackEntry> {
|
||||||
@Shadow
|
@Shadow
|
||||||
@@ -29,23 +32,23 @@ public abstract class TransferableSelectionList_PackEntryMixin extends ObjectSel
|
|||||||
@Unique
|
@Unique
|
||||||
private boolean draggable_lists$isBeingDragged = false;
|
private boolean draggable_lists$isBeingDragged = false;
|
||||||
|
|
||||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 4))
|
@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, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
public boolean removeOnUpArrowButtons(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||||
return !DraggableLists.CONFIG.disableResourcePackArrows;
|
return !DraggableLists.CONFIG.disableResourcePackArrows;
|
||||||
}
|
}
|
||||||
|
|
||||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 5))
|
@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, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
public boolean removeOffUpArrowButtons(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||||
return !DraggableLists.CONFIG.disableResourcePackArrows;
|
return !DraggableLists.CONFIG.disableResourcePackArrows;
|
||||||
}
|
}
|
||||||
|
|
||||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 6))
|
@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, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
public boolean removeOnDownArrowButtons(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||||
return !DraggableLists.CONFIG.disableResourcePackArrows;
|
return !DraggableLists.CONFIG.disableResourcePackArrows;
|
||||||
}
|
}
|
||||||
|
|
||||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 7))
|
@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, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
public boolean removeOffDownArrowButtons(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||||
return !DraggableLists.CONFIG.disableResourcePackArrows;
|
return !DraggableLists.CONFIG.disableResourcePackArrows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
-8
@@ -7,6 +7,7 @@ import net.minecraft.client.gui.GuiGraphics;
|
|||||||
import net.minecraft.client.gui.components.ObjectSelectionList;
|
import net.minecraft.client.gui.components.ObjectSelectionList;
|
||||||
import net.minecraft.client.gui.screens.multiplayer.ServerSelectionList;
|
import net.minecraft.client.gui.screens.multiplayer.ServerSelectionList;
|
||||||
import net.minecraft.client.multiplayer.ServerData;
|
import net.minecraft.client.multiplayer.ServerData;
|
||||||
|
import net.minecraft.client.renderer.RenderType;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
@@ -16,6 +17,8 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
@Mixin(ServerSelectionList.OnlineServerEntry.class)
|
@Mixin(ServerSelectionList.OnlineServerEntry.class)
|
||||||
public abstract class OnlineServerEntryMixin extends ObjectSelectionList.Entry<ServerSelectionList.Entry> implements DragItem<ServerData, ServerSelectionList.OnlineServerEntry> {
|
public abstract class OnlineServerEntryMixin extends ObjectSelectionList.Entry<ServerSelectionList.Entry> implements DragItem<ServerData, ServerSelectionList.OnlineServerEntry> {
|
||||||
@Shadow
|
@Shadow
|
||||||
@@ -35,23 +38,23 @@ public abstract class OnlineServerEntryMixin extends ObjectSelectionList.Entry<S
|
|||||||
@Unique
|
@Unique
|
||||||
private boolean draggable_lists$isBeingDragged;
|
private boolean draggable_lists$isBeingDragged;
|
||||||
|
|
||||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 3))
|
@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, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
public boolean removeUpOnButton(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||||
return !DraggableLists.CONFIG.disableServerArrows;
|
return !DraggableLists.CONFIG.disableServerArrows;
|
||||||
}
|
}
|
||||||
|
|
||||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 4))
|
@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, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
public boolean removeUpButton(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||||
return !DraggableLists.CONFIG.disableServerArrows;
|
return !DraggableLists.CONFIG.disableServerArrows;
|
||||||
}
|
}
|
||||||
|
|
||||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 5))
|
@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, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
public boolean removeDownOnButton(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||||
return !DraggableLists.CONFIG.disableServerArrows;
|
return !DraggableLists.CONFIG.disableServerArrows;
|
||||||
}
|
}
|
||||||
|
|
||||||
@WrapWithCondition(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiGraphics;blitSprite(Lnet/minecraft/resources/ResourceLocation;IIII)V", ordinal = 6))
|
@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, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
public boolean removeDownButton(GuiGraphics instance, Function<ResourceLocation, RenderType> function, ResourceLocation resourceLocation, int i, int j, int k, int l) {
|
||||||
return !DraggableLists.CONFIG.disableServerArrows;
|
return !DraggableLists.CONFIG.disableServerArrows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-2
@@ -19,8 +19,6 @@ import org.spongepowered.asm.mixin.Mixin;
|
|||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
import org.spongepowered.asm.mixin.Unique;
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Mixin(ServerSelectionList.class)
|
@Mixin(ServerSelectionList.class)
|
||||||
@Environment(EnvType.CLIENT)
|
@Environment(EnvType.CLIENT)
|
||||||
public abstract class ServerSelectionListMixin extends ObjectSelectionList<ServerSelectionList.Entry> implements DragList<ServerData, ServerSelectionList.OnlineServerEntry> {
|
public abstract class ServerSelectionListMixin extends ObjectSelectionList<ServerSelectionList.Entry> implements DragList<ServerData, ServerSelectionList.OnlineServerEntry> {
|
||||||
|
|||||||
+8
-8
@@ -1,25 +1,25 @@
|
|||||||
org.gradle.jvmargs=-Xmx4096M
|
org.gradle.jvmargs=-Xmx4096M
|
||||||
|
|
||||||
minecraft_version=1.20.6
|
minecraft_version=1.21.3
|
||||||
enabled_platforms=quilt,fabric,neoforge
|
enabled_platforms=quilt,fabric,neoforge
|
||||||
|
|
||||||
archives_base_name=draggable_lists
|
archives_base_name=draggable_lists
|
||||||
mod_id=draggable_lists
|
mod_id=draggable_lists
|
||||||
mod_name=Draggable Lists
|
mod_name=Draggable Lists
|
||||||
mod_version=1.0.8
|
mod_version=1.0.9
|
||||||
mod_description=Draggable resource packs, datapacks, servers and worlds
|
mod_description=Draggable resource packs, datapacks, servers and worlds
|
||||||
maven_group=com.mrmelon54.DraggableLists
|
maven_group=com.mrmelon54.DraggableLists
|
||||||
|
|
||||||
architectury_version=12.1.3
|
architectury_version=14.0.4
|
||||||
|
|
||||||
fabric_loader_version=0.15.11
|
fabric_loader_version=0.16.9
|
||||||
fabric_api_version=0.100.4+1.20.6
|
fabric_api_version=0.107.3+1.21.3
|
||||||
|
|
||||||
neoforge_version=20.6.125
|
neoforge_version=21.3.65
|
||||||
|
|
||||||
quilt_loader_version=0.28.0-beta.7
|
quilt_loader_version=0.28.0-beta.7
|
||||||
quilt_qsl_version=9.0.0-alpha.1+1.20.6
|
quilt_qsl_version=9.0.0-alpha.1+1.20.6
|
||||||
quilt_fabric_api_version=10.0.0-alpha.3+0.100.4-1.20.6
|
quilt_fabric_api_version=10.0.0-alpha.3+0.100.4-1.20.6
|
||||||
|
|
||||||
cloth_config_version=14.0.126
|
cloth_config_version=16.0.141
|
||||||
modmenu_version=10.0.0
|
modmenu_version=12.0.0
|
||||||
Reference in new issue
Block a user