mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-27 17:28:34 +01:00
Compare commits
10 commits
e125e80e8c
...
fc101a90df
Author | SHA1 | Date | |
---|---|---|---|
|
fc101a90df | ||
|
e22b1615a7 | ||
|
6da50dfa60 | ||
|
2040c68ed6 | ||
|
d9961a3926 | ||
|
4ef880aa15 | ||
|
3ce53350bf | ||
|
c1ee118eda | ||
|
24763a46bc | ||
|
38f4824757 |
39 changed files with 350 additions and 135 deletions
49
build.gradle
49
build.gradle
|
@ -6,33 +6,23 @@ plugins {
|
||||||
id 'net.neoforged.gradle.userdev' version '7.0.96'
|
id 'net.neoforged.gradle.userdev' version '7.0.96'
|
||||||
}
|
}
|
||||||
|
|
||||||
version = "$mod_version"
|
def buildSuffix = System.getenv('BUILD_NUMBER') ? "-b${System.getenv('BUILD_NUMBER')}" : ""
|
||||||
|
|
||||||
|
version = "$mod_version+mc${game_version}${buildSuffix}"
|
||||||
group = "de.ellpeck.actuallyadditions"
|
group = "de.ellpeck.actuallyadditions"
|
||||||
base {
|
base {
|
||||||
archivesName = "ActuallyAdditions-$game_version"
|
archivesName = "ActuallyAdditions"
|
||||||
}
|
}
|
||||||
|
|
||||||
if (System.getenv('BUILD_NUMBER') != null) {
|
|
||||||
version += "." + System.getenv('BUILD_NUMBER')
|
|
||||||
}
|
|
||||||
|
|
||||||
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
|
|
||||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||||
|
|
||||||
if (rootProject.file('src/main/resources/META-INF/accesstransformer.cfg').exists()) {
|
if (rootProject.file('src/main/resources/META-INF/accesstransformer.cfg').exists()) {
|
||||||
minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
|
minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||||
}
|
}
|
||||||
//minecraft.accessTransformers.entry public net.minecraft.client.Minecraft textureManager # textureManager
|
|
||||||
|
|
||||||
runs {
|
runs {
|
||||||
// applies to all the run configs below
|
// applies to all the run configs below
|
||||||
configureEach { net.neoforged.gradle.dsl.common.runs.run.Run run ->
|
configureEach { net.neoforged.gradle.dsl.common.runs.run.Run run ->
|
||||||
// Recommended logging data for a userdev environment
|
|
||||||
systemProperty 'forge.logging.markers', 'REGISTRIES'
|
|
||||||
|
|
||||||
// Recommended logging level for the console
|
|
||||||
systemProperty 'forge.logging.console.level', 'debug'
|
|
||||||
|
|
||||||
//Limit ram usage for the dev environment to 4GB
|
//Limit ram usage for the dev environment to 4GB
|
||||||
jvmArgument '-Xmx4G'
|
jvmArgument '-Xmx4G'
|
||||||
|
|
||||||
|
@ -93,20 +83,6 @@ dependencies {
|
||||||
runtimeOnly "curse.maven:mekanism-268560:5155329"
|
runtimeOnly "curse.maven:mekanism-268560:5155329"
|
||||||
}
|
}
|
||||||
|
|
||||||
// not sure if this is still needed
|
|
||||||
//processResources {
|
|
||||||
// inputs.property('version', project.version)
|
|
||||||
//
|
|
||||||
// from(sourceSets.main.resources.srcDirs) {
|
|
||||||
// include 'META-INF/mods.toml'
|
|
||||||
// expand 'version': project.version
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// from(sourceSets.main.resources.srcDirs) {
|
|
||||||
// exclude 'META-INF/mods.toml'
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
group = 'artifact'
|
group = 'artifact'
|
||||||
manifest {
|
manifest {
|
||||||
|
@ -114,12 +90,27 @@ jar {
|
||||||
"Specification-Version" : "1",
|
"Specification-Version" : "1",
|
||||||
"Implementation-Title" : project.archivesBaseName,
|
"Implementation-Title" : project.archivesBaseName,
|
||||||
"Implementation-Version" : project.version,
|
"Implementation-Version" : project.version,
|
||||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],)
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
||||||
|
"Modloader": "Neoforge",
|
||||||
|
"Modloader-Version": project.neo_version,
|
||||||
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
from sourceSets.main.output
|
from sourceSets.main.output
|
||||||
}
|
}
|
||||||
|
|
||||||
|
processResources {
|
||||||
|
inputs.property('version', project.version)
|
||||||
|
inputs.property('neo_version_range', project.neo_version_range)
|
||||||
|
inputs.property('loader', project.loader)
|
||||||
|
inputs.property('minecraft_version_range', project.minecraft_version_range)
|
||||||
|
|
||||||
|
filesMatching(['META-INF/mods.toml']) {
|
||||||
|
expand 'version': project.version, 'neo_version_range': project.neo_version_range, 'loader': project.loader, 'minecraft_version_range': project.minecraft_version_range
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
task apiJar(type: Jar) {
|
task apiJar(type: Jar) {
|
||||||
from sourceSets.main.output
|
from sourceSets.main.output
|
||||||
from sourceSets.main.java
|
from sourceSets.main.java
|
||||||
|
|
|
@ -2,13 +2,17 @@ org.gradle.jvmargs=-Xmx3G
|
||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
# Actually Additions
|
# Actually Additions
|
||||||
|
|
||||||
# TODO: check this version change is okay.
|
|
||||||
mod_version=1.1.52
|
mod_version=1.1.52
|
||||||
|
|
||||||
# Forge
|
# Forge
|
||||||
game_version=1.20.4
|
game_version=1.20.4
|
||||||
neo_version=20.4.190
|
neo_version=20.4.190
|
||||||
|
|
||||||
|
# mods.toml
|
||||||
|
loader=2
|
||||||
|
neo_version_range=[20.4.190,)
|
||||||
|
minecraft_version_range=[1.20.4,1.21)
|
||||||
|
|
||||||
# Parchment (Mappings)
|
# Parchment (Mappings)
|
||||||
neogradle.subsystems.parchment.minecraftVersion=1.20.4
|
neogradle.subsystems.parchment.minecraftVersion=1.20.4
|
||||||
neogradle.subsystems.parchment.mappingsVersion=2024.02.25
|
neogradle.subsystems.parchment.mappingsVersion=2024.02.25
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// 1.20.4 2024-03-04T22:51:31.6049301 Item Recipes
|
// 1.20.4 2024-03-06T18:38:03.9906633 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
|
||||||
|
@ -55,9 +55,11 @@ bbda1becc270cf13e6b1d8e6d873aafa0951552d data/actuallyadditions/recipes/lens_of_
|
||||||
4a76fa84033e80532494163fc35f60c44bdb67b5 data/actuallyadditions/recipes/player_probe.json
|
4a76fa84033e80532494163fc35f60c44bdb67b5 data/actuallyadditions/recipes/player_probe.json
|
||||||
2f24905a9d4b0e5d3d5ecbc5a7fa3a7647f41619 data/actuallyadditions/recipes/quadruple_battery.json
|
2f24905a9d4b0e5d3d5ecbc5a7fa3a7647f41619 data/actuallyadditions/recipes/quadruple_battery.json
|
||||||
80a2e4f402acab5da96bdf3acd459fce0f930c08 data/actuallyadditions/recipes/quintuple_battery.json
|
80a2e4f402acab5da96bdf3acd459fce0f930c08 data/actuallyadditions/recipes/quintuple_battery.json
|
||||||
|
c6ff81ba878c02651a9353e490b3a8f9897a5410 data/actuallyadditions/recipes/rice_dough.json
|
||||||
5958ff2fb37430660fb22012212336320ee83dd8 data/actuallyadditions/recipes/rice_seeds.json
|
5958ff2fb37430660fb22012212336320ee83dd8 data/actuallyadditions/recipes/rice_seeds.json
|
||||||
f6c73cb2e41a8a21e2fda888b28bf52672b33d2e data/actuallyadditions/recipes/rice_slime.json
|
f6c73cb2e41a8a21e2fda888b28bf52672b33d2e data/actuallyadditions/recipes/rice_slime.json
|
||||||
319b2d0423b79497837f5a3f940011b3bccf09f3 data/actuallyadditions/recipes/rice_slime_potion.json
|
319b2d0423b79497837f5a3f940011b3bccf09f3 data/actuallyadditions/recipes/rice_slime_potion.json
|
||||||
|
2bd92dcc8b63d8577d804d172321d3a47c4b001d data/actuallyadditions/recipes/ring.json
|
||||||
dd9f1f6cf00985f75ef5deee8e138c533e81db1a data/actuallyadditions/recipes/ring_of_growth.json
|
dd9f1f6cf00985f75ef5deee8e138c533e81db1a data/actuallyadditions/recipes/ring_of_growth.json
|
||||||
764d4f63e1d978d02419d30d2ad845b914e594c0 data/actuallyadditions/recipes/ring_of_magnetizing.json
|
764d4f63e1d978d02419d30d2ad845b914e594c0 data/actuallyadditions/recipes/ring_of_magnetizing.json
|
||||||
fc0a5281fc77edde16f22165e164f73dd28d7fcd data/actuallyadditions/recipes/single_battery.json
|
fc0a5281fc77edde16f22165e164f73dd28d7fcd data/actuallyadditions/recipes/single_battery.json
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// 1.20.4 2024-03-04T22:51:31.6159299 Recipes
|
// 1.20.4 2024-03-06T18:38:03.9956221 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
|
||||||
|
@ -13,9 +13,13 @@ db1978ab59369dd3c10e719073b7035acf33885c data/actuallyadditions/recipes/black_qu
|
||||||
86b8c5e857cf1b00e154b5f798a3e837e6a05333 data/actuallyadditions/recipes/chiseled_black_quartz_slab.json
|
86b8c5e857cf1b00e154b5f798a3e837e6a05333 data/actuallyadditions/recipes/chiseled_black_quartz_slab.json
|
||||||
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
|
||||||
|
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
|
||||||
|
@ -31,10 +35,13 @@ 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
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// 1.20.4 2024-03-05T23:33:24.583284 Item Models: actuallyadditions
|
// 1.20.4 2024-03-06T18:25:03.3664612 Item Models: actuallyadditions
|
||||||
1966de13838437bc6035f3649976a44797cf5144 assets/actuallyadditions/models/item/advanced_coil.json
|
1966de13838437bc6035f3649976a44797cf5144 assets/actuallyadditions/models/item/advanced_coil.json
|
||||||
24594fc68e66011dc2d7b79b92c94b387e710318 assets/actuallyadditions/models/item/advanced_leaf_blower.json
|
24594fc68e66011dc2d7b79b92c94b387e710318 assets/actuallyadditions/models/item/advanced_leaf_blower.json
|
||||||
ba2d814e269cdef72e1045f200b3c20ed6961517 assets/actuallyadditions/models/item/atomic_reconstructor.json
|
ba2d814e269cdef72e1045f200b3c20ed6961517 assets/actuallyadditions/models/item/atomic_reconstructor.json
|
||||||
|
@ -35,6 +35,7 @@ c73981382d646e4a0186b26fcfad817d39252055 assets/actuallyadditions/models/item/ch
|
||||||
2f943a7dfad9dee932b0c943c52a1490a625fdb9 assets/actuallyadditions/models/item/coffee_cup.json
|
2f943a7dfad9dee932b0c943c52a1490a625fdb9 assets/actuallyadditions/models/item/coffee_cup.json
|
||||||
a67f1795e1ad1d6ed19f2a35f176f39e00dbb9c3 assets/actuallyadditions/models/item/coffee_machine.json
|
a67f1795e1ad1d6ed19f2a35f176f39e00dbb9c3 assets/actuallyadditions/models/item/coffee_machine.json
|
||||||
523148eac33929fb0d2892856a5ddcb784043bb5 assets/actuallyadditions/models/item/crafter_on_a_stick.json
|
523148eac33929fb0d2892856a5ddcb784043bb5 assets/actuallyadditions/models/item/crafter_on_a_stick.json
|
||||||
|
89cc79420e3a7c2952ce729537b7503a517bb9de assets/actuallyadditions/models/item/crate_keeper.json
|
||||||
9bc734dadf9d5b85b8cc5685b673a1d074cf3d6d assets/actuallyadditions/models/item/crusher.json
|
9bc734dadf9d5b85b8cc5685b673a1d074cf3d6d assets/actuallyadditions/models/item/crusher.json
|
||||||
4b7ef5dd15d930d4b0b5507cd08c27cb5ee1498a assets/actuallyadditions/models/item/crusher_double.json
|
4b7ef5dd15d930d4b0b5507cd08c27cb5ee1498a assets/actuallyadditions/models/item/crusher_double.json
|
||||||
a38461a8a2056640674708a32548701b9c77bac3 assets/actuallyadditions/models/item/crystallized_canola_seed.json
|
a38461a8a2056640674708a32548701b9c77bac3 assets/actuallyadditions/models/item/crystallized_canola_seed.json
|
||||||
|
@ -46,7 +47,6 @@ e669eeb5832e40fd782df0f3ba89a27d3cadb9d3 assets/actuallyadditions/models/item/di
|
||||||
3318c3bb118ee0bb1008a936c72ec80dcaf59b8c assets/actuallyadditions/models/item/diamond_aiot.json
|
3318c3bb118ee0bb1008a936c72ec80dcaf59b8c assets/actuallyadditions/models/item/diamond_aiot.json
|
||||||
11e4961bde9e6900dc90a833108060a774783df6 assets/actuallyadditions/models/item/display_stand.json
|
11e4961bde9e6900dc90a833108060a774783df6 assets/actuallyadditions/models/item/display_stand.json
|
||||||
2ed3d6a7d3b292d765616e09ca0fe03810ad80eb assets/actuallyadditions/models/item/double_battery.json
|
2ed3d6a7d3b292d765616e09ca0fe03810ad80eb assets/actuallyadditions/models/item/double_battery.json
|
||||||
21407d7ee7e6a9afd4841e0c5f335166d00c8edc assets/actuallyadditions/models/item/dough.json
|
|
||||||
2669dbeb32101f50763c9cd7f71f5b401461dc18 assets/actuallyadditions/models/item/drill_black.json
|
2669dbeb32101f50763c9cd7f71f5b401461dc18 assets/actuallyadditions/models/item/drill_black.json
|
||||||
1b836004c51c7730cb9e2b21f6e6deb036d2274e assets/actuallyadditions/models/item/drill_blue.json
|
1b836004c51c7730cb9e2b21f6e6deb036d2274e assets/actuallyadditions/models/item/drill_blue.json
|
||||||
aa33fb2f609dfd580a0170bf59472b42430aec44 assets/actuallyadditions/models/item/drill_brown.json
|
aa33fb2f609dfd580a0170bf59472b42430aec44 assets/actuallyadditions/models/item/drill_brown.json
|
||||||
|
@ -172,7 +172,6 @@ cf5417e23f9eab2ce0560c4fd4c6b53940ba01b1 assets/actuallyadditions/models/item/le
|
||||||
1a4ec0f6ed3b9b741438be7d4388676c92d0d3c1 assets/actuallyadditions/models/item/palis_crystal_block.json
|
1a4ec0f6ed3b9b741438be7d4388676c92d0d3c1 assets/actuallyadditions/models/item/palis_crystal_block.json
|
||||||
df692efd0af52a6b3eef1332cb2e6b5469e47dbf assets/actuallyadditions/models/item/palis_crystal_cluster.json
|
df692efd0af52a6b3eef1332cb2e6b5469e47dbf assets/actuallyadditions/models/item/palis_crystal_cluster.json
|
||||||
046fa6e050fdaeadca8da1335be501705fa84723 assets/actuallyadditions/models/item/palis_crystal_shard.json
|
046fa6e050fdaeadca8da1335be501705fa84723 assets/actuallyadditions/models/item/palis_crystal_shard.json
|
||||||
29958f60555c7c12e36831dcc69504c8d8b52357 assets/actuallyadditions/models/item/paper_cone.json
|
|
||||||
158760d91cbb130b57b457e673e4b936b337ffc1 assets/actuallyadditions/models/item/phantom_booster.json
|
158760d91cbb130b57b457e673e4b936b337ffc1 assets/actuallyadditions/models/item/phantom_booster.json
|
||||||
b393ea03ae008aca117e8f7aa5a2d69ef36b827b assets/actuallyadditions/models/item/phantom_breaker.json
|
b393ea03ae008aca117e8f7aa5a2d69ef36b827b assets/actuallyadditions/models/item/phantom_breaker.json
|
||||||
2e3aa5aed20b31941e10b8ae868153f25aeadde4 assets/actuallyadditions/models/item/phantom_connector.json
|
2e3aa5aed20b31941e10b8ae868153f25aeadde4 assets/actuallyadditions/models/item/phantom_connector.json
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"parent": "minecraft:item/handheld",
|
"parent": "minecraft:item/handheld",
|
||||||
"textures": {
|
"textures": {
|
||||||
"layer0": "actuallyadditions:item/dough"
|
"layer0": "actuallyadditions:item/crate_keeper"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "minecraft:item/handheld",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "actuallyadditions:item/paper_cone"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"category": "misc",
|
||||||
|
"key": {
|
||||||
|
"C": {
|
||||||
|
"item": "actuallyadditions:coffee_beans"
|
||||||
|
},
|
||||||
|
"I": {
|
||||||
|
"item": "actuallyadditions:iron_casing"
|
||||||
|
},
|
||||||
|
"V": {
|
||||||
|
"item": "actuallyadditions:void_crystal"
|
||||||
|
},
|
||||||
|
"X": {
|
||||||
|
"item": "actuallyadditions:basic_coil"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
" C ",
|
||||||
|
" I ",
|
||||||
|
"XVX"
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "actuallyadditions:coffee_machine"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"category": "misc",
|
||||||
|
"key": {
|
||||||
|
"Q": {
|
||||||
|
"item": "actuallyadditions:diamatine_crystal"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"QQQ",
|
||||||
|
"QQQ",
|
||||||
|
"QQQ"
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "actuallyadditions:diamatine_crystal_block"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"category": "misc",
|
||||||
|
"key": {
|
||||||
|
"Q": {
|
||||||
|
"item": "actuallyadditions:emeradic_crystal"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"QQQ",
|
||||||
|
"QQQ",
|
||||||
|
"QQQ"
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "actuallyadditions:emeradic_crystal_block"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"category": "misc",
|
||||||
|
"key": {
|
||||||
|
"Q": {
|
||||||
|
"item": "actuallyadditions:enori_crystal"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"QQQ",
|
||||||
|
"QQQ",
|
||||||
|
"QQQ"
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "actuallyadditions:enori_crystal_block"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"category": "misc",
|
||||||
|
"key": {
|
||||||
|
"Q": {
|
||||||
|
"item": "actuallyadditions:palis_crystal"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"QQQ",
|
||||||
|
"QQQ",
|
||||||
|
"QQQ"
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "actuallyadditions:palis_crystal_block"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"category": "misc",
|
||||||
|
"key": {
|
||||||
|
"Q": {
|
||||||
|
"item": "actuallyadditions:restonia_crystal"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"QQQ",
|
||||||
|
"QQQ",
|
||||||
|
"QQQ"
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "actuallyadditions:restonia_crystal_block"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shapeless",
|
||||||
|
"category": "misc",
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"item": "actuallyadditions:rice"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item": "actuallyadditions:rice"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item": "actuallyadditions:rice"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"count": 2,
|
||||||
|
"item": "actuallyadditions:rice_dough"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"category": "misc",
|
||||||
|
"key": {
|
||||||
|
"D": {
|
||||||
|
"tag": "forge:dusts/glowstone"
|
||||||
|
},
|
||||||
|
"G": {
|
||||||
|
"tag": "forge:ingots/gold"
|
||||||
|
},
|
||||||
|
"I": {
|
||||||
|
"tag": "forge:ingots/iron"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"IGI",
|
||||||
|
"GDG",
|
||||||
|
"IGI"
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "actuallyadditions:ring"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"category": "misc",
|
||||||
|
"key": {
|
||||||
|
"Q": {
|
||||||
|
"item": "actuallyadditions:void_crystal"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pattern": [
|
||||||
|
"QQQ",
|
||||||
|
"QQQ",
|
||||||
|
"QQQ"
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "actuallyadditions:void_crystal_block"
|
||||||
|
}
|
||||||
|
}
|
|
@ -222,8 +222,23 @@ public class BlockRecipeGenerator extends RecipeProvider {
|
||||||
.define('S', ActuallyItems.EMPOWERED_DIAMATINE_CRYSTAL.get())
|
.define('S', ActuallyItems.EMPOWERED_DIAMATINE_CRYSTAL.get())
|
||||||
.save(recipeOutput);
|
.save(recipeOutput);
|
||||||
|
|
||||||
|
//Coffee Maker
|
||||||
|
Recipe.shaped(ActuallyBlocks.COFFEE_MACHINE.getItem())
|
||||||
|
.pattern(" C ", " I ", "XVX")
|
||||||
|
.define('C', ActuallyItems.COFFEE_BEANS)
|
||||||
|
.define('I', ActuallyBlocks.IRON_CASING.getItem())
|
||||||
|
.define('X', ActuallyItems.BASIC_COIL.get())
|
||||||
|
.define('V', ActuallyItems.VOID_CRYSTAL.get())
|
||||||
|
.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 {
|
||||||
|
@ -255,6 +270,10 @@ 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);
|
||||||
|
|
|
@ -30,6 +30,7 @@ public class ItemModelGenerator extends ItemModelProvider {
|
||||||
protected void registerModels() {
|
protected void registerModels() {
|
||||||
// Items
|
// Items
|
||||||
simpleItem(ActuallyItems.ITEM_BOOKLET); // will require complex I think
|
simpleItem(ActuallyItems.ITEM_BOOKLET); // will require complex I think
|
||||||
|
simpleItem(ActuallyItems.CRATE_KEEPER);
|
||||||
|
|
||||||
// All items?
|
// All items?
|
||||||
ActuallyItems.SIMPLE_ITEMS.forEach(this::simpleItem);
|
ActuallyItems.SIMPLE_ITEMS.forEach(this::simpleItem);
|
||||||
|
|
|
@ -451,6 +451,19 @@ public class ItemRecipeGenerator extends RecipeProvider {
|
||||||
.requires(ActuallyItems.RICE.get())
|
.requires(ActuallyItems.RICE.get())
|
||||||
.save(recipeOutput);
|
.save(recipeOutput);
|
||||||
|
|
||||||
|
//Rice Dough
|
||||||
|
Recipe.shapeless(ActuallyItems.RICE_DOUGH.get(), 2)
|
||||||
|
.requires(ActuallyItems.RICE.get(), 3)
|
||||||
|
.save(recipeOutput);
|
||||||
|
|
||||||
|
//Ring, glow stone dust in the middle, iron in the corners, gold in the cardinals.
|
||||||
|
Recipe.shaped(ActuallyItems.RING)
|
||||||
|
.pattern("IGI", "GDG", "IGI")
|
||||||
|
.define('I', Tags.Items.INGOTS_IRON)
|
||||||
|
.define('G', Tags.Items.INGOTS_GOLD)
|
||||||
|
.define('D', Tags.Items.DUSTS_GLOWSTONE)
|
||||||
|
.save(recipeOutput);
|
||||||
|
|
||||||
//Cup
|
//Cup
|
||||||
Recipe.shaped(ActuallyItems.EMPTY_CUP.get())
|
Recipe.shaped(ActuallyItems.EMPTY_CUP.get())
|
||||||
.pattern("S S", "SCS", "SSS")
|
.pattern("S S", "SCS", "SSS")
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package de.ellpeck.actuallyadditions.mod;
|
package de.ellpeck.actuallyadditions.mod;
|
||||||
|
|
||||||
|
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 net.minecraft.core.registries.Registries;
|
import net.minecraft.core.registries.Registries;
|
||||||
|
@ -8,10 +9,15 @@ import net.minecraft.world.item.CreativeModeTab;
|
||||||
import net.minecraft.world.item.CreativeModeTabs;
|
import net.minecraft.world.item.CreativeModeTabs;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.neoforged.bus.api.IEventBus;
|
import net.neoforged.bus.api.IEventBus;
|
||||||
|
import net.neoforged.neoforge.capabilities.Capabilities;
|
||||||
|
import net.neoforged.neoforge.energy.EnergyStorage;
|
||||||
|
import net.neoforged.neoforge.energy.IEnergyStorage;
|
||||||
import net.neoforged.neoforge.registries.DeferredRegister;
|
import net.neoforged.neoforge.registries.DeferredRegister;
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class ActuallyTabs {
|
public class ActuallyTabs {
|
||||||
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, ActuallyAdditions.MODID);
|
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, ActuallyAdditions.MODID);
|
||||||
|
@ -21,12 +27,19 @@ public class ActuallyTabs {
|
||||||
.withTabsBefore(CreativeModeTabs.SPAWN_EGGS)
|
.withTabsBefore(CreativeModeTabs.SPAWN_EGGS)
|
||||||
.title(Component.translatable("itemGroup.actuallyadditions"))
|
.title(Component.translatable("itemGroup.actuallyadditions"))
|
||||||
.displayItems((parameters, output) -> {
|
.displayItems((parameters, output) -> {
|
||||||
List<ItemStack> stacks = ActuallyItems.ITEMS.getEntries().stream().map(reg -> new ItemStack(reg.get())).toList();
|
List<ItemStack> stacks = ActuallyItems.ITEMS.getEntries().stream().map(reg -> new ItemStack(reg.get())).collect(Collectors.toList());
|
||||||
stacks.forEach(stack -> {
|
|
||||||
|
//Add charged versions of all energy items
|
||||||
|
List<ItemStack> charged = ActuallyItems.ITEMS.getEntries().stream().map(reg -> new ItemStack(reg.get()))
|
||||||
|
.filter(stack -> stack.getItem() instanceof ItemEnergy).toList();
|
||||||
|
charged.forEach(stack -> {
|
||||||
if(stack.getItem() instanceof ItemEnergy itemEnergy) {
|
if(stack.getItem() instanceof ItemEnergy itemEnergy) {
|
||||||
stack.getOrCreateTag().putDouble("Energy", itemEnergy.getMaxEnergyStored(stack));
|
EnergyStorage storage = new EnergyStorage(itemEnergy.maxPower, itemEnergy.transfer, itemEnergy.transfer, itemEnergy.maxPower);
|
||||||
|
stack.setData(ActuallyAttachments.ENERGY_STORAGE.get(), storage);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
stacks.addAll(charged);
|
||||||
|
|
||||||
output.acceptAll(stacks);
|
output.acceptAll(stacks);
|
||||||
}).build());
|
}).build());
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
package de.ellpeck.actuallyadditions.mod.attachments;
|
package de.ellpeck.actuallyadditions.mod.attachments;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
|
import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.CustomEnergyStorage;
|
import de.ellpeck.actuallyadditions.mod.tile.CustomEnergyStorage;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.neoforged.bus.api.IEventBus;
|
import net.neoforged.bus.api.IEventBus;
|
||||||
import net.neoforged.neoforge.attachment.AttachmentType;
|
import net.neoforged.neoforge.attachment.AttachmentType;
|
||||||
|
import net.neoforged.neoforge.energy.EnergyStorage;
|
||||||
import net.neoforged.neoforge.registries.DeferredRegister;
|
import net.neoforged.neoforge.registries.DeferredRegister;
|
||||||
import net.neoforged.neoforge.registries.NeoForgeRegistries;
|
import net.neoforged.neoforge.registries.NeoForgeRegistries;
|
||||||
|
|
||||||
|
@ -12,8 +15,30 @@ 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<CustomEnergyStorage>> ENERGY_STORAGE = ATTACHMENT_TYPES.register(
|
public static final Supplier<AttachmentType<EnergyStorage>> ENERGY_STORAGE = ATTACHMENT_TYPES.register(
|
||||||
"energy", () -> AttachmentType.serializable((holder) -> new CustomEnergyStorage(250000, 1000, 1000)).build());
|
"energy", ActuallyAttachments.itemEnergyStorageAttachment());
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
public static Supplier<AttachmentType<EnergyStorage>> itemEnergyStorageAttachment() {
|
||||||
|
return () -> AttachmentType.serializable(holder -> {
|
||||||
|
if (holder instanceof ItemStack itemStack) {
|
||||||
|
int capacity = 1000;
|
||||||
|
int maxTransfer = 1000;
|
||||||
|
if (itemStack.getItem() instanceof ItemEnergy itemEnergy) {
|
||||||
|
capacity = itemEnergy.maxPower;
|
||||||
|
maxTransfer = itemEnergy.transfer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return new EnergyStorage(capacity, maxTransfer, maxTransfer);
|
||||||
|
} else {
|
||||||
|
throw new IllegalStateException("Cannot attach energy handler item to a non-item.");
|
||||||
|
}
|
||||||
|
}).build();
|
||||||
|
}
|
||||||
|
|
||||||
public static void init(IEventBus evt) {
|
public static void init(IEventBus evt) {
|
||||||
ATTACHMENT_TYPES.register(evt);
|
ATTACHMENT_TYPES.register(evt);
|
||||||
|
|
|
@ -63,17 +63,12 @@ public class RenderBatteryBox implements BlockEntityRenderer<TileEntityBatteryBo
|
||||||
int j = (int) (backgroundOpacity * 255.0F) << 24;
|
int j = (int) (backgroundOpacity * 255.0F) << 24;
|
||||||
|
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
matrices.pushPose();
|
Matrix4f pose = matrices.last().pose();
|
||||||
|
font.drawInBatch(energyTotal, -font.width(energyTotal) / 2F, 10F, 0xFFFFFF, false, pose, buffer, Font.DisplayMode.NORMAL, j, combinedLight);
|
||||||
|
font.drawInBatch(energyName, -font.width(energyName) / 2F, 20F, 0xFFFFFF, false, pose, buffer, Font.DisplayMode.NORMAL, j, combinedLight);
|
||||||
|
|
||||||
matrices.translate(-60F, 0F, 60F);
|
matrices.translate(-60F, 0F, 60F);
|
||||||
matrices.mulPose(Axis.YP.rotationDegrees(90));
|
matrices.mulPose(Axis.YP.rotationDegrees(90));
|
||||||
Matrix4f pose = matrices.last().pose();
|
|
||||||
font.drawInBatch(energyTotal, -font.width(energyTotal) / 2F, 10F, 0, false, pose, buffer, Font.DisplayMode.SEE_THROUGH, j, combinedLight, true);
|
|
||||||
font.drawInBatch(energyName, -font.width(energyTotal) / 2F, 20F, 0, false, pose, buffer, Font.DisplayMode.SEE_THROUGH, j, combinedLight, true);
|
|
||||||
// font.draw(matrices, energyTotal, -font.width(energyTotal) / 2F, 10F, 0xFFFFFF);
|
|
||||||
// font.draw(matrices, energyName, -font.width(energyName) / 2F, 20F, 0xFFFFFF);
|
|
||||||
|
|
||||||
matrices.popPose();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -20,16 +20,17 @@ public class CommonConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ItemSettings {
|
public static class ItemSettings {
|
||||||
public static ModConfigSpec.ConfigValue<List<String>> DRILL_EXTRA_MINING_WHITELIST;
|
public static ModConfigSpec.ConfigValue<List<? extends String>> DRILL_EXTRA_MINING_WHITELIST;
|
||||||
|
|
||||||
public static void build() {
|
public static void build() {
|
||||||
BUILDER.comment("Item settings").push("itemsSettings");
|
BUILDER.comment("Item settings").push("itemsSettings");
|
||||||
|
|
||||||
|
// TODO: Tags!
|
||||||
DRILL_EXTRA_MINING_WHITELIST = BUILDER
|
DRILL_EXTRA_MINING_WHITELIST = BUILDER
|
||||||
.comment("By default, the Drill can mine certain blocks. If there is one that it can't mine, but should be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.")
|
.comment("By default, the Drill can mine certain blocks. If there is one that it can't mine, but should be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.")
|
||||||
.define("Drill Extra Whitelist", new ArrayList<String>() {{
|
.defineList("Drill Extra Whitelist", new ArrayList<>() {{
|
||||||
add("TConstruct:GravelOre");
|
add("TConstruct:GravelOre");
|
||||||
}});
|
}}, (o) -> o instanceof String);
|
||||||
|
|
||||||
BUILDER.pop();
|
BUILDER.pop();
|
||||||
}
|
}
|
||||||
|
@ -141,8 +142,8 @@ public class CommonConfig {
|
||||||
MOST_BLAND_PERSON_EVER = BUILDER.comment("If you want to be really boring and lame, you can turn on this setting to disable colored names on Actually Additions items. Because why would you want things to look pretty anyways, right?")
|
MOST_BLAND_PERSON_EVER = BUILDER.comment("If you want to be really boring and lame, you can turn on this setting to disable colored names on Actually Additions items. Because why would you want things to look pretty anyways, right?")
|
||||||
.define("noColoredItemNames", false); //TODO is this still needed?
|
.define("noColoredItemNames", false); //TODO is this still needed?
|
||||||
|
|
||||||
REDSTONECONFIGURATOR = BUILDER.comment("define the item used to configure Redstone Mode").define("redstoneConfigurator", "minecraft:redstone_torch", obj -> obj instanceof String);
|
REDSTONECONFIGURATOR = BUILDER.comment("define the item used to configure Redstone Mode").define("redstoneConfigurator", "minecraft:redstone_torch");
|
||||||
RELAYCONFIGURATOR = BUILDER.comment("define the item used to configure Direction in laser relays").define("relayConfigurator", "minecraft:compass", obj -> obj instanceof String);
|
RELAYCONFIGURATOR = BUILDER.comment("define the item used to configure Direction in laser relays").define("relayConfigurator", "minecraft:compass");
|
||||||
|
|
||||||
BUILDER.pop();
|
BUILDER.pop();
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ import de.ellpeck.actuallyadditions.mod.data.WorldData;
|
||||||
import de.ellpeck.actuallyadditions.mod.inventory.gui.EnergyDisplay;
|
import de.ellpeck.actuallyadditions.mod.inventory.gui.EnergyDisplay;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.IEnergyDisplay;
|
import de.ellpeck.actuallyadditions.mod.tile.IEnergyDisplay;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
|
||||||
|
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||||
import net.minecraft.ChatFormatting;
|
import net.minecraft.ChatFormatting;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
@ -37,6 +38,7 @@ import net.neoforged.api.distmarker.Dist;
|
||||||
import net.neoforged.api.distmarker.OnlyIn;
|
import net.neoforged.api.distmarker.OnlyIn;
|
||||||
import net.neoforged.bus.api.SubscribeEvent;
|
import net.neoforged.bus.api.SubscribeEvent;
|
||||||
import net.neoforged.neoforge.client.event.RenderGuiOverlayEvent;
|
import net.neoforged.neoforge.client.event.RenderGuiOverlayEvent;
|
||||||
|
import net.neoforged.neoforge.client.event.RenderLevelStageEvent;
|
||||||
import net.neoforged.neoforge.client.gui.overlay.GuiOverlayManager;
|
import net.neoforged.neoforge.client.gui.overlay.GuiOverlayManager;
|
||||||
import net.neoforged.neoforge.event.TickEvent;
|
import net.neoforged.neoforge.event.TickEvent;
|
||||||
import net.neoforged.neoforge.event.entity.player.ItemTooltipEvent;
|
import net.neoforged.neoforge.event.entity.player.ItemTooltipEvent;
|
||||||
|
@ -227,4 +229,11 @@ public class ClientEvents {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* @SubscribeEvent //TODO someday move the laser rendering to a new system
|
||||||
|
public void onRenderStage(final RenderLevelStageEvent event) {
|
||||||
|
if(event.getStage() == RenderLevelStageEvent.Stage.AFTER_SOLID_BLOCKS) {
|
||||||
|
AssetUtil.renderLaser();
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ import net.minecraft.world.entity.player.Inventory;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||||
import net.minecraft.world.inventory.ClickType;
|
import net.minecraft.world.inventory.ClickType;
|
||||||
|
import net.minecraft.world.inventory.ContainerListener;
|
||||||
import net.minecraft.world.inventory.Slot;
|
import net.minecraft.world.inventory.Slot;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.neoforged.api.distmarker.Dist;
|
import net.neoforged.api.distmarker.Dist;
|
||||||
|
@ -105,13 +106,12 @@ public class SackContainer extends AbstractContainerMenu implements IButtonReact
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
/* @Override
|
||||||
public void broadcastChanges() { // TODO is this needed anymore?
|
public void broadcastChanges() { // TODO is this needed anymore?
|
||||||
super.broadcastChanges();
|
super.broadcastChanges();
|
||||||
|
|
||||||
if (this.filter.needsUpdateSend() || this.autoInsert != this.oldAutoInsert) {
|
if (this.filter.needsUpdateSend() || this.autoInsert != this.oldAutoInsert) {
|
||||||
/*
|
for (ContainerListener listener : this..containerListeners) {
|
||||||
for (IContainerListener listener : this.containerListeners) {
|
|
||||||
listener.setContainerData(this, 0, this.filter.isWhitelist
|
listener.setContainerData(this, 0, this.filter.isWhitelist
|
||||||
? 1
|
? 1
|
||||||
: 0);
|
: 0);
|
||||||
|
@ -129,7 +129,6 @@ public class SackContainer extends AbstractContainerMenu implements IButtonReact
|
||||||
? 1
|
? 1
|
||||||
: 0);
|
: 0);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
this.filter.updateLasts();
|
this.filter.updateLasts();
|
||||||
this.oldAutoInsert = this.autoInsert;
|
this.oldAutoInsert = this.autoInsert;
|
||||||
}
|
}
|
||||||
|
@ -145,7 +144,7 @@ public class SackContainer extends AbstractContainerMenu implements IButtonReact
|
||||||
} else if (id == 2) {
|
} else if (id == 2) {
|
||||||
this.filter.respectMod = data == 1;
|
this.filter.respectMod = data == 1;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack quickMoveStack(@Nonnull Player player, int slot) {
|
public ItemStack quickMoveStack(@Nonnull Player player, int slot) {
|
||||||
|
|
|
@ -41,11 +41,17 @@ public class FilterSettingsGui {
|
||||||
public FilterSettingsGui(FilterSettings settings, int x, int y, Consumer<AbstractButton> buttonConsumer, int idOffset) {
|
public FilterSettingsGui(FilterSettings settings, int x, int y, Consumer<AbstractButton> buttonConsumer, int idOffset) {
|
||||||
this.theSettings = settings;
|
this.theSettings = settings;
|
||||||
|
|
||||||
this.whitelistButton = Button.builder(Component.literal("WH"), $ -> buttonClicked(idOffset))
|
this.whitelistButton = Button.builder(Component.literal("WH"), $ -> {
|
||||||
|
theSettings.isWhitelist = !theSettings.isWhitelist;
|
||||||
|
buttonClicked(idOffset);
|
||||||
|
})
|
||||||
.bounds(x, y, 16, 12).build();
|
.bounds(x, y, 16, 12).build();
|
||||||
buttonConsumer.accept(this.whitelistButton);
|
buttonConsumer.accept(this.whitelistButton);
|
||||||
y += 14;
|
y += 14;
|
||||||
this.modButton = Button.builder(Component.literal("MO"), $ -> buttonClicked(idOffset + 1))
|
this.modButton = Button.builder(Component.literal("MO"), $ -> {
|
||||||
|
theSettings.respectMod = !theSettings.respectMod;
|
||||||
|
buttonClicked(idOffset + 1);
|
||||||
|
})
|
||||||
.bounds(x, y, 16, 12).build();
|
.bounds(x, y, 16, 12).build();
|
||||||
buttonConsumer.accept(this.modButton);
|
buttonConsumer.accept(this.modButton);
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class GuiDrill extends AAScreen<ContainerDrill> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renderLabels(@Nonnull GuiGraphics guiGraphics, int x, int y) {
|
public void renderLabels(@Nonnull GuiGraphics guiGraphics, int x, int y) {
|
||||||
AssetUtil.displayNameString(guiGraphics, this.font, this.imageWidth, -10, I18n.get("container." + ActuallyAdditions.MODID + ".drill.name"));
|
AssetUtil.displayNameString(guiGraphics, this.font, this.imageWidth, -10, I18n.get("container." + ActuallyAdditions.MODID + ".drill"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class SackGui extends AAScreen<SackContainer> {
|
||||||
public void init() {
|
public void init() {
|
||||||
super.init();
|
super.init();
|
||||||
|
|
||||||
this.filter = new FilterSettingsGui(this.container.filter, this.leftPos + 138, this.topPos + 10, this::addRenderableWidget, 1);
|
this.filter = new FilterSettingsGui(this.container.filter, this.leftPos + 137, this.topPos + 10, this::addRenderableWidget, 1);
|
||||||
|
|
||||||
this.buttonAutoInsert = Button.builder(
|
this.buttonAutoInsert = Button.builder(
|
||||||
Component.literal("I")
|
Component.literal("I")
|
||||||
|
|
|
@ -40,8 +40,6 @@ public final class ActuallyItems {
|
||||||
// MISC ITEMS
|
// MISC ITEMS
|
||||||
public static final DeferredItem<ItemBase> CANOLA = ITEMS.register("canola", () -> new ItemBase());
|
public static final DeferredItem<ItemBase> CANOLA = ITEMS.register("canola", () -> new ItemBase());
|
||||||
public static final DeferredItem<ItemCoffee> COFFEE_CUP = ITEMS.register("coffee_cup", () -> new ItemCoffee());
|
public static final DeferredItem<ItemCoffee> COFFEE_CUP = ITEMS.register("coffee_cup", () -> new ItemCoffee());
|
||||||
public static final DeferredItem<ItemBase> PAPER_CONE = ITEMS.register("paper_cone", () -> new ItemBase());
|
|
||||||
public static final DeferredItem<ItemBase> DOUGH = ITEMS.register("dough", () -> new ItemBase());
|
|
||||||
public static final DeferredItem<ItemBase> RING = ITEMS.register("ring", () -> new ItemBase());
|
public static final DeferredItem<ItemBase> RING = ITEMS.register("ring", () -> new ItemBase());
|
||||||
public static final DeferredItem<ItemBase> BASIC_COIL = ITEMS.register("basic_coil", () -> new ItemBase());
|
public static final DeferredItem<ItemBase> BASIC_COIL = ITEMS.register("basic_coil", () -> new ItemBase());
|
||||||
public static final DeferredItem<ItemBase> ADVANCED_COIL = ITEMS.register("advanced_coil", () -> new ItemBase());
|
public static final DeferredItem<ItemBase> ADVANCED_COIL = ITEMS.register("advanced_coil", () -> new ItemBase());
|
||||||
|
@ -192,7 +190,7 @@ public final class ActuallyItems {
|
||||||
// The rest?
|
// The rest?
|
||||||
RESTONIA_CRYSTAL_SHARD, PALIS_CRYSTAL_SHARD, DIAMATINE_CRYSTAL_SHARD, VOID_CRYSTAL_SHARD, EMERADIC_CRYSTAL_SHARD,
|
RESTONIA_CRYSTAL_SHARD, PALIS_CRYSTAL_SHARD, DIAMATINE_CRYSTAL_SHARD, VOID_CRYSTAL_SHARD, EMERADIC_CRYSTAL_SHARD,
|
||||||
ENORI_CRYSTAL_SHARD, ENGINEERS_GOGGLES, ENGINEERS_GOGGLES_ADVANCED, LASER_UPGRADE_RANGE, LASER_UPGRADE_INVISIBILITY,
|
ENORI_CRYSTAL_SHARD, ENGINEERS_GOGGLES, ENGINEERS_GOGGLES_ADVANCED, LASER_UPGRADE_RANGE, LASER_UPGRADE_INVISIBILITY,
|
||||||
HANDHELD_FILLER, TRAVELERS_SACK, VOID_SACK, PLAYER_PROBE, FILTER, WATER_BOWL, PAPER_CONE, DOUGH,
|
HANDHELD_FILLER, TRAVELERS_SACK, VOID_SACK, PLAYER_PROBE, FILTER, WATER_BOWL,
|
||||||
RING, BASIC_COIL, ADVANCED_COIL, RICE_DOUGH, TINY_COAL, TINY_CHARCOAL, RICE_SLIMEBALL, CANOLA, EMPTY_CUP,
|
RING, BASIC_COIL, ADVANCED_COIL, RICE_DOUGH, TINY_COAL, TINY_CHARCOAL, RICE_SLIMEBALL, CANOLA, EMPTY_CUP,
|
||||||
BATS_WING, DRILL_CORE, LENS, ENDER_STAR, CRYSTALLIZED_CANOLA_SEED, EMPOWERED_CANOLA_SEED, LENS_OF_COLOR,
|
BATS_WING, DRILL_CORE, LENS, ENDER_STAR, CRYSTALLIZED_CANOLA_SEED, EMPOWERED_CANOLA_SEED, LENS_OF_COLOR,
|
||||||
LENS_OF_DETONATION, LENS_OF_CERTAIN_DEATH, LENS_OF_THE_KILLER, LENS_OF_DISENCHANTING, LENS_OF_THE_MINER,
|
LENS_OF_DETONATION, LENS_OF_CERTAIN_DEATH, LENS_OF_THE_KILLER, LENS_OF_DISENCHANTING, LENS_OF_THE_MINER,
|
||||||
|
|
|
@ -59,7 +59,6 @@ import net.neoforged.neoforge.items.IItemHandler;
|
||||||
import net.neoforged.neoforge.items.IItemHandlerModifiable;
|
import net.neoforged.neoforge.items.IItemHandlerModifiable;
|
||||||
|
|
||||||
public class DrillItem extends ItemEnergy {
|
public class DrillItem extends ItemEnergy {
|
||||||
|
|
||||||
public static final int HARVEST_LEVEL = 4;
|
public static final int HARVEST_LEVEL = 4;
|
||||||
private static final int ENERGY_USE = 100;
|
private static final int ENERGY_USE = 100;
|
||||||
|
|
||||||
|
@ -161,14 +160,12 @@ public class DrillItem extends ItemEnergy {
|
||||||
* @return The Upgrade, if it's installed
|
* @return The Upgrade, if it's installed
|
||||||
*/
|
*/
|
||||||
public ItemStack getHasUpgradeAsStack(ItemStack stack, ItemDrillUpgrade.UpgradeType upgrade) {
|
public ItemStack getHasUpgradeAsStack(ItemStack stack, ItemDrillUpgrade.UpgradeType upgrade) {
|
||||||
CompoundTag compound = stack.getOrCreateTag();
|
|
||||||
|
|
||||||
ItemStackHandlerAA inv = new ItemStackHandlerAA(ContainerDrill.SLOT_AMOUNT);
|
ItemStackHandlerAA inv = new ItemStackHandlerAA(ContainerDrill.SLOT_AMOUNT);
|
||||||
loadSlotsFromNBT(inv, stack);
|
loadSlotsFromNBT(inv, stack);
|
||||||
for (int i = 0; i < inv.getSlots(); i++) {
|
for (int i = 0; i < inv.getSlots(); i++) {
|
||||||
ItemStack slotStack = inv.getStackInSlot(i);
|
ItemStack slotStack = inv.getStackInSlot(i);
|
||||||
if (StackUtil.isValid(slotStack) && slotStack.getItem() instanceof ItemDrillUpgrade) {
|
if (StackUtil.isValid(slotStack) && slotStack.getItem() instanceof ItemDrillUpgrade drillUpgrade) {
|
||||||
if (((ItemDrillUpgrade) slotStack.getItem()).type == upgrade) {
|
if (drillUpgrade.type == upgrade) {
|
||||||
return slotStack;
|
return slotStack;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -213,11 +210,8 @@ public class DrillItem extends ItemEnergy {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getDestroySpeed(ItemStack stack, BlockState state) {
|
public float getDestroySpeed(ItemStack stack, BlockState state) {
|
||||||
if(!state.is(ActuallyTags.Blocks.MINEABLE_WITH_DRILL))
|
|
||||||
return 1.0F;
|
|
||||||
|
|
||||||
return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack)
|
return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack)
|
||||||
? (this.hasExtraWhitelist(state.getBlock()))
|
? (this.hasExtraWhitelist(state.getBlock()) || state.is(ActuallyTags.Blocks.MINEABLE_WITH_DRILL))
|
||||||
? this.getEfficiencyFromUpgrade(stack)
|
? this.getEfficiencyFromUpgrade(stack)
|
||||||
: 1.0F
|
: 1.0F
|
||||||
: 0.1F;
|
: 0.1F;
|
||||||
|
|
|
@ -33,8 +33,8 @@ import java.util.Optional;
|
||||||
|
|
||||||
public abstract class ItemEnergy extends ItemBase {
|
public abstract class ItemEnergy extends ItemBase {
|
||||||
|
|
||||||
private final int maxPower;
|
public final int maxPower;
|
||||||
private final int transfer;
|
public final int transfer;
|
||||||
|
|
||||||
public ItemEnergy(int maxPower, int transfer) {
|
public ItemEnergy(int maxPower, int transfer) {
|
||||||
super(ActuallyItems.defaultProps().stacksTo(1));
|
super(ActuallyItems.defaultProps().stacksTo(1));
|
||||||
|
@ -51,12 +51,12 @@ public abstract class ItemEnergy extends ItemBase {
|
||||||
@Override
|
@Override
|
||||||
public void appendHoverText(ItemStack stack, @Nullable Level worldIn, List<Component> tooltip, TooltipFlag flagIn) {
|
public void appendHoverText(ItemStack stack, @Nullable Level worldIn, List<Component> tooltip, TooltipFlag flagIn) {
|
||||||
super.appendHoverText(stack, worldIn, tooltip, flagIn);
|
super.appendHoverText(stack, worldIn, tooltip, flagIn);
|
||||||
int energy = 0;
|
IEnergyStorage storage = stack.getCapability(Capabilities.EnergyStorage.ITEM);
|
||||||
if (stack.hasTag() && stack.getTag().contains("Energy")) {
|
if(storage != null) {
|
||||||
energy = stack.getTag().getInt("Energy");
|
int energy = storage.getEnergyStored();
|
||||||
}
|
|
||||||
NumberFormat format = NumberFormat.getInstance();
|
NumberFormat format = NumberFormat.getInstance();
|
||||||
tooltip.add(Component.translatable("misc.actuallyadditions.power_long", format.format(energy), format.format(this.maxPower)));
|
tooltip.add(Component.translatable("misc.actuallyadditions.power_long", format.format(energy), format.format(storage.getMaxEnergyStored())));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -83,11 +83,11 @@ public abstract class ItemEnergy extends ItemBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getBarWidth(ItemStack stack) {
|
public int getBarWidth(ItemStack stack) {
|
||||||
if (stack.hasData(ActuallyAttachments.ENERGY_STORAGE)) {
|
IEnergyStorage storage = stack.getCapability(Capabilities.EnergyStorage.ITEM);
|
||||||
CustomEnergyStorage storage = stack.getData(ActuallyAttachments.ENERGY_STORAGE);
|
if (storage != null) {
|
||||||
return Math.round(13.0F - (float)storage.getEnergyStored() * 13.0F / storage.getMaxEnergyStored());
|
return Math.round((13.0F / storage.getMaxEnergyStored() * storage.getEnergyStored()));
|
||||||
}
|
}
|
||||||
return 1;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -103,7 +103,7 @@ public abstract class ItemEnergy extends ItemBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEnergy(ItemStack stack, int energy) {
|
public void setEnergy(ItemStack stack, int energy) {
|
||||||
Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM, null)).ifPresent(cap -> {
|
Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM)).ifPresent(cap -> {
|
||||||
if (cap instanceof CustomEnergyStorage) {
|
if (cap instanceof CustomEnergyStorage) {
|
||||||
((CustomEnergyStorage) cap).setEnergyStored(energy);
|
((CustomEnergyStorage) cap).setEnergyStored(energy);
|
||||||
}
|
}
|
||||||
|
@ -112,13 +112,13 @@ public abstract class ItemEnergy extends ItemBase {
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public int receiveEnergyInternal(ItemStack stack, int maxReceive, boolean simulate) {
|
public int receiveEnergyInternal(ItemStack stack, int maxReceive, boolean simulate) {
|
||||||
return Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM, null))
|
return Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM))
|
||||||
.map(cap -> ((CustomEnergyStorage) cap).receiveEnergyInternal(maxReceive, simulate))
|
.map(cap -> ((CustomEnergyStorage) cap).receiveEnergyInternal(maxReceive, simulate))
|
||||||
.orElse(0);
|
.orElse(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
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, null))
|
return Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM))
|
||||||
.map(cap -> cap instanceof CustomEnergyStorage
|
.map(cap -> cap instanceof CustomEnergyStorage
|
||||||
? ((CustomEnergyStorage) cap).extractEnergyInternal(maxExtract, simulate)
|
? ((CustomEnergyStorage) cap).extractEnergyInternal(maxExtract, simulate)
|
||||||
: 0)
|
: 0)
|
||||||
|
@ -127,32 +127,30 @@ public abstract class ItemEnergy extends ItemBase {
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public int receiveEnergy(ItemStack stack, int maxReceive, boolean simulate) {
|
public int receiveEnergy(ItemStack stack, int maxReceive, boolean simulate) {
|
||||||
return Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM, null))
|
return Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM))
|
||||||
.map(cap -> cap.receiveEnergy(maxReceive, simulate))
|
.map(cap -> cap.receiveEnergy(maxReceive, simulate))
|
||||||
.orElse(0);
|
.orElse(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int extractEnergy(ItemStack stack, int maxExtract, boolean simulate) {
|
public int extractEnergy(ItemStack stack, int maxExtract, boolean simulate) {
|
||||||
return Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM, null))
|
return Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM))
|
||||||
.map(cap -> cap.extractEnergy(maxExtract, simulate))
|
.map(cap -> cap.extractEnergy(maxExtract, simulate))
|
||||||
.orElse(0);
|
.orElse(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getEnergyStored(ItemStack stack) {
|
public int getEnergyStored(ItemStack stack) {
|
||||||
return Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM, null))
|
return Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM))
|
||||||
.map(IEnergyStorage::getEnergyStored)
|
.map(IEnergyStorage::getEnergyStored)
|
||||||
.orElse(0);
|
.orElse(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxEnergyStored(ItemStack stack) {
|
public int getMaxEnergyStored(ItemStack stack) {
|
||||||
return Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM, null))
|
return Optional.ofNullable(stack.getCapability(Capabilities.EnergyStorage.ITEM))
|
||||||
.map(IEnergyStorage::getMaxEnergyStored)
|
.map(IEnergyStorage::getMaxEnergyStored)
|
||||||
.orElse(0);
|
.orElse(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnergyStorage getEnergyStorage(ItemStack stack) {
|
public IEnergyStorage getEnergyStorage(ItemStack stack) {
|
||||||
if (!stack.hasData(ActuallyAttachments.ENERGY_STORAGE))
|
|
||||||
stack.setData(ActuallyAttachments.ENERGY_STORAGE, new CustomEnergyStorage(this.maxPower, this.transfer, this.transfer));
|
|
||||||
return stack.getData(ActuallyAttachments.ENERGY_STORAGE);
|
return stack.getData(ActuallyAttachments.ENERGY_STORAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,5 @@ public enum TheFoods {
|
||||||
SPAGHETTI.returnItem = new ItemStack(Items.BOWL);
|
SPAGHETTI.returnItem = new ItemStack(Items.BOWL);
|
||||||
PUMPKIN_STEW.returnItem = new ItemStack(Items.BOWL);
|
PUMPKIN_STEW.returnItem = new ItemStack(Items.BOWL);
|
||||||
CARROT_JUICE.returnItem = new ItemStack(Items.GLASS_BOTTLE);
|
CARROT_JUICE.returnItem = new ItemStack(Items.GLASS_BOTTLE);
|
||||||
FRENCH_FRIES.returnItem = new ItemStack(ActuallyItems.PAPER_CONE.get());
|
|
||||||
FISH_N_CHIPS.returnItem = new ItemStack(ActuallyItems.PAPER_CONE.get());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,6 @@ public class YummyItem extends ActuallyItem {
|
||||||
CHEESE(new FoodProperties.Builder().nutrition(1).saturationMod(0.05F), 3),
|
CHEESE(new FoodProperties.Builder().nutrition(1).saturationMod(0.05F), 3),
|
||||||
PUMPKIN_STEW(new FoodProperties.Builder().nutrition(6).saturationMod(0.3F), 30, true, new ItemStack(Items.BOWL)),
|
PUMPKIN_STEW(new FoodProperties.Builder().nutrition(6).saturationMod(0.3F), 30, true, new ItemStack(Items.BOWL)),
|
||||||
CARROT_JUICE(new FoodProperties.Builder().nutrition(4).saturationMod(0.2F), 20, true, new ItemStack(Items.GLASS_BOTTLE)),
|
CARROT_JUICE(new FoodProperties.Builder().nutrition(4).saturationMod(0.2F), 20, true, new ItemStack(Items.GLASS_BOTTLE)),
|
||||||
FISH_N_CHIPS(new FoodProperties.Builder().nutrition(14).saturationMod(0.65F), 40, new ItemStack(ActuallyItems.PAPER_CONE.get())),
|
|
||||||
FRENCH_FRIES(new FoodProperties.Builder().nutrition(10).saturationMod(0.6F), 32, new ItemStack(ActuallyItems.PAPER_CONE.get())),
|
|
||||||
FRENCH_FRY(new FoodProperties.Builder().nutrition(2).saturationMod(0.025F), 3),
|
FRENCH_FRY(new FoodProperties.Builder().nutrition(2).saturationMod(0.025F), 3),
|
||||||
SPAGHETTI(new FoodProperties.Builder().nutrition(7).saturationMod(0.4F), 38, new ItemStack(Items.BOWL)),
|
SPAGHETTI(new FoodProperties.Builder().nutrition(7).saturationMod(0.4F), 38, new ItemStack(Items.BOWL)),
|
||||||
NOODLE(new FoodProperties.Builder().nutrition(1).saturationMod(0.01F), 3),
|
NOODLE(new FoodProperties.Builder().nutrition(1).saturationMod(0.01F), 3),
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
|
|
||||||
modLoader="javafml"
|
modLoader="javafml"
|
||||||
loaderVersion="[2,)"
|
loaderVersion="[${loader},)"
|
||||||
license="MIT"
|
license="MIT"
|
||||||
[[mods]]
|
[[mods]]
|
||||||
modId="actuallyadditions"
|
modId="actuallyadditions"
|
||||||
version="${file.jarVersion}"
|
version="${version}"
|
||||||
displayName="Actually Additions"
|
displayName="Actually Additions"
|
||||||
#logoFile="logo.png"
|
#logoFile="logo.png"
|
||||||
credits="Author: Ellpeck; Textures and Models: BootyToast, GlenthorLP, canitzp"
|
credits="Author: Ellpeck; Textures and Models: BootyToast, GlenthorLP, canitzp; Porters: Flanks, MrBysco, ErrorMikey; 1.20+ Textures: Ridanisaurus"
|
||||||
authors="Ellpeck"
|
authors="Ellpeck"
|
||||||
description='''
|
description='''
|
||||||
Do you want Automation? Wireless Transport? Better Machines? A cup o' Coffee? Chests? Better Hoppers? Leaf Blowers? Faster Growth? Plants? Well, Actually Additions has all that and a lot more!
|
Do you want Automation? Wireless Transport? Better Machines? A cup o\' Coffee? Chests? Better Hoppers? Leaf Blowers? Faster Growth? Plants? Well, Actually Additions has all that and a lot more!
|
||||||
'''
|
'''
|
||||||
|
|
||||||
[[dependencies.actuallyadditions]]
|
[[dependencies.actuallyadditions]]
|
||||||
modId="neoforge"
|
modId="neoforge"
|
||||||
type="required"
|
type="required"
|
||||||
versionRange="[20.4.167,)"
|
versionRange="${neo_version_range}"
|
||||||
ordering="NONE"
|
ordering="NONE"
|
||||||
side="BOTH"
|
side="BOTH"
|
||||||
|
|
||||||
[[dependencies.actuallyadditions]]
|
[[dependencies.actuallyadditions]]
|
||||||
modId="minecraft"
|
modId="minecraft"
|
||||||
type="required"
|
type="required"
|
||||||
versionRange="[1.20.4,1.21)"
|
versionRange="${minecraft_version_range}"
|
||||||
ordering="NONE"
|
ordering="NONE"
|
||||||
side="BOTH"
|
side="BOTH"
|
||||||
|
|
|
@ -279,8 +279,8 @@
|
||||||
"item.actuallyadditions.rice_dough": "Rice Dough (wip)",
|
"item.actuallyadditions.rice_dough": "Rice Dough (wip)",
|
||||||
"item.actuallyadditions.food_rice_bread": "Rice Bread (wip)",
|
"item.actuallyadditions.food_rice_bread": "Rice Bread (wip)",
|
||||||
"item.actuallyadditions.rice_seeds": "Rice Seeds",
|
"item.actuallyadditions.rice_seeds": "Rice Seeds",
|
||||||
"item.actuallyadditions.tiny_coal": "Tiny Coal (wip)",
|
"item.actuallyadditions.tiny_coal": "Tiny Coal",
|
||||||
"item.actuallyadditions.tiny_charcoal": "Tiny Charcoal (wip)",
|
"item.actuallyadditions.tiny_charcoal": "Tiny Charcoal",
|
||||||
"item.actuallyadditions.rice_slimeball": "Rice Slimeball (wip)",
|
"item.actuallyadditions.rice_slimeball": "Rice Slimeball (wip)",
|
||||||
"item.actuallyadditions.single_battery": "Single Battery",
|
"item.actuallyadditions.single_battery": "Single Battery",
|
||||||
"item.actuallyadditions.double_battery": "Double Battery",
|
"item.actuallyadditions.double_battery": "Double Battery",
|
||||||
|
@ -377,12 +377,12 @@
|
||||||
"item.actuallyadditions.spawner_shard": "Spawner Shards (wip)",
|
"item.actuallyadditions.spawner_shard": "Spawner Shards (wip)",
|
||||||
"item.actuallyadditions.minecart_firework_box": "Firework Box Cart (wip)",
|
"item.actuallyadditions.minecart_firework_box": "Firework Box Cart (wip)",
|
||||||
"item.actuallyadditions.water_bowl": "Bowl of Water (wip)",
|
"item.actuallyadditions.water_bowl": "Bowl of Water (wip)",
|
||||||
"item.actuallyadditions.filter": "Item Filter (wip)",
|
"item.actuallyadditions.filter": "Item Filter",
|
||||||
"item.actuallyadditions.biomass": "Biomass (wip)",
|
"item.actuallyadditions.biomass": "Biomass (wip)",
|
||||||
"item.actuallyadditions.biocoal": "Bio Coal (wip)",
|
"item.actuallyadditions.biocoal": "Bio Coal (wip)",
|
||||||
"item.actuallyadditions.player_probe": "Player Probe (wip)",
|
"item.actuallyadditions.player_probe": "Player Probe (wip)",
|
||||||
"item.actuallyadditions.worm": "Worm",
|
"item.actuallyadditions.worm": "Worm",
|
||||||
"item.actuallyadditions.travelers_sack": "Traveler's Sack (wip)",
|
"item.actuallyadditions.travelers_sack": "Traveler's Sack",
|
||||||
"item.actuallyadditions.bag.storage": "filled slots (wip)",
|
"item.actuallyadditions.bag.storage": "filled slots (wip)",
|
||||||
"item.actuallyadditions.void_sack": "Void Sack (wip)",
|
"item.actuallyadditions.void_sack": "Void Sack (wip)",
|
||||||
"item.actuallyadditions.crystallized_canola_seed": "Crystallized Canola Seed",
|
"item.actuallyadditions.crystallized_canola_seed": "Crystallized Canola Seed",
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 479 B |
Binary file not shown.
Before Width: | Height: | Size: 2.3 KiB |
|
@ -1,19 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
"modid": "actuallyadditions",
|
|
||||||
"name": "Actually Additions",
|
|
||||||
"description": "Do you want Automation? Wireless Transport? Better Machines? A cup o' Coffee? Chests? Better Hoppers? Leaf Blowers? Faster Growth? Plants? Well, Actually Additions has all that and a lot more!",
|
|
||||||
"version": "${version}",
|
|
||||||
"mcversion": "${mcversion}",
|
|
||||||
"url": "http://github.com/Ellpeck/ActuallyAdditions",
|
|
||||||
"updateUrl": "",
|
|
||||||
"authorList": [ "Ellpeck" ],
|
|
||||||
"credits": "Author: Ellpeck; Textures and Models: BootyToast, GlenthorLP, canitzp",
|
|
||||||
"logoFile": "assets/actuallyadditions/textures/logo.png",
|
|
||||||
"screenshots": [
|
|
||||||
],
|
|
||||||
"parent":"",
|
|
||||||
"dependencies": [
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
|
@ -3,6 +3,6 @@
|
||||||
"description": {
|
"description": {
|
||||||
"text": "actuallyadditions resources"
|
"text": "actuallyadditions resources"
|
||||||
},
|
},
|
||||||
"pack_format": 22
|
"pack_format": 26
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue