Compare commits

...

7 commits

Author SHA1 Message Date
Flanks255
85a8ade648 annoyance fix. 2024-03-06 20:04:28 -06:00
Flanks255
8f73813a45 More recipe stuff, crystal block compress/decompress recipes. 2024-03-06 19:30:59 -06:00
Mrbysco
983cc04875 Jade 2024-03-07 02:27:32 +01:00
Mrbysco
91d9009f14 Update FermentingRecipe.java 2024-03-07 02:24:26 +01:00
Mrbysco
cf3ddec55b Update UpdateChecker.java 2024-03-07 02:08:17 +01:00
Mrbysco
0e30bd9974 Merge branch '1.20.4' of https://github.com/Ellpeck/ActuallyAdditions into 1.20.4 2024-03-07 01:56:50 +01:00
Mrbysco
555b1ddffb Back to CustomEnergyStorage 2024-03-07 01:56:39 +01:00
23 changed files with 149 additions and 61 deletions

View file

@ -79,7 +79,7 @@ dependencies {
compileOnly "xyz.brassgoggledcoders:PatchouliProvider:${patchouli_provider_version}" compileOnly "xyz.brassgoggledcoders:PatchouliProvider:${patchouli_provider_version}"
runtimeOnly "xyz.brassgoggledcoders:PatchouliProvider:${patchouli_provider_version}" runtimeOnly "xyz.brassgoggledcoders:PatchouliProvider:${patchouli_provider_version}"
runtimeOnly "curse.maven:the-one-probe-245211:5084077" runtimeOnly "curse.maven:jade-324717:5109393"
runtimeOnly "curse.maven:mekanism-268560:5155329" runtimeOnly "curse.maven:mekanism-268560:5155329"
} }

View file

@ -11,3 +11,4 @@ pluginManagement {
plugins { plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0' id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
} }
rootProject.name = "actuallyadditions"

View file

@ -1,4 +1,4 @@
// 1.20.4 2024-03-06T18:38:03.9906633 Item Recipes // 1.20.4 2024-03-06T19:28:58.8879133 Item Recipes
d374edde9294d1a224b4b5610b50117a11328c00 data/actuallyadditions/recipes/advanced_coil.json d374edde9294d1a224b4b5610b50117a11328c00 data/actuallyadditions/recipes/advanced_coil.json
f67629e45d152c96f3467a90a67520f78ecf9f07 data/actuallyadditions/recipes/advanced_leaf_blower.json f67629e45d152c96f3467a90a67520f78ecf9f07 data/actuallyadditions/recipes/advanced_leaf_blower.json
d65e5a70232fa2f0e74d2a67c1cd4b0e87124242 data/actuallyadditions/recipes/basic_coil.json d65e5a70232fa2f0e74d2a67c1cd4b0e87124242 data/actuallyadditions/recipes/basic_coil.json
@ -7,18 +7,30 @@ b59bc713a54b6398730e5a1ef105479a7e58cf3e data/actuallyadditions/recipes/booklet.
3ba50983b327aa3df390a73583cd99dc06c8efd9 data/actuallyadditions/recipes/charcoal_to_tiny.json 3ba50983b327aa3df390a73583cd99dc06c8efd9 data/actuallyadditions/recipes/charcoal_to_tiny.json
5499f93d172328fc4136f866c80523ecdafcf4a3 data/actuallyadditions/recipes/coal_to_tiny.json 5499f93d172328fc4136f866c80523ecdafcf4a3 data/actuallyadditions/recipes/coal_to_tiny.json
ba652d148d0c97f5453dff403f49bcb7d783c68a data/actuallyadditions/recipes/compress/diamatine_crystal.json ba652d148d0c97f5453dff403f49bcb7d783c68a data/actuallyadditions/recipes/compress/diamatine_crystal.json
e941d3812b720042fb88679f9c378c365db92abe data/actuallyadditions/recipes/compress/diamatine_crystal_block.json
bbcd53f245808916ef0dff4b4b49bb31d495cf3d data/actuallyadditions/recipes/compress/emeradic_crystal.json bbcd53f245808916ef0dff4b4b49bb31d495cf3d data/actuallyadditions/recipes/compress/emeradic_crystal.json
bafc6ad5e25c395cf19ecb56c394fcef02e01c45 data/actuallyadditions/recipes/compress/emeradic_crystal_block.json
1cdecac3f69286d8d09c376b4ca916f2e79b06cf data/actuallyadditions/recipes/compress/enori_crystal.json 1cdecac3f69286d8d09c376b4ca916f2e79b06cf data/actuallyadditions/recipes/compress/enori_crystal.json
99ef6128f1f960716fab2c254899581558a87566 data/actuallyadditions/recipes/compress/enori_crystal_block.json
fd30066d53e0e49dfbf5f818037ee4a9bc54af77 data/actuallyadditions/recipes/compress/palis_crystal.json fd30066d53e0e49dfbf5f818037ee4a9bc54af77 data/actuallyadditions/recipes/compress/palis_crystal.json
c759f5e1bea0bee1185acbaa2584d8df50140030 data/actuallyadditions/recipes/compress/palis_crystal_block.json
596151ee711f3ab3a74bedcc7edeaa509ad831d7 data/actuallyadditions/recipes/compress/restonia_crystal.json 596151ee711f3ab3a74bedcc7edeaa509ad831d7 data/actuallyadditions/recipes/compress/restonia_crystal.json
36144bad95ee20bf457e70b1974142ece89cd840 data/actuallyadditions/recipes/compress/restonia_crystal_block.json
302ce38b9e03c6167c60a4a6436beaea081bfb75 data/actuallyadditions/recipes/compress/void_crystal.json 302ce38b9e03c6167c60a4a6436beaea081bfb75 data/actuallyadditions/recipes/compress/void_crystal.json
83a41103cdb2ce107b9d7b55226cab337cc8adf9 data/actuallyadditions/recipes/compress/void_crystal_block.json
0d432cc6d29538e2f6f56d0a6c663ff63c4cc4f7 data/actuallyadditions/recipes/crafter_on_a_stick.json 0d432cc6d29538e2f6f56d0a6c663ff63c4cc4f7 data/actuallyadditions/recipes/crafter_on_a_stick.json
9353c328a45f8c2841ef30f7591cc99872b69bb9 data/actuallyadditions/recipes/crate_keeper.json 9353c328a45f8c2841ef30f7591cc99872b69bb9 data/actuallyadditions/recipes/crate_keeper.json
c39a005aec39dbcf38a2975b4122e8660cedcfc9 data/actuallyadditions/recipes/decompress/diamatine_crystal.json
70e759da4a394a68c8757007c59a4de44b8efaa5 data/actuallyadditions/recipes/decompress/diamatine_crystal_shard.json 70e759da4a394a68c8757007c59a4de44b8efaa5 data/actuallyadditions/recipes/decompress/diamatine_crystal_shard.json
81f409043a669467203a92c29c9bcbbec65209ad data/actuallyadditions/recipes/decompress/emeradic_crystal.json
ca592294f026cda8d02c808ea3b41b2333b089de data/actuallyadditions/recipes/decompress/emeradic_crystal_shard.json ca592294f026cda8d02c808ea3b41b2333b089de data/actuallyadditions/recipes/decompress/emeradic_crystal_shard.json
5ffb3f1ae350de40e6674a1d4d6c4e2041899049 data/actuallyadditions/recipes/decompress/enori_crystal.json
314c1a08f7114ce75ba9ce18d76d0baa5b049a9b data/actuallyadditions/recipes/decompress/enori_crystal_shard.json 314c1a08f7114ce75ba9ce18d76d0baa5b049a9b data/actuallyadditions/recipes/decompress/enori_crystal_shard.json
4f9962b68de0a604b99a0a0b54502e894c1bea93 data/actuallyadditions/recipes/decompress/palis_crystal.json
d99beb290a2a5944af948d2fb31f6b64a96c6e7f data/actuallyadditions/recipes/decompress/palis_crystal_shard.json d99beb290a2a5944af948d2fb31f6b64a96c6e7f data/actuallyadditions/recipes/decompress/palis_crystal_shard.json
43813305b116d62f2f262b33268c96c6f2c75126 data/actuallyadditions/recipes/decompress/restonia_crystal.json
2ae505e12a390dfb07b3d0e034dfc445ec67e0aa data/actuallyadditions/recipes/decompress/restonia_crystal_shard.json 2ae505e12a390dfb07b3d0e034dfc445ec67e0aa data/actuallyadditions/recipes/decompress/restonia_crystal_shard.json
dd65310cce05d96449b6641f0c29982bd670d623 data/actuallyadditions/recipes/decompress/void_crystal.json
823c7188829eb50975d857f61e33bc5c2780bb12 data/actuallyadditions/recipes/decompress/void_crystal_shard.json 823c7188829eb50975d857f61e33bc5c2780bb12 data/actuallyadditions/recipes/decompress/void_crystal_shard.json
c3592647a1b6de17893a80eeb9ed214f719cc4eb data/actuallyadditions/recipes/diamond_aiot.json c3592647a1b6de17893a80eeb9ed214f719cc4eb data/actuallyadditions/recipes/diamond_aiot.json
035937b870792a57c0db0b512b41f965af4c8195 data/actuallyadditions/recipes/double_battery.json 035937b870792a57c0db0b512b41f965af4c8195 data/actuallyadditions/recipes/double_battery.json

View file

@ -1,4 +1,4 @@
// 1.20.4 2024-03-06T18:38:03.9956221 Recipes // 1.20.4 2024-03-06T19:12:19.7519503 Recipes
4d3128b37a7153882a9324cda49b5069207561c5 data/actuallyadditions/recipes/atomic_reconstructor.json 4d3128b37a7153882a9324cda49b5069207561c5 data/actuallyadditions/recipes/atomic_reconstructor.json
b0367f5012651764931e8b8fd0c5bcca4e8614c0 data/actuallyadditions/recipes/battery_box.json b0367f5012651764931e8b8fd0c5bcca4e8614c0 data/actuallyadditions/recipes/battery_box.json
fe704716268e01ca8aeeb92196d9f660b9e08640 data/actuallyadditions/recipes/black_quartz_brick_slab.json fe704716268e01ca8aeeb92196d9f660b9e08640 data/actuallyadditions/recipes/black_quartz_brick_slab.json
@ -14,12 +14,9 @@ db1978ab59369dd3c10e719073b7035acf33885c data/actuallyadditions/recipes/black_qu
506d2ad2f3109a6640a35ef1a2143b16793414ba data/actuallyadditions/recipes/chiseled_black_quartz_stair.json 506d2ad2f3109a6640a35ef1a2143b16793414ba data/actuallyadditions/recipes/chiseled_black_quartz_stair.json
2e9233449531a074984b443ceef0ad782f82eaed data/actuallyadditions/recipes/chiseled_black_quartz_wall.json 2e9233449531a074984b443ceef0ad782f82eaed data/actuallyadditions/recipes/chiseled_black_quartz_wall.json
f1bbeaed1616b92ee345860fedb789e0aaa74a0f data/actuallyadditions/recipes/coffee_machine.json f1bbeaed1616b92ee345860fedb789e0aaa74a0f data/actuallyadditions/recipes/coffee_machine.json
e14dd51bd5ccda096d709d8b3633828784a720f4 data/actuallyadditions/recipes/diamatine_crystal_block.json
49e378923a797d89b3c3c46bef00f2a347ded250 data/actuallyadditions/recipes/display_stand.json 49e378923a797d89b3c3c46bef00f2a347ded250 data/actuallyadditions/recipes/display_stand.json
d7a4254f48cd9043def96f7d606e237d5c5119b9 data/actuallyadditions/recipes/emeradic_crystal_block.json
7c9a004460b6eb6c6e07cedfa086294d59e5eec5 data/actuallyadditions/recipes/empowerer.json 7c9a004460b6eb6c6e07cedfa086294d59e5eec5 data/actuallyadditions/recipes/empowerer.json
5801963cf623f873cdb254513c1b4b5ec319dd74 data/actuallyadditions/recipes/ender_casing.json 5801963cf623f873cdb254513c1b4b5ec319dd74 data/actuallyadditions/recipes/ender_casing.json
d69c14b97aaac6879055503487e0ffe83409fa82 data/actuallyadditions/recipes/enori_crystal_block.json
b2eefc77a753cbb650a879a9d30d833fc154dc58 data/actuallyadditions/recipes/ethetic_green_slab.json b2eefc77a753cbb650a879a9d30d833fc154dc58 data/actuallyadditions/recipes/ethetic_green_slab.json
1171daf9cf5402c9c47a9f2f370d5924ebddef5e data/actuallyadditions/recipes/ethetic_green_stairs.json 1171daf9cf5402c9c47a9f2f370d5924ebddef5e data/actuallyadditions/recipes/ethetic_green_stairs.json
0e57ac576603b7c6aeef7709d2e669e3dacbe5f2 data/actuallyadditions/recipes/ethetic_green_wall.json 0e57ac576603b7c6aeef7709d2e669e3dacbe5f2 data/actuallyadditions/recipes/ethetic_green_wall.json
@ -35,13 +32,10 @@ ff81da8a0f6632779414c0512100696a11771814 data/actuallyadditions/recipes/hopping_
92323ba7b5459abe64c06fff502d44384f64f361 data/actuallyadditions/recipes/laser_relay_advanced.json 92323ba7b5459abe64c06fff502d44384f64f361 data/actuallyadditions/recipes/laser_relay_advanced.json
31a2978ae8260ead579c6c920be0e40c6036498d data/actuallyadditions/recipes/laser_relay_extreme.json 31a2978ae8260ead579c6c920be0e40c6036498d data/actuallyadditions/recipes/laser_relay_extreme.json
4acb117a6727554073a78ed81bcd2b0b1af53bec data/actuallyadditions/recipes/laser_relay_item_advanced.json 4acb117a6727554073a78ed81bcd2b0b1af53bec data/actuallyadditions/recipes/laser_relay_item_advanced.json
728b2883a9325d8d5d7835d8e41af1426813f0a6 data/actuallyadditions/recipes/palis_crystal_block.json
e4ae5117c38f8c38371dd084ceb72b1910b7a34a data/actuallyadditions/recipes/restonia_crystal_block.json
532a454741e8068941f1f3c44f3be257530db8c3 data/actuallyadditions/recipes/shock_suppressor.json 532a454741e8068941f1f3c44f3be257530db8c3 data/actuallyadditions/recipes/shock_suppressor.json
7fa363b3afe88f3ffac1b9f85f59c6a291d59544 data/actuallyadditions/recipes/smooth_black_quartz_slab.json 7fa363b3afe88f3ffac1b9f85f59c6a291d59544 data/actuallyadditions/recipes/smooth_black_quartz_slab.json
892f9867958c77a0577adcfd8ce3f8da108ecd3e data/actuallyadditions/recipes/smooth_black_quartz_stair.json 892f9867958c77a0577adcfd8ce3f8da108ecd3e data/actuallyadditions/recipes/smooth_black_quartz_stair.json
42f29136de744f0e3629f1094136480a50bb571e data/actuallyadditions/recipes/smooth_black_quartz_wall.json 42f29136de744f0e3629f1094136480a50bb571e data/actuallyadditions/recipes/smooth_black_quartz_wall.json
bc3278bd2913d84faa511ec4668fdcb7052234a0 data/actuallyadditions/recipes/tiny_torch.json bc3278bd2913d84faa511ec4668fdcb7052234a0 data/actuallyadditions/recipes/tiny_torch.json
f6fe7bd7ee491106a0486211a6dc782e965102d8 data/actuallyadditions/recipes/vertical_digger.json f6fe7bd7ee491106a0486211a6dc782e965102d8 data/actuallyadditions/recipes/vertical_digger.json
6b63c99b4fbe11ee0aee38551205be3b1dd64d52 data/actuallyadditions/recipes/void_crystal_block.json
d5067865e97d33de5b828bc3bc5a2fcc8a16ea89 data/actuallyadditions/recipes/wood_casing.json d5067865e97d33de5b828bc3bc5a2fcc8a16ea89 data/actuallyadditions/recipes/wood_casing.json

View file

@ -2,14 +2,14 @@
"type": "minecraft:crafting_shaped", "type": "minecraft:crafting_shaped",
"category": "misc", "category": "misc",
"key": { "key": {
"Q": { "x": {
"item": "actuallyadditions:diamatine_crystal" "item": "actuallyadditions:diamatine_crystal"
} }
}, },
"pattern": [ "pattern": [
"QQQ", "xxx",
"QQQ", "xxx",
"QQQ" "xxx"
], ],
"result": { "result": {
"item": "actuallyadditions:diamatine_crystal_block" "item": "actuallyadditions:diamatine_crystal_block"

View file

@ -2,14 +2,14 @@
"type": "minecraft:crafting_shaped", "type": "minecraft:crafting_shaped",
"category": "misc", "category": "misc",
"key": { "key": {
"Q": { "x": {
"item": "actuallyadditions:emeradic_crystal" "item": "actuallyadditions:emeradic_crystal"
} }
}, },
"pattern": [ "pattern": [
"QQQ", "xxx",
"QQQ", "xxx",
"QQQ" "xxx"
], ],
"result": { "result": {
"item": "actuallyadditions:emeradic_crystal_block" "item": "actuallyadditions:emeradic_crystal_block"

View file

@ -2,14 +2,14 @@
"type": "minecraft:crafting_shaped", "type": "minecraft:crafting_shaped",
"category": "misc", "category": "misc",
"key": { "key": {
"Q": { "x": {
"item": "actuallyadditions:enori_crystal" "item": "actuallyadditions:enori_crystal"
} }
}, },
"pattern": [ "pattern": [
"QQQ", "xxx",
"QQQ", "xxx",
"QQQ" "xxx"
], ],
"result": { "result": {
"item": "actuallyadditions:enori_crystal_block" "item": "actuallyadditions:enori_crystal_block"

View file

@ -2,14 +2,14 @@
"type": "minecraft:crafting_shaped", "type": "minecraft:crafting_shaped",
"category": "misc", "category": "misc",
"key": { "key": {
"Q": { "x": {
"item": "actuallyadditions:palis_crystal" "item": "actuallyadditions:palis_crystal"
} }
}, },
"pattern": [ "pattern": [
"QQQ", "xxx",
"QQQ", "xxx",
"QQQ" "xxx"
], ],
"result": { "result": {
"item": "actuallyadditions:palis_crystal_block" "item": "actuallyadditions:palis_crystal_block"

View file

@ -2,14 +2,14 @@
"type": "minecraft:crafting_shaped", "type": "minecraft:crafting_shaped",
"category": "misc", "category": "misc",
"key": { "key": {
"Q": { "x": {
"item": "actuallyadditions:restonia_crystal" "item": "actuallyadditions:restonia_crystal"
} }
}, },
"pattern": [ "pattern": [
"QQQ", "xxx",
"QQQ", "xxx",
"QQQ" "xxx"
], ],
"result": { "result": {
"item": "actuallyadditions:restonia_crystal_block" "item": "actuallyadditions:restonia_crystal_block"

View file

@ -2,14 +2,14 @@
"type": "minecraft:crafting_shaped", "type": "minecraft:crafting_shaped",
"category": "misc", "category": "misc",
"key": { "key": {
"Q": { "x": {
"item": "actuallyadditions:void_crystal" "item": "actuallyadditions:void_crystal"
} }
}, },
"pattern": [ "pattern": [
"QQQ", "xxx",
"QQQ", "xxx",
"QQQ" "xxx"
], ],
"result": { "result": {
"item": "actuallyadditions:void_crystal_block" "item": "actuallyadditions:void_crystal_block"

View file

@ -0,0 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"ingredients": [
{
"item": "actuallyadditions:diamatine_crystal_block"
}
],
"result": {
"count": 9,
"item": "actuallyadditions:diamatine_crystal"
}
}

View file

@ -0,0 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"ingredients": [
{
"item": "actuallyadditions:emeradic_crystal_block"
}
],
"result": {
"count": 9,
"item": "actuallyadditions:emeradic_crystal"
}
}

View file

@ -0,0 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"ingredients": [
{
"item": "actuallyadditions:enori_crystal_block"
}
],
"result": {
"count": 9,
"item": "actuallyadditions:enori_crystal"
}
}

View file

@ -0,0 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"ingredients": [
{
"item": "actuallyadditions:palis_crystal_block"
}
],
"result": {
"count": 9,
"item": "actuallyadditions:palis_crystal"
}
}

View file

@ -0,0 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"ingredients": [
{
"item": "actuallyadditions:restonia_crystal_block"
}
],
"result": {
"count": 9,
"item": "actuallyadditions:restonia_crystal"
}
}

View file

@ -0,0 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"ingredients": [
{
"item": "actuallyadditions:void_crystal_block"
}
],
"result": {
"count": 9,
"item": "actuallyadditions:void_crystal"
}
}

View file

@ -231,14 +231,6 @@ public class BlockRecipeGenerator extends RecipeProvider {
.define('V', ActuallyItems.VOID_CRYSTAL.get()) .define('V', ActuallyItems.VOID_CRYSTAL.get())
.save(recipeOutput); .save(recipeOutput);
// Crystal Blocks
Recipe.block(ActuallyBlocks.RESTONIA_CRYSTAL.getItem(), ActuallyItems.RESTONIA_CRYSTAL.get(), recipeOutput);
Recipe.block(ActuallyBlocks.PALIS_CRYSTAL.getItem(), ActuallyItems.PALIS_CRYSTAL.get(), recipeOutput);
Recipe.block(ActuallyBlocks.DIAMATINE_CRYSTAL.getItem(), ActuallyItems.DIAMATINE_CRYSTAL.get(), recipeOutput);
Recipe.block(ActuallyBlocks.ENORI_CRYSTAL.getItem(), ActuallyItems.ENORI_CRYSTAL.get(), recipeOutput);
Recipe.block(ActuallyBlocks.VOID_CRYSTAL.getItem(), ActuallyItems.VOID_CRYSTAL.get(), recipeOutput);
Recipe.block(ActuallyBlocks.EMERADIC_CRYSTAL.getItem(), ActuallyItems.EMERADIC_CRYSTAL.get(), recipeOutput);
} }
public static class Recipe { public static class Recipe {
@ -270,10 +262,6 @@ public class BlockRecipeGenerator extends RecipeProvider {
Recipe.shaped(result).patternSingleKey('Q', resource, "QQQ").save(consumer); Recipe.shaped(result).patternSingleKey('Q', resource, "QQQ").save(consumer);
} }
public static void block(ItemLike result, ItemLike resource, RecipeOutput consumer) {
Recipe.shaped(result).patternSingleKey('Q', resource, "QQQ", "QQQ", "QQQ").save(consumer);
}
private static class Shapeless extends ShapelessRecipeBuilder { private static class Shapeless extends ShapelessRecipeBuilder {
public Shapeless(ItemLike result) { public Shapeless(ItemLike result) {
this(result, 1); this(result, 1);

View file

@ -496,6 +496,14 @@ public class ItemRecipeGenerator extends RecipeProvider {
addShard(recipeOutput, ActuallyItems.DIAMATINE_CRYSTAL_SHARD, ActuallyItems.DIAMATINE_CRYSTAL); addShard(recipeOutput, ActuallyItems.DIAMATINE_CRYSTAL_SHARD, ActuallyItems.DIAMATINE_CRYSTAL);
addShard(recipeOutput, ActuallyItems.EMERADIC_CRYSTAL_SHARD, ActuallyItems.EMERADIC_CRYSTAL); addShard(recipeOutput, ActuallyItems.EMERADIC_CRYSTAL_SHARD, ActuallyItems.EMERADIC_CRYSTAL);
//Crystal Blocks
addCrystalBlock(recipeOutput, ActuallyBlocks.VOID_CRYSTAL.getItem(), ActuallyItems.VOID_CRYSTAL);
addCrystalBlock(recipeOutput, ActuallyBlocks.ENORI_CRYSTAL.getItem(), ActuallyItems.ENORI_CRYSTAL);
addCrystalBlock(recipeOutput, ActuallyBlocks.RESTONIA_CRYSTAL.getItem(), ActuallyItems.RESTONIA_CRYSTAL);
addCrystalBlock(recipeOutput, ActuallyBlocks.PALIS_CRYSTAL.getItem(), ActuallyItems.PALIS_CRYSTAL);
addCrystalBlock(recipeOutput, ActuallyBlocks.DIAMATINE_CRYSTAL.getItem(), ActuallyItems.DIAMATINE_CRYSTAL);
addCrystalBlock(recipeOutput, ActuallyBlocks.EMERADIC_CRYSTAL.getItem(), ActuallyItems.EMERADIC_CRYSTAL);
// //Quartz // //Quartz
// GameRegistry.addSmelting(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F); // GameRegistry.addSmelting(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F);
@ -540,19 +548,24 @@ public class ItemRecipeGenerator extends RecipeProvider {
.save(consumer); .save(consumer);
} }
public static void decompress(RecipeOutput consumer, DeferredItem<? extends Item> output, DeferredItem<? extends Item> input) { public static void decompress(RecipeOutput consumer, ItemLike output, ItemLike input) {
ResourceLocation key = BuiltInRegistries.ITEM.getKey(output.get()); ResourceLocation key = BuiltInRegistries.ITEM.getKey(output.asItem());
Recipe.shapeless(output.get(), 9).requires(input.get()).save(consumer, new ResourceLocation(key.getNamespace(), "decompress/" + key.getPath())); Recipe.shapeless(output, 9).requires(input).save(consumer, new ResourceLocation(key.getNamespace(), "decompress/" + key.getPath()));
} }
public static void compress(RecipeOutput consumer, DeferredItem<? extends Item> output, DeferredItem<? extends Item> input) { public static void compress(RecipeOutput consumer, ItemLike output, ItemLike input) {
ResourceLocation key = BuiltInRegistries.ITEM.getKey(output.get()); ResourceLocation key = BuiltInRegistries.ITEM.getKey(output.asItem());
Recipe.shaped(output.get()).pattern("xxx","xxx", "xxx").define('x', input.get()).save(consumer, new ResourceLocation(key.getNamespace(), "compress/" + key.getPath())); Recipe.shaped(output).pattern("xxx","xxx", "xxx").define('x', input).save(consumer, new ResourceLocation(key.getNamespace(), "compress/" + key.getPath()));
} }
public static void addShard(RecipeOutput consumer, DeferredItem<? extends Item> shard, DeferredItem<? extends Item> crystal) { public static void addShard(RecipeOutput consumer, DeferredItem<? extends Item> shard, DeferredItem<? extends Item> crystal) {
compress(consumer, crystal, shard); compress(consumer, crystal, shard);
decompress(consumer, shard, crystal); decompress(consumer, shard, crystal);
} }
public static void addCrystalBlock(RecipeOutput consumer, ItemLike block, DeferredItem<? extends Item> crystal) {
compress(consumer, block, crystal);
decompress(consumer, crystal, block);
}
public static void addToolAndArmorRecipes(RecipeOutput consumer, DeferredItem<? extends Item> base, DeferredItem<? extends Item> pickaxe, DeferredItem<? extends Item> sword, DeferredItem<? extends Item> axe, DeferredItem<? extends Item> shovel, DeferredItem<? extends Item> hoe, DeferredItem<? extends Item> helm, DeferredItem<? extends Item> chest, DeferredItem<? extends Item> pants, DeferredItem<? extends Item> boots) { public static void addToolAndArmorRecipes(RecipeOutput consumer, DeferredItem<? extends Item> base, DeferredItem<? extends Item> pickaxe, DeferredItem<? extends Item> sword, DeferredItem<? extends Item> axe, DeferredItem<? extends Item> shovel, DeferredItem<? extends Item> hoe, DeferredItem<? extends Item> helm, DeferredItem<? extends Item> chest, DeferredItem<? extends Item> pants, DeferredItem<? extends Item> boots) {
//Pickaxe //Pickaxe
Recipe.shaped(pickaxe.get()) Recipe.shaped(pickaxe.get())

View file

@ -3,6 +3,7 @@ package de.ellpeck.actuallyadditions.mod;
import de.ellpeck.actuallyadditions.mod.attachments.ActuallyAttachments; import de.ellpeck.actuallyadditions.mod.attachments.ActuallyAttachments;
import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems;
import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy;
import de.ellpeck.actuallyadditions.mod.tile.CustomEnergyStorage;
import net.minecraft.core.registries.Registries; import net.minecraft.core.registries.Registries;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.CreativeModeTab;
@ -34,7 +35,8 @@ public class ActuallyTabs {
.filter(stack -> stack.getItem() instanceof ItemEnergy).toList(); .filter(stack -> stack.getItem() instanceof ItemEnergy).toList();
charged.forEach(stack -> { charged.forEach(stack -> {
if(stack.getItem() instanceof ItemEnergy itemEnergy) { if(stack.getItem() instanceof ItemEnergy itemEnergy) {
EnergyStorage storage = new EnergyStorage(itemEnergy.maxPower, itemEnergy.transfer, itemEnergy.transfer, itemEnergy.maxPower); CustomEnergyStorage storage = new CustomEnergyStorage(itemEnergy.maxPower, itemEnergy.transfer, itemEnergy.transfer);
storage.setEnergyStored(itemEnergy.maxPower);
stack.setData(ActuallyAttachments.ENERGY_STORAGE.get(), storage); stack.setData(ActuallyAttachments.ENERGY_STORAGE.get(), storage);
} }
}); });

View file

@ -15,14 +15,14 @@ import java.util.function.Supplier;
public class ActuallyAttachments { public class ActuallyAttachments {
private static final DeferredRegister<AttachmentType<?>> ATTACHMENT_TYPES = DeferredRegister.create(NeoForgeRegistries.Keys.ATTACHMENT_TYPES, ActuallyAdditions.MODID); private static final DeferredRegister<AttachmentType<?>> ATTACHMENT_TYPES = DeferredRegister.create(NeoForgeRegistries.Keys.ATTACHMENT_TYPES, ActuallyAdditions.MODID);
public static final Supplier<AttachmentType<EnergyStorage>> ENERGY_STORAGE = ATTACHMENT_TYPES.register( public static final Supplier<AttachmentType<CustomEnergyStorage>> ENERGY_STORAGE = ATTACHMENT_TYPES.register(
"energy", ActuallyAttachments.itemEnergyStorageAttachment()); "energy", ActuallyAttachments.itemEnergyStorageAttachment());
/* /*
* This is a supplier for an attachment type that can be used to attach an energy storage to an item. * This is a supplier for an attachment type that can be used to attach an energy storage to an item.
* Implementation is based on EnderIO's https://github.com/Team-EnderIO/EnderIO/blob/e1f022df745131ed5fea718bd860880a5785d4c7/src/core/java/com/enderio/core/common/attachment/AttachmentUtil.java#L47-L60 * Implementation is based on EnderIO's https://github.com/Team-EnderIO/EnderIO/blob/e1f022df745131ed5fea718bd860880a5785d4c7/src/core/java/com/enderio/core/common/attachment/AttachmentUtil.java#L47-L60
*/ */
public static Supplier<AttachmentType<EnergyStorage>> itemEnergyStorageAttachment() { public static Supplier<AttachmentType<CustomEnergyStorage>> itemEnergyStorageAttachment() {
return () -> AttachmentType.serializable(holder -> { return () -> AttachmentType.serializable(holder -> {
if (holder instanceof ItemStack itemStack) { if (holder instanceof ItemStack itemStack) {
int capacity = 1000; int capacity = 1000;
@ -33,7 +33,7 @@ public class ActuallyAttachments {
} }
return new EnergyStorage(capacity, maxTransfer, maxTransfer); return new CustomEnergyStorage(capacity, maxTransfer, maxTransfer);
} else { } else {
throw new IllegalStateException("Cannot attach energy handler item to a non-item."); throw new IllegalStateException("Cannot attach energy handler item to a non-item.");
} }

View file

@ -162,7 +162,6 @@ public class FermentingRecipe implements Recipe<Container> {
public void toNetwork(@Nonnull FriendlyByteBuf pBuffer, @Nonnull FermentingRecipe pRecipe) { public void toNetwork(@Nonnull FriendlyByteBuf pBuffer, @Nonnull FermentingRecipe pRecipe) {
pRecipe.input.writeToPacket(pBuffer); pRecipe.input.writeToPacket(pBuffer);
pRecipe.output.writeToPacket(pBuffer); pRecipe.output.writeToPacket(pBuffer);
pBuffer.writeInt(pRecipe.output.getAmount());
pBuffer.writeInt(pRecipe.time); pBuffer.writeInt(pRecipe.time);
} }
} }

View file

@ -24,6 +24,7 @@ import net.neoforged.api.distmarker.Dist;
import net.neoforged.api.distmarker.OnlyIn; import net.neoforged.api.distmarker.OnlyIn;
import net.neoforged.fml.loading.FMLEnvironment; import net.neoforged.fml.loading.FMLEnvironment;
import net.neoforged.neoforge.capabilities.Capabilities; import net.neoforged.neoforge.capabilities.Capabilities;
import net.neoforged.neoforge.energy.EnergyStorage;
import net.neoforged.neoforge.energy.IEnergyStorage; import net.neoforged.neoforge.energy.IEnergyStorage;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -119,7 +120,7 @@ public abstract class ItemEnergy extends ItemBase {
public int extractEnergyInternal(ItemStack stack, int maxExtract, boolean simulate) { public int extractEnergyInternal(ItemStack stack, int maxExtract, boolean simulate) {
return Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM)) return Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM))
.map(cap -> cap instanceof CustomEnergyStorage .map(cap -> cap instanceof EnergyStorage
? ((CustomEnergyStorage) cap).extractEnergyInternal(maxExtract, simulate) ? ((CustomEnergyStorage) cap).extractEnergyInternal(maxExtract, simulate)
: 0) : 0)
.orElse(0); .orElse(0);

View file

@ -45,11 +45,11 @@ public class UpdateChecker {
if (Minecraft.getInstance().player != null) { if (Minecraft.getInstance().player != null) {
Player player = Minecraft.getInstance().player; Player player = Minecraft.getInstance().player;
if (UpdateChecker.checkFailed) { if (UpdateChecker.checkFailed) {
player.displayClientMessage(Component.Serializer.fromJson(I18n.get("info." + ActuallyAdditions.MODID + ".update.failed")), false); player.displayClientMessage(Component.translatable("info." + ActuallyAdditions.MODID + ".update.failed"), false);
} else if (UpdateChecker.needsUpdateNotify) { } else if (UpdateChecker.needsUpdateNotify) {
player.displayClientMessage(Component.Serializer.fromJson(I18n.get("info." + ActuallyAdditions.MODID + ".update.generic")), false); player.displayClientMessage(Component.translatable("info." + ActuallyAdditions.MODID + ".update.generic"), false);
player.displayClientMessage(Component.Serializer.fromJson(I18n.get("info." + ActuallyAdditions.MODID + ".update.versionCompare", ActuallyAdditions.VERSION, UpdateChecker.updateVersionString)), false); player.displayClientMessage(Component.translatable("info." + ActuallyAdditions.MODID + ".update.versionCompare", ActuallyAdditions.VERSION, UpdateChecker.updateVersionString), false);
player.displayClientMessage(Component.Serializer.fromJson(I18n.get("info." + ActuallyAdditions.MODID + ".update.buttons", UpdateChecker.CHANGELOG_LINK, UpdateChecker.DOWNLOAD_LINK)), false); player.displayClientMessage(Component.translatable("info." + ActuallyAdditions.MODID + ".update.buttons", UpdateChecker.CHANGELOG_LINK, UpdateChecker.DOWNLOAD_LINK), false);
} }
if (threadFinished) { if (threadFinished) {
NeoForge.EVENT_BUS.unregister(this); NeoForge.EVENT_BUS.unregister(this);