Skip to content

Commit

Permalink
WIP - Port to 1.20.5
Browse files Browse the repository at this point in the history
  • Loading branch information
PepperCode1 committed May 15, 2024
1 parent 663cb47 commit 4199527
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
java-version: 21
check-latest: true
- name: Build artifacts
run: ./gradlew build --stacktrace
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ processResources {
}

tasks.withType(JavaCompile).configureEach {
it.options.release = 17
it.options.release = 21
}

java {
Expand All @@ -71,8 +71,8 @@ java {
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

jar {
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ org.gradle.parallel = true

# Fabric Properties
loom_version = 1.6.11
minecraft_version = 1.20.2
yarn_mappings = 1.20.2+build.4
minecraft_version = 1.20.5
yarn_mappings = 1.20.5+build.1
loader_version = 0.15.10

# Mod Properties
mod_version = 3.0.0-beta.5
mod_minecraft_version = 1.20.2
mod_minecraft_version = 1.20.5
maven_group = me.pepperbell
archives_base_name = continuity

# Dependencies
fabric_version = 0.89.0+1.20.2
modmenu_version = 8.0.1
fabric_version = 0.97.6+1.20.5
modmenu_version = 10.0.0-beta.1
canvas_version = 20.2.2627
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class BaseCtmProperties implements CtmProperties {
public BaseCtmProperties(Properties properties, Identifier resourceId, ResourcePack pack, int packPriority, ResourceManager resourceManager, String method) {
this.properties = properties;
this.resourceId = resourceId;
this.packName = pack.getName();
this.packName = pack.getId();
this.packPriority = packPriority;
this.resourceManager = resourceManager;
this.method = method;
Expand Down Expand Up @@ -605,7 +605,7 @@ protected void parseResourceCondition() {
}
} else if (packStr.equals("programmer_art")) {
Optional<Resource> optionalResource = resourceManager.getResource(resourceId);
if (optionalResource.isPresent() && !optionalResource.get().getPack().getName().equals("programmer_art")) {
if (optionalResource.isPresent() && !optionalResource.get().getPack().getId().equals("programmer_art")) {
valid = false;
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import org.apache.commons.io.FilenameUtils;
import org.jetbrains.annotations.Nullable;

import com.google.common.collect.ImmutableMap;

import it.unimi.dsi.fastutil.Hash;
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;
Expand Down Expand Up @@ -242,7 +240,7 @@ public static Predicate<BlockState> parseBlockStates(Properties properties, Stri
}

predicateMap.put(block, state -> {
ImmutableMap<Property<?>, Comparable<?>> targetValueMap = state.getEntries();
Map<Property<?>, Comparable<?>> targetValueMap = state.getEntries();
for (Map.Entry<Property<?>, ObjectOpenHashSet<Comparable<?>>> entry : entryArray) {
Comparable<?> targetValue = targetValueMap.get(entry.getKey());
if (targetValue != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private void loadAll(ResourcePack pack, int packPriority) {
properties.load(stream);
load(properties, resourceId, pack, packPriority);
} catch (Exception e) {
ContinuityClient.LOGGER.error("Failed to load CTM properties from file '" + resourceId + "' in pack '" + pack.getName() + "'", e);
ContinuityClient.LOGGER.error("Failed to load CTM properties from file '" + resourceId + "' in pack '" + pack.getId() + "'", e);
}
}
});
Expand All @@ -94,7 +94,7 @@ private void load(Properties properties, Identifier resourceId, ResourcePack pac
if (loader != null) {
load(loader, properties, resourceId, pack, packPriority, method);
} else {
ContinuityClient.LOGGER.error("Unknown 'method' value '" + method + "' in file '" + resourceId + "' in pack '" + pack.getName() + "'");
ContinuityClient.LOGGER.error("Unknown 'method' value '" + method + "' in file '" + resourceId + "' in pack '" + pack.getId() + "'");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ private static void reload(ResourceManager manager) {
try (InputStream inputStream = resource.getInputStream()) {
Properties properties = new Properties();
properties.load(inputStream);
reload(properties, LOCATION, resource.getResourcePackName());
reload(properties, LOCATION, resource.getPackId());
} catch (IOException e) {
ContinuityClient.LOGGER.error("Failed to load custom block layers from file '" + LOCATION + "' from pack '" + resource.getResourcePackName() + "'", e);
ContinuityClient.LOGGER.error("Failed to load custom block layers from file '" + LOCATION + "' from pack '" + resource.getPackId() + "'", e);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/continuity.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "me.pepperbell.continuity.client.mixin",
"compatibilityLevel": "JAVA_17",
"compatibilityLevel": "JAVA_21",
"client": [
"AtlasLoaderMixin",
"BakedModelManagerMixin",
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
],

"depends": {
"minecraft": ">=1.20.2 <=1.20.4",
"minecraft": ">=1.20.5",
"fabricloader": ">=0.15.0",
"fabric-api": ">=0.89.0"
"fabric-api": ">=0.97.6"
},

"custom": {
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/resourcepacks/default/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"pack": {
"pack_format": 18,
"supported_formats": [18, 22],
"pack_format": 32,
"supported_formats": [32, 999],
"description": {
"translate": "resourcePack.continuity.default.description"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"pack": {
"pack_format": 18,
"supported_formats": [18, 22],
"pack_format": 32,
"supported_formats": [32, 999],
"description": {
"translate": "resourcePack.continuity.glass_pane_culling_fix.description"
}
Expand Down

0 comments on commit 4199527

Please sign in to comment.