Skip to content

Commit

Permalink
feat: update to 1.20.1 (polydex support missing)
Browse files Browse the repository at this point in the history
  • Loading branch information
CamperSamu committed Dec 25, 2023
1 parent c5e048b commit dc5a165
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 35 deletions.
26 changes: 17 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

plugins {
id 'fabric-loom' version '1.0.+'
id 'fabric-loom' version '1.4-SNAPSHOT'
id 'maven-publish'
}

Expand All @@ -32,6 +32,13 @@ repositories {
}
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url 'https://jitpack.io' }
maven {
name 'Quilt'
url 'https://maven.quiltmc.org/repository/release'
content {
includeGroupByRegex("org\\.quiltmc.*")
}
}
mavenLocal()
}

Expand All @@ -43,21 +50,22 @@ dependencies {

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation "com.github.TheEpicBlock:PolyMc:${project.polymc_version}"
// modImplementation include("com.github.TheEpicBlock:resource-locator-api:${project.poly_res_version}")
modImplementation ("com.github.TheEpicBlock:PolyMc:${project.polymc_version}"){
transitive(false)
}
modImplementation include("nl.theepicblock:resource-locator-api:${project.resource_locator_api_version}") {
exclude group: 'net.fabricmc', module: 'fabric-loader'
}
modImplementation "maven.modrinth:alloy-forgery:${project.alloy_forgery_version}"
modImplementation "maven.modrinth:owo-lib:${project.owo_version}"
modImplementation "maven.modrinth:polydex:${project.polydex_version}"
modImplementation "eu.pb4:polydex:${project.polydex_version}"
modImplementation "eu.pb4:sgui:${project.sgui_version}"
modRuntimeOnly "eu.pb4:player-data-api:${project.player_data_version}"
modRuntimeOnly "xyz.nucleoid:more-codecs:${project.codecs_version}"
modRuntimeOnly "eu.pb4:sidebar-api:${project.sidebar_version}"
modRuntimeOnly 'me.lucko:fabric-permissions-api:0.1-SNAPSHOT'
modRuntimeOnly "fr.catcore:server-translations-api:${project.translations_version}"
modRuntimeOnly "xyz.nucleoid:server-translations-api:${project.translations_version}"

// Resoucepack host testing
modRuntimeOnly "eu.pb4:polymer:${project.polymer}"
modRuntimeOnly "eu.pb4:polymer-autohost:${project.polymer_host}"
modRuntimeOnly "eu.pb4:polymer-resource-pack:${project.polymer}"
}

processResources {
Expand Down
32 changes: 15 additions & 17 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,24 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.19
yarn_mappings=1.19+build.4
loader_version=0.14.7
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.9
loader_version=0.15.3

# Mod Properties
mod_version = 2.0.0
mod_version = 2.0.1
maven_group = com.campersamu
archives_base_name = poly-forgery

# Dependencies
fabric_version=0.55.3+1.19
polymc_version=5.2.0
#poly_res_version=0.3.2
alloy_forgery_version=2.0.16+1.19
polydex_version=0.1.8+1.19
sgui_version=1.1.3+1.19
owo_version=0.9.3+1.19
player_data_version=0.2.1+1.19
codecs_version=0.2.2+1.18
sidebar_version=0.1.1+1.19
translations_version=1.4.16+1.19
polymer=0.2.10+1.19
polymer_host=0.1.2+1.19
fabric_version=0.91.0+1.20.1
polymc_version=5.4.0
resource_locator_api_version=0.5.0+1.20.1
alloy_forgery_version=2.1.2+1.20
polydex_version=1.0.0-beta.2.2+1.20.1
sgui_version=1.2.2+1.20
owo_version=0.11.1+1.20
player_data_version=0.2.2+1.19.3
codecs_version=0.3.2+1.20
translations_version=2.0.0+1.20
polymer=0.5.19+1.20.1
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.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions src/main/java/com/campersamu/polyforgery/Init.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public void registerPolys(PolyRegistry registry) {

@Override
public void onInitialize() {
if (getInstance().isModLoaded("polydex")){
/*if (getInstance().isModLoaded("polydex")){
LOGGER.info("Polydex found! PolyForgery is going to add the recipe screen to the reicpe viewer!");
AlloyForgeryRecipeView.init();
}
}*/
}

public static Identifier id(String path) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package com.campersamu.polyforgery.compat.polydex;


import eu.pb4.polydex.api.ItemEntry;
import eu.pb4.polydex.api.ItemPageView;
import eu.pb4.polydex.api.PolydexUtils;
import eu.pb4.sgui.api.elements.GuiElement;
import eu.pb4.sgui.api.elements.GuiElementBuilder;
import eu.pb4.sgui.api.gui.layered.Layer;
Expand All @@ -15,13 +12,14 @@
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import net.minecraft.util.collection.DefaultedList;
import org.jetbrains.annotations.Nullable;
import wraith.alloyforgery.recipe.AlloyForgeRecipe;

import java.util.List;

public class AlloyForgeryRecipeView implements ItemPageView<AlloyForgeRecipe> {
public class AlloyForgeryRecipeView /*implements AbstractRecipePolydexPage<AlloyForgeRecipe>*/ {

@Override
/*@Override
public GuiElement getIcon(ItemEntry itemEntry, AlloyForgeRecipe recipe, ServerPlayerEntity serverPlayerEntity, Runnable runnable) {
return new GuiElementBuilder(Items.BRICKS)
.setName(Text.translatable("container.alloy_forgery.rei.title"))
Expand Down Expand Up @@ -52,4 +50,20 @@ public void renderLayer(ItemEntry itemEntry, AlloyForgeRecipe recipe, ServerPlay
public static void init(){
ItemPageView.registerRecipe(AlloyForgeRecipe.Type.INSTANCE, new AlloyForgeryRecipeView());
}
@Override
public ItemStack typeIcon(ServerPlayerEntity player) {
return new GuiElementBuilder(Items.BRICKS)
.setName(Text.translatable("container.alloy_forgery.rei.title"))
.setLore(List.of(
Text.translatable("container.alloy_forgery.rei.min_tier", recipe.getMinForgeTier()).setStyle(Style.EMPTY.withColor(Formatting.GRAY)),
Text.translatable("container.alloy_forgery.rei.fuel_per_tick", recipe.getFuelPerTick()).setStyle(Style.EMPTY.withColor(Formatting.GRAY))
))
.build();
}
@Override
public void createPage(@Nullable PolydexEntry entry, ServerPlayerEntity player, PageBuilder layer) {
}*/
}
Binary file modified src/main/resources/assets/polyforgery/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"depends": {
"fabricloader": "*",
"fabric": "*",
"minecraft": "1.19.x",
"minecraft": "1.20.x",
"polymc": ">=5.0.0",
"alloy_forgery": ">=2.0.14+1.19",
"java": ">=17"
Expand Down

0 comments on commit dc5a165

Please sign in to comment.