Skip to content

Commit

Permalink
Initial 1.19 Port (#87)
Browse files Browse the repository at this point in the history
* Initial 1.19 Port

* Tweak version to reference 1.19

This may not be perfectly in-line with SemVer, but it's close enough, and gets the point across.

Co-authored-by: mikenrafter <[email protected]>
  • Loading branch information
Nilinking and mikenrafter authored Jul 17, 2022
1 parent f52a234 commit aca6412
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.11-SNAPSHOT'
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
}

Expand Down
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
org.gradle.jvmargs=-Xmx4G
# Fabric Properties
# check this on https://fabricmc.net/versions.html
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.2
loader_version=0.13.3
minecraft_version=1.19
yarn_mappings=1.19+build.4
loader_version=0.14.8
# Mod Properties
mod_version=1.0.0-bc.9
mod_version=1.0.0-bc.19
maven_group=dev.thedocruby
archives_base_name=resounding
# Dependencies
# check this on https://fabricmc.net/versions.html
fabric_version=0.47.10+1.18.2
fabric_version=0.57.0+1.19
# https://www.curseforge.com/minecraft/mc-mods/cloth-config/files
cloth_config_version=6.2.57
cloth_config_version=7.0.72
# https://www.curseforge.com/minecraft/mc-mods/modmenu/files
mod_menu_version=3.1.0
mod_menu_version=4.0.3
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
10 changes: 5 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/dev/thedocruby/resounding/ResoundingEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@ public static void playSound(double posX, double posY, double posZ, int sourceID
final int top = mc.world.getTopY();
isRain = rainPattern.matcher(lastSoundName).matches();
soundPos = new Vec3d(posX, posY, posZ);
viewDist = mc.options.getViewDistance();
viewDist = mc.options.getClampedViewDistance();
double maxDist = Math.min(
Math.min(
Math.min(
mc.options.simulationDistance, viewDist),
mc.options.getSimulationDistance().getValue(), viewDist),
pC.soundSimulationDistance) * 16,
pC.maxTraceDist / 2);
soundChunk = mc.world.getChunk(((int)Math.floor(soundPos.x))>>4,((int)Math.floor(soundPos.z))>>4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
import me.shedaniel.clothconfig2.api.AbstractConfigListEntry;
import me.shedaniel.clothconfig2.gui.entries.MultiElementListEntry;
import me.shedaniel.clothconfig2.gui.entries.NestedListListEntry;
import net.minecraft.text.LiteralText;
import net.minecraft.text.TranslatableText;
import net.minecraft.text.LiteralTextContent;
import net.minecraft.text.Text;
import net.minecraft.text.TranslatableTextContent;
import org.jetbrains.annotations.NotNull;

import java.lang.reflect.ParameterizedType;
Expand All @@ -36,16 +37,16 @@ public static void register() {
Object defaultElemValue = Utils.constructUnsafely(fieldTypeParam);
String remainingI13n = i13n.substring(0, i13n.indexOf(".option") + ".option".length());
String classI13n = String.format("%s.%s", remainingI13n, fieldTypeParam.getSimpleName());
return Collections.singletonList(new NestedListListEntry(new TranslatableText(i13n), configValue, false, (Supplier)null, (abstractConfigListEntries) -> {
return Collections.singletonList(new NestedListListEntry(Text.translatable(i13n), configValue, false, (Supplier)null, (abstractConfigListEntries) -> {
}, () -> {
Map ll = (Map<Object, Object>) Utils.getUnsafely(field, defaults);
return ll == null ? List.of() : new ArrayList<>(ll.values());
}, new LiteralText(""), false, true, (elem, nestedListListEntry) -> {
}, Text.literal(""), false, true, (elem, nestedListListEntry) -> {
if (elem == null) {
Object newDefaultElemValue = Utils.constructUnsafely(fieldTypeParam);
return new MultiElementListEntry(new TranslatableText(classI13n), newDefaultElemValue, getChildren(classI13n, fieldTypeParam, newDefaultElemValue, defaultElemValue, registry1), true);
return new MultiElementListEntry(Text.translatable(classI13n), newDefaultElemValue, getChildren(classI13n, fieldTypeParam, newDefaultElemValue, defaultElemValue, registry1), true);
} else {
return new MultiElementListEntry(new TranslatableText(classI13n), elem, getChildren(classI13n, fieldTypeParam, elem, defaultElemValue, registry1), true);
return new MultiElementListEntry(Text.translatable(classI13n), elem, getChildren(classI13n, fieldTypeParam, elem, defaultElemValue, registry1), true);

}
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private void soundInfoYeeter(SoundInstance sound, CallbackInfo ci, WeightedSound
@Inject(method = "tick()V", at = @At(value = "HEAD"))
private void ticker(CallbackInfo ci){ AirEffects.updateSmoothedRain(); }

@ModifyArg(method = "getAdjustedVolume", at = @At(value = "INVOKE", target = "net/minecraft/util/math/MathHelper.clamp (FFF)F"), index = 0)
@ModifyArg(method = "getAdjustedVolume(FLnet/minecraft/sound/SoundCategory;)F", at = @At(value = "INVOKE", target = "net/minecraft/util/math/MathHelper.clamp (FFF)F"), index = 0)
private float volumeMultiplierInjector(float vol){ if (ResoundingEngine.isOff) return vol; return vol * PrecomputedConfig.globalVolumeMultiplier; }

@SuppressWarnings("InvalidInjectorMethodSignature")
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
],
"depends": {
"java": ">=17",
"cloth-config2": ">=6.2.57",
"fabricloader": ">=0.13.3",
"minecraft": "1.18.2"
"cloth-config2": ">=7.0.72",
"fabricloader": ">=0.14.6",
"minecraft": "1.19"
},
"suggests": {
"modmenu": ">=3.1.0"
"modmenu": ">=4.0.3"
},
"custom": {
"modmenu": {
Expand Down

0 comments on commit aca6412

Please sign in to comment.