Skip to content

Commit

Permalink
Release merge (#971)
Browse files Browse the repository at this point in the history
* feat: ✨ Add copper backpack with more inventory slots but still only 1 upgrade slot

* feat: ✨ Add Stack Upgrade Starter Tier crafted with copper blocks and can be crafted into tier 1 with fewer iron blocks needed
  • Loading branch information
P3pp3rF1y authored Feb 12, 2024
1 parent 80859f1 commit f3a9a4f
Show file tree
Hide file tree
Showing 37 changed files with 392 additions and 70 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
minecraft_version=1.18.2
forge_version=40.1.30
mod_version=3.19.7
mod_version=3.20.1
jei_mc_version=1.18.2
jei_version=9.7.2.281
curios_version=1.18.2-5.0.9.1
botania_version=1.18.2-430-SNAPSHOT
patchouli_version=1.18.2-66
balm_cf_file_id=3914491
sc_version=1.18.2-0.5.113.+
sc_version=1.18.2-0.6.0.+
crafting_tweaks_cf_file_id=3584842
chipped_cf_file_id=4293291
ctm_cf_file_id=3933537
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"sophisticatedbackpacks:copper_backpack"
]
},
"criteria": {
"has_backpack": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:backpack"
]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "sophisticatedbackpacks:copper_backpack"
}
}
},
"requirements": [
[
"has_backpack",
"has_the_recipe"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"sophisticatedbackpacks:iron_backpack_from_copper"
]
},
"criteria": {
"has_copper_backpack": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:copper_backpack"
]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "sophisticatedbackpacks:iron_backpack_from_copper"
}
}
},
"requirements": [
[
"has_copper_backpack",
"has_the_recipe"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"sophisticatedbackpacks:stack_upgrade_starter_tier"
]
},
"criteria": {
"has_upgrade_base": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:upgrade_base"
]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "sophisticatedbackpacks:stack_upgrade_starter_tier"
}
}
},
"requirements": [
[
"has_upgrade_base",
"has_the_recipe"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"sophisticatedbackpacks:stack_upgrade_tier_1_from_starter"
]
},
"criteria": {
"has_upgrade_base": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"sophisticatedbackpacks:upgrade_base"
]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "sophisticatedbackpacks:stack_upgrade_tier_1_from_starter"
}
}
},
"requirements": [
[
"has_upgrade_base",
"has_the_recipe"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:block",
"pools": [
{
"name": "main",
"rolls": 1.0,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "sophisticatedbackpacks:copper_backpack"
}
],
"functions": [
{
"function": "sophisticatedbackpacks:copy_backpack_data"
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@
"entries": [
{
"type": "minecraft:item",
"weight": 5,
"weight": 7,
"name": "sophisticatedbackpacks:backpack"
},
{
"type": "minecraft:item",
"weight": 5,
"name": "sophisticatedbackpacks:copper_backpack"
},
{
"type": "minecraft:item",
"weight": 3,
Expand All @@ -27,7 +32,7 @@
},
{
"type": "minecraft:empty",
"weight": 89
"weight": 84
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"type": "minecraft:item",
"weight": 5,
"name": "sophisticatedbackpacks:backpack"
"name": "sophisticatedbackpacks:copper_backpack"
},
{
"type": "minecraft:item",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"entries": [
{
"type": "minecraft:item",
"weight": 4,
"weight": 5,
"name": "sophisticatedbackpacks:backpack"
},
{
"type": "minecraft:item",
"weight": 2,
"name": "sophisticatedbackpacks:iron_backpack"
"weight": 3,
"name": "sophisticatedbackpacks:copper_backpack"
},
{
"type": "minecraft:item",
Expand All @@ -23,7 +23,7 @@
},
{
"type": "minecraft:empty",
"weight": 92
"weight": 90
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"type": "sophisticatedbackpacks:backpack_upgrade",
"conditions": [
{
"itemRegistryName": "sophisticatedbackpacks:copper_backpack",
"type": "sophisticatedcore:item_enabled"
}
],
"pattern": [
"CCC",
"CBC",
"CCC"
],
"key": {
"C": {
"tag": "forge:ingots/copper"
},
"B": {
"item": "sophisticatedbackpacks:backpack"
}
},
"result": {
"item": "sophisticatedbackpacks:copper_backpack"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"type": "sophisticatedbackpacks:backpack_upgrade",
"conditions": [
{
"itemRegistryName": "sophisticatedbackpacks:iron_backpack",
"type": "sophisticatedcore:item_enabled"
}
],
"pattern": [
" I ",
"IBI",
" I "
],
"key": {
"I": {
"tag": "forge:ingots/iron"
},
"B": {
"item": "sophisticatedbackpacks:copper_backpack"
}
},
"result": {
"item": "sophisticatedbackpacks:iron_backpack"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"type": "minecraft:crafting_shaped",
"conditions": [
{
"itemRegistryName": "sophisticatedbackpacks:stack_upgrade_starter_tier",
"type": "sophisticatedcore:item_enabled"
}
],
"pattern": [
"CCC",
"CBC",
"CCC"
],
"key": {
"B": {
"item": "sophisticatedbackpacks:upgrade_base"
},
"C": {
"tag": "forge:storage_blocks/copper"
}
},
"result": {
"item": "sophisticatedbackpacks:stack_upgrade_starter_tier"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"type": "minecraft:crafting_shaped",
"conditions": [
{
"itemRegistryName": "sophisticatedbackpacks:stack_upgrade_tier_1",
"type": "sophisticatedcore:item_enabled"
}
],
"pattern": [
" I ",
"ISI",
" I "
],
"key": {
"S": {
"item": "sophisticatedbackpacks:stack_upgrade_starter_tier"
},
"I": {
"tag": "forge:storage_blocks/iron"
}
},
"result": {
"item": "sophisticatedbackpacks:stack_upgrade_tier_1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public static class Server {
public final NoInteractionBlocks noInteractionBlocks;
public final NoConnectionBlocks noConnectionBlocks;
public final BackpackConfig leatherBackpack;
public final BackpackConfig copperBackpack;
public final BackpackConfig ironBackpack;
public final BackpackConfig goldBackpack;
public final BackpackConfig diamondBackpack;
Expand Down Expand Up @@ -137,6 +138,7 @@ private void clearCache() {
noConnectionBlocks = new NoConnectionBlocks(builder);

leatherBackpack = new BackpackConfig(builder, "Leather", 27, 1);
copperBackpack = new BackpackConfig(builder, "Copper", 45, 1);
ironBackpack = new BackpackConfig(builder, "Iron", 54, 2);
goldBackpack = new BackpackConfig(builder, "Gold", 81, 3);
diamondBackpack = new BackpackConfig(builder, "Diamond", 108, 5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@
import net.p3pp3rf1y.sophisticatedbackpacks.SophisticatedBackpacks;
import net.p3pp3rf1y.sophisticatedbackpacks.client.init.ModBlockColors;
import net.p3pp3rf1y.sophisticatedbackpacks.client.init.ModItemColors;
import net.p3pp3rf1y.sophisticatedbackpacks.client.render.BackpackBlockEntityRenderer;
import net.p3pp3rf1y.sophisticatedbackpacks.client.render.BackpackDynamicModel;
import net.p3pp3rf1y.sophisticatedbackpacks.client.render.BackpackLayerRenderer;
import net.p3pp3rf1y.sophisticatedbackpacks.client.render.BackpackModel;
import net.p3pp3rf1y.sophisticatedbackpacks.client.render.ClientBackpackContentsTooltip;
import net.p3pp3rf1y.sophisticatedbackpacks.client.render.*;
import net.p3pp3rf1y.sophisticatedbackpacks.init.ModBlocks;
import net.p3pp3rf1y.sophisticatedbackpacks.network.BlockPickMessage;
import net.p3pp3rf1y.sophisticatedbackpacks.network.SBPPacketHandler;
Expand Down Expand Up @@ -70,6 +66,7 @@ private static void onModelRegistry(ModelRegistryEvent event) {

private static void clientSetup(FMLClientSetupEvent event) {
ItemBlockRenderTypes.setRenderLayer(ModBlocks.BACKPACK.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(ModBlocks.COPPER_BACKPACK.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(ModBlocks.IRON_BACKPACK.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(ModBlocks.GOLD_BACKPACK.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(ModBlocks.DIAMOND_BACKPACK.get(), RenderType.cutout());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static void registerBlockColorHandlers(ColorHandlerEvent.Block event) {
return WorldHelper.getBlockEntity(blockDisplayReader, pos, BackpackBlockEntity.class)
.map(te -> tintIndex == 0 ? te.getBackpackWrapper().getMainColor() : te.getBackpackWrapper().getAccentColor())
.orElse(getDefaultColor(tintIndex));
}, BACKPACK.get(), IRON_BACKPACK.get(), GOLD_BACKPACK.get(), DIAMOND_BACKPACK.get(), NETHERITE_BACKPACK.get());
}, BACKPACK.get(), COPPER_BACKPACK.get(), IRON_BACKPACK.get(), GOLD_BACKPACK.get(), DIAMOND_BACKPACK.get(), NETHERITE_BACKPACK.get());
}

private static int getDefaultColor(int tintIndex) {
Expand Down
Loading

0 comments on commit f3a9a4f

Please sign in to comment.