mirror of
https://github.com/darksaid98/draggable_lists.git
synced 2026-12-01 14:38:47 +00:00
Update some stuff before 1.20.4
This commit is contained in:
14 files changed
+88
-76
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
id "architectury-plugin" version "3.4-SNAPSHOT"
|
||||
id "dev.architectury.loom" version "1.1-SNAPSHOT" apply false
|
||||
id "dev.architectury.loom" version "1.4-SNAPSHOT" apply false
|
||||
id "io.github.pacifistmc.forgix" version "1.2.6"
|
||||
id "org.ajoberstar.grgit" version "4.1.0"
|
||||
}
|
||||
|
||||
+6
-6
@@ -35,7 +35,7 @@ public abstract class MixinTransferableSelectionList extends ObjectSelectionList
|
||||
private double draggable_lists$softScrollingOrigin = 0;
|
||||
|
||||
public MixinTransferableSelectionList(Minecraft minecraft, int i, int j, int k, int l, int m) {
|
||||
super(minecraft, i, j, k, l, m);
|
||||
super(minecraft, i, j, k, l);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -97,7 +97,7 @@ public abstract class MixinTransferableSelectionList extends ObjectSelectionList
|
||||
|
||||
@Unique
|
||||
boolean draggable_lists$updateDragEvent(double mouseX, double mouseY) {
|
||||
if (mouseX < x0) {
|
||||
if (mouseX < getX()) {
|
||||
draggable_lists$draggingStartX = mouseX;
|
||||
}
|
||||
double y = draggable_lists$capYCoordinate((int) mouseY, true);
|
||||
@@ -122,7 +122,7 @@ public abstract class MixinTransferableSelectionList extends ObjectSelectionList
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float delta) {
|
||||
public void renderWidget(GuiGraphics guiGraphics, int mouseX, int mouseY, float delta) {
|
||||
super.render(guiGraphics, mouseX, mouseY, delta);
|
||||
|
||||
if (this.draggable_lists$draggingObject instanceof ResourcePackEntryDuckProvider duckProvider) {
|
||||
@@ -157,8 +157,8 @@ public abstract class MixinTransferableSelectionList extends ObjectSelectionList
|
||||
|
||||
@Unique
|
||||
int draggable_lists$capYCoordinate(int y, boolean useScreenSpace) {
|
||||
int scrollableTop = y0 + (useScreenSpace ? 0 : (int) Math.max(headerHeight - getScrollAmount() + 2, 0)) + 2;
|
||||
int scrollableHeight = y1 - y0 - (useScreenSpace ? 0 : itemHeight + (int) Math.max(headerHeight - getScrollAmount() + 2, 0));
|
||||
int scrollableTop = getY() + (useScreenSpace ? 0 : (int) Math.max(headerHeight - getScrollAmount() + 2, 0)) + 2;
|
||||
int scrollableHeight = getBottom() - getY() - (useScreenSpace ? 0 : itemHeight + (int) Math.max(headerHeight - getScrollAmount() + 2, 0));
|
||||
if (y < scrollableTop) y = scrollableTop;
|
||||
if (y > scrollableTop + scrollableHeight) y = scrollableTop + scrollableHeight;
|
||||
return y;
|
||||
@@ -176,7 +176,7 @@ public abstract class MixinTransferableSelectionList extends ObjectSelectionList
|
||||
|
||||
@Unique
|
||||
boolean draggable_lists$dragResourcePack(ResourcePackEntryDuckProvider underlyingPackProvider, double mouseY) {
|
||||
int m = Mth.floor(mouseY - (double) y0) - this.headerHeight + (int) this.getScrollAmount() - 4;
|
||||
int m = Mth.floor(mouseY - (double) getY()) - this.headerHeight + (int) this.getScrollAmount() - 4;
|
||||
int n = m / this.itemHeight;
|
||||
|
||||
PackSelectionModel.Entry pack = underlyingPackProvider.draggable_lists$getUnderlyingPack();
|
||||
|
||||
+6
-6
@@ -53,7 +53,7 @@ public abstract class MixinServerSelectionList extends ObjectSelectionList<Serve
|
||||
private double draggable_lists$softScrollingOrigin = 0;
|
||||
|
||||
public MixinServerSelectionList(Minecraft minecraftClient, int i, int j, int k, int l, int m) {
|
||||
super(minecraftClient, i, j, k, l, m);
|
||||
super(minecraftClient, i, j, k, l);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -138,8 +138,8 @@ public abstract class MixinServerSelectionList extends ObjectSelectionList<Serve
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float delta) {
|
||||
super.render(guiGraphics, mouseX, mouseY, delta);
|
||||
public void renderWidget(GuiGraphics guiGraphics, int mouseX, int mouseY, float delta) {
|
||||
super.renderWidget(guiGraphics, mouseX, mouseY, delta);
|
||||
|
||||
if (this.draggable_lists$draggingObject instanceof ServerEntryDuckProvider duckProvider) {
|
||||
int z = Mth.floor(mouseY + draggable_lists$draggingOffsetY);
|
||||
@@ -173,8 +173,8 @@ public abstract class MixinServerSelectionList extends ObjectSelectionList<Serve
|
||||
|
||||
@Unique
|
||||
int draggable_lists$capYCoordinate(int y, boolean useScreenSpace) {
|
||||
int scrollableTop = y0 + 4;
|
||||
int scrollableHeight = y1 - y0 - (useScreenSpace ? 2 : itemHeight + 2);
|
||||
int scrollableTop = y + 4;
|
||||
int scrollableHeight = getBottom() - getY() - (useScreenSpace ? 2 : itemHeight + 2);
|
||||
if (y < scrollableTop) y = scrollableTop;
|
||||
if (y > scrollableTop + scrollableHeight) y = scrollableTop + scrollableHeight;
|
||||
return y;
|
||||
@@ -196,7 +196,7 @@ public abstract class MixinServerSelectionList extends ObjectSelectionList<Serve
|
||||
int i = multiplayerScreenDuckProvider.draggable_lists$getIndexOfServerInfo(underlyingServerProvider.draggable_lists$getUnderlyingServer());
|
||||
if (i == -1) return false;
|
||||
|
||||
int m = Mth.floor(mouseY - (double) this.y0) - this.headerHeight + (int) this.getScrollAmount() - 4;
|
||||
int m = Mth.floor(mouseY - (double) this.getY()) - this.headerHeight + (int) this.getScrollAmount() - 4;
|
||||
int n = m / this.itemHeight;
|
||||
|
||||
if (n >= 0 && n < onlineServers.size()) {
|
||||
|
||||
@@ -19,5 +19,5 @@ dependencies {
|
||||
exclude(group: "net.fabricmc.fabric-api")
|
||||
}
|
||||
|
||||
compileClasspath(project(path: ":common", configuration: "namedElements")) { transitive false }
|
||||
compileOnly(project(path: ":common", configuration: "namedElements")) { transitive false }
|
||||
}
|
||||
+8
-4
@@ -42,7 +42,11 @@ processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand "version": project.version
|
||||
expand "version": project.version,
|
||||
"description": rootProject.mod_description,
|
||||
"minecraft_version": rootProject.minecraft_version,
|
||||
"architectury_version": rootProject.architectury_version,
|
||||
"cloth_config_version": rootProject.cloth_config_version
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,18 +54,18 @@ shadowJar {
|
||||
exclude "architectury.common.json"
|
||||
|
||||
configurations = [project.configurations.shadowCommon]
|
||||
classifier "dev-shadow"
|
||||
archiveClassifier.set "dev-shadow"
|
||||
}
|
||||
|
||||
remapJar {
|
||||
injectAccessWidener = true
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
classifier null
|
||||
archiveClassifier.set null
|
||||
}
|
||||
|
||||
jar {
|
||||
classifier "dev"
|
||||
archiveClassifier.set "dev-shadow"
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
"id": "draggable_lists",
|
||||
"version": "${version}",
|
||||
"name": "Draggable Lists",
|
||||
"description": "Draggable resource packs, datapacks and servers",
|
||||
"description": "${description}",
|
||||
"authors": [
|
||||
"MrMelon54"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://mrmelon54.com/minecraft/draggable-lists",
|
||||
"sources": "https://github.com/MrMelon54/draggable_lists",
|
||||
"issues": "https://github.com/MrMelon54/draggable_lists/issues"
|
||||
"sources": "https://github.com/mrmelon54/draggable_lists",
|
||||
"issues": "https://github.com/mrmelon54/draggable_lists/issues"
|
||||
},
|
||||
"license": "GPL-3.0-only",
|
||||
"icon": "icon.png",
|
||||
@@ -29,7 +29,8 @@
|
||||
],
|
||||
"depends": {
|
||||
"fabric": "*",
|
||||
"minecraft": "1.20.x",
|
||||
"architectury": ">=9.0.0"
|
||||
"minecraft": "${minecraft_version}",
|
||||
"architectury": ">=${architectury_version}",
|
||||
"cloth-config": ">=${cloth_config_version}"
|
||||
}
|
||||
}
|
||||
+19
-19
@@ -2,21 +2,17 @@ plugins {
|
||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url "https://maven.neoforged.net/releases" }
|
||||
}
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
forge()
|
||||
neoForge()
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = project(":common").loom.accessWidenerPath
|
||||
|
||||
forge {
|
||||
convertAccessWideners = true
|
||||
extraAccessWideners.add loom.accessWidenerPath.get().asFile.name
|
||||
|
||||
mixinConfig "draggable_lists-common.mixins.json"
|
||||
mixinConfig "draggable_lists.mixins.json"
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
@@ -24,25 +20,29 @@ configurations {
|
||||
shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files.
|
||||
compileClasspath.extendsFrom common
|
||||
runtimeClasspath.extendsFrom common
|
||||
developmentForge.extendsFrom common
|
||||
developmentNeoForge.extendsFrom common
|
||||
}
|
||||
|
||||
dependencies {
|
||||
forge "net.minecraftforge:forge:${rootProject.forge_version}"
|
||||
neoForge "net.neoforged:neoforge:${rootProject.forge_version}"
|
||||
// Remove the next line if you don't want to depend on the API
|
||||
modApi "dev.architectury:architectury-forge:${rootProject.architectury_version}"
|
||||
modApi "dev.architectury:architectury-neoforge:${rootProject.architectury_version}"
|
||||
|
||||
modApi "me.shedaniel.cloth:cloth-config-forge:${rootProject.cloth_config_version}"
|
||||
modApi "me.shedaniel.cloth:cloth-config-neoforge:${rootProject.cloth_config_version}"
|
||||
|
||||
common(project(path: ":common", configuration: "namedElements")) { transitive false }
|
||||
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false }
|
||||
shadowCommon(project(path: ":common", configuration: "transformProductionNeoForge")) { transitive = false }
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
filesMatching("META-INF/mods.toml") {
|
||||
expand "version": project.version
|
||||
expand "version": project.version,
|
||||
"description": rootProject.mod_description,
|
||||
"minecraft_version": rootProject.minecraft_version,
|
||||
"architectury_version": rootProject.architectury_version,
|
||||
"cloth_config_version": rootProject.cloth_config_version
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,17 +51,17 @@ shadowJar {
|
||||
exclude "architectury.common.json"
|
||||
|
||||
configurations = [project.configurations.shadowCommon]
|
||||
classifier "dev-shadow"
|
||||
archiveClassifier.set "dev-shadow"
|
||||
}
|
||||
|
||||
remapJar {
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
classifier null
|
||||
archiveClassifier.set null
|
||||
}
|
||||
|
||||
jar {
|
||||
classifier "dev"
|
||||
archiveClassifier.set "dev-shadow"
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
@@ -78,7 +78,7 @@ components.java {
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenForge(MavenPublication) {
|
||||
mavenNeoForge(MavenPublication) {
|
||||
artifactId = rootProject.archives_base_name + "-" + project.name
|
||||
from components.java
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
loom.platform=forge
|
||||
loom.platform=neoforge
|
||||
@@ -1,5 +1,5 @@
|
||||
modLoader = "javafml"
|
||||
loaderVersion = "[46,)"
|
||||
loaderVersion = "*"
|
||||
issueTrackerURL = "https://github.com/MrMelon54/draggable_lists/issues"
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
@@ -8,26 +8,26 @@ modId = "draggable_lists"
|
||||
version = "${version}"
|
||||
displayName = "Draggable Lists"
|
||||
authors = "MrMelon54"
|
||||
description = "Draggable resource packs, datapacks and servers"
|
||||
description = "${description}"
|
||||
logoFile = "/icon.png"
|
||||
|
||||
[[dependencies.draggable_lists]]
|
||||
modId = "forge"
|
||||
mandatory = true
|
||||
versionRange = "[46,)"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
||||
[[dependencies.draggable_lists]]
|
||||
modId = "minecraft"
|
||||
mandatory = true
|
||||
versionRange = "[1.20,)"
|
||||
versionRange = "[${minecraft_version},)"
|
||||
ordering = "NONE"
|
||||
side = "BOTH"
|
||||
|
||||
[[dependencies.draggable_lists]]
|
||||
modId = "architectury"
|
||||
mandatory = true
|
||||
versionRange = "[9.0.0,)"
|
||||
versionRange = "[${architectury_version},)"
|
||||
ordering = "AFTER"
|
||||
side = "BOTH"
|
||||
|
||||
[[dependencies.draggable_lists]]
|
||||
modId = "cloth_config"
|
||||
mandatory = true
|
||||
versionRange = "[${cloth_config_version},)"
|
||||
ordering = "AFTER"
|
||||
side = "BOTH"
|
||||
+11
-11
@@ -1,24 +1,24 @@
|
||||
org.gradle.jvmargs=-Xmx4096M
|
||||
|
||||
minecraft_version=1.20.2
|
||||
enabled_platforms=quilt,fabric,forge
|
||||
minecraft_version=1.20.4
|
||||
enabled_platforms=quilt,fabric,neoforge
|
||||
|
||||
archives_base_name=draggable_lists
|
||||
mod_id=draggable_lists
|
||||
mod_name=Draggable Lists
|
||||
mod_version=1.0.2
|
||||
mod_description="Draggable resource packs, datapacks, servers and worlds"
|
||||
mod_description=Draggable resource packs, datapacks, servers and worlds
|
||||
maven_group=com.mrmelon54.DraggableLists
|
||||
|
||||
architectury_version=10.0.8
|
||||
architectury_version=11.0.9
|
||||
|
||||
fabric_loader_version=0.14.22
|
||||
fabric_api_version=0.89.3+1.20.2
|
||||
fabric_loader_version=0.15.3
|
||||
fabric_api_version=0.93.1+1.20.4
|
||||
|
||||
forge_version=1.20.2-48.0.13
|
||||
forge_version=20.4.93-beta
|
||||
|
||||
quilt_loader_version=0.21.0
|
||||
quilt_fabric_api_version=7.0.0+0.83.0-1.20
|
||||
quilt_loader_version=0.22.0
|
||||
quilt_fabric_api_version=7.4.0+0.90.0-1.20.1
|
||||
|
||||
cloth_config_version=12.0.109
|
||||
modmenu_version=8.0.0
|
||||
cloth_config_version=13.0.121
|
||||
modmenu_version=9.0.0
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
+8
-5
@@ -53,8 +53,11 @@ processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
filesMatching("quilt.mod.json") {
|
||||
expand "group": rootProject.maven_group,
|
||||
"version": project.version
|
||||
expand "version": project.version,
|
||||
"description": rootProject.mod_description,
|
||||
"minecraft_version": rootProject.minecraft_version,
|
||||
"architectury_version": rootProject.architectury_version,
|
||||
"cloth_config_version": rootProject.cloth_config_version
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,18 +65,18 @@ shadowJar {
|
||||
exclude "architectury.common.json"
|
||||
|
||||
configurations = [project.configurations.shadowCommon]
|
||||
classifier "dev-shadow"
|
||||
archiveClassifier.set "dev-shadow"
|
||||
}
|
||||
|
||||
remapJar {
|
||||
injectAccessWidener = true
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
classifier null
|
||||
archiveClassifier.set null
|
||||
}
|
||||
|
||||
jar {
|
||||
classifier "dev"
|
||||
archiveClassifier.set "dev-shadow"
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
"draggable_lists-common.mixins.json"
|
||||
],
|
||||
"quilt_loader": {
|
||||
"group": "${group}",
|
||||
"group": "com.mrmelon54.DraggableLists",
|
||||
"id": "draggable_lists",
|
||||
"version": "${version}",
|
||||
"metadata": {
|
||||
"name": "Draggable Lists",
|
||||
"description": "Draggable resource packs, datapacks and servers",
|
||||
"description": "${description}",
|
||||
"contributors": {
|
||||
"MrMelon54": "Owner"
|
||||
},
|
||||
@@ -42,11 +42,15 @@
|
||||
},
|
||||
{
|
||||
"id": "minecraft",
|
||||
"version": "1.20.x"
|
||||
"version": "${minecraft_version}"
|
||||
},
|
||||
{
|
||||
"id": "architectury",
|
||||
"version": ">=9.0.0"
|
||||
"version": ">=${architectury_version}"
|
||||
},
|
||||
{
|
||||
"id": "cloth-config",
|
||||
"version": ">=${cloth_config_version"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ pluginManagement {
|
||||
repositories {
|
||||
maven { url "https://maven.fabricmc.net/" }
|
||||
maven { url "https://maven.architectury.dev/" }
|
||||
maven { url "https://maven.minecraftforge.net/" }
|
||||
maven { url "https://maven.neoforged.net/releases" }
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user