Compare commits

...

3 Commits

Author SHA1 Message Date
BitHeaven f33ec41d0d Worked patch on 1.20.1 2024-09-29 13:48:50 +05:00
BitHeaven 74fd36eea9 Fix 2024-09-29 12:34:32 +05:00
BitHeaven 5655fcbd6b .gitignore is now working 2024-09-26 22:50:10 +05:00
4 changed files with 18 additions and 16 deletions

View File

@ -42,8 +42,8 @@ dependencies {
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
implementation group: 'org.yaml', name: 'snakeyaml', version: '2.3'
includedJars group: 'org.yaml', name: 'snakeyaml', version: '2.3'
implementation group: 'org.yaml', name: 'snakeyaml', version: '2.0'
includedJars group: 'org.yaml', name: 'snakeyaml', version: '2.0'
implementation group: 'org.json', name: 'json', version: '20240303'
includedJars group: 'org.json', name: 'json', version: '20240303'
}
@ -61,7 +61,7 @@ processResources {
}
}
def targetJavaVersion = 21
def targetJavaVersion = 17
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
@ -85,13 +85,15 @@ java {
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
}
from configurations.includedJars.collect {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from {
configurations.includedJars.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
// configure the maven publication
publishing {

View File

@ -2,13 +2,13 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.16.5
# Mod Properties
mod_version=1.0.0
mod_version=1.0.1
maven_group=ru.bitheaven
archives_base_name=donpayinteg
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.105.0+1.21.1
fabric_version=0.92.2+1.20.1

View File

@ -16,7 +16,7 @@ public class DonPayInteg implements ModInitializer {
public static final String MOD_ID = "donpayinteg";
public static final String NAME = "DonatePayIntegration";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
public static List<String> commands = new ArrayList<String>();
public static List<String> commands = new ArrayList<>();
@Override
public void onInitialize() {
@ -38,10 +38,10 @@ public class DonPayInteg implements ModInitializer {
}
}
if(i.getAndIncrement() % (20 * 2) == 0) {
if(j.getAndIncrement() % (20 * 2) == 0) {
if (!commands.isEmpty()) {
world.getCommandManager().executeWithPrefix(world.getCommandSource(), commands.getFirst());
commands.removeFirst();
world.getCommandManager().executeWithPrefix(world.getCommandSource(), commands.get(0));
commands.remove(0);
}
}
});

View File

@ -47,8 +47,8 @@ public class DonateThread extends Thread {
lastDonate = objects.getInt("id");
DonPayInteg.commands.addLast("title @a title \"" + msg.replace("{username}", objects.getJSONObject("vars").getString("name")) + "\"");
DonPayInteg.commands.addLast(cmd.replace("{username}", objects.getJSONObject("vars").getString("name")));
DonPayInteg.commands.add("title @a title \"" + msg.replace("{username}", objects.getJSONObject("vars").getString("name")) + "\"");
DonPayInteg.commands.add(cmd.replace("{username}", objects.getJSONObject("vars").getString("name")));
LOGGER.info("Exec donate #{}", lastDonate);
Config config = ConfigHandler.load();