Skip to content

Commit

Permalink
feat: updated to 1.19.4 (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
GoryMoon authored Jun 11, 2023
1 parent 38fabe9 commit b9d48d7
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 35 deletions.
7 changes: 2 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ repositories {
maven { // curios
url "https://maven.theillusivec4.top/"
}
maven { // TOP
url "https://maven.k-4u.nl"
}
maven { // Registrate
url "https://maven.tterrag.com/"
}
Expand All @@ -153,9 +150,9 @@ dependencies {
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:${curios_version}:api")

implementation fg.deobf("com.tterrag.registrate:Registrate:${registrate_version}")
jarJar(group: 'com.tterrag.registrate', name: 'Registrate', version: "[MC1.19.3,MC1.19.4)")
jarJar(group: 'com.tterrag.registrate', name: 'Registrate', version: "[MC1.19.4,MC1.20)")

runtimeOnly fg.deobf("blusunrize.immersiveengineering:ImmersiveEngineering:1.19.3-9.3.0-163")
runtimeOnly fg.deobf("blusunrize.immersiveengineering:ImmersiveEngineering:1.19.4-9.4.0-166.4")
}

reobf {
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=5.1.0
forge_version=44.1.23
mod_version=5.2.0
forge_version=45.1.0
mappings_channel=parchment
mappings_version=2023.03.12-1.19.3
mc_version=1.19.3
mappings_version=1.19.3-2023.03.12-1.19.4
mc_version=1.19.4

curios_version=1.19.3-5.1.4.1
registrate_version=MC1.19.3-1.1.13
curios_version=1.19.4-5.1.5.3
registrate_version=MC1.19.4-1.2.16
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.19.3 2023-06-09T17:42:13.510444 Registrate Provider for chargers [Recipes, Advancements, Loot Tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
// 1.19.4 2023-06-11T17:09:46.554898 Registrate Provider for chargers [Recipes, Advancements, Loot Tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
3792e9381196c8ffa0a6965a2a05d389f60b5c95 assets/chargers/blockstates/charger_t1.json
25bdc385d9e5cf3dbb17b546a5af3659ba985819 assets/chargers/blockstates/charger_t2.json
d212b963fcdf9ae026f36c24bf90c47eb118a9f5 assets/chargers/blockstates/charger_t3.json
Expand Down Expand Up @@ -27,11 +27,11 @@ ba7eb40f73150996c0d5e249ebb54e731190264f data/chargers/advancements/recipes/reds
ee7c503354f487c9778b3a8c565b692256ca12e2 data/chargers/loot_tables/blocks/charger_t3.json
424db1e82db349deec7e65867a997d106da95928 data/chargers/loot_tables/blocks/charger_t4.json
69ae7b8c26192afe1712c0d985abc21ae0977723 data/chargers/loot_tables/blocks/wireless_charger.json
9c37329caf4b7b73cbc8b2a4964fc811917ecd87 data/chargers/recipes/charger_t1.json
de48e5641df6cf6f424587396cd244e3b54b68ae data/chargers/recipes/charger_t2.json
ec7b00ed448cd303598794269734eaca3f6ea962 data/chargers/recipes/charger_t3.json
817f1456c8ebd3258deb0812a099838cf3fdab92 data/chargers/recipes/charger_t4.json
5ccbbfc2d6712702ecf1f25e0a4c89adadcb3e41 data/chargers/recipes/wireless_charger.json
099d104d6c3e2a0984f62e863e632562615455f2 data/chargers/recipes/charger_t1.json
19c28cb03513db6835c9bb037dd9ffaf5f853c32 data/chargers/recipes/charger_t2.json
d496b5cd2857e3454712e00350a955d5a3f7a2b4 data/chargers/recipes/charger_t3.json
323b7848ed1635dbc4412048dc27a829c2f33ce2 data/chargers/recipes/charger_t4.json
872e0ee42c60419233ccce24b8e907215c940520 data/chargers/recipes/wireless_charger.json
997b4bab35a589848045d13a64c15f0b6fa5e989 data/minecraft/tags/blocks/mineable/pickaxe.json
d785139912c3e3bbe12e1c40f4009c0ccf279a19 data/minecraft/tags/blocks/needs_diamond_tool.json
2832bc540df3fe30f4f5fca04a116987d8f869e1 data/minecraft/tags/blocks/needs_iron_tool.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
],
"result": {
"item": "chargers:charger_t1"
}
},
"show_notification": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
],
"result": {
"item": "chargers:charger_t2"
}
},
"show_notification": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
],
"result": {
"item": "chargers:charger_t3"
}
},
"show_notification": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
],
"result": {
"item": "chargers:charger_t4"
}
},
"show_notification": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
],
"result": {
"item": "chargers:wireless_charger"
}
},
"show_notification": true
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package se.gory_moon.chargers.crafting;

import net.minecraft.core.NonNullList;
import net.minecraft.core.RegistryAccess;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.inventory.CraftingContainer;
import net.minecraft.world.item.ItemStack;
Expand All @@ -25,8 +26,8 @@ public UpgradeChargerRecipe(ResourceLocation id, String group, CraftingBookCateg
}

@Override
public @NotNull ItemStack assemble(@NotNull CraftingContainer inv) {
var out = getResultItem().copy();
public @NotNull ItemStack assemble(@NotNull CraftingContainer inv, @NotNull RegistryAccess access) {
var out = getResultItem(access).copy();

if (out.getItem() instanceof ChargerBlockItem) {
AtomicInteger energy = new AtomicInteger();
Expand All @@ -42,10 +43,10 @@ public UpgradeChargerRecipe(ResourceLocation id, String group, CraftingBookCateg
});
return out;
}
return super.assemble(inv);
return super.assemble(inv, access);
}

public ShapedRecipe toVanilla() {
return new ShapedRecipe(getId(), getGroup(), category(), getWidth(), getHeight(), getIngredients(), getResultItem());
return new ShapedRecipe(getId(), getGroup(), category(), getWidth(), getHeight(), getIngredients(), getResultItem(null));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ public class UpgradeChargerRecipeSerializer implements RecipeSerializer<UpgradeC
@Override
public @NotNull UpgradeChargerRecipe fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject json) {
ShapedRecipe basic = RecipeSerializer.SHAPED_RECIPE.fromJson(recipeId, json);
return new UpgradeChargerRecipe(basic.getId(), basic.getGroup(), basic.category(), basic.getWidth(), basic.getHeight(), basic.getIngredients(), basic.getResultItem());
return new UpgradeChargerRecipe(basic.getId(), basic.getGroup(), basic.category(), basic.getWidth(), basic.getHeight(), basic.getIngredients(), basic.getResultItem(null));
}

@Override
public @Nullable UpgradeChargerRecipe fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyByteBuf buffer) {
ShapedRecipe basic = RecipeSerializer.SHAPED_RECIPE.fromNetwork(recipeId, buffer);
return basic != null ? new UpgradeChargerRecipe(basic.getId(), basic.getGroup(), basic.category(), basic.getWidth(), basic.getHeight(), basic.getIngredients(), basic.getResultItem()) : null;
return basic != null ? new UpgradeChargerRecipe(basic.getId(), basic.getGroup(), basic.category(), basic.getWidth(), basic.getHeight(), basic.getIngredients(), basic.getResultItem(null)) : null;
}

@Override
Expand Down
9 changes: 5 additions & 4 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
modLoader="javafml"
loaderVersion="[44,)"
loaderVersion="[45,)"
license="LGPL v3"
issueTrackerURL="https://github.com/GoryMoon/Chargers/issues"

Expand All @@ -9,26 +9,27 @@ issueTrackerURL="https://github.com/GoryMoon/Chargers/issues"
displayName="Chargers"
displayURL="https://www.curseforge.com/minecraft/mc-mods/chargers"
authors="Gory_Moon"
itemIcon="chargers:charger_t1"
description='''
A mod that adds item charger blocks in tiers and a wireless one'''

[[dependencies.chargers]]
modId="forge"
mandatory=true
versionRange="[44,)"
versionRange="[45,)"
ordering="NONE"
side="BOTH"

[[dependencies.chargers]]
modId="curios"
mandatory=false
versionRange="[1.19.3-5.1.2.0,)"
versionRange="[1.19.4-5.1.5.3,)"
ordering="BEFORE"
side="BOTH"

[[dependencies.chargers]]
modId="minecraft"
mandatory=true
versionRange="[1.19.3,1.19.4)"
versionRange="[1.19.4,1.20)"
ordering="NONE"
side="BOTH"
5 changes: 2 additions & 3 deletions src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"pack": {
"description": "Chargers resources",
"pack_format": 12,
"forge:resource_pack_format": 12,
"forge:data_pack_format": 10
"pack_format": 13,
"forge:server_data_pack_format": 12
}
}

0 comments on commit b9d48d7

Please sign in to comment.