mirror of
https://github.com/chylex/Hardcore-Ender-Expansion-2.git
synced 2025-09-15 14:32:09 +02:00
Compare commits
28 Commits
1.16.5
...
components
Author | SHA1 | Date | |
---|---|---|---|
1135c192bb
|
|||
8933d8d8cc
|
|||
5564fc4a24
|
|||
f0b6fd2fac
|
|||
ec76799a67
|
|||
e73ac4e3d1
|
|||
858fa672ec
|
|||
77f759e0d0
|
|||
f077f11c32
|
|||
e0c3ed6bc3
|
|||
7565443e38
|
|||
f659e5e1c7
|
|||
cf752e2bb3
|
|||
cb05067529
|
|||
567cf03403
|
|||
3b4ca6c0b7
|
|||
b03a40690e
|
|||
bb13594c4f
|
|||
322b6ba900
|
|||
498bf5bbd2
|
|||
ea48d98008
|
|||
a0ea885997
|
|||
ec103b67d7
|
|||
082ebb9fe0
|
|||
65fc2d8aeb
|
|||
158efbbf70
|
|||
de395eb168
|
|||
fceff2cd9e
|
4
.idea/gradle.xml
generated
4
.idea/gradle.xml
generated
@@ -12,7 +12,9 @@
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/data" />
|
||||
<option value="$PROJECT_DIR$/src/system" />
|
||||
<option value="$PROJECT_DIR$/modules/debug" />
|
||||
<option value="$PROJECT_DIR$/modules/system" />
|
||||
<option value="$PROJECT_DIR$/modules/util" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
|
53
build.gradle
53
build.gradle
@@ -2,12 +2,20 @@ ext {
|
||||
mc_version = "1.16.5"
|
||||
forge_version = "36.1.32"
|
||||
mixin_version = "0.8.2"
|
||||
mapping_version = "20210309-1.16.5"
|
||||
kotlin_mod_version = "1.13.0"
|
||||
mapping_version = "20210309-1.16.5"
|
||||
|
||||
access_transformers = [
|
||||
new File(rootProject.projectDir, "src/main/resources/META-INF/accesstransformer_main.cfg"),
|
||||
new File(project(":system").projectDir, "src/main/resources/META-INF/accesstransformer_system.cfg"),
|
||||
new File(project(":util").projectDir, "src/main/resources/META-INF/accesstransformer_util.cfg"),
|
||||
]
|
||||
}
|
||||
|
||||
buildscript {
|
||||
ext {
|
||||
forge_gradle_version = "4.1.+"
|
||||
mixin_gradle_version = "0.7-SNAPSHOT"
|
||||
kotlin_version = "1.5.20"
|
||||
}
|
||||
|
||||
@@ -18,8 +26,8 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: "4.1.+", changing: true
|
||||
classpath group: "org.spongepowered", name: "mixingradle", version: "0.7-SNAPSHOT"
|
||||
classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: forge_gradle_version, changing: true
|
||||
classpath group: "org.spongepowered", name: "mixingradle", version: mixin_gradle_version
|
||||
classpath group: "org.jetbrains.kotlin", name: "kotlin-gradle-plugin", version: kotlin_version
|
||||
}
|
||||
}
|
||||
@@ -29,7 +37,7 @@ apply plugin: "org.spongepowered.mixin"
|
||||
apply plugin: "eclipse"
|
||||
apply plugin: "idea"
|
||||
|
||||
if (file("run/mods_deobf.gradle").exists()){
|
||||
if (file("run/mods_deobf.gradle").exists()) {
|
||||
apply from: "run/mods_deobf.gradle"
|
||||
}
|
||||
|
||||
@@ -46,12 +54,15 @@ archivesBaseName = metaName.replaceAll("\\s", "")
|
||||
|
||||
idea {
|
||||
module {
|
||||
[".idea", ".settings", ".gradle", "build", "gradle", "out", "run", "src/main/kotlin", "src/test/kotlin"].each {
|
||||
[".idea", ".settings", ".gradle", "build", "gradle", "run"].each {
|
||||
excludeDirs += file(it)
|
||||
}
|
||||
|
||||
["out", "src/main/kotlin", "src/test/kotlin"].each {
|
||||
excludeDirs += file("src/system/" + it)
|
||||
excludeDirs += file(it)
|
||||
excludeDirs += file("modules/debug/" + it)
|
||||
excludeDirs += file("modules/system/" + it)
|
||||
excludeDirs += file("modules/util/" + it)
|
||||
}
|
||||
|
||||
["src/main/kotlin", "src/test/kotlin"].each {
|
||||
@@ -87,10 +98,9 @@ allprojects {
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "kotlinforforge"
|
||||
url = "https://thedarkcolour.github.io/KotlinForForge"
|
||||
}
|
||||
mavenCentral()
|
||||
maven { url = "https://files.minecraftforge.net/maven" }
|
||||
maven { url = "https://thedarkcolour.github.io/KotlinForForge" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -99,7 +109,7 @@ allprojects {
|
||||
implementation "org.jetbrains.kotlin:kotlin-reflect"
|
||||
}
|
||||
|
||||
if (file("$buildDir/classes").exists()){
|
||||
if (file("$buildDir/classes").exists()) {
|
||||
file("$buildDir/classes/java/main").mkdirs() // Forge complains when the java folder is missing
|
||||
}
|
||||
}
|
||||
@@ -115,12 +125,10 @@ sourceSets {
|
||||
|
||||
minecraft {
|
||||
mappings channel: "snapshot", version: rootProject.mapping_version
|
||||
|
||||
accessTransformer = file("src/main/resources/META-INF/accesstransformer.cfg")
|
||||
setAccessTransformers(rootProject.access_transformers)
|
||||
|
||||
runs {
|
||||
client {
|
||||
property "hee.debug", ""
|
||||
property "mixin.env.remapRefMap", "true"
|
||||
property "mixin.env.refMapRemappingFile", "${projectDir}/build/createSrgToMcp/output.srg"
|
||||
arg "-mixin.config=hee.mixins.json"
|
||||
@@ -130,13 +138,14 @@ minecraft {
|
||||
mods {
|
||||
hee {
|
||||
source sourceSets.main
|
||||
source project(":debug").sourceSets.main
|
||||
source project(":system").sourceSets.main
|
||||
source project(":util").sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
property "hee.debug", ""
|
||||
property "mixin.env.remapRefMap", "true"
|
||||
property "mixin.env.refMapRemappingFile", "${projectDir}/build/createSrgToMcp/output.srg"
|
||||
arg "-mixin.config=hee.mixins.json"
|
||||
@@ -146,7 +155,9 @@ minecraft {
|
||||
mods {
|
||||
hee {
|
||||
source sourceSets.main
|
||||
source project(":debug").sourceSets.main
|
||||
source project(":system").sourceSets.main
|
||||
source project(":util").sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -163,7 +174,9 @@ minecraft {
|
||||
mods {
|
||||
hee {
|
||||
source sourceSets.main
|
||||
source project(":debug").sourceSets.main
|
||||
source project(":system").sourceSets.main
|
||||
source project(":util").sourceSets.main
|
||||
source project(":datagen").sourceSets.main
|
||||
}
|
||||
}
|
||||
@@ -178,9 +191,11 @@ mixin {
|
||||
dependencies {
|
||||
minecraft "net.minecraftforge:forge:" + mc_version + "-" + forge_version
|
||||
|
||||
implementation project(":util")
|
||||
implementation project(":system")
|
||||
implementation "thedarkcolour:kotlinforforge:" + kotlin_mod_version
|
||||
|
||||
testImplementation project(":util")
|
||||
testImplementation project(":system")
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-api:5.3.0-RC1"
|
||||
|
||||
@@ -197,9 +212,11 @@ test {
|
||||
jar {
|
||||
archiveName = archivesBaseName + "-" + mc_version + "-v" + version + ".jar"
|
||||
|
||||
from(project(":system").sourceSets.main.output) {
|
||||
exclude "META-INF"
|
||||
exclude "pack.mcmeta"
|
||||
["system", "util"].each {
|
||||
from(project(":" + it).sourceSets.main.output) {
|
||||
exclude "pack.mcmeta"
|
||||
exclude "META-INF/*.kotlin_module"
|
||||
}
|
||||
}
|
||||
|
||||
from("./data/gen") {
|
||||
|
@@ -5,28 +5,23 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: "4.1.+", changing: true
|
||||
classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: forge_gradle_version, changing: true
|
||||
classpath group: "org.jetbrains.kotlin", name: "kotlin-gradle-plugin", version: kotlin_version
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url = "https://files.minecraftforge.net/maven" }
|
||||
}
|
||||
|
||||
apply plugin: "net.minecraftforge.gradle"
|
||||
apply plugin: "eclipse"
|
||||
|
||||
minecraft {
|
||||
mappings channel: "snapshot", version: rootProject.mapping_version
|
||||
accessTransformer = file("../src/main/resources/META-INF/accesstransformer.cfg")
|
||||
setAccessTransformers(rootProject.access_transformers)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "net.minecraftforge:forge:" + mc_version + "-" + forge_version
|
||||
implementation rootProject
|
||||
implementation project(":system")
|
||||
implementation project(":util")
|
||||
}
|
||||
|
||||
jar {
|
||||
|
@@ -10,6 +10,9 @@ e53a79fa8e5222e4287e2e5d410890b1f8df78ba assets/hee/blockstates/autumn_leaves_ye
|
||||
1ce8f488560f32fddbd2532961df123665625c75 assets/hee/blockstates/autumn_sapling_orange.json
|
||||
303070f9945ee2e6716e0fcd67bfa3275b93fde6 assets/hee/blockstates/autumn_sapling_red.json
|
||||
694318e51ca78111cd91a507a99ab852825cdf0c assets/hee/blockstates/autumn_sapling_yellowgreen.json
|
||||
6af0fcab50e591ffad19be1909b4e2baba4bc084 assets/hee/blockstates/cauldron_dragons_breath.json
|
||||
06141839f09e97f639771c67108b9b2e2f437403 assets/hee/blockstates/cauldron_ender_goo.json
|
||||
802edf094f47f5ce129eec4b2be018ab8a9a62e6 assets/hee/blockstates/cauldron_purified_ender_goo.json
|
||||
e926f62a373640c427ba9ac962d7b2dcbe0ae376 assets/hee/blockstates/corrupted_energy.json
|
||||
7bce0e85ae6f21ceede602f140f40c7678480790 assets/hee/blockstates/dark_chest.json
|
||||
97ac658307fc07611fe9328ab95d692ab16bb92d assets/hee/blockstates/dark_loam.json
|
||||
@@ -72,7 +75,7 @@ c16b5933b9af8fb1033c6d6d11e19628d7c56f4f assets/hee/blockstates/miners_burial_bl
|
||||
b58fb5ca5bdaf639f725135a2a6682adc4c712ff assets/hee/blockstates/miners_burial_block_plain.json
|
||||
4c56ed06867c9ef95b287b57e31ddb123e56020e assets/hee/blockstates/obsidian_chiseled.json
|
||||
4c56ed06867c9ef95b287b57e31ddb123e56020e assets/hee/blockstates/obsidian_chiseled_lit.json
|
||||
58196b68181ce4554fe7accaa29d3f1f2596b3c2 assets/hee/blockstates/obsidian_falling.json
|
||||
27365e71c0a9f8cfab0340d70a65b7f341363e0d assets/hee/blockstates/obsidian_falling.json
|
||||
d4bc138bf24df55f5df0df391cced6c587e6fec3 assets/hee/blockstates/obsidian_pillar.json
|
||||
d666add54a950dd814fc08a7e612ac5a57070c15 assets/hee/blockstates/obsidian_pillar_lit.json
|
||||
3c6eb037eb8731410f06b17815e9b9d3705c6b7f assets/hee/blockstates/obsidian_smooth.json
|
||||
@@ -89,6 +92,7 @@ b70f529af4a5d86e6313d278bed22000f5aa5239 assets/hee/blockstates/purified_ender_g
|
||||
7b9473e5987ea2cf6fde1a7b530895bba6891a24 assets/hee/blockstates/puzzle_block_wall.json
|
||||
ce9b1e3bb4760063c69b9c671c8a567520125dd2 assets/hee/blockstates/scaffolding.json
|
||||
070df87fc3b7dd9029a0bf0d59745cb0e4430181 assets/hee/blockstates/spawner_obsidian_towers.json
|
||||
eb08886b7e7241361d5c7ee280e024610990847e assets/hee/blockstates/stone_brick_wall.json
|
||||
947fcca21b602927ed0ead585ea1d2213372f074 assets/hee/blockstates/table_base_tier_1.json
|
||||
404f8c1b45214db75959f02706dc10c66b278970 assets/hee/blockstates/table_base_tier_2.json
|
||||
805a8e554ff95cea28405e6de97da053986bd9df assets/hee/blockstates/table_base_tier_3.json
|
||||
@@ -103,6 +107,7 @@ c53b83ef3e8152ed65147117c10122e4906ea61b assets/hee/blockstates/whitebark_log.js
|
||||
281264d279f075947ee2f8afdb78190364782921 assets/hee/blockstates/whitebark_planks.json
|
||||
976d2b47d52e04eb9944e3c4c8aee9a91f315ade assets/hee/blockstates/whitebark_slab.json
|
||||
776dd79a096f999f2606047486af73aca71a6cf0 assets/hee/blockstates/whitebark_stairs.json
|
||||
9c87b9db95b144daa448ab95b11338423a7b5394 assets/hee/lang/en_us.json
|
||||
a3127926cde114f660a9748f9d2ff6c378778d6a assets/hee/models/block/accumulation_table_tier_1.json
|
||||
c87320b92ede3bf18f7497cf59689d15ef18969b assets/hee/models/block/accumulation_table_tier_2.json
|
||||
0adc1ddee430fc2aacd2b6a32fbc1fea048345c2 assets/hee/models/block/accumulation_table_tier_3.json
|
||||
@@ -159,6 +164,16 @@ f2e86d976bcd985021fbe00d34b1e1b44a64a557 assets/hee/models/block/endersol_merge_
|
||||
488e5dec7542396ca80e3bcb02b7313a412aa97f assets/hee/models/block/endium_block.json
|
||||
aa8fcca7cb3898e5e7658bbdae0a555209b3f8e2 assets/hee/models/block/endium_ore.json
|
||||
01c6bfe57748c7a87ce304024d905c7715f1fe3c assets/hee/models/block/enhanced_brewing_stand.json
|
||||
1926175e552d2b810d01b8a89fc45a5bb4dd39ed assets/hee/models/block/eternal_fire_floor0.json
|
||||
1eab166292d4a4fcb44a9f5d9a33ca0dcf535ba5 assets/hee/models/block/eternal_fire_floor1.json
|
||||
82316da36e8f8f4ee6fd9ae5fd119e4692b99d2d assets/hee/models/block/eternal_fire_side0.json
|
||||
61ef10a01e1377e36af67d5ae379218924626595 assets/hee/models/block/eternal_fire_side1.json
|
||||
ad645653a99dc42535fdfb855b4dc8622c6f826d assets/hee/models/block/eternal_fire_side_alt0.json
|
||||
e233d09cb8537c735b2af104c0637bab2ca85d59 assets/hee/models/block/eternal_fire_side_alt1.json
|
||||
5726b3ca9700fbca7ac3ade22ad5cc0634cfe652 assets/hee/models/block/eternal_fire_up0.json
|
||||
4f913fac7c9deac303f95251a82018e4e3fb0183 assets/hee/models/block/eternal_fire_up1.json
|
||||
fa5d1de1603cdea3f8886c053a48c9ce145ec173 assets/hee/models/block/eternal_fire_up_alt0.json
|
||||
9b39ca3af11554cc5f7b49fa6b7d495d4026395e assets/hee/models/block/eternal_fire_up_alt1.json
|
||||
78688919cd3be6d8e511a9e72227c8c1ed3eaf07 assets/hee/models/block/ethereal_lantern.json
|
||||
2978d091e8cbd221ee969bb3f2e078c06ef4e3e1 assets/hee/models/block/experience_gate.json
|
||||
7f01aebf3576d63fb8f254aa0d6ffd28f11245a4 assets/hee/models/block/experience_gate_controller.json
|
||||
@@ -205,14 +220,13 @@ e715a206318b020b1e3119db56f8e807ab4c11dd assets/hee/models/block/infused_tnt.jso
|
||||
63f514ba3c4648bbe843ab4bc5ddf1df70025f0c assets/hee/models/block/infusion_table_tier_1.json
|
||||
71efff4640a6fe83ac449de2204e2d2bd0e3f97e assets/hee/models/block/infusion_table_tier_2.json
|
||||
18c56872e21de3d66f642f1d6a3c4bccafc461c8 assets/hee/models/block/infusion_table_tier_3.json
|
||||
a5f3f2cbbe8628a426817953c087585f65fc2254 assets/hee/models/block/loot_chest.json
|
||||
fd787c41eb1e5875ff3b22b7a5c5d989d097ad40 assets/hee/models/block/loot_chest.json
|
||||
7b4ae46a1f8d7d285d31565ce7cba02a5784d93f assets/hee/models/block/miners_burial_block_chiseled.json
|
||||
f86f536da296ac2e2081fe038757e565f7ac6952 assets/hee/models/block/miners_burial_block_jail.json
|
||||
7b3afe0784c92fb8e0d8112427e7f2ee1799e5e5 assets/hee/models/block/miners_burial_block_pillar.json
|
||||
7e60044fcb9a5806d815a94b49304ff6ca992496 assets/hee/models/block/miners_burial_block_pillar_horizontal.json
|
||||
1af20bb8055eb36f6e0b0db1eac13ad7a63ff106 assets/hee/models/block/miners_burial_block_plain.json
|
||||
0ed91de9858f63ae21ace09f60cf734bbd27daa6 assets/hee/models/block/obsidian_chiseled.json
|
||||
b1c121d633d189b0cb6fbc8b675b5acf0b19a0d4 assets/hee/models/block/obsidian_falling.json
|
||||
66637af0fb0dc1f048ce46c7291d6fe3e443e69f assets/hee/models/block/obsidian_pillar.json
|
||||
f5677922b8a5a69b2fd2a34cf081fb4dcbd9bd23 assets/hee/models/block/obsidian_pillar_horizontal.json
|
||||
66637af0fb0dc1f048ce46c7291d6fe3e443e69f assets/hee/models/block/obsidian_pillar_lit.json
|
||||
@@ -295,7 +309,6 @@ ffbc19b2aeeb81c1acf03dfc6f4ab101b5602f7a assets/hee/models/item/autumn_sapling_b
|
||||
2ef2d9dd8a04a7a2bb0d0a75570565ff4921cf67 assets/hee/models/item/blank_token.json
|
||||
98167609bf3898587f7565736a6fc24a7966cacd assets/hee/models/item/blobby_spawn_egg.json
|
||||
fda3face7f4a5bb8debff8958d1d4920860cd1c3 assets/hee/models/item/compost.json
|
||||
bd805b17a4641f39e85e70aa5e10f45b0f0d32ce assets/hee/models/item/corrupted_energy.json
|
||||
5305057f6e86d0fb549f22e6d49a2ca6e9723c54 assets/hee/models/item/dark_chest.json
|
||||
45959256d2d1b4548f4f528d2d690816697955d2 assets/hee/models/item/dark_loam.json
|
||||
d6669437273af857f67460b9ffc674f07cc07630 assets/hee/models/item/dark_loam_slab.json
|
||||
@@ -397,7 +410,7 @@ b0ccc08c142525e3d82a6643d34dfb0d82385571 assets/hee/models/item/miners_burial_bl
|
||||
8e0fc42a6a28596571ec0877ab3a9af7901adeaa assets/hee/models/item/miners_burial_block_plain.json
|
||||
7a8592c4a45ccdea4ca36898b3371364f6aab2ca assets/hee/models/item/obsidian_chiseled.json
|
||||
7a8592c4a45ccdea4ca36898b3371364f6aab2ca assets/hee/models/item/obsidian_chiseled_lit.json
|
||||
6ec06a3d2286e954a180a021f8e2fa0847bc62a9 assets/hee/models/item/obsidian_falling.json
|
||||
561f15cf196c891a108a723c24894fa524b7d2e2 assets/hee/models/item/obsidian_falling.json
|
||||
3c4e981d4d1945965dfbdc0e4c5ce4c2325646ca assets/hee/models/item/obsidian_fragment.json
|
||||
28e22c71e0b66c4f05a034efed3fdc1c53ed3446 assets/hee/models/item/obsidian_pillar.json
|
||||
28e22c71e0b66c4f05a034efed3fdc1c53ed3446 assets/hee/models/item/obsidian_pillar_lit.json
|
||||
@@ -469,7 +482,7 @@ aa8696fc83d73951a890f55cd7c2b9c9abb3f611 assets/hee/models/item/whitebark_log.js
|
||||
2903a69c4cd7c37db3891af9c0736568ccc3acff data/forge/tags/blocks/chests.json
|
||||
3260d80138f7c357d2efbda403e8d0e6a957d75b data/forge/tags/blocks/end_stones.json
|
||||
424e2e03cf62f23f4496468a97b9f0df060df9fe data/forge/tags/blocks/glass.json
|
||||
f87bf8e15aea2ca3068935be41828e61a22e6ef8 data/forge/tags/blocks/obsidian.json
|
||||
763fefed687a3383a23e481415837b08a931661f data/forge/tags/blocks/obsidian.json
|
||||
83ea3831e8edbb4cab7f4a997b6e78b74d273493 data/forge/tags/blocks/ores.json
|
||||
9a1109a26cfd5f396d8e080f77d8277f130f299d data/forge/tags/blocks/storage_blocks.json
|
||||
2903a69c4cd7c37db3891af9c0736568ccc3acff data/forge/tags/items/chests.json
|
||||
@@ -480,7 +493,7 @@ d3fbc7a0a7d1a6cd5b4a2d6604a4625c57b57a9a data/forge/tags/items/ender_pearls.json
|
||||
ff2ba2285b4163d5d08376c6d99477f96273310c data/forge/tags/items/heads.json
|
||||
144c342bc93a719b95e99b4d9493ed29885bf71b data/forge/tags/items/ingots.json
|
||||
b187118e591990e8c0397058318592c587c3dcff data/forge/tags/items/nuggets.json
|
||||
f87bf8e15aea2ca3068935be41828e61a22e6ef8 data/forge/tags/items/obsidian.json
|
||||
763fefed687a3383a23e481415837b08a931661f data/forge/tags/items/obsidian.json
|
||||
83ea3831e8edbb4cab7f4a997b6e78b74d273493 data/forge/tags/items/ores.json
|
||||
ebdc7d4617021fcc8582e3a17b42d4a815d9e021 data/forge/tags/items/rods.json
|
||||
9a1109a26cfd5f396d8e080f77d8277f130f299d data/forge/tags/items/storage_blocks.json
|
||||
@@ -503,6 +516,7 @@ d9abd1ed1cc52d7f8c1b48896da855b2e8bded23 data/hee/loot_tables/blocks/dusty_stone
|
||||
ef63046d109846e09f43eaa0fbd322889d31d3c3 data/hee/loot_tables/blocks/dusty_stone_brick_stairs.json
|
||||
fd7e4cb74c69e176813fd0cddef9c4c98847eacc data/hee/loot_tables/blocks/dusty_stone_bricks.json
|
||||
e891c4099dec492133fc58662765c326b00f1e09 data/hee/loot_tables/blocks/dusty_stone_cracked_bricks.json
|
||||
de6d8d0b775f590077634afc913165c831192070 data/hee/loot_tables/blocks/dusty_stone_decoration.json
|
||||
5ca27ed38494044939def58dae0354d0cb09baad data/hee/loot_tables/blocks/end_stone_burned.json
|
||||
c50fb5765d11b9f46dd81f2d9c33d4d0b6bb1402 data/hee/loot_tables/blocks/end_stone_enchanted.json
|
||||
7d720082305ddef2d864263bf58c55a67549cbeb data/hee/loot_tables/blocks/end_stone_infested.json
|
||||
@@ -566,25 +580,29 @@ e66091a13a6e7593eb5bd971978d24a5a0e375b3 data/hee/loot_tables/blocks/whitebark.j
|
||||
9bd3a9e24162d2c81047b834f8f79d6cabec86be data/hee/loot_tables/blocks/whitebark_planks.json
|
||||
7d84dc443a052e349593b71d2c0a523e75396cdf data/hee/loot_tables/blocks/whitebark_slab.json
|
||||
83e0b81adb3f9dd488397e8459b95f7b0ce19927 data/hee/loot_tables/blocks/whitebark_stairs.json
|
||||
37f3c55266db3db8dc6d22fdbaf3d53243016b77 data/hee/tags/blocks/gloomrock_particles.json
|
||||
1a70c674d979a59cea18d92f2227ab8a5ed2ccc7 data/hee/tags/blocks/void_portal_frame_crafted.json
|
||||
f5996244831ab38fe1fae2f304bbd7825d6ad98b data/minecraft/tags/blocks/bamboo_plantable_on.json
|
||||
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/minecraft/tags/blocks/flower_pots.json
|
||||
479189f9b35a3c8f795539daf6a1809130242c5b data/minecraft/tags/blocks/flower_pots.json
|
||||
424e2e03cf62f23f4496468a97b9f0df060df9fe data/minecraft/tags/blocks/impermeable.json
|
||||
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/minecraft/tags/blocks/leaves.json
|
||||
4557912145f8c53493f249ef3961d02e156891e4 data/minecraft/tags/blocks/leaves.json
|
||||
4ea74ec750ba7360a7843a0d4a604ac7b35dfa96 data/minecraft/tags/blocks/logs.json
|
||||
4ea74ec750ba7360a7843a0d4a604ac7b35dfa96 data/minecraft/tags/blocks/logs_that_burn.json
|
||||
697395021049c8cccfac2486c52eb6664cc5bad6 data/minecraft/tags/blocks/planks.json
|
||||
10fff7e5092ddc68cc1611ad4605dc4d6608e227 data/minecraft/tags/blocks/portals.json
|
||||
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/minecraft/tags/blocks/saplings.json
|
||||
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/minecraft/tags/blocks/slabs.json
|
||||
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/minecraft/tags/blocks/stairs.json
|
||||
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/minecraft/tags/blocks/walls.json
|
||||
6f73d4c0d7c0f2650b498f35a60e8fe9c280c765 data/minecraft/tags/blocks/saplings.json
|
||||
eb69de8447077a713baaab7e10184ec283c25516 data/minecraft/tags/blocks/slabs.json
|
||||
07e3d7d270309424e1ab60a1b89ab2da85f800c7 data/minecraft/tags/blocks/stairs.json
|
||||
5318f9d9be9209139567f7f58d77d1b27d9d1327 data/minecraft/tags/blocks/walls.json
|
||||
8a04ae43dc7062677394df7bf7276dbc92a5f1ca data/minecraft/tags/blocks/wooden_slabs.json
|
||||
3bf587d2f806c14a76a10db8f43386552382c381 data/minecraft/tags/blocks/wooden_stairs.json
|
||||
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/minecraft/tags/items/leaves.json
|
||||
4557912145f8c53493f249ef3961d02e156891e4 data/minecraft/tags/items/leaves.json
|
||||
4ea74ec750ba7360a7843a0d4a604ac7b35dfa96 data/minecraft/tags/items/logs.json
|
||||
4ea74ec750ba7360a7843a0d4a604ac7b35dfa96 data/minecraft/tags/items/logs_that_burn.json
|
||||
697395021049c8cccfac2486c52eb6664cc5bad6 data/minecraft/tags/items/planks.json
|
||||
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/minecraft/tags/items/saplings.json
|
||||
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/minecraft/tags/items/slabs.json
|
||||
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/minecraft/tags/items/stairs.json
|
||||
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/minecraft/tags/items/walls.json
|
||||
6f73d4c0d7c0f2650b498f35a60e8fe9c280c765 data/minecraft/tags/items/saplings.json
|
||||
eb69de8447077a713baaab7e10184ec283c25516 data/minecraft/tags/items/slabs.json
|
||||
07e3d7d270309424e1ab60a1b89ab2da85f800c7 data/minecraft/tags/items/stairs.json
|
||||
5318f9d9be9209139567f7f58d77d1b27d9d1327 data/minecraft/tags/items/walls.json
|
||||
8a04ae43dc7062677394df7bf7276dbc92a5f1ca data/minecraft/tags/items/wooden_slabs.json
|
||||
3bf587d2f806c14a76a10db8f43386552382c381 data/minecraft/tags/items/wooden_stairs.json
|
||||
|
16
data/gen/assets/hee/blockstates/cauldron_dragons_breath.json
Normal file
16
data/gen/assets/hee/blockstates/cauldron_dragons_breath.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"variants": {
|
||||
"level=0": {
|
||||
"model": "minecraft:block/cauldron"
|
||||
},
|
||||
"level=1": {
|
||||
"model": "hee:block/cauldron_dragons_breath_level1"
|
||||
},
|
||||
"level=2": {
|
||||
"model": "hee:block/cauldron_dragons_breath_level2"
|
||||
},
|
||||
"level=3": {
|
||||
"model": "hee:block/cauldron_dragons_breath_level3"
|
||||
}
|
||||
}
|
||||
}
|
16
data/gen/assets/hee/blockstates/cauldron_ender_goo.json
Normal file
16
data/gen/assets/hee/blockstates/cauldron_ender_goo.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"variants": {
|
||||
"level=0": {
|
||||
"model": "minecraft:block/cauldron"
|
||||
},
|
||||
"level=1": {
|
||||
"model": "hee:block/cauldron_ender_goo_level1"
|
||||
},
|
||||
"level=2": {
|
||||
"model": "hee:block/cauldron_ender_goo_level2"
|
||||
},
|
||||
"level=3": {
|
||||
"model": "hee:block/cauldron_ender_goo_level3"
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"variants": {
|
||||
"level=0": {
|
||||
"model": "minecraft:block/cauldron"
|
||||
},
|
||||
"level=1": {
|
||||
"model": "hee:block/cauldron_purified_ender_goo_level1"
|
||||
},
|
||||
"level=2": {
|
||||
"model": "hee:block/cauldron_purified_ender_goo_level2"
|
||||
},
|
||||
"level=3": {
|
||||
"model": "hee:block/cauldron_purified_ender_goo_level3"
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "hee:block/obsidian_falling"
|
||||
"model": "minecraft:block/obsidian"
|
||||
}
|
||||
}
|
||||
}
|
90
data/gen/assets/hee/blockstates/stone_brick_wall.json
Normal file
90
data/gen/assets/hee/blockstates/stone_brick_wall.json
Normal file
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"multipart": [
|
||||
{
|
||||
"when": {
|
||||
"up": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "hee:block/stone_brick_wall_post"
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "hee:block/stone_brick_wall_side",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "hee:block/stone_brick_wall_side_tall",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "hee:block/stone_brick_wall_side",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "hee:block/stone_brick_wall_side_tall",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "hee:block/stone_brick_wall_side",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "hee:block/stone_brick_wall_side_tall",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "hee:block/stone_brick_wall_side",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "hee:block/stone_brick_wall_side_tall",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@@ -1,415 +1,357 @@
|
||||
{
|
||||
"block.hee.ethereal_lantern": "Ethereal Lantern",
|
||||
"block.hee.stone_brick_wall": "Stone Brick Wall",
|
||||
"block.hee.infused_glass": "Infused Glass",
|
||||
"block.hee.vantablock": "Vantablock",
|
||||
"block.hee.endium_block": "Endium Block",
|
||||
"block.hee.endersol": "Endersol",
|
||||
"block.hee.humus": "Humus",
|
||||
|
||||
"block.hee.gloomrock": "Gloomrock",
|
||||
"block.hee.gloomrock_bricks": "Gloomrock Bricks",
|
||||
"block.hee.gloomrock_brick_slab": "Gloomrock Brick Slab",
|
||||
"block.hee.gloomrock_brick_stairs": "Gloomrock Brick Stairs",
|
||||
"block.hee.gloomrock_smooth": "Smooth Gloomrock",
|
||||
"block.hee.gloomrock_smooth_slab": "Smooth Gloomrock Slab",
|
||||
"block.hee.gloomrock_smooth_stairs": "Smooth Gloomrock Stairs",
|
||||
"block.hee.gloomrock_smooth_red": "Red Gloomrock",
|
||||
"block.hee.gloomrock_smooth_orange": "Orange Gloomrock",
|
||||
"block.hee.gloomrock_smooth_yellow": "Yellow Gloomrock",
|
||||
"block.hee.gloomrock_smooth_green": "Green Gloomrock",
|
||||
"block.hee.gloomrock_smooth_cyan": "Cyan Gloomrock",
|
||||
"block.hee.gloomrock_smooth_blue": "Blue Gloomrock",
|
||||
"block.hee.gloomrock_smooth_purple": "Purple Gloomrock",
|
||||
"block.hee.gloomrock_smooth_magenta": "Magenta Gloomrock",
|
||||
"block.hee.gloomrock_smooth_white": "White Gloomrock",
|
||||
"block.hee.gloomtorch": "Gloomtorch",
|
||||
|
||||
"block.hee.dusty_stone": "Dusty Stone",
|
||||
"block.hee.dusty_stone_cracked": "Cracked Dusty Stone",
|
||||
"block.hee.dusty_stone_damaged": "Damaged Dusty Stone",
|
||||
"block.hee.dusty_stone_bricks": "Dusty Stone Bricks",
|
||||
"block.hee.dusty_stone_cracked_bricks": "Cracked Dusty Stone Bricks",
|
||||
"block.hee.dusty_stone_decoration": "Dusty Stone Decoration",
|
||||
"block.hee.dusty_stone_brick_stairs": "Dusty Stone Brick Stairs",
|
||||
"block.hee.dusty_stone_brick_slab": "Dusty Stone Brick Slab",
|
||||
|
||||
"block.hee.obsidian_stairs": "Obsidian Stairs",
|
||||
"block.hee.obsidian_falling": "Falling Obsidian",
|
||||
"block.hee.obsidian_smooth": "Smooth Obsidian",
|
||||
"block.hee.obsidian_chiseled": "Chiseled Obsidian",
|
||||
"block.hee.obsidian_pillar": "Obsidian Pillar",
|
||||
"block.hee.obsidian_smooth_lit": "Smooth Obsidian (Lit)",
|
||||
"block.hee.obsidian_chiseled_lit": "Chiseled Obsidian (Lit)",
|
||||
"block.hee.obsidian_pillar_lit": "Obsidian Pillar (Lit)",
|
||||
"block.hee.obsidian_tower_top": "Obsidian Tower Top",
|
||||
|
||||
"block.hee.end_stone_infested": "Infested End Stone",
|
||||
"block.hee.end_stone_burned": "Burned End Stone",
|
||||
"block.hee.end_stone_enchanted": "Enchanted End Stone",
|
||||
|
||||
"block.hee.accumulation_table": "Accumulation Table",
|
||||
"block.hee.ancient_cobweb": "Ancient Cobweb",
|
||||
"block.hee.autumn_leaves_brown": "Autumn Leaves (Brown)",
|
||||
"block.hee.autumn_leaves_orange": "Autumn Leaves (Orange)",
|
||||
"block.hee.autumn_leaves_red": "Autumn Leaves (Red)",
|
||||
"block.hee.autumn_leaves_yellowgreen": "Autumn Leaves (Yellow-Green)",
|
||||
"block.hee.autumn_sapling_brown": "Autumn Sapling (Brown)",
|
||||
"block.hee.autumn_sapling_orange": "Autumn Sapling (Orange)",
|
||||
"block.hee.autumn_sapling_red": "Autumn Sapling (Red)",
|
||||
"block.hee.autumn_sapling_yellowgreen": "Autumn Sapling (Yellow-Green)",
|
||||
"block.hee.dark_chest": "Dark Chest",
|
||||
"block.hee.dark_loam": "Dark Loam",
|
||||
"block.hee.dark_loam_slab": "Dark Loam Slab",
|
||||
|
||||
"block.hee.death_flower": "Death Flower",
|
||||
"block.hee.death_flower_healed": "Healed Death Flower",
|
||||
"block.hee.death_flower_withered": "Withered Death Flower",
|
||||
"block.hee.dry_vines": "Dry Vines",
|
||||
"block.hee.dusty_stone": "Dusty Stone",
|
||||
"block.hee.dusty_stone_brick_slab": "Dusty Stone Brick Slab",
|
||||
"block.hee.dusty_stone_brick_stairs": "Dusty Stone Brick Stairs",
|
||||
"block.hee.dusty_stone_bricks": "Dusty Stone Bricks",
|
||||
"block.hee.dusty_stone_cracked": "Cracked Dusty Stone",
|
||||
"block.hee.dusty_stone_cracked_bricks": "Cracked Dusty Stone Bricks",
|
||||
"block.hee.dusty_stone_damaged": "Damaged Dusty Stone",
|
||||
"block.hee.dusty_stone_decoration": "Dusty Stone Decoration",
|
||||
"block.hee.end_portal_acceptor": "End Portal Acceptor",
|
||||
"block.hee.end_portal_frame": "End Portal Frame",
|
||||
"block.hee.end_portal_inner": "End Portal",
|
||||
"block.hee.end_powder_ore": "End Powder Ore",
|
||||
"block.hee.end_stone_burned": "Burned End Stone",
|
||||
"block.hee.end_stone_enchanted": "Enchanted End Stone",
|
||||
"block.hee.end_stone_infested": "Infested End Stone",
|
||||
"block.hee.enderman_head": "Enderman Head",
|
||||
"block.hee.endersol": "Endersol",
|
||||
"block.hee.endium_block": "Endium Block",
|
||||
"block.hee.endium_ore": "Endium Ore",
|
||||
"block.hee.energy_cluster": "Energy Cluster",
|
||||
"block.hee.enhanced_brewing_stand": "Enhanced Brewing Stand",
|
||||
"block.hee.eternal_fire": "Eternal Fire",
|
||||
"block.hee.ethereal_lantern": "Ethereal Lantern",
|
||||
"block.hee.experience_gate": "Experience Gate",
|
||||
"block.hee.experience_gate_controller": "Experience Gate (Controller)",
|
||||
"block.hee.experience_table": "Experience Table",
|
||||
"block.hee.gloomrock": "Gloomrock",
|
||||
"block.hee.gloomrock_brick_slab": "Gloomrock Brick Slab",
|
||||
"block.hee.gloomrock_brick_stairs": "Gloomrock Brick Stairs",
|
||||
"block.hee.gloomrock_bricks": "Gloomrock Bricks",
|
||||
"block.hee.gloomrock_smooth": "Smooth Gloomrock",
|
||||
"block.hee.gloomrock_smooth_blue": "Blue Gloomrock",
|
||||
"block.hee.gloomrock_smooth_cyan": "Cyan Gloomrock",
|
||||
"block.hee.gloomrock_smooth_green": "Green Gloomrock",
|
||||
"block.hee.gloomrock_smooth_magenta": "Magenta Gloomrock",
|
||||
"block.hee.gloomrock_smooth_orange": "Orange Gloomrock",
|
||||
"block.hee.gloomrock_smooth_purple": "Purple Gloomrock",
|
||||
"block.hee.gloomrock_smooth_red": "Red Gloomrock",
|
||||
"block.hee.gloomrock_smooth_slab": "Smooth Gloomrock Slab",
|
||||
"block.hee.gloomrock_smooth_stairs": "Smooth Gloomrock Stairs",
|
||||
"block.hee.gloomrock_smooth_white": "White Gloomrock",
|
||||
"block.hee.gloomrock_smooth_yellow": "Yellow Gloomrock",
|
||||
"block.hee.gloomtorch": "Gloomtorch",
|
||||
"block.hee.grave_dirt": "Grave Dirt",
|
||||
"block.hee.grave_dirt_loot": "Grave Dirt (Loot)",
|
||||
"block.hee.grave_dirt_spiderling": "Grave Dirt (Spiderling)",
|
||||
|
||||
"block.hee.whitebark_log": "Whitebark Log",
|
||||
"block.hee.whitebark": "Whitebark",
|
||||
"block.hee.whitebark_planks": "Whitebark Planks",
|
||||
"block.hee.whitebark_stairs": "Whitebark Stairs",
|
||||
"block.hee.whitebark_slab": "Whitebark Slab",
|
||||
|
||||
"block.hee.miners_burial_block_plain": "Miner's Burial Block",
|
||||
"block.hee.miners_burial_block_chiseled": "Miner's Burial Block (Chiseled)",
|
||||
"block.hee.miners_burial_block_pillar": "Miner's Burial Block (Pillar)",
|
||||
"block.hee.miners_burial_block_jail": "Miner's Burial Block (Jail)",
|
||||
"block.hee.miners_burial_altar": "Miner's Burial Altar",
|
||||
|
||||
"block.hee.humus": "Humus",
|
||||
"block.hee.igneous_plate": "Igneous Plate",
|
||||
"block.hee.igneous_rock_ore": "Igneous Rock Ore",
|
||||
"block.hee.infused_glass": "Infused Glass",
|
||||
"block.hee.infusion_table": "Infusion Table",
|
||||
"block.hee.jar_o_dust": "Jar o' Dust",
|
||||
"block.hee.jar_o_dust.tooltip.entry": "§7%sx %s",
|
||||
"block.hee.dark_chest": "Dark Chest",
|
||||
"block.hee.jar_o_dust.tooltip.entry": "\u00A77%sx %s",
|
||||
"block.hee.large_shulker_box": "Large Shulker Box",
|
||||
"block.hee.loot_chest": "Loot Chest",
|
||||
"block.hee.loot_chest.tooltip": "§5§o(Editable in creative mode)",
|
||||
"block.hee.loot_chest.error_has_loot_table": "Cannot edit a Loot Chest that uses a predefined loot table",
|
||||
|
||||
"block.hee.puzzle_block_wall": "Puzzle Block (Wall)",
|
||||
"block.hee.puzzle_block_plain": "Puzzle Block (Plain)",
|
||||
"block.hee.loot_chest.tooltip": "\u00A75\u00A7o(Editable in creative mode)",
|
||||
"block.hee.medium_shulker_box": "Medium Shulker Box",
|
||||
"block.hee.miners_burial_altar": "Miner's Burial Altar",
|
||||
"block.hee.miners_burial_block_chiseled": "Miner's Burial Block (Chiseled)",
|
||||
"block.hee.miners_burial_block_jail": "Miner's Burial Block (Jail)",
|
||||
"block.hee.miners_burial_block_pillar": "Miner's Burial Block (Pillar)",
|
||||
"block.hee.miners_burial_block_plain": "Miner's Burial Block",
|
||||
"block.hee.obsidian_chiseled": "Chiseled Obsidian",
|
||||
"block.hee.obsidian_chiseled_lit": "Chiseled Obsidian (Lit)",
|
||||
"block.hee.obsidian_falling": "Falling Obsidian",
|
||||
"block.hee.obsidian_pillar": "Obsidian Pillar",
|
||||
"block.hee.obsidian_pillar_lit": "Obsidian Pillar (Lit)",
|
||||
"block.hee.obsidian_smooth": "Smooth Obsidian",
|
||||
"block.hee.obsidian_smooth_lit": "Smooth Obsidian (Lit)",
|
||||
"block.hee.obsidian_stairs": "Obsidian Stairs",
|
||||
"block.hee.obsidian_tower_top": "Obsidian Tower Top",
|
||||
"block.hee.potted_autumn_sapling_brown": "Potted Autumn Sapling (Brown)",
|
||||
"block.hee.potted_autumn_sapling_orange": "Potted Autumn Sapling (Orange)",
|
||||
"block.hee.potted_autumn_sapling_red": "Potted Autumn Sapling (Red)",
|
||||
"block.hee.potted_autumn_sapling_yellowgreen": "Potted Autumn Sapling (Yellow-Green)",
|
||||
"block.hee.potted_death_flower": "Potted Death Flower",
|
||||
"block.hee.potted_death_flower_healed": "Potted Healed Death Flower",
|
||||
"block.hee.potted_death_flower_withered": "Potted Withered Death Flower",
|
||||
"block.hee.puzzle_block_burst_3": "Puzzle Block (Burst 3x3)",
|
||||
"block.hee.puzzle_block_burst_5": "Puzzle Block (Burst 5x5)",
|
||||
"block.hee.puzzle_block_plain": "Puzzle Block (Plain)",
|
||||
"block.hee.puzzle_block_redirect_1": "Puzzle Block (Redirect 1)",
|
||||
"block.hee.puzzle_block_redirect_2": "Puzzle Block (Redirect 2)",
|
||||
"block.hee.puzzle_block_redirect_4": "Puzzle Block (Redirect 4)",
|
||||
"block.hee.puzzle_block_teleport": "Puzzle Block (Teleport)",
|
||||
|
||||
"block.hee.experience_gate": "Experience Gate",
|
||||
"block.hee.experience_gate_controller": "Experience Gate (Controller)",
|
||||
|
||||
"block.hee.igneous_plate": "Igneous Plate",
|
||||
"block.hee.enhanced_brewing_stand": "Enhanced Brewing Stand",
|
||||
|
||||
"block.hee.end_powder_ore": "End Powder Ore",
|
||||
"block.hee.endium_ore": "Endium Ore",
|
||||
"block.hee.stardust_ore": "Stardust Ore",
|
||||
"block.hee.igneous_rock_ore": "Igneous Rock Ore",
|
||||
|
||||
"block.hee.autumn_leaves_red": "Autumn Leaves (Red)",
|
||||
"block.hee.autumn_leaves_brown": "Autumn Leaves (Brown)",
|
||||
"block.hee.autumn_leaves_orange": "Autumn Leaves (Orange)",
|
||||
"block.hee.autumn_leaves_yellowgreen": "Autumn Leaves (Yellow-Green)",
|
||||
"block.hee.autumn_sapling_red": "Autumn Sapling (Red)",
|
||||
"block.hee.autumn_sapling_brown": "Autumn Sapling (Brown)",
|
||||
"block.hee.autumn_sapling_orange": "Autumn Sapling (Orange)",
|
||||
"block.hee.autumn_sapling_yellowgreen": "Autumn Sapling (Yellow-Green)",
|
||||
"block.hee.potted_autumn_sapling_red": "Potted Autumn Sapling (Red)",
|
||||
"block.hee.potted_autumn_sapling_brown": "Potted Autumn Sapling (Brown)",
|
||||
"block.hee.potted_autumn_sapling_orange": "Potted Autumn Sapling (Orange)",
|
||||
"block.hee.potted_autumn_sapling_yellowgreen": "Potted Autumn Sapling (Yellow-Green)",
|
||||
|
||||
"block.hee.death_flower": "Death Flower",
|
||||
"block.hee.death_flower_healed": "Healed Death Flower",
|
||||
"block.hee.death_flower_withered": "Withered Death Flower",
|
||||
"block.hee.potted_death_flower": "Potted Death Flower",
|
||||
"block.hee.potted_death_flower_healed": "Potted Healed Death Flower",
|
||||
"block.hee.potted_death_flower_withered": "Potted Withered Death Flower",
|
||||
|
||||
"block.hee.ancient_cobweb": "Ancient Cobweb",
|
||||
"block.hee.dry_vines": "Dry Vines",
|
||||
"block.hee.enderman_head": "Enderman Head",
|
||||
|
||||
"block.hee.end_portal_inner": "End Portal",
|
||||
"block.hee.end_portal_frame": "End Portal Frame",
|
||||
"block.hee.end_portal_acceptor": "End Portal Acceptor",
|
||||
"block.hee.void_portal_inner": "Void Portal",
|
||||
"block.hee.void_portal_frame": "Void Portal Frame",
|
||||
"block.hee.void_portal_storage": "Void Portal Storage",
|
||||
|
||||
"block.hee.energy_cluster": "Energy Cluster",
|
||||
|
||||
"block.hee.table_pedestal": "Table Pedestal",
|
||||
"block.hee.table_base": "Table Base",
|
||||
"block.hee.accumulation_table": "Accumulation Table",
|
||||
"block.hee.experience_table": "Experience Table",
|
||||
"block.hee.infusion_table": "Infusion Table",
|
||||
|
||||
"block.hee.eternal_fire": "Eternal Fire",
|
||||
"block.hee.puzzle_block_wall": "Puzzle Block (Wall)",
|
||||
"block.hee.scaffolding": "Scaffolding",
|
||||
|
||||
"block.hee.shulker_box": "Shulker Box",
|
||||
"block.hee.small_shulker_box": "Small Shulker Box",
|
||||
"block.hee.medium_shulker_box": "Medium Shulker Box",
|
||||
"block.hee.large_shulker_box": "Large Shulker Box",
|
||||
|
||||
"block.tooltip.hee.table.tier": "§7Tier %s",
|
||||
|
||||
"item.hee.ancient_dust": "Ancient Dust",
|
||||
"item.hee.ethereum": "Ethereum",
|
||||
"item.hee.end_powder": "End Powder",
|
||||
"item.hee.stardust": "Stardust",
|
||||
"item.hee.endium_ingot": "Endium Ingot",
|
||||
"item.hee.endium_nugget": "Endium Nugget",
|
||||
"item.hee.obsidian_fragment": "Obsidian Fragment",
|
||||
"item.hee.igneous_rock": "Igneous Rock",
|
||||
"item.hee.puzzle_medallion": "Puzzle Medallion",
|
||||
"item.hee.infernium": "Infernium",
|
||||
"item.hee.infernium_ingot": "Infernium Ingot",
|
||||
"item.hee.auricion": "Auricion",
|
||||
"item.hee.dragon_scale": "Dragon Scale",
|
||||
"item.hee.instability_orb": "Instability Orb",
|
||||
"item.hee.ectoplasm": "Ectoplasm",
|
||||
"item.hee.enchanted_claw": "Enchanted Claw",
|
||||
|
||||
"item.hee.alteration_nexus": "Alteration Nexus",
|
||||
"item.hee.void_essence": "Void Essence",
|
||||
"item.hee.obsidian_rod": "Obsidian Rod",
|
||||
"item.hee.purity_extract": "Purity Extract",
|
||||
"item.hee.static_core": "Static Core",
|
||||
"item.hee.ticking_core": "Ticking Core",
|
||||
"item.hee.dirty_infernium_ingot": "Dirty Infernium Ingot",
|
||||
"item.hee.amelior": "Amelior",
|
||||
"item.hee.revitalization_substance": "Revitalization Substance",
|
||||
"item.hee.binding_essence": "Binding Essence",
|
||||
|
||||
"item.hee.eye_of_ender": "Eye of Ender",
|
||||
"item.hee.compost": "Compost",
|
||||
"item.hee.void_salad.single": "Void Salad",
|
||||
"item.hee.void_salad.double": "Void Void Salad",
|
||||
"item.hee.void_salad.mega": "Mega Void Salad",
|
||||
|
||||
"item.hee.accumulation_table_core": "Accumulation Table Core",
|
||||
"item.hee.experience_table_core": "Experience Table Core",
|
||||
"item.hee.infusion_table_core": "Infusion Table Core",
|
||||
|
||||
"item.hee.table_link": "Table Link",
|
||||
"item.hee.knowledge_note": "Knowledge Note",
|
||||
"item.hee.experience_bottle.tooltip": "§a%s §2experience",
|
||||
|
||||
"item.hee.void_miner": "Void Miner",
|
||||
"item.hee.void_bucket": "Void Bucket",
|
||||
"item.hee.scorching_pickaxe": "Scorching Pickaxe",
|
||||
"item.hee.scorching_shovel": "Scorching Shovel",
|
||||
"item.hee.scorching_axe": "Scorching Axe",
|
||||
"item.hee.scorching_sword": "Scorching Sword",
|
||||
"item.hee.flint_and_infernium": "Flint and Infernium",
|
||||
|
||||
"item.hee.ender_goo_bucket": "Ender Goo Bucket",
|
||||
"item.hee.purified_ender_goo_bucket": "Purified Ender Goo Bucket",
|
||||
|
||||
"item.hee.energy_oracle": "Energy Oracle",
|
||||
"item.hee.energy_receptacle": "Energy Receptacle",
|
||||
"item.hee.energy_receptacle.tooltip.empty": "§9Empty",
|
||||
"item.hee.energy_receptacle.tooltip.holding": "§9Holding §3%s§9 Energy",
|
||||
|
||||
"item.hee.spatial_dash_gem": "Spatial Dash Gem",
|
||||
"item.hee.linking_gem": "Linking Gem",
|
||||
"item.hee.portal_token.normal": "Portal Token",
|
||||
"item.hee.portal_token.rare": "Rare Portal Token",
|
||||
"item.hee.portal_token.solitary": "Solitary Portal Token",
|
||||
"item.hee.portal_token.normal.concrete": "Portal Token (%s)",
|
||||
"item.hee.portal_token.rare.concrete": "Rare Portal Token (%s)",
|
||||
"item.hee.portal_token.solitary.concrete": "Solitary Portal Token (%s)",
|
||||
"item.hee.portal_token.tooltip.difficulty.peaceful": "§7«§2 Peaceful §7»",
|
||||
"item.hee.portal_token.tooltip.difficulty.neutral": "§7«§e Neutral §7»",
|
||||
"item.hee.portal_token.tooltip.difficulty.hostile": "§7«§4 Hostile §7»",
|
||||
"item.hee.portal_token.tooltip.difficulty.boss": "§7«§5 Boss §7»",
|
||||
"item.hee.portal_token.tooltip.activate": "§6Right-click to activate",
|
||||
"item.hee.portal_token.tooltip.creative.generate": "§6Hold and right-click to generate (creative)",
|
||||
"item.hee.portal_token.tooltip.creative.teleport": "§6Hold and right-click to teleport (creative)",
|
||||
"item.hee.portal_token.tooltip.advanced": "§7Index: %s",
|
||||
"item.hee.blank_token": "Blank Token",
|
||||
|
||||
"item.hee.trinket_pouch": "Trinket Pouch",
|
||||
"item.hee.trinket_pouch.tooltip": "§7Right-click to open",
|
||||
"item.hee.amulet_of_recovery": "Amulet of Recovery",
|
||||
"item.hee.amulet_of_recovery.cost_error": "Error calculating Energy cost for Amulet of Recovery. Please check server logs for the full error and report it.",
|
||||
"item.hee.ring_of_hunger": "Ring of Hunger",
|
||||
"item.hee.ring_of_preservation": "Ring of Preservation",
|
||||
"item.hee.talisman_of_griefing": "Talisman of Griefing",
|
||||
"item.hee.scale_of_freefall": "Scale of Freefall",
|
||||
|
||||
"item.hee.ender_eye_spawn_egg": "Ender Eye Spawn Egg",
|
||||
"item.hee.angry_enderman_spawn_egg": "Angry Enderman Spawn Egg",
|
||||
"item.hee.blobby_spawn_egg": "Blobby Spawn Egg",
|
||||
"item.hee.endermite_instability_spawn_egg": "Endermite Spawn Egg (Instability)",
|
||||
"item.hee.spiderling_spawn_egg": "Spiderling Spawn Egg",
|
||||
"item.hee.undread_spawn_egg": "Undread Spawn Egg",
|
||||
"item.hee.vampire_bat_spawn_egg": "Vampire Bat Spawn Egg",
|
||||
|
||||
"item.hee.chorus_berry": "Chorus Berry",
|
||||
"item.hee.shulker_box.tooltip": "§7Right-click to open",
|
||||
|
||||
"item.tooltip.hee.energy.level": "§9Energy: §3%s§9 / §3%s",
|
||||
"item.tooltip.hee.energy.uses": "§9Uses Left: §3%s",
|
||||
|
||||
"item.tooltip.hee.trinket.in_slot.charged": "§aActive",
|
||||
"item.tooltip.hee.trinket.in_slot.uncharged": "§cMust be recharged",
|
||||
"item.tooltip.hee.trinket.not_in_slot.charged": "§cMust be placed in Trinket slot",
|
||||
"item.tooltip.hee.trinket.not_in_slot.uncharged": "§cMust be charged and placed in Trinket slot",
|
||||
|
||||
"item.tooltip.hee.table_core.tooltip": "§7Minimum Tier: %s",
|
||||
|
||||
"fluid.hee.ender_goo": "Ender Goo",
|
||||
"fluid.hee.purified_ender_goo": "Purified Ender Goo",
|
||||
|
||||
"hee.infusions.list.title": "§aInfusions",
|
||||
"hee.infusions.list.item": "§2- %s",
|
||||
"hee.infusions.list.none": "§7None",
|
||||
"hee.infusions.applicable.title": "§aApplicable To",
|
||||
"hee.infusions.applicable.item": "§2- %s §3[%s]",
|
||||
|
||||
"hee.infusion.power": "Power",
|
||||
"hee.infusion.fire": "Fire",
|
||||
"hee.infusion.trap": "Trap",
|
||||
"hee.infusion.mining": "Mining",
|
||||
"hee.infusion.harmless": "Harmless",
|
||||
"hee.infusion.phasing": "Phasing",
|
||||
"hee.infusion.slow": "Slow",
|
||||
"hee.infusion.riding": "Riding",
|
||||
"hee.infusion.vigor": "Vigor",
|
||||
"hee.infusion.capacity": "Capacity",
|
||||
"hee.infusion.distance": "Distance",
|
||||
"hee.infusion.speed": "Speed",
|
||||
"hee.infusion.stability": "Stability",
|
||||
"hee.infusion.safety": "Safety",
|
||||
"hee.infusion.expansion": "Expansion",
|
||||
|
||||
"itemGroup.hee": "Hardcore Ender Expansion",
|
||||
|
||||
"hee.energy.overlay.health": "%s ENERGY CLUSTER",
|
||||
"hee.energy.overlay.level": "HOLDING %s OUT OF %s ENERGY",
|
||||
"hee.energy.overlay.ignored": "IGNORED",
|
||||
|
||||
"hee.energy.health.powered": "POWERED",
|
||||
"hee.energy.health.healthy": "HEALTHY",
|
||||
"hee.energy.health.weakened": "WEAKENED",
|
||||
"hee.energy.health.tired": "TIRED",
|
||||
"hee.energy.health.damaged": "DAMAGED",
|
||||
"hee.energy.health.unstable": "UNSTABLE",
|
||||
"hee.energy.health.revitalizing": "REVITALIZING",
|
||||
|
||||
"entity.hee.ender_eye": "Ender Eye",
|
||||
"block.hee.stardust_ore": "Stardust Ore",
|
||||
"block.hee.stone_brick_wall": "Stone Brick Wall",
|
||||
"block.hee.table_base": "Table Base",
|
||||
"block.hee.table_pedestal": "Table Pedestal",
|
||||
"block.hee.vantablock": "Vantablock",
|
||||
"block.hee.void_portal_frame": "Void Portal Frame",
|
||||
"block.hee.void_portal_inner": "Void Portal",
|
||||
"block.hee.void_portal_storage": "Void Portal Storage",
|
||||
"block.hee.whitebark": "Whitebark",
|
||||
"block.hee.whitebark_log": "Whitebark Log",
|
||||
"block.hee.whitebark_planks": "Whitebark Planks",
|
||||
"block.hee.whitebark_slab": "Whitebark Slab",
|
||||
"block.hee.whitebark_stairs": "Whitebark Stairs",
|
||||
"block.tooltip.hee.table.tier": "\u00A77Tier %s",
|
||||
"commands.hee.causatum.check": "Ender Causatum stage: %s",
|
||||
"commands.hee.causatum.info": "checks or triggers Ender Causatum stages",
|
||||
"commands.hee.causatum.list": "Ender Causatum stages:",
|
||||
"commands.hee.causatum.set": "Ender Causatum stage updated for %s player(s)",
|
||||
"commands.hee.debug.info": "access to debug toggles",
|
||||
"commands.hee.help.failed": "Page must be between 1 and %s",
|
||||
"commands.hee.help.footer.admin": "\u00A7a\u00A7nadmin commands",
|
||||
"commands.hee.help.footer.end": "\u00A72 ---",
|
||||
"commands.hee.help.footer.middle": "\u00A72 / \u00A7r",
|
||||
"commands.hee.help.footer.next": "next page",
|
||||
"commands.hee.help.footer.prev": "previous page",
|
||||
"commands.hee.help.footer.start": "\u00A72--- Navigate to: \u00A7r",
|
||||
"commands.hee.help.header.admin": "\u00A72--- Showing \u00A7aadmin\u00A72 commands, page %s \u00A72of %s\u00A72 ---",
|
||||
"commands.hee.help.header.client": "\u00A72--- Showing \u00A7aclient\u00A72 commands, page %s\u00A72 ---",
|
||||
"commands.hee.help.header.debug": "\u00A72--- Showing \u00A7adebug\u00A72 commands, page %s \u00A72of %s\u00A72 ---",
|
||||
"commands.hee.help.info": "shows command list",
|
||||
"commands.hee.infusions.add_success": "Added %s infusion",
|
||||
"commands.hee.infusions.already_present": "Infusion is already present on this item",
|
||||
"commands.hee.infusions.info": "manipulates infusions on held item",
|
||||
"commands.hee.infusions.no_held_item": "No item held in main hand",
|
||||
"commands.hee.infusions.not_applicable": "Infusion cannot be applied to this item",
|
||||
"commands.hee.infusions.not_present": "Infusion is not present on this item",
|
||||
"commands.hee.infusions.nothing_to_remove": "No infusions present on this item",
|
||||
"commands.hee.infusions.remove_success": "Removed %s infusion",
|
||||
"commands.hee.infusions.reset_success": "Removed %s infusion(s)",
|
||||
"commands.hee.instability.info": "utilities for instability",
|
||||
"commands.hee.lootchest.info": "manipulates Loot Chests",
|
||||
"commands.hee.lootchest.not_loot_chest": "No Loot Chest at the specified location",
|
||||
"commands.hee.lootchest.remove_table_success": "Removed loot table",
|
||||
"commands.hee.lootchest.reset_success": "Reset loot generated for %s player(s)",
|
||||
"commands.hee.lootchest.set_table_success": "Updated loot table",
|
||||
"commands.hee.lootchest.table_not_found": "Loot table not found",
|
||||
"commands.hee.scaffolding.info": "sets current structure palette",
|
||||
"commands.hee.structure.info": "utilities for custom structures",
|
||||
"commands.hee.territory.info": "utilities for territories",
|
||||
"commands.hee.testworld.info": "converts overworld into a test world",
|
||||
"commands.hee.token.info": "generates a Portal Token item",
|
||||
"commands.hee.token.success": "Created Portal Token leading to %s",
|
||||
"effect.hee.banishment": "Banishment",
|
||||
"effect.hee.corruption": "Corruption",
|
||||
"effect.hee.lifeless": "Lifeless",
|
||||
"effect.hee.purity": "Purity",
|
||||
"entity.hee.angry_enderman": "Angry Enderman",
|
||||
"entity.hee.blobby": "Blobby",
|
||||
"entity.hee.ender_eye": "Ender Eye",
|
||||
"entity.hee.ender_pearl": "Ender Pearl",
|
||||
"entity.hee.endermite_instability": "Endermite (Instability)",
|
||||
"entity.hee.spiderling": "Spiderling",
|
||||
"entity.hee.undread": "Undread",
|
||||
"entity.hee.vampire_bat": "Vampire Bat",
|
||||
"entity.hee.ender_pearl": "Ender Pearl",
|
||||
|
||||
"effect.hee.lifeless": "Lifeless",
|
||||
"effect.hee.purity": "Purity",
|
||||
"effect.hee.corruption": "Corruption",
|
||||
"effect.hee.banishment": "Banishment",
|
||||
|
||||
"item.minecraft.potion.effect.purity": "Potion of Purity",
|
||||
"item.minecraft.splash_potion.effect.purity": "Splash Potion of Purity",
|
||||
"item.minecraft.lingering_potion.effect.purity": "Lingering Potion of Purity",
|
||||
"item.minecraft.tipped_arrow.effect.purity": "Arrow of Purity",
|
||||
|
||||
"item.minecraft.potion.effect.corruption": "Potion of Corruption",
|
||||
"item.minecraft.splash_potion.effect.corruption": "Splash Potion of Corruption",
|
||||
"item.minecraft.lingering_potion.effect.corruption": "Lingering Potion of Corruption",
|
||||
"item.minecraft.tipped_arrow.effect.corruption": "Arrow of Corruption",
|
||||
|
||||
"item.minecraft.potion.effect.banishment": "Potion of Banishment",
|
||||
"item.minecraft.splash_potion.effect.banishment": "Splash Potion of Banishment",
|
||||
"item.minecraft.lingering_potion.effect.banishment": "Lingering Potion of Banishment",
|
||||
"item.minecraft.tipped_arrow.effect.banishment": "Arrow of Banishment",
|
||||
|
||||
"fluid.hee.ender_goo": "Ender Goo",
|
||||
"fluid.hee.purified_ender_goo": "Purified Ender Goo",
|
||||
"gui.hee.amulet_of_recovery.move_all": "Move All",
|
||||
"gui.hee.enhanced_brewing_stand.title": "Enhanced Brewing Stand",
|
||||
"gui.hee.loot_chest.title": "Loot Chest",
|
||||
"gui.hee.loot_chest.title.creative": "Loot Chest (Editing)",
|
||||
"gui.hee.portal_token_storage.title": "Portal Tokens",
|
||||
"gui.hee.enhanced_brewing_stand.title": "Enhanced Brewing Stand",
|
||||
|
||||
"hee.territory.fallback.name": "Unknown",
|
||||
"hee.territory.the_hub.name": "The Hub",
|
||||
"hee.territory.forgotten_tombs.name": "Forgotten Tombs",
|
||||
"hee.territory.obsidian_towers.name": "Obsidian Towers",
|
||||
"hee.energy.health.damaged": "DAMAGED",
|
||||
"hee.energy.health.healthy": "HEALTHY",
|
||||
"hee.energy.health.powered": "POWERED",
|
||||
"hee.energy.health.revitalizing": "REVITALIZING",
|
||||
"hee.energy.health.tired": "TIRED",
|
||||
"hee.energy.health.unstable": "UNSTABLE",
|
||||
"hee.energy.health.weakened": "WEAKENED",
|
||||
"hee.energy.overlay.health": "%s ENERGY CLUSTER",
|
||||
"hee.energy.overlay.ignored": "IGNORED",
|
||||
"hee.energy.overlay.level": "HOLDING %s OUT OF %s ENERGY",
|
||||
"hee.infusion.capacity": "Capacity",
|
||||
"hee.infusion.distance": "Distance",
|
||||
"hee.infusion.expansion": "Expansion",
|
||||
"hee.infusion.fire": "Fire",
|
||||
"hee.infusion.harmless": "Harmless",
|
||||
"hee.infusion.mining": "Mining",
|
||||
"hee.infusion.phasing": "Phasing",
|
||||
"hee.infusion.power": "Power",
|
||||
"hee.infusion.riding": "Riding",
|
||||
"hee.infusion.safety": "Safety",
|
||||
"hee.infusion.slow": "Slow",
|
||||
"hee.infusion.speed": "Speed",
|
||||
"hee.infusion.stability": "Stability",
|
||||
"hee.infusion.trap": "Trap",
|
||||
"hee.infusion.vigor": "Vigor",
|
||||
"hee.infusions.applicable.item": "\u00A72- %s \u00A73[%s]",
|
||||
"hee.infusions.applicable.title": "\u00A7aApplicable To",
|
||||
"hee.infusions.list.item": "\u00A72- %s",
|
||||
"hee.infusions.list.none": "\u00A77None",
|
||||
"hee.infusions.list.title": "\u00A7aInfusions",
|
||||
"hee.territory.arcane_conjunctions.name": "Arcane Conjunctions",
|
||||
"hee.territory.lost_garden.name": "Lost Garden",
|
||||
"hee.territory.ender_city.name": "Ender City",
|
||||
"hee.territory.hostile_pass.name": "Hostile Pass",
|
||||
"hee.territory.warded_mines.name": "Warded Mines",
|
||||
"hee.territory.eternal_mists.name": "Eternal Mists",
|
||||
"hee.territory.cursed_library.name": "Cursed Library",
|
||||
"hee.territory.dragon_lair.name": "Dragon Lair",
|
||||
|
||||
"commands.hee.help.info": "shows command list",
|
||||
"commands.hee.help.failed": "Page must be between 1 and %s",
|
||||
"commands.hee.help.header.client": "§2--- Showing §aclient§2 commands, page %s§2 ---",
|
||||
"commands.hee.help.header.admin": "§2--- Showing §aadmin§2 commands, page %s §2of %s§2 ---",
|
||||
"commands.hee.help.header.debug": "§2--- Showing §adebug§2 commands, page %s §2of %s§2 ---",
|
||||
"commands.hee.help.footer.start": "§2--- Navigate to: §r",
|
||||
"commands.hee.help.footer.admin": "§a§nadmin commands",
|
||||
"commands.hee.help.footer.prev": "previous page",
|
||||
"commands.hee.help.footer.middle": "§2 / §r",
|
||||
"commands.hee.help.footer.next": "next page",
|
||||
"commands.hee.help.footer.end": "§2 ---",
|
||||
|
||||
"commands.hee.causatum.info": "checks or triggers Ender Causatum stages",
|
||||
"commands.hee.causatum.list": "Ender Causatum stages:",
|
||||
"commands.hee.causatum.check": "Ender Causatum stage: %s",
|
||||
"commands.hee.causatum.set": "Ender Causatum stage updated for %s player(s)",
|
||||
|
||||
"commands.hee.infusions.info": "manipulates infusions on held item",
|
||||
"commands.hee.infusions.reset_success": "Removed %s infusion(s)",
|
||||
"commands.hee.infusions.add_success": "Added %s infusion",
|
||||
"commands.hee.infusions.remove_success": "Removed %s infusion",
|
||||
"commands.hee.infusions.no_held_item": "No item held in main hand",
|
||||
"commands.hee.infusions.nothing_to_remove": "No infusions present on this item",
|
||||
"commands.hee.infusions.not_applicable": "Infusion cannot be applied to this item",
|
||||
"commands.hee.infusions.already_present": "Infusion is already present on this item",
|
||||
"commands.hee.infusions.not_present": "Infusion is not present on this item",
|
||||
|
||||
"commands.hee.lootchest.info": "manipulates Loot Chests",
|
||||
"commands.hee.lootchest.set_table_success": "Updated loot table",
|
||||
"commands.hee.lootchest.remove_table_success": "Removed loot table",
|
||||
"commands.hee.lootchest.reset_success": "Reset loot generated for %s player(s)",
|
||||
"commands.hee.lootchest.table_not_found": "Loot table not found",
|
||||
"commands.hee.lootchest.not_loot_chest": "No Loot Chest at the specified location",
|
||||
|
||||
"commands.hee.token.info": "generates a Portal Token item",
|
||||
"commands.hee.token.success": "Created Portal Token leading to %s",
|
||||
|
||||
"commands.hee.structure.info": "utilities for custom structures",
|
||||
"commands.hee.testworld.info": "converts overworld into a test world",
|
||||
|
||||
"hee.territory.ender_city.name": "Ender City",
|
||||
"hee.territory.eternal_mists.name": "Eternal Mists",
|
||||
"hee.territory.fallback.name": "Unknown",
|
||||
"hee.territory.forgotten_tombs.name": "Forgotten Tombs",
|
||||
"hee.territory.hostile_pass.name": "Hostile Pass",
|
||||
"hee.territory.lost_garden.name": "Lost Garden",
|
||||
"hee.territory.obsidian_towers.name": "Obsidian Towers",
|
||||
"hee.territory.the_hub.name": "The Hub",
|
||||
"hee.territory.warded_mines.name": "Warded Mines",
|
||||
"item.hee.accumulation_table_core": "Accumulation Table Core",
|
||||
"item.hee.alteration_nexus": "Alteration Nexus",
|
||||
"item.hee.amelior": "Amelior",
|
||||
"item.hee.amulet_of_recovery": "Amulet of Recovery",
|
||||
"item.hee.amulet_of_recovery.cost_error": "Error calculating Energy cost for Amulet of Recovery. Please check server logs for the full error and report it.",
|
||||
"item.hee.ancient_dust": "Ancient Dust",
|
||||
"item.hee.angry_enderman_spawn_egg": "Angry Enderman Spawn Egg",
|
||||
"item.hee.auricion": "Auricion",
|
||||
"item.hee.binding_essence": "Binding Essence",
|
||||
"item.hee.blank_token": "Blank Token",
|
||||
"item.hee.blobby_spawn_egg": "Blobby Spawn Egg",
|
||||
"item.hee.chorus_berry": "Chorus Berry",
|
||||
"item.hee.compost": "Compost",
|
||||
"item.hee.dirty_infernium_ingot": "Dirty Infernium Ingot",
|
||||
"item.hee.dragon_scale": "Dragon Scale",
|
||||
"item.hee.ectoplasm": "Ectoplasm",
|
||||
"item.hee.enchanted_claw": "Enchanted Claw",
|
||||
"item.hee.end_powder": "End Powder",
|
||||
"item.hee.ender_eye_spawn_egg": "Ender Eye Spawn Egg",
|
||||
"item.hee.ender_goo_bucket": "Ender Goo Bucket",
|
||||
"item.hee.endermite_instability_spawn_egg": "Endermite (Instability) Spawn Egg",
|
||||
"item.hee.endium_ingot": "Endium Ingot",
|
||||
"item.hee.endium_nugget": "Endium Nugget",
|
||||
"item.hee.energy_oracle": "Energy Oracle",
|
||||
"item.hee.energy_receptacle": "Energy Receptacle",
|
||||
"item.hee.energy_receptacle.tooltip.empty": "\u00A79Empty",
|
||||
"item.hee.energy_receptacle.tooltip.holding": "\u00A79Holding \u00A73%s\u00A79 Energy",
|
||||
"item.hee.ethereum": "Ethereum",
|
||||
"item.hee.experience_bottle.tooltip": "\u00A7a%s \u00A72experience",
|
||||
"item.hee.experience_table_core": "Experience Table Core",
|
||||
"item.hee.flint_and_infernium": "Flint and Infernium",
|
||||
"item.hee.igneous_rock": "Igneous Rock",
|
||||
"item.hee.infernium": "Infernium",
|
||||
"item.hee.infernium_ingot": "Infernium Ingot",
|
||||
"item.hee.infusion_table_core": "Infusion Table Core",
|
||||
"item.hee.instability_orb": "Instability Orb",
|
||||
"item.hee.knowledge_note": "Knowledge Note",
|
||||
"item.hee.linking_gem": "Linking Gem",
|
||||
"item.hee.obsidian_fragment": "Obsidian Fragment",
|
||||
"item.hee.obsidian_rod": "Obsidian Rod",
|
||||
"item.hee.portal_token.normal": "Portal Token",
|
||||
"item.hee.portal_token.normal.concrete": "Portal Token (%s)",
|
||||
"item.hee.portal_token.rare": "Rare Portal Token",
|
||||
"item.hee.portal_token.rare.concrete": "Rare Portal Token (%s)",
|
||||
"item.hee.portal_token.solitary": "Solitary Portal Token",
|
||||
"item.hee.portal_token.solitary.concrete": "Solitary Portal Token (%s)",
|
||||
"item.hee.portal_token.tooltip.activate": "\u00A76Right-click to activate",
|
||||
"item.hee.portal_token.tooltip.advanced": "\u00A77Index: %s",
|
||||
"item.hee.portal_token.tooltip.creative.generate": "\u00A76Hold and right-click to generate (creative)",
|
||||
"item.hee.portal_token.tooltip.creative.teleport": "\u00A76Hold and right-click to teleport (creative)",
|
||||
"item.hee.portal_token.tooltip.difficulty.boss": "\u00A77\u00AB\u00A75 Boss \u00A77\u00BB",
|
||||
"item.hee.portal_token.tooltip.difficulty.hostile": "\u00A77\u00AB\u00A74 Hostile \u00A77\u00BB",
|
||||
"item.hee.portal_token.tooltip.difficulty.neutral": "\u00A77\u00AB\u00A7e Neutral \u00A77\u00BB",
|
||||
"item.hee.portal_token.tooltip.difficulty.peaceful": "\u00A77\u00AB\u00A72 Peaceful \u00A77\u00BB",
|
||||
"item.hee.purified_ender_goo_bucket": "Purified Ender Goo Bucket",
|
||||
"item.hee.purity_extract": "Purity Extract",
|
||||
"item.hee.puzzle_medallion": "Puzzle Medallion",
|
||||
"item.hee.revitalization_substance": "Revitalization Substance",
|
||||
"item.hee.ring_of_hunger": "Ring of Hunger",
|
||||
"item.hee.ring_of_preservation": "Ring of Preservation",
|
||||
"item.hee.scale_of_freefall": "Scale of Freefall",
|
||||
"item.hee.scorching_axe": "Scorching Axe",
|
||||
"item.hee.scorching_pickaxe": "Scorching Pickaxe",
|
||||
"item.hee.scorching_shovel": "Scorching Shovel",
|
||||
"item.hee.scorching_sword": "Scorching Sword",
|
||||
"item.hee.shulker_box.tooltip": "\u00A77Right-click to open",
|
||||
"item.hee.spatial_dash_gem": "Spatial Dash Gem",
|
||||
"item.hee.spiderling_spawn_egg": "Spiderling Spawn Egg",
|
||||
"item.hee.stardust": "Stardust",
|
||||
"item.hee.static_core": "Static Core",
|
||||
"item.hee.table_link": "Table Link",
|
||||
"item.hee.talisman_of_griefing": "Talisman of Griefing",
|
||||
"item.hee.ticking_core": "Ticking Core",
|
||||
"item.hee.trinket_pouch": "Trinket Pouch",
|
||||
"item.hee.trinket_pouch.tooltip": "\u00A77Right-click to open",
|
||||
"item.hee.undread_spawn_egg": "Undread Spawn Egg",
|
||||
"item.hee.vampire_bat_spawn_egg": "Vampire Bat Spawn Egg",
|
||||
"item.hee.void_bucket": "Void Bucket",
|
||||
"item.hee.void_essence": "Void Essence",
|
||||
"item.hee.void_miner": "Void Miner",
|
||||
"item.hee.void_salad.double": "Void Void Salad",
|
||||
"item.hee.void_salad.mega": "Mega Void Salad",
|
||||
"item.hee.void_salad.single": "Void Salad",
|
||||
"item.minecraft.lingering_potion.effect.banishment": "Lingering Potion of Banishment",
|
||||
"item.minecraft.lingering_potion.effect.corruption": "Lingering Potion of Corruption",
|
||||
"item.minecraft.lingering_potion.effect.purity": "Lingering Potion of Purity",
|
||||
"item.minecraft.potion.effect.banishment": "Potion of Banishment",
|
||||
"item.minecraft.potion.effect.corruption": "Potion of Corruption",
|
||||
"item.minecraft.potion.effect.purity": "Potion of Purity",
|
||||
"item.minecraft.splash_potion.effect.banishment": "Splash Potion of Banishment",
|
||||
"item.minecraft.splash_potion.effect.corruption": "Splash Potion of Corruption",
|
||||
"item.minecraft.splash_potion.effect.purity": "Splash Potion of Purity",
|
||||
"item.minecraft.tipped_arrow.effect.banishment": "Arrow of Banishment",
|
||||
"item.minecraft.tipped_arrow.effect.corruption": "Arrow of Corruption",
|
||||
"item.minecraft.tipped_arrow.effect.purity": "Arrow of Purity",
|
||||
"item.tooltip.hee.energy.level": "\u00A79Energy: \u00A73%s\u00A79 / \u00A73%s",
|
||||
"item.tooltip.hee.energy.uses": "\u00A79Uses Left: \u00A73%s",
|
||||
"item.tooltip.hee.table_core.tooltip": "\u00A77Minimum Tier: %s",
|
||||
"item.tooltip.hee.trinket.in_slot.charged": "\u00A7aActive",
|
||||
"item.tooltip.hee.trinket.in_slot.uncharged": "\u00A7cMust be recharged",
|
||||
"item.tooltip.hee.trinket.not_in_slot.charged": "\u00A7cMust be placed in Trinket slot",
|
||||
"item.tooltip.hee.trinket.not_in_slot.uncharged": "\u00A7cMust be charged and placed in Trinket slot",
|
||||
"itemGroup.hee": "Hardcore Ender Expansion",
|
||||
"subtitles.hee.ambient.forgotten_tombs.end_trigger": "Graves rattle",
|
||||
|
||||
"subtitles.hee.block.cauldron.brew": "Cauldron bubbles",
|
||||
"subtitles.hee.block.death_flower.wither": "Death Flower withers",
|
||||
"subtitles.hee.block.experience_gate.pickup": "Experience Gate charges",
|
||||
"subtitles.hee.block.experience_gate.levelup": "Experience Gate dings",
|
||||
"subtitles.hee.block.jar_o_dust.shatter": "Jar o' Dust shatters",
|
||||
"subtitles.hee.block.experience_gate.pickup": "Experience Gate charges",
|
||||
"subtitles.hee.block.igneous_plate.cool": "Igneous Plate cools",
|
||||
"subtitles.hee.block.jar_o_dust.shatter": "Jar o' Dust shatters",
|
||||
"subtitles.hee.block.miners_burial_altar.insert": "Puzzle Medallion descends",
|
||||
"subtitles.hee.block.obsidian.land": "Obsidian landed",
|
||||
"subtitles.hee.block.puzzle_logic.click": "Puzzle Block clicks",
|
||||
"subtitles.hee.block.spawner.expire": "Spawner expires",
|
||||
|
||||
"subtitles.hee.item.puzzle_medallion.spawn": "Puzzle Medallion appears",
|
||||
"subtitles.hee.item.revitalization_substance.use.success": "Revitalization Substance accepted",
|
||||
"subtitles.hee.item.revitalization_substance.use.fail": "Revitalization Substance rejected",
|
||||
"subtitles.hee.item.scale_of_freefall.use": "Scale of Freefall activates",
|
||||
"subtitles.hee.item.ring_of_preservation.use": "Ring of Preservation mends",
|
||||
"subtitles.hee.item.table_link.use.success": "Linking succeeds",
|
||||
"subtitles.hee.item.table_link.use.fail": "Linking fails",
|
||||
|
||||
"subtitles.hee.entity.generic.teleport": "Something teleports",
|
||||
"subtitles.hee.entity.igneous_rock.burn": "Igneous Rock burns",
|
||||
"subtitles.hee.entity.player.teleport": "Player teleports",
|
||||
"subtitles.hee.entity.revitalization_substance.heal": "Goo heals",
|
||||
"subtitles.hee.entity.spatial_dash.expire": "Spatial Dash expires",
|
||||
"subtitles.hee.entity.token_holder.drop": "Portal Token drops",
|
||||
|
||||
"subtitles.hee.item.puzzle_medallion.spawn": "Puzzle Medallion appears",
|
||||
"subtitles.hee.item.revitalization_substance.use.fail": "Revitalization Substance rejected",
|
||||
"subtitles.hee.item.revitalization_substance.use.success": "Revitalization Substance accepted",
|
||||
"subtitles.hee.item.ring_of_preservation.use": "Ring of Preservation mends",
|
||||
"subtitles.hee.item.scale_of_freefall.use": "Scale of Freefall activates",
|
||||
"subtitles.hee.item.table_link.use.fail": "Linking fails",
|
||||
"subtitles.hee.item.table_link.use.success": "Linking succeeds",
|
||||
"subtitles.hee.mob.ender_eye.hit.fail": "Ender Eye resists damage",
|
||||
"subtitles.hee.mob.enderman.first_kill": "A feeling of coldness fills your existence",
|
||||
"subtitles.hee.mob.enderman.teleport.fail": "Enderman panics",
|
||||
"subtitles.hee.mob.enderman.teleport.out": "Enderman escapes",
|
||||
"subtitles.hee.mob.undread.hurt": "Undread hurts",
|
||||
"subtitles.hee.mob.undread.death": "Undread dies",
|
||||
"subtitles.hee.mob.undread.curse": "Undread curses",
|
||||
"subtitles.hee.mob.undread.fuse": "Undread smokes"
|
||||
"subtitles.hee.mob.undread.death": "Undread dies",
|
||||
"subtitles.hee.mob.undread.fuse": "Undread smokes",
|
||||
"subtitles.hee.mob.undread.hurt": "Undread hurts"
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/fire_floor0",
|
||||
"textures": {
|
||||
"particle": "hee:block/eternal_fire_0",
|
||||
"fire": "hee:block/eternal_fire_0"
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/fire_floor1",
|
||||
"textures": {
|
||||
"particle": "hee:block/eternal_fire_1",
|
||||
"fire": "hee:block/eternal_fire_1"
|
||||
}
|
||||
}
|
7
data/gen/assets/hee/models/block/eternal_fire_side0.json
Normal file
7
data/gen/assets/hee/models/block/eternal_fire_side0.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/fire_side0",
|
||||
"textures": {
|
||||
"particle": "hee:block/eternal_fire_0",
|
||||
"fire": "hee:block/eternal_fire_0"
|
||||
}
|
||||
}
|
7
data/gen/assets/hee/models/block/eternal_fire_side1.json
Normal file
7
data/gen/assets/hee/models/block/eternal_fire_side1.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/fire_side1",
|
||||
"textures": {
|
||||
"particle": "hee:block/eternal_fire_1",
|
||||
"fire": "hee:block/eternal_fire_1"
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/fire_side_alt0",
|
||||
"textures": {
|
||||
"particle": "hee:block/eternal_fire_0",
|
||||
"fire": "hee:block/eternal_fire_0"
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/fire_side_alt1",
|
||||
"textures": {
|
||||
"particle": "hee:block/eternal_fire_1",
|
||||
"fire": "hee:block/eternal_fire_1"
|
||||
}
|
||||
}
|
7
data/gen/assets/hee/models/block/eternal_fire_up0.json
Normal file
7
data/gen/assets/hee/models/block/eternal_fire_up0.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/fire_up0",
|
||||
"textures": {
|
||||
"particle": "hee:block/eternal_fire_0",
|
||||
"fire": "hee:block/eternal_fire_0"
|
||||
}
|
||||
}
|
7
data/gen/assets/hee/models/block/eternal_fire_up1.json
Normal file
7
data/gen/assets/hee/models/block/eternal_fire_up1.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/fire_up1",
|
||||
"textures": {
|
||||
"particle": "hee:block/eternal_fire_1",
|
||||
"fire": "hee:block/eternal_fire_1"
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/fire_up_alt0",
|
||||
"textures": {
|
||||
"particle": "hee:block/eternal_fire_0",
|
||||
"fire": "hee:block/eternal_fire_0"
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/fire_up_alt1",
|
||||
"textures": {
|
||||
"particle": "hee:block/eternal_fire_1",
|
||||
"fire": "hee:block/eternal_fire_1"
|
||||
}
|
||||
}
|
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"parent": "minecraft:block/block",
|
||||
"textures": {
|
||||
"particle": "hee:block/loot_chest_particle"
|
||||
}
|
||||
|
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "minecraft:block/obsidian"
|
||||
}
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"parent": "hee:block/corrupted_energy"
|
||||
}
|
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"parent": "hee:block/obsidian_falling"
|
||||
"parent": "minecraft:block/obsidian"
|
||||
}
|
@@ -7,6 +7,7 @@
|
||||
"hee:obsidian_pillar",
|
||||
"hee:obsidian_smooth_lit",
|
||||
"hee:obsidian_chiseled_lit",
|
||||
"hee:obsidian_pillar_lit"
|
||||
"hee:obsidian_pillar_lit",
|
||||
"hee:obsidian_tower_top"
|
||||
]
|
||||
}
|
@@ -7,6 +7,7 @@
|
||||
"hee:obsidian_pillar",
|
||||
"hee:obsidian_smooth_lit",
|
||||
"hee:obsidian_chiseled_lit",
|
||||
"hee:obsidian_pillar_lit"
|
||||
"hee:obsidian_pillar_lit",
|
||||
"hee:obsidian_tower_top"
|
||||
]
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "hee:dusty_stone_decoration"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
17
data/gen/data/hee/tags/blocks/gloomrock_particles.json
Normal file
17
data/gen/data/hee/tags/blocks/gloomrock_particles.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"hee:gloomrock",
|
||||
"hee:gloomrock_bricks",
|
||||
"hee:gloomrock_smooth",
|
||||
"hee:gloomrock_smooth_red",
|
||||
"hee:gloomrock_smooth_orange",
|
||||
"hee:gloomrock_smooth_yellow",
|
||||
"hee:gloomrock_smooth_green",
|
||||
"hee:gloomrock_smooth_cyan",
|
||||
"hee:gloomrock_smooth_blue",
|
||||
"hee:gloomrock_smooth_purple",
|
||||
"hee:gloomrock_smooth_magenta",
|
||||
"hee:gloomrock_smooth_white"
|
||||
]
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"hee:void_portal_frame_crafted",
|
||||
"hee:void_portal_storage_crafted"
|
||||
]
|
||||
}
|
@@ -1,4 +1,12 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": []
|
||||
"values": [
|
||||
"hee:potted_autumn_sapling_red",
|
||||
"hee:potted_autumn_sapling_brown",
|
||||
"hee:potted_autumn_sapling_orange",
|
||||
"hee:potted_autumn_sapling_yellowgreen",
|
||||
"hee:potted_death_flower",
|
||||
"hee:potted_death_flower_healed",
|
||||
"hee:potted_death_flower_withered"
|
||||
]
|
||||
}
|
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": []
|
||||
"values": [
|
||||
"hee:autumn_leaves_red",
|
||||
"hee:autumn_leaves_brown",
|
||||
"hee:autumn_leaves_orange",
|
||||
"hee:autumn_leaves_yellowgreen"
|
||||
]
|
||||
}
|
7
data/gen/data/minecraft/tags/blocks/logs_that_burn.json
Normal file
7
data/gen/data/minecraft/tags/blocks/logs_that_burn.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"hee:whitebark_log",
|
||||
"hee:whitebark"
|
||||
]
|
||||
}
|
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": []
|
||||
"values": [
|
||||
"hee:autumn_sapling_red",
|
||||
"hee:autumn_sapling_brown",
|
||||
"hee:autumn_sapling_orange",
|
||||
"hee:autumn_sapling_yellowgreen"
|
||||
]
|
||||
}
|
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": []
|
||||
"values": [
|
||||
"hee:gloomrock_brick_slab",
|
||||
"hee:gloomrock_smooth_slab",
|
||||
"hee:dusty_stone_brick_slab",
|
||||
"hee:dark_loam_slab",
|
||||
"hee:whitebark_slab"
|
||||
]
|
||||
}
|
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": []
|
||||
"values": [
|
||||
"hee:gloomrock_brick_stairs",
|
||||
"hee:gloomrock_smooth_stairs",
|
||||
"hee:dusty_stone_brick_stairs",
|
||||
"hee:obsidian_stairs",
|
||||
"hee:whitebark_stairs"
|
||||
]
|
||||
}
|
@@ -1,4 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": []
|
||||
"values": [
|
||||
"hee:stone_brick_wall"
|
||||
]
|
||||
}
|
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": []
|
||||
"values": [
|
||||
"hee:autumn_leaves_red",
|
||||
"hee:autumn_leaves_brown",
|
||||
"hee:autumn_leaves_orange",
|
||||
"hee:autumn_leaves_yellowgreen"
|
||||
]
|
||||
}
|
7
data/gen/data/minecraft/tags/items/logs_that_burn.json
Normal file
7
data/gen/data/minecraft/tags/items/logs_that_burn.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"hee:whitebark_log",
|
||||
"hee:whitebark"
|
||||
]
|
||||
}
|
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": []
|
||||
"values": [
|
||||
"hee:autumn_sapling_red",
|
||||
"hee:autumn_sapling_brown",
|
||||
"hee:autumn_sapling_orange",
|
||||
"hee:autumn_sapling_yellowgreen"
|
||||
]
|
||||
}
|
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": []
|
||||
"values": [
|
||||
"hee:gloomrock_brick_slab",
|
||||
"hee:gloomrock_smooth_slab",
|
||||
"hee:dusty_stone_brick_slab",
|
||||
"hee:dark_loam_slab",
|
||||
"hee:whitebark_slab"
|
||||
]
|
||||
}
|
@@ -1,4 +1,10 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": []
|
||||
"values": [
|
||||
"hee:gloomrock_brick_stairs",
|
||||
"hee:gloomrock_smooth_stairs",
|
||||
"hee:dusty_stone_brick_stairs",
|
||||
"hee:obsidian_stairs",
|
||||
"hee:whitebark_stairs"
|
||||
]
|
||||
}
|
@@ -1,4 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": []
|
||||
"values": [
|
||||
"hee:stone_brick_wall"
|
||||
]
|
||||
}
|
@@ -1,15 +1,15 @@
|
||||
package chylex.hee.datagen
|
||||
|
||||
import chylex.hee.HEE
|
||||
import chylex.hee.datagen.client.BlockItemModels
|
||||
import chylex.hee.datagen.client.BlockModels
|
||||
import chylex.hee.datagen.client.BlockStates
|
||||
import chylex.hee.datagen.client.ItemModels
|
||||
import chylex.hee.datagen.client.LangEnglish
|
||||
import chylex.hee.datagen.server.BlockLootTables
|
||||
import chylex.hee.datagen.server.BlockTags
|
||||
import chylex.hee.datagen.server.ItemTags
|
||||
import chylex.hee.system.forge.SubscribeAllEvents
|
||||
import chylex.hee.system.forge.SubscribeEvent
|
||||
import chylex.hee.util.forge.SubscribeAllEvents
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus.MOD
|
||||
import net.minecraftforge.fml.event.lifecycle.GatherDataEvent
|
||||
|
||||
@@ -22,10 +22,10 @@ object DataGen {
|
||||
|
||||
with(e.generator) {
|
||||
if (e.includeClient()) {
|
||||
addProvider(BlockStates(this, modid, helper))
|
||||
addProvider(BlockModels(this, modid, helper))
|
||||
addProvider(BlockItemModels(this, modid, helper))
|
||||
addProvider(BlockStates(this, modid, helper))
|
||||
addProvider(ItemModels(this, modid, helper))
|
||||
addProvider(LangEnglish(this, modid))
|
||||
}
|
||||
|
||||
if (e.includeServer()) {
|
||||
|
@@ -1,53 +1,14 @@
|
||||
package chylex.hee.datagen
|
||||
|
||||
import chylex.hee.HEE
|
||||
import chylex.hee.system.facades.Resource
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.data.IDataProvider
|
||||
import net.minecraft.item.Item
|
||||
import net.minecraft.util.IItemProvider
|
||||
import net.minecraft.util.ResourceLocation
|
||||
import net.minecraftforge.client.model.generators.ModelBuilder
|
||||
import net.minecraftforge.client.model.generators.ModelProvider
|
||||
import net.minecraftforge.registries.IForgeRegistryEntry
|
||||
|
||||
val IForgeRegistryEntry<*>.path: String
|
||||
get() = registryName!!.path
|
||||
|
||||
val IForgeRegistryEntry<*>.isVanilla
|
||||
get() = Resource.isVanilla(registryName!!)
|
||||
|
||||
val IItemProvider.r
|
||||
get() = when(this) {
|
||||
is Block -> resource("block/" + this.path, this.isVanilla)
|
||||
is Item -> resource("item/" + this.path, this.isVanilla)
|
||||
else -> throw IllegalArgumentException()
|
||||
}
|
||||
|
||||
fun IItemProvider.r(suffix: String): ResourceLocation {
|
||||
return when(this) {
|
||||
is Block -> resource("block/" + this.path + suffix, this.isVanilla)
|
||||
is Item -> resource("item/" + this.path + suffix, this.isVanilla)
|
||||
else -> throw IllegalArgumentException()
|
||||
}
|
||||
}
|
||||
|
||||
fun resource(path: String, vanilla: Boolean): ResourceLocation {
|
||||
return if (vanilla) Resource.Vanilla(path) else Resource.Custom(path)
|
||||
}
|
||||
|
||||
inline fun <T : IDataProvider> T?.safeUnit(callback: T.() -> Unit) {
|
||||
try {
|
||||
this?.callback()
|
||||
} catch(e: Exception) {
|
||||
HEE.log.error("[DataGen] " + e.message)
|
||||
}
|
||||
}
|
||||
|
||||
inline fun <T : ModelBuilder<T>, U : ModelProvider<T>> U?.safeUnit(callback: U.() -> Unit) {
|
||||
try {
|
||||
this?.callback()
|
||||
} catch(e: Exception) {
|
||||
} catch (e: Exception) {
|
||||
HEE.log.error("[DataGen] " + e.message)
|
||||
}
|
||||
}
|
||||
@@ -55,7 +16,7 @@ inline fun <T : ModelBuilder<T>, U : ModelProvider<T>> U?.safeUnit(callback: U.(
|
||||
inline fun <T : ModelBuilder<T>, U : ModelProvider<T>> U?.safe(callback: U.() -> T): T? {
|
||||
return try {
|
||||
this?.callback()
|
||||
} catch(e: Exception) {
|
||||
} catch (e: Exception) {
|
||||
HEE.log.error("[DataGen] " + e.message)
|
||||
null
|
||||
}
|
||||
@@ -64,12 +25,8 @@ inline fun <T : ModelBuilder<T>, U : ModelProvider<T>> U?.safe(callback: U.() ->
|
||||
inline fun <T : ModelBuilder<T>> T?.then(callback: T.() -> T): T? {
|
||||
return try {
|
||||
this?.callback()
|
||||
} catch(e: Exception) {
|
||||
} catch (e: Exception) {
|
||||
HEE.log.error("[DataGen] " + e.message)
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
class Callback<T>(val item: T, val suffix: String, val path: String) {
|
||||
override fun toString() = path
|
||||
}
|
||||
|
@@ -1,115 +0,0 @@
|
||||
package chylex.hee.datagen.client
|
||||
|
||||
import chylex.hee.datagen.client.util.block
|
||||
import chylex.hee.datagen.client.util.multi
|
||||
import chylex.hee.datagen.client.util.override
|
||||
import chylex.hee.datagen.client.util.parent
|
||||
import chylex.hee.datagen.client.util.simple
|
||||
import chylex.hee.datagen.r
|
||||
import chylex.hee.datagen.then
|
||||
import chylex.hee.init.ModBlocks
|
||||
import chylex.hee.system.facades.Resource
|
||||
import net.minecraft.block.Blocks
|
||||
import net.minecraft.data.DataGenerator
|
||||
import net.minecraftforge.client.model.generators.ItemModelProvider
|
||||
import net.minecraftforge.common.data.ExistingFileHelper
|
||||
|
||||
class BlockItemModels(generator: DataGenerator, modid: String, existingFileHelper: ExistingFileHelper) : ItemModelProvider(generator, modid, existingFileHelper) {
|
||||
override fun registerModels() {
|
||||
|
||||
// Blocks: Building (Uncategorized)
|
||||
|
||||
parent(ModBlocks.STONE_BRICK_WALL, Resource.Custom("block/stone_brick_wall_inventory"), checkExistence = false)
|
||||
parent(ModBlocks.INFUSED_GLASS, Resource.Custom("block/infused_glass_c0"))
|
||||
block(ModBlocks.ENDERSOL)
|
||||
block(ModBlocks.HUMUS)
|
||||
|
||||
// Blocks: Building (Gloomrock)
|
||||
|
||||
simple(ModBlocks.GLOOMTORCH.asItem())
|
||||
|
||||
// Blocks: Building (Grave Dirt)
|
||||
|
||||
parent(ModBlocks.GRAVE_DIRT_PLAIN, Resource.Custom("block/grave_dirt_low"))
|
||||
parent(ModBlocks.GRAVE_DIRT_LOOT, Resource.Custom("block/grave_dirt_loot_4"), checkExistence = false)
|
||||
parent(ModBlocks.GRAVE_DIRT_SPIDERLING, Resource.Custom("block/grave_dirt_low"))
|
||||
|
||||
// Blocks: Interactive (Storage)
|
||||
|
||||
parent(ModBlocks.DARK_CHEST, Blocks.CHEST.asItem().r)
|
||||
parent(ModBlocks.LOOT_CHEST, Blocks.CHEST.asItem().r)
|
||||
|
||||
// Blocks: Interactive (Puzzle)
|
||||
|
||||
parent(ModBlocks.PUZZLE_PLAIN, Resource.Custom("block/puzzle_base_active"), checkExistence = false)
|
||||
|
||||
parent(ModBlocks.PUZZLE_BURST_3, Resource.Custom("block/puzzle_block_inventory")).then {
|
||||
texture("top", Resource.Custom("block/puzzle_overlay_burst_3"))
|
||||
}
|
||||
|
||||
parent(ModBlocks.PUZZLE_BURST_5, Resource.Custom("block/puzzle_block_inventory")).then {
|
||||
texture("top", Resource.Custom("block/puzzle_overlay_burst_5"))
|
||||
}
|
||||
|
||||
parent(ModBlocks.PUZZLE_REDIRECT_1, Resource.Custom("block/puzzle_block_inventory")).then {
|
||||
texture("top", Resource.Custom("block/puzzle_overlay_redirect_1n"))
|
||||
}
|
||||
|
||||
parent(ModBlocks.PUZZLE_REDIRECT_2, Resource.Custom("block/puzzle_block_inventory")).then {
|
||||
texture("top", Resource.Custom("block/puzzle_overlay_redirect_2ns"))
|
||||
}
|
||||
|
||||
parent(ModBlocks.PUZZLE_REDIRECT_4, Resource.Custom("block/puzzle_block_inventory")).then {
|
||||
texture("top", Resource.Custom("block/puzzle_overlay_redirect_4"))
|
||||
}
|
||||
|
||||
parent(ModBlocks.PUZZLE_TELEPORT, Resource.Custom("block/puzzle_block_inventory")).then {
|
||||
texture("top", Resource.Custom("block/puzzle_overlay_teleport"))
|
||||
}
|
||||
|
||||
// Blocks: Interactive (Gates)
|
||||
|
||||
block(ModBlocks.EXPERIENCE_GATE)
|
||||
|
||||
// Blocks: Interactive (Uncategorized)
|
||||
|
||||
simple(ModBlocks.IGNEOUS_PLATE)
|
||||
simple(ModBlocks.ENHANCED_BREWING_STAND.asItem())
|
||||
|
||||
// Blocks: Decorative (Trees)
|
||||
|
||||
simple(ModBlocks.WHITEBARK_SAPLING_AUTUMN_RED)
|
||||
simple(ModBlocks.WHITEBARK_SAPLING_AUTUMN_BROWN)
|
||||
simple(ModBlocks.WHITEBARK_SAPLING_AUTUMN_ORANGE)
|
||||
simple(ModBlocks.WHITEBARK_SAPLING_AUTUMN_YELLOWGREEN)
|
||||
|
||||
// Blocks: Decorative (Plants)
|
||||
|
||||
simple(ModBlocks.DEATH_FLOWER_DECAYING, ModBlocks.DEATH_FLOWER_DECAYING.r("_1")).then {
|
||||
override(ModBlocks.DEATH_FLOWER_DECAYING.asItem().r("_2")) { predicate(Resource.Custom("death_level"), 4F) }
|
||||
override(ModBlocks.DEATH_FLOWER_DECAYING.asItem().r("_3")) { predicate(Resource.Custom("death_level"), 8F) }
|
||||
override(ModBlocks.DEATH_FLOWER_DECAYING.asItem().r("_4")) { predicate(Resource.Custom("death_level"), 12F) }
|
||||
}
|
||||
|
||||
multi(ModBlocks.DEATH_FLOWER_DECAYING, Resource.Vanilla("item/generated"), 1..4) {
|
||||
texture("layer0", Resource.Custom("block/" + it.path))
|
||||
}
|
||||
|
||||
simple(ModBlocks.DEATH_FLOWER_HEALED)
|
||||
simple(ModBlocks.DEATH_FLOWER_WITHERED)
|
||||
|
||||
// Blocks: Decorative (Uncategorized)
|
||||
|
||||
simple(ModBlocks.ANCIENT_COBWEB)
|
||||
simple(ModBlocks.DRY_VINES, Blocks.VINE.r)
|
||||
block(ModBlocks.ENDERMAN_HEAD)
|
||||
|
||||
// Blocks: Energy
|
||||
|
||||
simple(ModBlocks.ENERGY_CLUSTER)
|
||||
|
||||
// Blocks: Tables
|
||||
|
||||
block(ModBlocks.TABLE_PEDESTAL)
|
||||
}
|
||||
}
|
@@ -1,220 +1,74 @@
|
||||
package chylex.hee.datagen.client
|
||||
|
||||
import chylex.hee.datagen.client.util.cauldron
|
||||
import chylex.hee.datagen.client.util.cross
|
||||
import chylex.hee.datagen.client.util.cube
|
||||
import chylex.hee.datagen.client.util.cubeBottomTop
|
||||
import chylex.hee.datagen.client.util.cubeColumn
|
||||
import chylex.hee.datagen.client.util.flowerPot
|
||||
import chylex.hee.datagen.client.util.leaves
|
||||
import chylex.hee.datagen.client.util.multi
|
||||
import chylex.hee.datagen.client.util.parent
|
||||
import chylex.hee.datagen.client.util.particle
|
||||
import chylex.hee.datagen.client.util.portalFrame
|
||||
import chylex.hee.datagen.client.util.simple
|
||||
import chylex.hee.datagen.client.util.suffixed
|
||||
import chylex.hee.datagen.client.util.table
|
||||
import chylex.hee.datagen.client.util.wall
|
||||
import chylex.hee.datagen.r
|
||||
import chylex.hee.datagen.then
|
||||
import chylex.hee.game.Resource.location
|
||||
import chylex.hee.game.block.BlockAbstractTable
|
||||
import chylex.hee.game.block.IHeeBlock
|
||||
import chylex.hee.game.block.properties.BlockModel
|
||||
import chylex.hee.game.block.properties.BlockModel.CubeBottomTop
|
||||
import chylex.hee.game.block.properties.BlockModel.CubeColumn
|
||||
import chylex.hee.game.block.properties.BlockModel.Fluid
|
||||
import chylex.hee.game.block.properties.BlockModel.FromParent
|
||||
import chylex.hee.game.block.properties.BlockModel.Manual
|
||||
import chylex.hee.game.block.properties.BlockModel.Multi
|
||||
import chylex.hee.game.block.properties.BlockModel.NoAmbientOcclusion
|
||||
import chylex.hee.game.block.properties.BlockModel.Parent
|
||||
import chylex.hee.game.block.properties.BlockModel.ParticleOnly
|
||||
import chylex.hee.game.block.properties.BlockModel.PortalFrame
|
||||
import chylex.hee.game.block.properties.BlockModel.SimpleBlockModel
|
||||
import chylex.hee.game.block.properties.BlockModel.Suffixed
|
||||
import chylex.hee.game.block.properties.BlockModel.Table
|
||||
import chylex.hee.game.block.properties.BlockModel.WithTextures
|
||||
import chylex.hee.init.ModBlocks
|
||||
import chylex.hee.system.facades.Resource
|
||||
import net.minecraft.block.Blocks
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.data.DataGenerator
|
||||
import net.minecraftforge.client.model.generators.BlockModelBuilder
|
||||
import net.minecraftforge.client.model.generators.BlockModelProvider
|
||||
import net.minecraftforge.common.data.ExistingFileHelper
|
||||
|
||||
class BlockModels(generator: DataGenerator, modid: String, existingFileHelper: ExistingFileHelper) : BlockModelProvider(generator, modid, existingFileHelper) {
|
||||
override fun registerModels() {
|
||||
|
||||
// Blocks: Building (Uncategorized)
|
||||
|
||||
wall(ModBlocks.STONE_BRICK_WALL, Blocks.STONE_BRICKS.r)
|
||||
simple(ModBlocks.STONE_BRICK_WALL.suffixed("_inventory"), Resource.Vanilla("block/wall_inventory"), "wall", Blocks.STONE_BRICKS.r)
|
||||
cubeColumn(ModBlocks.ENDERSOL)
|
||||
cubeBottomTop(ModBlocks.ENDERSOL.suffixed("_merge_1"), ModBlocks.ENDERSOL.r("_merge_1"), Blocks.END_STONE.r, ModBlocks.ENDERSOL.r("_top"))
|
||||
cubeBottomTop(ModBlocks.ENDERSOL.suffixed("_merge_2"), ModBlocks.ENDERSOL.r("_merge_2"), Blocks.END_STONE.r, ModBlocks.ENDERSOL.r("_top"))
|
||||
cube(ModBlocks.HUMUS)
|
||||
cubeBottomTop(ModBlocks.HUMUS.suffixed("_merge"), ModBlocks.HUMUS.r("_merge"), ModBlocks.ENDERSOL.r("_top"), ModBlocks.HUMUS.r)
|
||||
|
||||
// Blocks: Building (Obsidian)
|
||||
|
||||
cube(ModBlocks.OBSIDIAN_FALLING, Blocks.OBSIDIAN.r)
|
||||
|
||||
// Blocks: Building (End Stone)
|
||||
|
||||
cubeBottomTop(ModBlocks.END_STONE_INFESTED, bottom = Blocks.END_STONE.r).then {
|
||||
texture("particle", ModBlocks.END_STONE_INFESTED.r("_top"))
|
||||
for (block in ModBlocks.ALL) {
|
||||
(block as? IHeeBlock)?.let { registerModel(block, it.model.generate(block).blockModel) { builder -> builder } }
|
||||
}
|
||||
}
|
||||
|
||||
cubeBottomTop(ModBlocks.END_STONE_BURNED, bottom = Blocks.END_STONE.r).then {
|
||||
texture("particle", ModBlocks.END_STONE_BURNED.r("_top"))
|
||||
}
|
||||
private fun registerModel(block: Block, model: BlockModel, callback: (BlockModelBuilder) -> BlockModelBuilder) {
|
||||
when (model) {
|
||||
is SimpleBlockModel -> simple(block, model.parent, model.textureName, model.textureLocation ?: block.location)?.then(callback)
|
||||
is CubeBottomTop -> cubeBottomTop(block, model.side ?: block.location("_side"), model.bottom ?: block.location("_bottom"), model.top ?: block.location("_top"))?.then(callback)
|
||||
is PortalFrame -> portalFrame(block, model.frameBlock.location("_side"), model.frameBlock.location("_top_" + model.topSuffix))?.then(callback)
|
||||
is ParticleOnly -> particle(block, model.particle)?.then(callback)
|
||||
is Parent -> parent(model.name, model.parent)?.then(callback)
|
||||
is FromParent -> parent(block, model.parent)?.then(callback)
|
||||
is Suffixed -> registerModel(block.suffixed(model.suffix), model.wrapped, callback)
|
||||
|
||||
cubeBottomTop(ModBlocks.END_STONE_ENCHANTED, bottom = Blocks.END_STONE.r).then {
|
||||
texture("particle", ModBlocks.END_STONE_ENCHANTED.r("_top"))
|
||||
}
|
||||
|
||||
// Blocks: Building (Grave Dirt)
|
||||
|
||||
cube(ModBlocks.GRAVE_DIRT_PLAIN.suffixed("_full"), ModBlocks.GRAVE_DIRT_PLAIN.r).then {
|
||||
texture("particle", ModBlocks.GRAVE_DIRT_PLAIN.r)
|
||||
}
|
||||
|
||||
multi(ModBlocks.GRAVE_DIRT_LOOT, Resource.Custom("block/grave_dirt_low"), 1..6) {
|
||||
texture("top", Resource.Custom("block/$it"))
|
||||
}
|
||||
|
||||
// Blocks: Building (Wood)
|
||||
|
||||
cube(ModBlocks.WHITEBARK, ModBlocks.WHITEBARK_LOG.r)
|
||||
|
||||
// Blocks: Fluids
|
||||
|
||||
particle(ModBlocks.ENDER_GOO, ModBlocks.ENDER_GOO.r("_still"))
|
||||
particle(ModBlocks.PURIFIED_ENDER_GOO, ModBlocks.PURIFIED_ENDER_GOO.r("_still"))
|
||||
cauldron(ModBlocks.CAULDRON_ENDER_GOO, ModBlocks.ENDER_GOO.r("_still"))
|
||||
cauldron(ModBlocks.CAULDRON_PURIFIED_ENDER_GOO, ModBlocks.PURIFIED_ENDER_GOO.r("_still"))
|
||||
cauldron(ModBlocks.CAULDRON_DRAGONS_BREATH, Resource.Custom("block/dragons_breath_still"))
|
||||
|
||||
// Blocks: Interactive (Storage)
|
||||
|
||||
particle(ModBlocks.DARK_CHEST, ModBlocks.GLOOMROCK_SMOOTH.r)
|
||||
|
||||
parent(ModBlocks.LOOT_CHEST, Resource.Vanilla("block/block")).then {
|
||||
texture("particle", ModBlocks.LOOT_CHEST.r("_particle"))
|
||||
}
|
||||
|
||||
// Blocks: Interactive (Puzzle)
|
||||
|
||||
arrayOf("active", "disabled", "inactive").forEach {
|
||||
parent("puzzle_base_$it", Resource.Vanilla("block/cube_all")).then {
|
||||
texture("all", Resource.Custom("block/puzzle_base_$it"))
|
||||
is WithTextures -> registerModel(block, model.baseModel) {
|
||||
model.textures.entries.fold(callback(it)) { builder, (name, location) -> builder.texture(name, location) }
|
||||
}
|
||||
}
|
||||
|
||||
arrayOf("burst_3", "burst_5", "redirect_1e", "redirect_1n", "redirect_1s", "redirect_1w", "redirect_2ew", "redirect_2ns", "redirect_4", "teleport").forEach {
|
||||
parent("puzzle_overlay_$it", Resource.Custom("block/puzzle_overlay")).then {
|
||||
texture("overlay", Resource.Custom("block/puzzle_overlay_$it"))
|
||||
is NoAmbientOcclusion -> registerModel(block, model.baseModel) {
|
||||
callback(it).ao(false)
|
||||
}
|
||||
}
|
||||
|
||||
// Blocks: Interactive (Gates)
|
||||
|
||||
cubeBottomTop(ModBlocks.EXPERIENCE_GATE, top = ModBlocks.EXPERIENCE_GATE.r("_bottom"))
|
||||
|
||||
multi(ModBlocks.EXPERIENCE_GATE, ModBlocks.EXPERIENCE_GATE.r, arrayOf("_rd1", "_rd2", "_ud")) {
|
||||
texture("top", Resource.Custom("block/experience_gate_top" + it.suffix))
|
||||
}
|
||||
|
||||
cubeBottomTop(ModBlocks.EXPERIENCE_GATE_CONTROLLER, ModBlocks.EXPERIENCE_GATE.r("_side"), ModBlocks.EXPERIENCE_GATE.r("_bottom"), ModBlocks.EXPERIENCE_GATE.r("_top_controller"))
|
||||
|
||||
// Blocks: Interactive (Uncategorized)
|
||||
|
||||
cubeBottomTop(ModBlocks.INFUSED_TNT, Blocks.TNT.r("_side"), Blocks.TNT.r("_bottom"), Blocks.TNT.r("_top"))
|
||||
particle(ModBlocks.IGNEOUS_PLATE, ModBlocks.IGNEOUS_PLATE.r)
|
||||
|
||||
parent(ModBlocks.ENHANCED_BREWING_STAND, Blocks.BREWING_STAND.r).then {
|
||||
texture("particle", Blocks.BREWING_STAND.r)
|
||||
texture("base", Blocks.BREWING_STAND.r("_base"))
|
||||
texture("stand", ModBlocks.ENHANCED_BREWING_STAND.r)
|
||||
}
|
||||
|
||||
// Blocks: Ores
|
||||
|
||||
parent(ModBlocks.STARDUST_ORE, Resource.Custom("block/cube_overlay")).then {
|
||||
texture("particle", ModBlocks.STARDUST_ORE.r("_particle"))
|
||||
texture("base", Blocks.END_STONE.r)
|
||||
}
|
||||
|
||||
// Blocks: Decorative (Trees)
|
||||
|
||||
cross(ModBlocks.WHITEBARK_SAPLING_AUTUMN_RED)
|
||||
cross(ModBlocks.WHITEBARK_SAPLING_AUTUMN_BROWN)
|
||||
cross(ModBlocks.WHITEBARK_SAPLING_AUTUMN_ORANGE)
|
||||
cross(ModBlocks.WHITEBARK_SAPLING_AUTUMN_YELLOWGREEN)
|
||||
leaves(ModBlocks.WHITEBARK_LEAVES_AUTUMN_RED)
|
||||
leaves(ModBlocks.WHITEBARK_LEAVES_AUTUMN_BROWN)
|
||||
leaves(ModBlocks.WHITEBARK_LEAVES_AUTUMN_ORANGE)
|
||||
leaves(ModBlocks.WHITEBARK_LEAVES_AUTUMN_YELLOWGREEN)
|
||||
flowerPot(ModBlocks.POTTED_WHITEBARK_SAPLING_AUTUMN_RED, ModBlocks.WHITEBARK_SAPLING_AUTUMN_RED)
|
||||
flowerPot(ModBlocks.POTTED_WHITEBARK_SAPLING_AUTUMN_BROWN, ModBlocks.WHITEBARK_SAPLING_AUTUMN_BROWN)
|
||||
flowerPot(ModBlocks.POTTED_WHITEBARK_SAPLING_AUTUMN_ORANGE, ModBlocks.WHITEBARK_SAPLING_AUTUMN_ORANGE)
|
||||
flowerPot(ModBlocks.POTTED_WHITEBARK_SAPLING_AUTUMN_YELLOWGREEN, ModBlocks.WHITEBARK_SAPLING_AUTUMN_YELLOWGREEN)
|
||||
|
||||
// Blocks: Decorative (Plants)
|
||||
|
||||
multi(ModBlocks.DEATH_FLOWER_DECAYING, Resource.Vanilla("block/cross"), 1..4) {
|
||||
texture("cross", Resource.Custom("block/$it"))
|
||||
}
|
||||
|
||||
cross(ModBlocks.DEATH_FLOWER_HEALED)
|
||||
cross(ModBlocks.DEATH_FLOWER_WITHERED)
|
||||
|
||||
multi(ModBlocks.POTTED_DEATH_FLOWER_DECAYING, Resource.Vanilla("block/flower_pot_cross"), 1..4) {
|
||||
texture("plant", Resource.Custom("block/death_flower" + it.suffix))
|
||||
}
|
||||
|
||||
flowerPot(ModBlocks.POTTED_DEATH_FLOWER_HEALED, ModBlocks.DEATH_FLOWER_HEALED)
|
||||
flowerPot(ModBlocks.POTTED_DEATH_FLOWER_WITHERED, ModBlocks.DEATH_FLOWER_WITHERED)
|
||||
|
||||
// Blocks: Decorative (Uncategorized)
|
||||
|
||||
cross(ModBlocks.ANCIENT_COBWEB)
|
||||
|
||||
// Blocks: Portals
|
||||
|
||||
portalFrame(ModBlocks.END_PORTAL_FRAME, ModBlocks.END_PORTAL_FRAME.r("_side"), ModBlocks.END_PORTAL_FRAME.r("_top_plain"))
|
||||
portalFrame(ModBlocks.END_PORTAL_ACCEPTOR, ModBlocks.END_PORTAL_FRAME.r("_side"), ModBlocks.END_PORTAL_FRAME.r("_top_acceptor"))
|
||||
portalFrame(ModBlocks.VOID_PORTAL_FRAME, ModBlocks.VOID_PORTAL_FRAME.r("_side"), ModBlocks.VOID_PORTAL_FRAME.r("_top_plain"))
|
||||
portalFrame(ModBlocks.VOID_PORTAL_STORAGE, ModBlocks.VOID_PORTAL_FRAME.r("_side"), ModBlocks.VOID_PORTAL_FRAME.r("_top_storage"))
|
||||
portalFrame(ModBlocks.VOID_PORTAL_FRAME_CRAFTED, ModBlocks.VOID_PORTAL_FRAME.r("_side"), ModBlocks.VOID_PORTAL_FRAME.r("_top_plain"))
|
||||
portalFrame(ModBlocks.VOID_PORTAL_STORAGE_CRAFTED, ModBlocks.VOID_PORTAL_FRAME.r("_side"), ModBlocks.VOID_PORTAL_FRAME.r("_top_storage"))
|
||||
|
||||
// Blocks: Energy
|
||||
|
||||
cross(ModBlocks.CORRUPTED_ENERGY, Blocks.BARRIER.asItem().r).then { ao(false) }
|
||||
|
||||
// Blocks: Tables
|
||||
|
||||
for(tier in 1..3) {
|
||||
parent("table_tier_$tier", Resource.Custom("block/table")).then {
|
||||
texture("particle", "hee:block/table_base")
|
||||
texture("bottom", "hee:block/table_base")
|
||||
texture("top", "hee:block/table_base")
|
||||
texture("side", "hee:block/table_base_side_$tier")
|
||||
is Multi -> {
|
||||
for (innerModel in model.models) {
|
||||
registerModel(block, innerModel, callback)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
parent(ModBlocks.TABLE_BASE_TIER_1, Resource.Custom("block/table_tier_1")).then {
|
||||
Resource.Custom("block/transparent").let {
|
||||
texture("overlay_top", it)
|
||||
texture("overlay_side", it)
|
||||
}
|
||||
CubeColumn -> cubeColumn(block)?.then(callback)
|
||||
Table -> table(block as BlockAbstractTable)?.then(callback)
|
||||
Fluid -> particle(block, block.location("_still"))?.then(callback)
|
||||
Manual -> return
|
||||
}
|
||||
|
||||
parent(ModBlocks.TABLE_BASE_TIER_2, Resource.Custom("block/table_tier_2")).then {
|
||||
Resource.Custom("block/transparent").let {
|
||||
texture("overlay_top", it)
|
||||
texture("overlay_side", it)
|
||||
}
|
||||
}
|
||||
|
||||
parent(ModBlocks.TABLE_BASE_TIER_3, Resource.Custom("block/table_tier_3")).then {
|
||||
Resource.Custom("block/transparent").let {
|
||||
texture("overlay_top", it)
|
||||
texture("overlay_side", it)
|
||||
}
|
||||
}
|
||||
|
||||
table(ModBlocks.ACCUMULATION_TABLE_TIER_1)
|
||||
table(ModBlocks.ACCUMULATION_TABLE_TIER_2)
|
||||
table(ModBlocks.ACCUMULATION_TABLE_TIER_3)
|
||||
table(ModBlocks.EXPERIENCE_TABLE_TIER_1)
|
||||
table(ModBlocks.EXPERIENCE_TABLE_TIER_2)
|
||||
table(ModBlocks.EXPERIENCE_TABLE_TIER_3)
|
||||
table(ModBlocks.INFUSION_TABLE_TIER_1)
|
||||
table(ModBlocks.INFUSION_TABLE_TIER_2)
|
||||
table(ModBlocks.INFUSION_TABLE_TIER_3)
|
||||
}
|
||||
}
|
||||
|
@@ -1,191 +1,53 @@
|
||||
package chylex.hee.datagen.client
|
||||
|
||||
import chylex.hee.datagen.client.util.cube
|
||||
import chylex.hee.datagen.client.util.cauldron
|
||||
import chylex.hee.datagen.client.util.log
|
||||
import chylex.hee.datagen.client.util.pillar
|
||||
import chylex.hee.datagen.client.util.simpleStateAndItem
|
||||
import chylex.hee.datagen.client.util.simpleStateOnly
|
||||
import chylex.hee.datagen.client.util.slab
|
||||
import chylex.hee.datagen.client.util.stairs
|
||||
import chylex.hee.datagen.r
|
||||
import chylex.hee.datagen.client.util.wall
|
||||
import chylex.hee.game.block.IHeeBlock
|
||||
import chylex.hee.game.block.properties.BlockStatePreset
|
||||
import chylex.hee.game.block.properties.BlockStatePreset.Cauldron
|
||||
import chylex.hee.game.block.properties.BlockStatePreset.Log
|
||||
import chylex.hee.game.block.properties.BlockStatePreset.None
|
||||
import chylex.hee.game.block.properties.BlockStatePreset.Pillar
|
||||
import chylex.hee.game.block.properties.BlockStatePreset.PillarFrom
|
||||
import chylex.hee.game.block.properties.BlockStatePreset.Simple
|
||||
import chylex.hee.game.block.properties.BlockStatePreset.SimpleFrom
|
||||
import chylex.hee.game.block.properties.BlockStatePreset.Slab
|
||||
import chylex.hee.game.block.properties.BlockStatePreset.Stairs
|
||||
import chylex.hee.game.block.properties.BlockStatePreset.Wall
|
||||
import chylex.hee.init.ModBlocks
|
||||
import net.minecraft.block.Blocks
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.block.RotatedPillarBlock
|
||||
import net.minecraft.block.SlabBlock
|
||||
import net.minecraft.block.StairsBlock
|
||||
import net.minecraft.block.WallBlock
|
||||
import net.minecraft.data.DataGenerator
|
||||
import net.minecraftforge.client.model.generators.BlockStateProvider
|
||||
import net.minecraftforge.common.data.ExistingFileHelper
|
||||
|
||||
class BlockStates(generator: DataGenerator, modid: String, existingFileHelper: ExistingFileHelper) : BlockStateProvider(generator, modid, existingFileHelper) {
|
||||
override fun registerStatesAndModels() {
|
||||
for (block in ModBlocks.ALL) {
|
||||
(block as? IHeeBlock)?.let { registerState(block, it.model.generate(block).blockState) }
|
||||
}
|
||||
}
|
||||
|
||||
// Blocks: Building (Uncategorized)
|
||||
|
||||
cube(ModBlocks.ETHEREAL_LANTERN)
|
||||
cube(ModBlocks.VANTABLOCK)
|
||||
cube(ModBlocks.ENDIUM_BLOCK)
|
||||
|
||||
// Blocks: Building (Gloomrock)
|
||||
|
||||
cube(ModBlocks.GLOOMROCK)
|
||||
cube(ModBlocks.GLOOMROCK_BRICKS)
|
||||
stairs(ModBlocks.GLOOMROCK_BRICK_STAIRS, ModBlocks.GLOOMROCK_BRICKS)
|
||||
slab(ModBlocks.GLOOMROCK_BRICK_SLAB, ModBlocks.GLOOMROCK_BRICKS)
|
||||
cube(ModBlocks.GLOOMROCK_SMOOTH)
|
||||
stairs(ModBlocks.GLOOMROCK_SMOOTH_STAIRS, ModBlocks.GLOOMROCK_SMOOTH, side = ModBlocks.GLOOMROCK_SMOOTH_SLAB.r("_side"))
|
||||
slab(ModBlocks.GLOOMROCK_SMOOTH_SLAB, ModBlocks.GLOOMROCK_SMOOTH, side = ModBlocks.GLOOMROCK_SMOOTH_SLAB.r("_side"))
|
||||
cube(ModBlocks.GLOOMROCK_SMOOTH_RED)
|
||||
cube(ModBlocks.GLOOMROCK_SMOOTH_ORANGE)
|
||||
cube(ModBlocks.GLOOMROCK_SMOOTH_YELLOW)
|
||||
cube(ModBlocks.GLOOMROCK_SMOOTH_GREEN)
|
||||
cube(ModBlocks.GLOOMROCK_SMOOTH_CYAN)
|
||||
cube(ModBlocks.GLOOMROCK_SMOOTH_BLUE)
|
||||
cube(ModBlocks.GLOOMROCK_SMOOTH_PURPLE)
|
||||
cube(ModBlocks.GLOOMROCK_SMOOTH_MAGENTA)
|
||||
cube(ModBlocks.GLOOMROCK_SMOOTH_WHITE)
|
||||
|
||||
// Blocks: Building (Dusty Stone)
|
||||
|
||||
cube(ModBlocks.DUSTY_STONE)
|
||||
cube(ModBlocks.DUSTY_STONE_CRACKED)
|
||||
cube(ModBlocks.DUSTY_STONE_DAMAGED)
|
||||
cube(ModBlocks.DUSTY_STONE_BRICKS)
|
||||
cube(ModBlocks.DUSTY_STONE_CRACKED_BRICKS)
|
||||
cube(ModBlocks.DUSTY_STONE_DECORATION)
|
||||
stairs(ModBlocks.DUSTY_STONE_BRICK_STAIRS, ModBlocks.DUSTY_STONE_BRICKS)
|
||||
slab(ModBlocks.DUSTY_STONE_BRICK_SLAB, ModBlocks.DUSTY_STONE_BRICKS)
|
||||
|
||||
// Blocks: Building (Obsidian)
|
||||
|
||||
stairs(ModBlocks.OBSIDIAN_STAIRS, Blocks.OBSIDIAN)
|
||||
simpleStateAndItem(ModBlocks.OBSIDIAN_FALLING)
|
||||
cube(ModBlocks.OBSIDIAN_SMOOTH)
|
||||
cube(ModBlocks.OBSIDIAN_CHISELED)
|
||||
pillar(ModBlocks.OBSIDIAN_PILLAR)
|
||||
cube(ModBlocks.OBSIDIAN_SMOOTH_LIT, ModBlocks.OBSIDIAN_SMOOTH)
|
||||
cube(ModBlocks.OBSIDIAN_CHISELED_LIT, ModBlocks.OBSIDIAN_CHISELED)
|
||||
pillar(ModBlocks.OBSIDIAN_PILLAR_LIT, ModBlocks.OBSIDIAN_PILLAR)
|
||||
cube(ModBlocks.OBSIDIAN_TOWER_TOP, ModBlocks.OBSIDIAN_CHISELED)
|
||||
|
||||
// Blocks: Building (End Stone)
|
||||
|
||||
simpleStateAndItem(ModBlocks.END_STONE_INFESTED)
|
||||
simpleStateAndItem(ModBlocks.END_STONE_BURNED)
|
||||
simpleStateAndItem(ModBlocks.END_STONE_ENCHANTED)
|
||||
|
||||
// Blocks: Building (Dark Loam)
|
||||
|
||||
cube(ModBlocks.DARK_LOAM)
|
||||
slab(ModBlocks.DARK_LOAM_SLAB, ModBlocks.DARK_LOAM)
|
||||
|
||||
// Blocks: Building (Wood)
|
||||
|
||||
log(ModBlocks.WHITEBARK_LOG)
|
||||
simpleStateAndItem(ModBlocks.WHITEBARK)
|
||||
cube(ModBlocks.WHITEBARK_PLANKS)
|
||||
stairs(ModBlocks.WHITEBARK_STAIRS, ModBlocks.WHITEBARK_PLANKS)
|
||||
slab(ModBlocks.WHITEBARK_SLAB, ModBlocks.WHITEBARK_PLANKS)
|
||||
|
||||
// Blocks: Building (Miner's Burial)
|
||||
|
||||
cube(ModBlocks.MINERS_BURIAL_BLOCK_PLAIN)
|
||||
cube(ModBlocks.MINERS_BURIAL_BLOCK_CHISELED)
|
||||
pillar(ModBlocks.MINERS_BURIAL_BLOCK_PILLAR)
|
||||
cube(ModBlocks.MINERS_BURIAL_BLOCK_JAIL)
|
||||
simpleStateAndItem(ModBlocks.MINERS_BURIAL_ALTAR)
|
||||
|
||||
// Blocks: Fluids
|
||||
|
||||
simpleStateOnly(ModBlocks.ENDER_GOO)
|
||||
simpleStateOnly(ModBlocks.PURIFIED_ENDER_GOO)
|
||||
|
||||
// Blocks: Interactive (Storage)
|
||||
|
||||
simpleStateOnly(ModBlocks.JAR_O_DUST)
|
||||
simpleStateOnly(ModBlocks.DARK_CHEST)
|
||||
simpleStateOnly(ModBlocks.LOOT_CHEST)
|
||||
|
||||
// Blocks: Interactive (Puzzle)
|
||||
|
||||
cube(ModBlocks.PUZZLE_WALL)
|
||||
|
||||
// Blocks: Interactive (Gates)
|
||||
|
||||
simpleStateAndItem(ModBlocks.EXPERIENCE_GATE_CONTROLLER)
|
||||
|
||||
// Blocks: Interactive (Uncategorized)
|
||||
|
||||
simpleStateAndItem(ModBlocks.INFUSED_TNT)
|
||||
simpleStateOnly(ModBlocks.IGNEOUS_PLATE)
|
||||
|
||||
// Blocks: Ores
|
||||
|
||||
cube(ModBlocks.END_POWDER_ORE)
|
||||
cube(ModBlocks.ENDIUM_ORE)
|
||||
cube(ModBlocks.IGNEOUS_ROCK_ORE)
|
||||
|
||||
// Blocks: Decorative (Trees)
|
||||
|
||||
simpleStateOnly(ModBlocks.WHITEBARK_SAPLING_AUTUMN_RED)
|
||||
simpleStateOnly(ModBlocks.WHITEBARK_SAPLING_AUTUMN_BROWN)
|
||||
simpleStateOnly(ModBlocks.WHITEBARK_SAPLING_AUTUMN_ORANGE)
|
||||
simpleStateOnly(ModBlocks.WHITEBARK_SAPLING_AUTUMN_YELLOWGREEN)
|
||||
simpleStateAndItem(ModBlocks.WHITEBARK_LEAVES_AUTUMN_RED)
|
||||
simpleStateAndItem(ModBlocks.WHITEBARK_LEAVES_AUTUMN_BROWN)
|
||||
simpleStateAndItem(ModBlocks.WHITEBARK_LEAVES_AUTUMN_ORANGE)
|
||||
simpleStateAndItem(ModBlocks.WHITEBARK_LEAVES_AUTUMN_YELLOWGREEN)
|
||||
simpleStateOnly(ModBlocks.POTTED_WHITEBARK_SAPLING_AUTUMN_RED)
|
||||
simpleStateOnly(ModBlocks.POTTED_WHITEBARK_SAPLING_AUTUMN_BROWN)
|
||||
simpleStateOnly(ModBlocks.POTTED_WHITEBARK_SAPLING_AUTUMN_ORANGE)
|
||||
simpleStateOnly(ModBlocks.POTTED_WHITEBARK_SAPLING_AUTUMN_YELLOWGREEN)
|
||||
|
||||
// Blocks: Decorative (Plants)
|
||||
|
||||
simpleStateOnly(ModBlocks.DEATH_FLOWER_HEALED)
|
||||
simpleStateOnly(ModBlocks.DEATH_FLOWER_WITHERED)
|
||||
simpleStateOnly(ModBlocks.POTTED_DEATH_FLOWER_HEALED)
|
||||
simpleStateOnly(ModBlocks.POTTED_DEATH_FLOWER_WITHERED)
|
||||
|
||||
// Blocks: Decorative (Uncategorized)
|
||||
|
||||
simpleStateOnly(ModBlocks.ANCIENT_COBWEB)
|
||||
simpleStateOnly(ModBlocks.ENDERMAN_HEAD, Blocks.SOUL_SAND)
|
||||
simpleStateOnly(ModBlocks.ENDERMAN_WALL_HEAD, Blocks.SOUL_SAND)
|
||||
|
||||
// Blocks: Spawners
|
||||
|
||||
simpleStateOnly(ModBlocks.SPAWNER_OBSIDIAN_TOWERS, Blocks.SPAWNER)
|
||||
|
||||
// Blocks: Portals
|
||||
|
||||
simpleStateOnly(ModBlocks.END_PORTAL_INNER, Blocks.END_PORTAL)
|
||||
simpleStateAndItem(ModBlocks.END_PORTAL_FRAME)
|
||||
simpleStateAndItem(ModBlocks.END_PORTAL_ACCEPTOR)
|
||||
simpleStateOnly(ModBlocks.VOID_PORTAL_INNER, Blocks.END_PORTAL)
|
||||
simpleStateAndItem(ModBlocks.VOID_PORTAL_FRAME)
|
||||
simpleStateAndItem(ModBlocks.VOID_PORTAL_STORAGE)
|
||||
simpleStateAndItem(ModBlocks.VOID_PORTAL_FRAME_CRAFTED)
|
||||
simpleStateAndItem(ModBlocks.VOID_PORTAL_STORAGE_CRAFTED)
|
||||
|
||||
// Blocks: Energy
|
||||
|
||||
simpleStateAndItem(ModBlocks.CORRUPTED_ENERGY)
|
||||
|
||||
// Blocks: Tables
|
||||
|
||||
simpleStateAndItem(ModBlocks.TABLE_BASE_TIER_1)
|
||||
simpleStateAndItem(ModBlocks.TABLE_BASE_TIER_2)
|
||||
simpleStateAndItem(ModBlocks.TABLE_BASE_TIER_3)
|
||||
simpleStateAndItem(ModBlocks.ACCUMULATION_TABLE_TIER_1)
|
||||
simpleStateAndItem(ModBlocks.ACCUMULATION_TABLE_TIER_2)
|
||||
simpleStateAndItem(ModBlocks.ACCUMULATION_TABLE_TIER_3)
|
||||
simpleStateAndItem(ModBlocks.EXPERIENCE_TABLE_TIER_1)
|
||||
simpleStateAndItem(ModBlocks.EXPERIENCE_TABLE_TIER_2)
|
||||
simpleStateAndItem(ModBlocks.EXPERIENCE_TABLE_TIER_3)
|
||||
simpleStateAndItem(ModBlocks.INFUSION_TABLE_TIER_1)
|
||||
simpleStateAndItem(ModBlocks.INFUSION_TABLE_TIER_2)
|
||||
simpleStateAndItem(ModBlocks.INFUSION_TABLE_TIER_3)
|
||||
|
||||
// Blocks: Utilities
|
||||
|
||||
simpleStateAndItem(ModBlocks.SCAFFOLDING)
|
||||
private fun registerState(block: Block, model: BlockStatePreset) {
|
||||
when (model) {
|
||||
None -> return
|
||||
Simple -> simpleStateOnly(block)
|
||||
is SimpleFrom -> simpleStateOnly(block, model.modelBlock)
|
||||
Pillar -> pillar(block as RotatedPillarBlock)
|
||||
is PillarFrom -> pillar(block as RotatedPillarBlock, model.modelBlock)
|
||||
is Stairs -> stairs(block as StairsBlock, model.fullBlock, model.side)
|
||||
is Slab -> slab(block as SlabBlock, model.fullBlock, model.side)
|
||||
is Wall -> wall(block as WallBlock, model.fullBlock)
|
||||
is Cauldron -> cauldron(block, model.fluidTexture)
|
||||
Log -> log(block as RotatedPillarBlock)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,166 +1,106 @@
|
||||
package chylex.hee.datagen.client
|
||||
|
||||
import chylex.hee.datagen.client.util.block
|
||||
import chylex.hee.datagen.client.util.layers
|
||||
import chylex.hee.datagen.client.util.multi
|
||||
import chylex.hee.datagen.client.util.override
|
||||
import chylex.hee.datagen.client.util.parent
|
||||
import chylex.hee.datagen.client.util.simple
|
||||
import chylex.hee.datagen.client.util.suffixed
|
||||
import chylex.hee.datagen.r
|
||||
import chylex.hee.datagen.then
|
||||
import chylex.hee.game.Resource
|
||||
import chylex.hee.game.Resource.location
|
||||
import chylex.hee.game.block.IHeeBlock
|
||||
import chylex.hee.game.item.IHeeItem
|
||||
import chylex.hee.game.item.properties.ItemModel
|
||||
import chylex.hee.game.item.properties.ItemModel.AsBlock
|
||||
import chylex.hee.game.item.properties.ItemModel.Copy
|
||||
import chylex.hee.game.item.properties.ItemModel.FromParent
|
||||
import chylex.hee.game.item.properties.ItemModel.Layers
|
||||
import chylex.hee.game.item.properties.ItemModel.Manual
|
||||
import chylex.hee.game.item.properties.ItemModel.Multi
|
||||
import chylex.hee.game.item.properties.ItemModel.Named
|
||||
import chylex.hee.game.item.properties.ItemModel.Simple
|
||||
import chylex.hee.game.item.properties.ItemModel.SingleItemModel
|
||||
import chylex.hee.game.item.properties.ItemModel.Skull
|
||||
import chylex.hee.game.item.properties.ItemModel.SpawnEgg
|
||||
import chylex.hee.game.item.properties.ItemModel.Suffixed
|
||||
import chylex.hee.game.item.properties.ItemModel.Wall
|
||||
import chylex.hee.game.item.properties.ItemModel.WithOverrides
|
||||
import chylex.hee.game.item.properties.ItemModel.WithTextures
|
||||
import chylex.hee.init.ModBlocks
|
||||
import chylex.hee.init.ModItems
|
||||
import chylex.hee.system.facades.Resource
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.data.DataGenerator
|
||||
import net.minecraft.item.Items
|
||||
import net.minecraft.util.IItemProvider
|
||||
import net.minecraftforge.client.model.generators.ItemModelBuilder
|
||||
import net.minecraftforge.client.model.generators.ItemModelProvider
|
||||
import net.minecraftforge.common.data.ExistingFileHelper
|
||||
|
||||
class ItemModels(generator: DataGenerator, modid: String, existingFileHelper: ExistingFileHelper) : ItemModelProvider(generator, modid, existingFileHelper) {
|
||||
override fun registerModels() {
|
||||
|
||||
// Items: Raw Resources
|
||||
|
||||
simple(ModItems.ETHEREUM)
|
||||
simple(ModItems.ANCIENT_DUST)
|
||||
simple(ModItems.END_POWDER)
|
||||
simple(ModItems.STARDUST)
|
||||
simple(ModItems.ENDIUM_INGOT)
|
||||
simple(ModItems.ENDIUM_NUGGET)
|
||||
simple(ModItems.OBSIDIAN_FRAGMENT)
|
||||
simple(ModItems.IGNEOUS_ROCK)
|
||||
simple(ModItems.PUZZLE_MEDALLION)
|
||||
simple(ModItems.INFERNIUM)
|
||||
simple(ModItems.INFERNIUM_INGOT)
|
||||
simple(ModItems.AURICION)
|
||||
simple(ModItems.DRAGON_SCALE)
|
||||
simple(ModItems.INSTABILITY_ORB)
|
||||
simple(ModItems.ECTOPLASM)
|
||||
simple(ModItems.ENCHANTED_CLAW)
|
||||
|
||||
// Items: Manufactured Resources
|
||||
|
||||
simple(ModItems.ALTERATION_NEXUS)
|
||||
simple(ModItems.VOID_ESSENCE)
|
||||
simple(ModItems.OBSIDIAN_ROD)
|
||||
simple(ModItems.PURITY_EXTRACT)
|
||||
simple(ModItems.STATIC_CORE)
|
||||
simple(ModItems.TICKING_CORE)
|
||||
simple(ModItems.DIRTY_INFERNIUM_INGOT)
|
||||
simple(ModItems.AMELIOR)
|
||||
simple(ModItems.REVITALIZATION_SUBSTANCE)
|
||||
layers(ModItems.BINDING_ESSENCE, arrayOf("binding_essence_primary", "binding_essence_secondary", "binding_essence_tertiary", "binding_essence_quaternary"))
|
||||
|
||||
// Items: Nature & Food
|
||||
|
||||
simple(ModItems.COMPOST)
|
||||
|
||||
simple(ModItems.VOID_SALAD).then {
|
||||
override(Resource.Custom("item/void_void_salad")) { predicate(Resource.Custom("void_salad_type"), 1F) }
|
||||
override(Resource.Custom("item/mega_void_salad")) { predicate(Resource.Custom("void_salad_type"), 2F) }
|
||||
for (item in ModItems.ALL) {
|
||||
(item as? IHeeItem)?.let { registerModel(item, it.model) }
|
||||
}
|
||||
|
||||
simple("void_void_salad")
|
||||
simple("mega_void_salad")
|
||||
|
||||
// Items: Table Cores
|
||||
|
||||
simple(ModItems.ACCUMULATION_TABLE_CORE)
|
||||
simple(ModItems.EXPERIENCE_TABLE_CORE)
|
||||
simple(ModItems.INFUSION_TABLE_CORE)
|
||||
|
||||
// Items: Utilities
|
||||
|
||||
simple(ModItems.TABLE_LINK)
|
||||
simple(ModItems.KNOWLEDGE_NOTE)
|
||||
parent(ModItems.ENDERMAN_HEAD, Resource.Vanilla("item/template_skull"))
|
||||
simple(ModItems.EXPERIENCE_BOTTLE, Items.EXPERIENCE_BOTTLE.r)
|
||||
|
||||
// Items: Tools
|
||||
|
||||
simple(ModItems.VOID_MINER)
|
||||
|
||||
simple(ModItems.VOID_BUCKET).then {
|
||||
override(ModItems.VOID_BUCKET.r("_fluid_level_1")) { predicate(Resource.Custom("void_bucket_cooldown"), 0.01F) }
|
||||
override(ModItems.VOID_BUCKET.r("_fluid_level_2")) { predicate(Resource.Custom("void_bucket_cooldown"), 0.3F) }
|
||||
override(ModItems.VOID_BUCKET.r("_fluid_level_3")) { predicate(Resource.Custom("void_bucket_cooldown"), 0.5F) }
|
||||
override(ModItems.VOID_BUCKET.r("_fluid_level_4")) { predicate(Resource.Custom("void_bucket_cooldown"), 0.7F) }
|
||||
for (block in ModBlocks.ALL) {
|
||||
(block as? IHeeBlock)
|
||||
?.let { it.model.generate(block).itemModel }
|
||||
?.let { registerModel(if (it.asItem) block.asItem() else block, it.model) }
|
||||
}
|
||||
}
|
||||
|
||||
multi(ModItems.VOID_BUCKET, Resource.Vanilla("item/generated"), Array(4) { "_fluid_level_${it + 1}" }) {
|
||||
texture("layer0", Resource.Custom("item/void_bucket"))
|
||||
texture("layer1", Resource.Custom("item/$it"))
|
||||
private fun registerModel(item: IItemProvider, model: ItemModel) {
|
||||
registerModel(item, model) { it }
|
||||
}
|
||||
|
||||
private fun registerModel(item: IItemProvider, model: ItemModel, callback: (ItemModelBuilder) -> ItemModelBuilder) {
|
||||
when (model) {
|
||||
is SingleItemModel -> registerSingleModel(item, model, callback)
|
||||
|
||||
is WithTextures -> registerModel(item, model.baseModel) {
|
||||
model.textures.entries.fold(callback(it)) { builder, (name, location) -> builder.texture(name, location) }
|
||||
}
|
||||
|
||||
is WithOverrides -> registerModel(item, model.baseModel) {
|
||||
var builder = callback(it)
|
||||
|
||||
for ((property, valueMap) in model.overrides) {
|
||||
for ((value, overrideModel) in valueMap) {
|
||||
registerSingleModel(item, overrideModel)
|
||||
builder = builder.override(overrideModel.getLocation(item.asItem())) {
|
||||
predicate(property.name, value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
builder
|
||||
}
|
||||
|
||||
is Multi -> {
|
||||
for (innerModel in model.models) {
|
||||
registerModel(item, innerModel, callback)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
simple(ModItems.SCORCHING_PICKAXE)
|
||||
simple(ModItems.SCORCHING_SHOVEL)
|
||||
simple(ModItems.SCORCHING_AXE)
|
||||
simple(ModItems.SCORCHING_SWORD)
|
||||
simple(ModItems.FLINT_AND_INFERNIUM)
|
||||
private fun registerSingleModel(item: IItemProvider, model: SingleItemModel) {
|
||||
registerSingleModel(item, model) { it }
|
||||
}
|
||||
|
||||
// Items: Fluids
|
||||
|
||||
simple(ModItems.ENDER_GOO_BUCKET)
|
||||
simple(ModItems.PURIFIED_ENDER_GOO_BUCKET)
|
||||
|
||||
// Items: Energy
|
||||
|
||||
layers(ModItems.ENERGY_ORACLE, arrayOf("energy_oracle", "energy_oracle_indicator_inactive")).then {
|
||||
override(ModItems.ENERGY_ORACLE.r("_active_mild")) { predicate(Resource.Custom("activity_intensity"), 0.5F) }
|
||||
override(ModItems.ENERGY_ORACLE.r("_active_full")) { predicate(Resource.Custom("activity_intensity"), 1F) }
|
||||
private fun registerSingleModel(item: IItemProvider, model: SingleItemModel, callback: (ItemModelBuilder) -> ItemModelBuilder) {
|
||||
when (model) {
|
||||
Manual -> return
|
||||
Simple -> simple(item)?.then(callback)
|
||||
AsBlock -> block(item as Block)?.then(callback)
|
||||
Skull -> parent(item, Resource.Vanilla("item/template_skull"))?.then(callback)
|
||||
SpawnEgg -> parent(item, Resource.Vanilla("item/template_spawn_egg"))?.then(callback)
|
||||
Wall -> parent(item, item.suffixed("_inventory").location)?.then(callback)
|
||||
is Copy -> simple(item, model.item.location)?.then(callback)
|
||||
is Layers -> layers(item, model.layers)?.then(callback)
|
||||
is Named -> simple(model.name)?.then(callback)
|
||||
is FromParent -> parent(item, model.parent)?.then(callback)
|
||||
is Suffixed -> registerModel(item.suffixed(model.suffix), model.wrapped, callback)
|
||||
}
|
||||
|
||||
multi(ModItems.ENERGY_ORACLE, Resource.Vanilla("item/generated"), arrayOf("_active_mild", "_active_full")) {
|
||||
texture("layer0", Resource.Custom("item/energy_oracle"))
|
||||
texture("layer1", Resource.Custom("item/energy_oracle_indicator" + it.suffix))
|
||||
}
|
||||
|
||||
simple(ModItems.ENERGY_RECEPTACLE).then {
|
||||
override(ModItems.ENERGY_RECEPTACLE.r("_with_cluster")) { predicate(Resource.Custom("has_cluster"), 1F) }
|
||||
}
|
||||
|
||||
layers(ModItems.ENERGY_RECEPTACLE.suffixed("_with_cluster"), arrayOf("energy_receptacle", "energy_receptacle_cluster"))
|
||||
|
||||
// Items: Gems & Teleportation
|
||||
|
||||
simple(ModItems.INFUSED_ENDER_PEARL, Items.ENDER_PEARL.r)
|
||||
simple(ModItems.SPATIAL_DASH_GEM)
|
||||
simple(ModItems.LINKING_GEM)
|
||||
|
||||
layers(ModItems.PORTAL_TOKEN, arrayOf("portal_token_outline", "portal_token_color_top", "portal_token_color_bottom")).then {
|
||||
override(ModItems.PORTAL_TOKEN.r("_rare")) { predicate(Resource.Custom("token_type"), 1F) }
|
||||
override(ModItems.PORTAL_TOKEN.r("_rare_corrupted")) { predicate(Resource.Custom("token_type"), 1.5F) }
|
||||
override(ModItems.PORTAL_TOKEN.r("_solitary")) { predicate(Resource.Custom("token_type"), 2F) }
|
||||
}
|
||||
|
||||
layers(ModItems.PORTAL_TOKEN.suffixed("_rare"), arrayOf("portal_token_outline", "portal_token_color_top", "portal_token_color_bottom", "portal_token_border_rare"))
|
||||
layers(ModItems.PORTAL_TOKEN.suffixed("_rare_corrupted"), arrayOf("portal_token_outline", "portal_token_color_top", "portal_token_color_bottom", "portal_token_border_rare", "portal_token_corruption"))
|
||||
layers(ModItems.PORTAL_TOKEN.suffixed("_solitary"), arrayOf("portal_token_outline", "portal_token_color_top", "portal_token_color_bottom", "portal_token_border_solitary"))
|
||||
simple(ModItems.BLANK_TOKEN)
|
||||
|
||||
// Items: Trinkets
|
||||
|
||||
simple(ModItems.TRINKET_POUCH)
|
||||
|
||||
simple(ModItems.TOTEM_OF_UNDYING).then {
|
||||
override(ModItems.TOTEM_OF_UNDYING.r("_shaking")) { predicate(Resource.Custom("is_shaking"), 1F) }
|
||||
}
|
||||
|
||||
simple(ModItems.TOTEM_OF_UNDYING.suffixed("_shaking"))
|
||||
simple(ModItems.AMULET_OF_RECOVERY)
|
||||
simple(ModItems.AMULET_OF_RECOVERY.suffixed("_held"))
|
||||
simple(ModItems.RING_OF_HUNGER)
|
||||
simple(ModItems.RING_OF_PRESERVATION)
|
||||
simple(ModItems.TALISMAN_OF_GRIEFING)
|
||||
simple(ModItems.SCALE_OF_FREEFALL)
|
||||
|
||||
// Items: Spawn Eggs
|
||||
|
||||
parent(ModItems.SPAWN_ENDER_EYE, Resource.Vanilla("item/template_spawn_egg"))
|
||||
parent(ModItems.SPAWN_ANGRY_ENDERMAN, Resource.Vanilla("item/template_spawn_egg"))
|
||||
parent(ModItems.SPAWN_BLOBBY, Resource.Vanilla("item/template_spawn_egg"))
|
||||
parent(ModItems.SPAWN_ENDERMITE_INSTABILITY, Resource.Vanilla("item/template_spawn_egg"))
|
||||
parent(ModItems.SPAWN_SPIDERLING, Resource.Vanilla("item/template_spawn_egg"))
|
||||
parent(ModItems.SPAWN_UNDREAD, Resource.Vanilla("item/template_spawn_egg"))
|
||||
parent(ModItems.SPAWN_VAMPIRE_BAT, Resource.Vanilla("item/template_spawn_egg"))
|
||||
}
|
||||
}
|
||||
|
119
data/src/main/java/chylex/hee/datagen/client/LangEnglish.kt
Normal file
119
data/src/main/java/chylex/hee/datagen/client/LangEnglish.kt
Normal file
@@ -0,0 +1,119 @@
|
||||
package chylex.hee.datagen.client
|
||||
|
||||
import chylex.hee.HEE
|
||||
import chylex.hee.client.text.LocalizationStrategy
|
||||
import chylex.hee.game.block.IHeeBlock
|
||||
import chylex.hee.game.command.ClientCommandHandler
|
||||
import chylex.hee.game.item.IHeeItem
|
||||
import chylex.hee.game.item.infusion.Infusion
|
||||
import chylex.hee.game.mechanics.energy.IClusterHealth.HealthOverride
|
||||
import chylex.hee.game.mechanics.energy.IClusterHealth.HealthStatus
|
||||
import chylex.hee.game.potion.IHeeEffect
|
||||
import chylex.hee.game.territory.TerritoryType
|
||||
import chylex.hee.init.ModBlocks
|
||||
import chylex.hee.init.ModCommands
|
||||
import chylex.hee.init.ModEffects
|
||||
import chylex.hee.init.ModEntities
|
||||
import chylex.hee.init.ModItems
|
||||
import chylex.hee.init.ModLanguage
|
||||
import chylex.hee.init.ModPotions
|
||||
import chylex.hee.init.ModSounds
|
||||
import chylex.hee.system.getRegistryEntries
|
||||
import chylex.hee.system.path
|
||||
import net.minecraft.data.DataGenerator
|
||||
import net.minecraft.potion.Effect
|
||||
import net.minecraft.potion.Potion
|
||||
import net.minecraftforge.common.data.LanguageProvider
|
||||
|
||||
class LangEnglish(generator: DataGenerator, modid: String) : LanguageProvider(generator, modid, "en_us") {
|
||||
private val addedKeys = mutableMapOf<String, String>()
|
||||
|
||||
override fun addTranslations() {
|
||||
for (block in ModBlocks.ALL) {
|
||||
if (block is IHeeBlock) {
|
||||
block.localization.localize(block.translationKey.removePrefix("block.hee."))?.let { add(block, it) }
|
||||
addAll(block.localizationExtra)
|
||||
}
|
||||
}
|
||||
|
||||
for (item in ModItems.ALL) {
|
||||
if (item is IHeeItem) {
|
||||
item.localization.localize(item.translationKey.removePrefix("item.hee.").removePrefix("block.hee."))?.let { add(item, it) }
|
||||
addAll(item.localizationExtra)
|
||||
}
|
||||
}
|
||||
|
||||
for (fluid in ModBlocks.FLUIDS) {
|
||||
add("fluid.hee." + fluid.registryName, fluid.localizedName)
|
||||
}
|
||||
|
||||
for ((type, properties) in ModEntities.ALL) {
|
||||
properties.localization.localize(type.translationKey.removePrefix("entity.hee."))?.let { add(type, it) }
|
||||
}
|
||||
|
||||
for ((sound, localized) in ModSounds.SUBTITLES) {
|
||||
add("subtitles.hee." + sound.name.path, localized)
|
||||
}
|
||||
|
||||
for (effect in getRegistryEntries<Effect>(ModEffects)) {
|
||||
if (effect is IHeeEffect) {
|
||||
effect.localization.localize(effect.name.removePrefix("effect.hee."))?.let { add(effect, it) }
|
||||
}
|
||||
}
|
||||
|
||||
for (potion in getRegistryEntries<Potion>(ModPotions)) {
|
||||
val name = potion.path
|
||||
val localized = LocalizationStrategy.Default.localize(name)
|
||||
add("item.minecraft.potion.effect.$name", "Potion of $localized")
|
||||
add("item.minecraft.splash_potion.effect.$name", "Splash Potion of $localized")
|
||||
add("item.minecraft.lingering_potion.effect.$name", "Lingering Potion of $localized")
|
||||
add("item.minecraft.tipped_arrow.effect.$name", "Arrow of $localized")
|
||||
}
|
||||
|
||||
for (territoryType in TerritoryType.ALL) {
|
||||
add(territoryType.translationKey, LocalizationStrategy.Default.localize(territoryType.title))
|
||||
}
|
||||
|
||||
for (infusion in Infusion.values()) {
|
||||
add(infusion.translationKey, infusion.localizedName)
|
||||
}
|
||||
|
||||
for (clusterHealth in listOf(*HealthStatus.values(), *HealthOverride.values())) {
|
||||
add(clusterHealth.translationKey, clusterHealth.localizedName)
|
||||
}
|
||||
|
||||
for (command in ModCommands.admin + ModCommands.debug) {
|
||||
val name = command.name
|
||||
add("commands.hee.$name.info", command.description)
|
||||
|
||||
for ((key, translation) in command.localization) {
|
||||
add("commands.hee.$name.$key", translation)
|
||||
}
|
||||
}
|
||||
|
||||
for (command in ClientCommandHandler.all.values) {
|
||||
val name = command.name
|
||||
add("commands.hee.$name.info", command.description)
|
||||
}
|
||||
|
||||
for ((key, localizedText) in ModLanguage.GENERIC) {
|
||||
add(key, localizedText)
|
||||
}
|
||||
}
|
||||
|
||||
private fun addAll(map: Map<String, String>) {
|
||||
for ((key, value) in map) {
|
||||
add(key, value)
|
||||
}
|
||||
}
|
||||
|
||||
override fun add(key: String, value: String) {
|
||||
val previous = addedKeys.put(key, value)
|
||||
if (previous == null) {
|
||||
super.add(key, value)
|
||||
}
|
||||
else if (value != previous) {
|
||||
HEE.log.warn("[LangEnglish] Duplicate translation: $key -> $previous -> $value")
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,15 +1,12 @@
|
||||
package chylex.hee.datagen.client.util
|
||||
|
||||
import chylex.hee.datagen.Callback
|
||||
import chylex.hee.datagen.path
|
||||
import chylex.hee.datagen.r
|
||||
import chylex.hee.datagen.safe
|
||||
import chylex.hee.datagen.safeUnit
|
||||
import chylex.hee.datagen.then
|
||||
import chylex.hee.game.Resource
|
||||
import chylex.hee.game.Resource.location
|
||||
import chylex.hee.game.block.BlockAbstractTable
|
||||
import chylex.hee.system.facades.Resource
|
||||
import chylex.hee.system.forge.named
|
||||
import chylex.hee.system.migration.BlockWall
|
||||
import chylex.hee.system.named
|
||||
import chylex.hee.system.path
|
||||
import net.minecraft.block.AbstractBlock
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.block.Blocks
|
||||
@@ -29,66 +26,22 @@ fun BlockModelProvider.parent(block: Block, parent: ResourceLocation) = safe {
|
||||
this.getBuilder(block.path).parent(getExistingFile(parent))
|
||||
}
|
||||
|
||||
fun BlockModelProvider.simple(block: Block, parent: ResourceLocation, textureName: String, textureLocation: ResourceLocation = block.r): BlockModelBuilder? {
|
||||
fun BlockModelProvider.simple(block: Block, parent: ResourceLocation, textureName: String, textureLocation: ResourceLocation = block.location): BlockModelBuilder? {
|
||||
return this.parent(block, parent).then { texture(textureName, textureLocation) }
|
||||
}
|
||||
|
||||
fun BlockModelProvider.cube(block: Block, texture: ResourceLocation = block.r): BlockModelBuilder? {
|
||||
return this.simple(block, Resource.Vanilla("block/cube_all"), "all", texture)
|
||||
}
|
||||
|
||||
fun BlockModelProvider.cross(block: Block, texture: ResourceLocation = block.r): BlockModelBuilder? {
|
||||
return this.simple(block, Resource.Vanilla("block/cross"), "cross", texture)
|
||||
}
|
||||
|
||||
fun BlockModelProvider.cubeColumn(block: Block, side: ResourceLocation = block.r, end: ResourceLocation = block.r("_top")) = safe {
|
||||
fun BlockModelProvider.cubeColumn(block: Block, side: ResourceLocation = block.location, end: ResourceLocation = block.location("_top")) = safe {
|
||||
return this.cubeColumn(block.path, side, end)
|
||||
}
|
||||
|
||||
fun BlockModelProvider.cubeBottomTop(block: Block, side: ResourceLocation = block.r("_side"), bottom: ResourceLocation = block.r("_bottom"), top: ResourceLocation = block.r("_top")) = safe {
|
||||
fun BlockModelProvider.cubeBottomTop(block: Block, side: ResourceLocation, bottom: ResourceLocation, top: ResourceLocation) = safe {
|
||||
return this.cubeBottomTop(block.path, side, bottom, top)
|
||||
}
|
||||
|
||||
fun BlockModelProvider.leaves(block: Block): BlockModelBuilder? {
|
||||
return this.simple(block, Resource.Vanilla("block/leaves"), "all")
|
||||
}
|
||||
|
||||
fun BlockModelProvider.particle(block: Block, particle: ResourceLocation) = safe {
|
||||
this.getBuilder(block.path).texture("particle", particle)
|
||||
}
|
||||
|
||||
fun BlockModelProvider.multi(block: Block, parent: ResourceLocation, suffixes: Array<String>, callback: BlockModelBuilder.(Callback<Block>) -> Unit) {
|
||||
for(suffix in suffixes) {
|
||||
val path = block.path + suffix
|
||||
|
||||
this.safeUnit {
|
||||
this.getBuilder(path).parent(getExistingFile(parent)).callback(Callback(block, suffix, path))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun BlockModelProvider.multi(block: Block, parent: ResourceLocation, suffixes: IntRange, callback: BlockModelBuilder.(Callback<Block>) -> Unit) {
|
||||
multi(block, parent, Array(1 + suffixes.last - suffixes.first) { "_${suffixes.first + it}" }, callback)
|
||||
}
|
||||
|
||||
fun BlockModelProvider.wall(block: BlockWall, texture: ResourceLocation) = safeUnit {
|
||||
wallPost(block.path + "_post", texture)
|
||||
wallSide(block.path + "_side", texture)
|
||||
wallSideTall(block.path + "_side_tall", texture)
|
||||
}
|
||||
|
||||
fun BlockModelProvider.cauldron(block: Block, water: ResourceLocation) = safeUnit {
|
||||
getBuilder(block.path + "_level1").parent(getExistingFile(Resource.Vanilla("block/cauldron_level1"))).texture("water", water)
|
||||
getBuilder(block.path + "_level2").parent(getExistingFile(Resource.Vanilla("block/cauldron_level2"))).texture("water", water)
|
||||
getBuilder(block.path + "_level3").parent(getExistingFile(Resource.Vanilla("block/cauldron_level3"))).texture("water", water)
|
||||
}
|
||||
|
||||
fun BlockModelProvider.flowerPot(potBlock: Block, plantBlock: Block) = safe {
|
||||
this.getBuilder(potBlock.path)
|
||||
.parent(getExistingFile(Resource.Vanilla("block/flower_pot_cross")))
|
||||
.texture("plant", plantBlock.r)
|
||||
}
|
||||
|
||||
fun BlockModelProvider.portalFrame(block: Block, side: ResourceLocation, top: ResourceLocation) = safe {
|
||||
this.getBuilder(block.path)
|
||||
.parent(getExistingFile(Resource.Custom("block/portal_frame")))
|
||||
|
@@ -1,63 +1,57 @@
|
||||
package chylex.hee.datagen.client.util
|
||||
|
||||
import chylex.hee.datagen.r
|
||||
import chylex.hee.datagen.safeUnit
|
||||
import chylex.hee.system.migration.BlockRotatedPillar
|
||||
import chylex.hee.system.migration.BlockSlab
|
||||
import chylex.hee.system.migration.BlockStairs
|
||||
import chylex.hee.game.Resource
|
||||
import chylex.hee.game.Resource.location
|
||||
import chylex.hee.game.block.util.CAULDRON_LEVEL
|
||||
import chylex.hee.system.path
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.block.RotatedPillarBlock
|
||||
import net.minecraft.block.SlabBlock
|
||||
import net.minecraft.block.StairsBlock
|
||||
import net.minecraft.block.WallBlock
|
||||
import net.minecraft.util.ResourceLocation
|
||||
import net.minecraftforge.client.model.generators.BlockStateProvider
|
||||
import net.minecraftforge.client.model.generators.ConfiguredModel
|
||||
import net.minecraftforge.client.model.generators.ModelFile.UncheckedModelFile
|
||||
|
||||
private fun BlockStateProvider.simpleBlockItem(block: Block) {
|
||||
this.simpleBlockItem(block, UncheckedModelFile(block.r))
|
||||
}
|
||||
|
||||
fun BlockStateProvider.simpleStateOnly(block: Block, model: Block = block) = safeUnit {
|
||||
this.simpleBlock(block, UncheckedModelFile(model.r))
|
||||
this.simpleBlock(block, UncheckedModelFile(model.location))
|
||||
}
|
||||
|
||||
fun BlockStateProvider.simpleStateAndItem(block: Block) = safeUnit {
|
||||
this.simpleBlock(block, UncheckedModelFile(block.r))
|
||||
this.simpleBlockItem(block)
|
||||
fun BlockStateProvider.pillar(block: RotatedPillarBlock, model: Block = block) = safeUnit {
|
||||
this.axisBlock(block, model.location)
|
||||
}
|
||||
|
||||
fun BlockStateProvider.cube(block: Block) = safeUnit {
|
||||
this.simpleBlock(block)
|
||||
this.simpleBlockItem(block)
|
||||
fun BlockStateProvider.stairs(stairsBlock: StairsBlock, fullBlock: Block, side: ResourceLocation? = null) = safeUnit {
|
||||
val texture = fullBlock.location
|
||||
this.stairsBlock(stairsBlock, side ?: texture, texture, texture)
|
||||
}
|
||||
|
||||
fun BlockStateProvider.cube(block: Block, model: Block) = safeUnit {
|
||||
val modelFile = UncheckedModelFile(model.r)
|
||||
this.simpleBlock(block, modelFile)
|
||||
this.simpleBlockItem(block, modelFile)
|
||||
}
|
||||
|
||||
fun BlockStateProvider.stairs(stairBlock: BlockStairs, fullBlock: Block, side: ResourceLocation? = null) = safeUnit {
|
||||
val texture = fullBlock.r
|
||||
this.stairsBlock(stairBlock, side ?: texture, texture, texture)
|
||||
this.simpleBlockItem(stairBlock)
|
||||
}
|
||||
|
||||
fun BlockStateProvider.slab(slabBlock: BlockSlab, fullBlock: Block, side: ResourceLocation? = null) = safeUnit {
|
||||
val texture = fullBlock.r
|
||||
fun BlockStateProvider.slab(slabBlock: SlabBlock, fullBlock: Block, side: ResourceLocation? = null) = safeUnit {
|
||||
val texture = fullBlock.location
|
||||
this.slabBlock(slabBlock, texture, side ?: texture, texture, texture)
|
||||
this.simpleBlockItem(slabBlock)
|
||||
}
|
||||
|
||||
fun BlockStateProvider.log(block: BlockRotatedPillar) = safeUnit {
|
||||
fun BlockStateProvider.wall(block: WallBlock, fullBlock: Block) = safeUnit {
|
||||
val texture = fullBlock.location
|
||||
this.wallBlock(block, texture)
|
||||
models().simple(block.suffixed("_inventory"), Resource.Vanilla("block/wall_inventory"), "wall", texture)
|
||||
}
|
||||
|
||||
fun BlockStateProvider.cauldron(block: Block, water: ResourceLocation) = safeUnit {
|
||||
val models = models()
|
||||
val level1 = models.getBuilder(block.path + "_level1").parent(models.getExistingFile(Resource.Vanilla("block/cauldron_level1"))).texture("water", water)
|
||||
val level2 = models.getBuilder(block.path + "_level2").parent(models.getExistingFile(Resource.Vanilla("block/cauldron_level2"))).texture("water", water)
|
||||
val level3 = models.getBuilder(block.path + "_level3").parent(models.getExistingFile(Resource.Vanilla("block/cauldron_level3"))).texture("water", water)
|
||||
|
||||
getVariantBuilder(block)
|
||||
.partialState().with(CAULDRON_LEVEL, 0).addModels(ConfiguredModel(models.getExistingFile(Resource.Vanilla("block/cauldron"))))
|
||||
.partialState().with(CAULDRON_LEVEL, 1).addModels(ConfiguredModel(level1))
|
||||
.partialState().with(CAULDRON_LEVEL, 2).addModels(ConfiguredModel(level2))
|
||||
.partialState().with(CAULDRON_LEVEL, 3).addModels(ConfiguredModel(level3))
|
||||
}
|
||||
|
||||
fun BlockStateProvider.log(block: RotatedPillarBlock) = safeUnit {
|
||||
this.logBlock(block)
|
||||
this.simpleBlockItem(block)
|
||||
}
|
||||
|
||||
fun BlockStateProvider.pillar(block: BlockRotatedPillar) = safeUnit {
|
||||
this.axisBlock(block)
|
||||
this.simpleBlockItem(block)
|
||||
}
|
||||
|
||||
fun BlockStateProvider.pillar(block: BlockRotatedPillar, model: Block) = safeUnit {
|
||||
val modelFile = UncheckedModelFile(model.r)
|
||||
this.axisBlock(block, model.r)
|
||||
this.simpleBlockItem(block, modelFile)
|
||||
}
|
||||
|
@@ -1,12 +1,11 @@
|
||||
package chylex.hee.datagen.client.util
|
||||
|
||||
import chylex.hee.datagen.Callback
|
||||
import chylex.hee.datagen.path
|
||||
import chylex.hee.datagen.r
|
||||
import chylex.hee.datagen.safe
|
||||
import chylex.hee.datagen.safeUnit
|
||||
import chylex.hee.system.facades.Resource
|
||||
import chylex.hee.system.forge.named
|
||||
import chylex.hee.game.Resource
|
||||
import chylex.hee.game.Resource.location
|
||||
import chylex.hee.game.Resource.locationPrefix
|
||||
import chylex.hee.system.named
|
||||
import chylex.hee.system.path
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.item.Item
|
||||
import net.minecraft.util.IItemProvider
|
||||
@@ -20,59 +19,49 @@ fun Item.suffixed(suffix: String): Item {
|
||||
return Item(Item.Properties()) named this.path + suffix
|
||||
}
|
||||
|
||||
private val ItemModelProvider.generated
|
||||
get() = getExistingFile(Resource.Vanilla("item/generated"))
|
||||
|
||||
private fun IItemProvider.path() = when(this) {
|
||||
is Block -> this.path
|
||||
is Item -> this.path
|
||||
fun IItemProvider.suffixed(suffix: String): IItemProvider = when (this) {
|
||||
is Block -> this.suffixed(suffix)
|
||||
is Item -> this.suffixed(suffix)
|
||||
else -> throw IllegalArgumentException()
|
||||
}
|
||||
|
||||
private val ItemModelProvider.generated
|
||||
get() = getExistingFile(Resource.Vanilla("item/generated"))
|
||||
|
||||
private fun ItemModelProvider.build(item: IItemProvider): ItemModelBuilder {
|
||||
return this.getBuilder(item.path())
|
||||
return this.getBuilder(when (item) {
|
||||
is Block -> item.path
|
||||
is Item -> item.path
|
||||
else -> throw IllegalArgumentException()
|
||||
})
|
||||
}
|
||||
|
||||
fun ItemModelProvider.parent(item: IItemProvider, parent: ResourceLocation, checkExistence: Boolean = true) = safe {
|
||||
this.build(item).parent(if (checkExistence) getExistingFile(parent) else UncheckedModelFile(parent))
|
||||
fun ItemModelProvider.parent(item: IItemProvider, parent: ResourceLocation) = safe {
|
||||
this.build(item).parent(getExistingFile(parent))
|
||||
}
|
||||
|
||||
fun ItemModelProvider.simple(path: String, texture: String = "item/$path") = safe {
|
||||
this.getBuilder(path).parent(generated).texture("layer0", texture)
|
||||
}
|
||||
|
||||
fun ItemModelProvider.simple(item: IItemProvider, texture: ResourceLocation = item.r) = safe {
|
||||
fun ItemModelProvider.simple(item: IItemProvider, texture: ResourceLocation = item.location) = safe {
|
||||
this.build(item).parent(generated).texture("layer0", texture)
|
||||
}
|
||||
|
||||
fun ItemModelProvider.layers(item: Item, layers: Array<String>) = safe {
|
||||
var builder = this.getBuilder(item.path).parent(generated)
|
||||
fun ItemModelProvider.layers(item: IItemProvider, layers: Array<out String>) = safe {
|
||||
var builder = this.build(item).parent(generated)
|
||||
|
||||
for((index, layer) in layers.withIndex()) {
|
||||
builder = builder.texture("layer$index", Resource.Custom("item/$layer"))
|
||||
for ((index, layer) in layers.withIndex()) {
|
||||
builder = builder.texture("layer$index", Resource.Custom(item.locationPrefix + layer))
|
||||
}
|
||||
|
||||
builder
|
||||
}
|
||||
|
||||
fun ItemModelProvider.multi(item: IItemProvider, parent: ResourceLocation, suffixes: Array<String>, callback: ItemModelBuilder.(Callback<IItemProvider>) -> Unit) {
|
||||
for(suffix in suffixes) {
|
||||
val path = item.path() + suffix
|
||||
|
||||
this.safeUnit {
|
||||
this.getBuilder(path).parent(getExistingFile(parent)).callback(Callback(item, suffix, path))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun ItemModelProvider.multi(item: IItemProvider, parent: ResourceLocation, suffixes: IntRange, callback: ItemModelBuilder.(Callback<IItemProvider>) -> Unit) {
|
||||
multi(item, parent, Array(1 + suffixes.last - suffixes.first) { "_${suffixes.first + it}" }, callback)
|
||||
}
|
||||
|
||||
fun ItemModelProvider.block(block: Block, parent: Block = block) = safe {
|
||||
this.getBuilder(block.path).parent(UncheckedModelFile(parent.r))
|
||||
this.getBuilder(block.path).parent(UncheckedModelFile(parent.location))
|
||||
}
|
||||
|
||||
fun ItemModelBuilder.override(model: ResourceLocation, callback: OverrideBuilder.() -> OverrideBuilder): ItemModelBuilder? {
|
||||
inline fun ItemModelBuilder.override(model: ResourceLocation, callback: OverrideBuilder.() -> OverrideBuilder): ItemModelBuilder {
|
||||
return this.override().model(UncheckedModelFile(model)).let(callback).end()
|
||||
}
|
||||
|
@@ -1,99 +1,42 @@
|
||||
package chylex.hee.datagen.server
|
||||
|
||||
import chylex.hee.HEE
|
||||
import chylex.hee.datagen.server.util.BlockLootTableProvider
|
||||
import chylex.hee.game.block.IHeeBlock
|
||||
import chylex.hee.game.block.properties.BlockDrop
|
||||
import chylex.hee.game.block.properties.BlockDrop.FlowerPot
|
||||
import chylex.hee.game.block.properties.BlockDrop.Manual
|
||||
import chylex.hee.game.block.properties.BlockDrop.NamedTile
|
||||
import chylex.hee.game.block.properties.BlockDrop.Nothing
|
||||
import chylex.hee.game.block.properties.BlockDrop.OneOf
|
||||
import chylex.hee.game.block.properties.BlockDrop.Self
|
||||
import chylex.hee.init.ModBlocks
|
||||
import chylex.hee.init.ModItems
|
||||
import net.minecraft.block.Blocks
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.block.FlowerPotBlock
|
||||
import net.minecraft.data.DataGenerator
|
||||
import net.minecraft.loot.LootTables
|
||||
|
||||
class BlockLootTables(generator: DataGenerator) : BlockLootTableProvider(generator) {
|
||||
override val consumer = object : RegistrationConsumer() {
|
||||
override fun addTables() {
|
||||
dropSelf(ModBlocks.ACCUMULATION_TABLE_TIER_1)
|
||||
dropSelf(ModBlocks.ACCUMULATION_TABLE_TIER_2)
|
||||
dropSelf(ModBlocks.ACCUMULATION_TABLE_TIER_3)
|
||||
dropSelf(ModBlocks.DARK_LOAM)
|
||||
dropSelf(ModBlocks.DARK_LOAM_SLAB)
|
||||
dropSelf(ModBlocks.DEATH_FLOWER_HEALED)
|
||||
dropSelf(ModBlocks.DEATH_FLOWER_WITHERED)
|
||||
dropSelf(ModBlocks.DUSTY_STONE_BRICKS)
|
||||
dropSelf(ModBlocks.DUSTY_STONE_BRICK_SLAB)
|
||||
dropSelf(ModBlocks.DUSTY_STONE_BRICK_STAIRS)
|
||||
dropSelf(ModBlocks.DUSTY_STONE_CRACKED_BRICKS)
|
||||
dropSelf(ModBlocks.ENDIUM_BLOCK)
|
||||
dropSelf(ModBlocks.ENDIUM_ORE)
|
||||
dropSelf(ModBlocks.END_STONE_BURNED)
|
||||
dropSelf(ModBlocks.END_STONE_ENCHANTED)
|
||||
dropSelf(ModBlocks.END_STONE_INFESTED)
|
||||
dropSelf(ModBlocks.ETHEREAL_LANTERN)
|
||||
dropSelf(ModBlocks.EXPERIENCE_TABLE_TIER_1)
|
||||
dropSelf(ModBlocks.EXPERIENCE_TABLE_TIER_2)
|
||||
dropSelf(ModBlocks.EXPERIENCE_TABLE_TIER_3)
|
||||
dropSelf(ModBlocks.GLOOMROCK)
|
||||
dropSelf(ModBlocks.GLOOMROCK_BRICKS)
|
||||
dropSelf(ModBlocks.GLOOMROCK_BRICK_SLAB)
|
||||
dropSelf(ModBlocks.GLOOMROCK_BRICK_STAIRS)
|
||||
dropSelf(ModBlocks.GLOOMROCK_SMOOTH)
|
||||
dropSelf(ModBlocks.GLOOMROCK_SMOOTH_BLUE)
|
||||
dropSelf(ModBlocks.GLOOMROCK_SMOOTH_CYAN)
|
||||
dropSelf(ModBlocks.GLOOMROCK_SMOOTH_GREEN)
|
||||
dropSelf(ModBlocks.GLOOMROCK_SMOOTH_MAGENTA)
|
||||
dropSelf(ModBlocks.GLOOMROCK_SMOOTH_ORANGE)
|
||||
dropSelf(ModBlocks.GLOOMROCK_SMOOTH_PURPLE)
|
||||
dropSelf(ModBlocks.GLOOMROCK_SMOOTH_RED)
|
||||
dropSelf(ModBlocks.GLOOMROCK_SMOOTH_SLAB)
|
||||
dropSelf(ModBlocks.GLOOMROCK_SMOOTH_STAIRS)
|
||||
dropSelf(ModBlocks.GLOOMROCK_SMOOTH_WHITE)
|
||||
dropSelf(ModBlocks.GLOOMROCK_SMOOTH_YELLOW)
|
||||
dropSelf(ModBlocks.GLOOMTORCH)
|
||||
dropSelf(ModBlocks.IGNEOUS_PLATE)
|
||||
dropSelf(ModBlocks.INFUSION_TABLE_TIER_1)
|
||||
dropSelf(ModBlocks.INFUSION_TABLE_TIER_2)
|
||||
dropSelf(ModBlocks.INFUSION_TABLE_TIER_3)
|
||||
dropSelf(ModBlocks.MINERS_BURIAL_BLOCK_CHISELED)
|
||||
dropSelf(ModBlocks.MINERS_BURIAL_BLOCK_PILLAR)
|
||||
dropSelf(ModBlocks.MINERS_BURIAL_BLOCK_PLAIN)
|
||||
dropSelf(ModBlocks.OBSIDIAN_CHISELED)
|
||||
dropSelf(ModBlocks.OBSIDIAN_CHISELED_LIT)
|
||||
dropSelf(ModBlocks.OBSIDIAN_PILLAR)
|
||||
dropSelf(ModBlocks.OBSIDIAN_PILLAR_LIT)
|
||||
dropSelf(ModBlocks.OBSIDIAN_SMOOTH)
|
||||
dropSelf(ModBlocks.OBSIDIAN_SMOOTH_LIT)
|
||||
dropSelf(ModBlocks.OBSIDIAN_STAIRS)
|
||||
dropSelf(ModBlocks.STONE_BRICK_WALL)
|
||||
dropSelf(ModBlocks.TABLE_BASE_TIER_1)
|
||||
dropSelf(ModBlocks.TABLE_BASE_TIER_2)
|
||||
dropSelf(ModBlocks.TABLE_BASE_TIER_3)
|
||||
dropSelf(ModBlocks.TABLE_PEDESTAL)
|
||||
dropSelf(ModBlocks.VANTABLOCK)
|
||||
dropSelf(ModBlocks.VOID_PORTAL_FRAME_CRAFTED)
|
||||
dropSelf(ModBlocks.VOID_PORTAL_STORAGE_CRAFTED)
|
||||
dropSelf(ModBlocks.WHITEBARK)
|
||||
dropSelf(ModBlocks.WHITEBARK_LOG)
|
||||
dropSelf(ModBlocks.WHITEBARK_PLANKS)
|
||||
dropSelf(ModBlocks.WHITEBARK_SAPLING_AUTUMN_BROWN)
|
||||
dropSelf(ModBlocks.WHITEBARK_SAPLING_AUTUMN_ORANGE)
|
||||
dropSelf(ModBlocks.WHITEBARK_SAPLING_AUTUMN_RED)
|
||||
dropSelf(ModBlocks.WHITEBARK_SAPLING_AUTUMN_YELLOWGREEN)
|
||||
dropSelf(ModBlocks.WHITEBARK_SLAB)
|
||||
dropSelf(ModBlocks.WHITEBARK_STAIRS)
|
||||
for (block in ModBlocks.ALL) {
|
||||
(block as? IHeeBlock)?.let { registerDrop(block, it.drop) }
|
||||
}
|
||||
}
|
||||
|
||||
dropFunc(ModBlocks.DARK_CHEST, withName)
|
||||
dropFunc(ModBlocks.ENHANCED_BREWING_STAND, withName)
|
||||
private fun registerDrop(block: Block, drop: BlockDrop) {
|
||||
if (block.lootTable == LootTables.EMPTY && drop != Nothing) {
|
||||
HEE.log.error("[BlockLootTables] block has empty loot table but declares drops: " + block.registryName)
|
||||
return
|
||||
}
|
||||
|
||||
dropOther(ModBlocks.CAULDRON_DRAGONS_BREATH, Blocks.CAULDRON)
|
||||
dropOther(ModBlocks.CAULDRON_ENDER_GOO, Blocks.CAULDRON)
|
||||
dropOther(ModBlocks.CAULDRON_PURIFIED_ENDER_GOO, Blocks.CAULDRON)
|
||||
dropOther(ModBlocks.ENDERMAN_HEAD, ModItems.ENDERMAN_HEAD)
|
||||
dropOther(ModBlocks.ENDERMAN_WALL_HEAD, ModItems.ENDERMAN_HEAD)
|
||||
dropOther(ModBlocks.OBSIDIAN_FALLING, Blocks.OBSIDIAN)
|
||||
|
||||
dropFlowerPot(ModBlocks.POTTED_DEATH_FLOWER_HEALED)
|
||||
dropFlowerPot(ModBlocks.POTTED_DEATH_FLOWER_WITHERED)
|
||||
dropFlowerPot(ModBlocks.POTTED_WHITEBARK_SAPLING_AUTUMN_BROWN)
|
||||
dropFlowerPot(ModBlocks.POTTED_WHITEBARK_SAPLING_AUTUMN_ORANGE)
|
||||
dropFlowerPot(ModBlocks.POTTED_WHITEBARK_SAPLING_AUTUMN_YELLOWGREEN)
|
||||
dropFlowerPot(ModBlocks.POTTED_WHITEBARK_SAPLING_AUTUMN_RED)
|
||||
when (drop) {
|
||||
Nothing, Manual -> return
|
||||
Self -> registerDropSelfLootTable(block)
|
||||
NamedTile -> registerLootTable(block, withName)
|
||||
FlowerPot -> registerFlowerPot(block as FlowerPotBlock)
|
||||
is OneOf -> registerDropping(block, drop.item)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,46 +1,32 @@
|
||||
package chylex.hee.datagen.server
|
||||
|
||||
import chylex.hee.datagen.server.util.add
|
||||
import chylex.hee.game.block.BlockWhitebarkSapling
|
||||
import chylex.hee.game.block.IHeeBlock
|
||||
import chylex.hee.init.ModBlocks
|
||||
import chylex.hee.system.forge.getRegistryEntries
|
||||
import chylex.hee.system.migration.BlockFlowerPot
|
||||
import chylex.hee.system.migration.BlockLeaves
|
||||
import chylex.hee.system.migration.BlockSlab
|
||||
import chylex.hee.system.migration.BlockStairs
|
||||
import chylex.hee.system.migration.BlockWall
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.data.BlockTagsProvider
|
||||
import net.minecraft.data.DataGenerator
|
||||
import net.minecraft.tags.BlockTags
|
||||
import net.minecraftforge.common.Tags
|
||||
import net.minecraft.tags.ITag.INamedTag
|
||||
import net.minecraftforge.common.data.ExistingFileHelper
|
||||
|
||||
class BlockTags(generator: DataGenerator, modId: String, existingFileHelper: ExistingFileHelper?) : BlockTagsProvider(generator, modId, existingFileHelper) {
|
||||
private val blocks = getRegistryEntries<Block>(ModBlocks)
|
||||
private val registeredTags = mutableSetOf<INamedTag<Block>>()
|
||||
|
||||
val allRegisteredTags: Set<INamedTag<Block>>
|
||||
get() = registeredTags
|
||||
|
||||
override fun registerTags() {
|
||||
getOrCreateBuilder(BlockTags.BAMBOO_PLANTABLE_ON).add(ModBlocks.HUMUS)
|
||||
getOrCreateBuilder(BlockTags.FLOWER_POTS).add(blocks.filterIsInstance<BlockFlowerPot>())
|
||||
getOrCreateBuilder(BlockTags.IMPERMEABLE).add(ModBlocks.INFUSED_GLASS)
|
||||
getOrCreateBuilder(BlockTags.LEAVES).add(blocks.filterIsInstance<BlockLeaves>())
|
||||
getOrCreateBuilder(BlockTags.LOGS).add(ModBlocks.WHITEBARK_LOG, ModBlocks.WHITEBARK)
|
||||
getOrCreateBuilder(BlockTags.PORTALS).add(ModBlocks.END_PORTAL_INNER, ModBlocks.VOID_PORTAL_INNER)
|
||||
getOrCreateBuilder(BlockTags.PLANKS).add(ModBlocks.WHITEBARK_PLANKS)
|
||||
getOrCreateBuilder(BlockTags.SAPLINGS).add(blocks.filterIsInstance<BlockWhitebarkSapling>())
|
||||
getOrCreateBuilder(BlockTags.SLABS).add(blocks.filterIsInstance<BlockSlab>())
|
||||
getOrCreateBuilder(BlockTags.STAIRS).add(blocks.filterIsInstance<BlockStairs>())
|
||||
getOrCreateBuilder(BlockTags.WALLS).add(blocks.filterIsInstance<BlockWall>())
|
||||
getOrCreateBuilder(BlockTags.WOODEN_SLABS).add(ModBlocks.WHITEBARK_SLAB)
|
||||
getOrCreateBuilder(BlockTags.WOODEN_STAIRS).add(ModBlocks.WHITEBARK_STAIRS)
|
||||
for (block in ModBlocks.ALL) {
|
||||
val tags = (block as? IHeeBlock)?.tags
|
||||
if (!tags.isNullOrEmpty()) {
|
||||
registerTags(block, tags)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getOrCreateBuilder(Tags.Blocks.CHESTS).add(ModBlocks.DARK_CHEST)
|
||||
getOrCreateBuilder(Tags.Blocks.END_STONES).add(ModBlocks.END_STONE_INFESTED, ModBlocks.END_STONE_BURNED, ModBlocks.END_STONE_ENCHANTED)
|
||||
getOrCreateBuilder(Tags.Blocks.GLASS).add(ModBlocks.INFUSED_GLASS)
|
||||
getOrCreateBuilder(Tags.Blocks.OBSIDIAN).add(ModBlocks.OBSIDIAN_FALLING)
|
||||
getOrCreateBuilder(Tags.Blocks.OBSIDIAN).add(ModBlocks.OBSIDIAN_SMOOTH, ModBlocks.OBSIDIAN_CHISELED, ModBlocks.OBSIDIAN_PILLAR)
|
||||
getOrCreateBuilder(Tags.Blocks.OBSIDIAN).add(ModBlocks.OBSIDIAN_SMOOTH_LIT, ModBlocks.OBSIDIAN_CHISELED_LIT, ModBlocks.OBSIDIAN_PILLAR_LIT)
|
||||
getOrCreateBuilder(Tags.Blocks.ORES).add(ModBlocks.END_POWDER_ORE, ModBlocks.ENDIUM_ORE, ModBlocks.STARDUST_ORE, ModBlocks.IGNEOUS_ROCK_ORE)
|
||||
getOrCreateBuilder(Tags.Blocks.STORAGE_BLOCKS).add(ModBlocks.ENDIUM_BLOCK)
|
||||
private fun registerTags(block: Block, tags: List<INamedTag<Block>>) {
|
||||
for (tag in tags) {
|
||||
getOrCreateBuilder(tag).addItemEntry(block)
|
||||
registeredTags.add(tag)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,38 +1,33 @@
|
||||
package chylex.hee.datagen.server
|
||||
|
||||
import chylex.hee.game.item.IHeeItem
|
||||
import chylex.hee.init.ModItems
|
||||
import net.minecraft.data.BlockTagsProvider
|
||||
import net.minecraft.data.DataGenerator
|
||||
import net.minecraft.data.ItemTagsProvider
|
||||
import net.minecraft.tags.BlockTags
|
||||
import net.minecraft.item.Item
|
||||
import net.minecraft.tags.ITag.INamedTag
|
||||
import net.minecraft.tags.ItemTags
|
||||
import net.minecraftforge.common.Tags
|
||||
import net.minecraftforge.common.data.ExistingFileHelper
|
||||
|
||||
class ItemTags(dataGenerator: DataGenerator, blockTagProvider: BlockTagsProvider, modId: String, existingFileHelper: ExistingFileHelper?) : ItemTagsProvider(dataGenerator, blockTagProvider, modId, existingFileHelper) {
|
||||
class ItemTags(dataGenerator: DataGenerator, private val blockTags: BlockTags, modId: String, existingFileHelper: ExistingFileHelper?) : ItemTagsProvider(dataGenerator, blockTags, modId, existingFileHelper) {
|
||||
override fun registerTags() {
|
||||
copy(BlockTags.LEAVES, ItemTags.LEAVES)
|
||||
copy(BlockTags.LOGS, ItemTags.LOGS)
|
||||
copy(BlockTags.PLANKS, ItemTags.PLANKS)
|
||||
copy(BlockTags.SAPLINGS, ItemTags.SAPLINGS)
|
||||
copy(BlockTags.SLABS, ItemTags.SLABS)
|
||||
copy(BlockTags.STAIRS, ItemTags.STAIRS)
|
||||
copy(BlockTags.WALLS, ItemTags.WALLS)
|
||||
copy(BlockTags.WOODEN_SLABS, ItemTags.WOODEN_SLABS)
|
||||
copy(BlockTags.WOODEN_STAIRS, ItemTags.WOODEN_STAIRS)
|
||||
val itemTags = ItemTags.getAllTags().associateBy { it.name }
|
||||
|
||||
copy(Tags.Blocks.CHESTS, Tags.Items.CHESTS)
|
||||
copy(Tags.Blocks.END_STONES, Tags.Items.END_STONES)
|
||||
copy(Tags.Blocks.GLASS, Tags.Items.GLASS)
|
||||
copy(Tags.Blocks.OBSIDIAN, Tags.Items.OBSIDIAN)
|
||||
copy(Tags.Blocks.ORES, Tags.Items.ORES)
|
||||
copy(Tags.Blocks.STORAGE_BLOCKS, Tags.Items.STORAGE_BLOCKS)
|
||||
for (blockTag in blockTags.allRegisteredTags) {
|
||||
itemTags[blockTag.name]?.let { copy(blockTag, it) }
|
||||
}
|
||||
|
||||
getOrCreateBuilder(Tags.Items.DUSTS).add(ModItems.ANCIENT_DUST, ModItems.END_POWDER, ModItems.STARDUST)
|
||||
getOrCreateBuilder(Tags.Items.ENDER_PEARLS).add(ModItems.INFUSED_ENDER_PEARL)
|
||||
getOrCreateBuilder(Tags.Items.HEADS).add(ModItems.ENDERMAN_HEAD)
|
||||
getOrCreateBuilder(Tags.Items.INGOTS).add(ModItems.ENDIUM_INGOT, ModItems.INFERNIUM_INGOT, ModItems.DIRTY_INFERNIUM_INGOT)
|
||||
getOrCreateBuilder(Tags.Items.NUGGETS).add(ModItems.ENDIUM_NUGGET)
|
||||
getOrCreateBuilder(Tags.Items.RODS).add(ModItems.OBSIDIAN_ROD)
|
||||
for (item in ModItems.ALL) {
|
||||
val tags = (item as? IHeeItem)?.tags
|
||||
if (!tags.isNullOrEmpty()) {
|
||||
registerTags(item, tags)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun registerTags(item: Item, tags: List<INamedTag<Item>>) {
|
||||
for (tag in tags) {
|
||||
getOrCreateBuilder(tag).addItemEntry(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package chylex.hee.datagen.server.util
|
||||
|
||||
import chylex.hee.system.migration.BlockFlowerPot
|
||||
import com.mojang.datafixers.util.Pair
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.data.DataGenerator
|
||||
@@ -11,7 +10,6 @@ import net.minecraft.loot.LootParameterSets
|
||||
import net.minecraft.loot.LootTable
|
||||
import net.minecraft.loot.LootTable.Builder
|
||||
import net.minecraft.loot.ValidationTracker
|
||||
import net.minecraft.util.IItemProvider
|
||||
import net.minecraft.util.ResourceLocation
|
||||
import java.util.function.BiConsumer
|
||||
import java.util.function.Consumer
|
||||
@@ -33,12 +31,12 @@ abstract class BlockLootTableProvider(generator: DataGenerator) : LootTableProvi
|
||||
protected abstract class RegistrationConsumer : BlockLootTables() {
|
||||
private val lootTables = mutableMapOf<ResourceLocation, Builder>()
|
||||
|
||||
override fun addTables() {}
|
||||
abstract override fun addTables()
|
||||
|
||||
final override fun accept(consumer: BiConsumer<ResourceLocation?, Builder?>) {
|
||||
addTables()
|
||||
|
||||
for((location, table) in lootTables) {
|
||||
for ((location, table) in lootTables) {
|
||||
consumer.accept(location, table)
|
||||
}
|
||||
|
||||
@@ -49,22 +47,6 @@ abstract class BlockLootTableProvider(generator: DataGenerator) : LootTableProvi
|
||||
check(lootTables.put(block.lootTable, table) == null)
|
||||
}
|
||||
|
||||
protected fun dropSelf(block: Block) {
|
||||
registerDropSelfLootTable(block)
|
||||
}
|
||||
|
||||
protected fun dropOther(block: Block, drop: IItemProvider) {
|
||||
registerDropping(block, drop)
|
||||
}
|
||||
|
||||
protected fun dropFunc(block: Block, func: (Block) -> Builder) {
|
||||
registerLootTable(block, func)
|
||||
}
|
||||
|
||||
protected fun dropFlowerPot(block: BlockFlowerPot) {
|
||||
registerFlowerPot(block)
|
||||
}
|
||||
|
||||
protected companion object {
|
||||
val withName = BlockLootTables::droppingWithName
|
||||
}
|
||||
|
@@ -3,5 +3,5 @@ package chylex.hee.datagen.server.util
|
||||
import net.minecraft.data.TagsProvider
|
||||
|
||||
fun <T> TagsProvider.Builder<T>.add(items: List<T>) {
|
||||
items.forEach(this::add)
|
||||
items.forEach(this::addItemEntry)
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"pack": {
|
||||
"description": "Hardcore Ender Expansion 2 (Datagen)",
|
||||
"pack_format": 6,
|
||||
"_comment": ""
|
||||
}
|
||||
"pack": {
|
||||
"description": "Hardcore Ender Expansion 2 (Datagen)",
|
||||
"pack_format": 6,
|
||||
"_comment": ""
|
||||
}
|
||||
}
|
||||
|
@@ -5,26 +5,23 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: "4.1.+", changing: true
|
||||
classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: forge_gradle_version, changing: true
|
||||
classpath group: "org.jetbrains.kotlin", name: "kotlin-gradle-plugin", version: kotlin_version
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url = "https://files.minecraftforge.net/maven" }
|
||||
}
|
||||
|
||||
apply plugin: "net.minecraftforge.gradle"
|
||||
apply plugin: "eclipse"
|
||||
|
||||
minecraft {
|
||||
mappings channel: "snapshot", version: rootProject.mapping_version
|
||||
accessTransformer = file("../../src/main/resources/META-INF/accesstransformer.cfg")
|
||||
setAccessTransformers(rootProject.access_transformers)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "net.minecraftforge:forge:" + mc_version + "-" + forge_version
|
||||
implementation rootProject
|
||||
implementation project(":system")
|
||||
implementation project(":util")
|
||||
}
|
||||
|
||||
jar {
|
143
modules/debug/src/main/java/chylex/hee/client/BuildStick.kt
Normal file
143
modules/debug/src/main/java/chylex/hee/client/BuildStick.kt
Normal file
@@ -0,0 +1,143 @@
|
||||
package chylex.hee.client
|
||||
|
||||
import chylex.hee.client.render.RenderStateBuilder
|
||||
import chylex.hee.client.render.util.DF_ONE
|
||||
import chylex.hee.client.render.util.DF_ZERO
|
||||
import chylex.hee.client.render.util.SF_ONE_MINUS_SRC_ALPHA
|
||||
import chylex.hee.client.render.util.SF_SRC_ALPHA
|
||||
import chylex.hee.client.util.MC
|
||||
import chylex.hee.game.item.util.nbtOrNull
|
||||
import chylex.hee.game.world.util.floodFill
|
||||
import chylex.hee.game.world.util.getBlock
|
||||
import chylex.hee.game.world.util.getState
|
||||
import chylex.hee.game.world.util.isAir
|
||||
import chylex.hee.game.world.util.removeBlock
|
||||
import chylex.hee.game.world.util.setState
|
||||
import chylex.hee.util.nbt.hasKey
|
||||
import net.minecraft.block.BlockState
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats
|
||||
import net.minecraft.entity.player.PlayerEntity
|
||||
import net.minecraft.item.BlockItem
|
||||
import net.minecraft.item.Items
|
||||
import net.minecraft.util.Direction
|
||||
import net.minecraft.util.Direction.DOWN
|
||||
import net.minecraft.util.Direction.EAST
|
||||
import net.minecraft.util.Direction.NORTH
|
||||
import net.minecraft.util.Direction.SOUTH
|
||||
import net.minecraft.util.Direction.UP
|
||||
import net.minecraft.util.Direction.WEST
|
||||
import net.minecraft.util.Hand.MAIN_HAND
|
||||
import net.minecraft.util.Hand.OFF_HAND
|
||||
import net.minecraft.util.math.BlockPos
|
||||
import net.minecraft.util.math.BlockRayTraceResult
|
||||
import net.minecraft.util.math.shapes.ISelectionContext
|
||||
import net.minecraft.world.IWorld
|
||||
import net.minecraftforge.client.event.DrawHighlightEvent
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent.LeftClickBlock
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock
|
||||
import net.minecraftforge.event.world.BlockEvent.BreakEvent
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
import org.lwjgl.opengl.GL11
|
||||
|
||||
object BuildStick {
|
||||
private val RENDER_TYPE_LINE = with(RenderStateBuilder()) {
|
||||
line(2.25)
|
||||
blend(SF_SRC_ALPHA, DF_ONE, SF_ONE_MINUS_SRC_ALPHA, DF_ZERO)
|
||||
layering(RenderStateBuilder.LAYERING_OFFSET_Z)
|
||||
mask(RenderStateBuilder.MASK_COLOR)
|
||||
buildType("hee:debug_line", DefaultVertexFormats.POSITION_COLOR, GL11.GL_LINES, bufferSize = 256)
|
||||
}
|
||||
|
||||
private fun isHoldingBuildStick(player: PlayerEntity): Boolean {
|
||||
val heldItem = player.getHeldItem(MAIN_HAND)
|
||||
return heldItem.item === Items.STICK && heldItem.nbtOrNull.hasKey("HEE_BUILD")
|
||||
}
|
||||
|
||||
private fun getBuildStickBlocks(world: IWorld, pos: BlockPos, state: BlockState, face: Direction): List<BlockPos> {
|
||||
val floodFaces = when (face) {
|
||||
UP, DOWN -> listOf(NORTH, SOUTH, EAST, WEST)
|
||||
NORTH, SOUTH -> listOf(UP, DOWN, EAST, WEST)
|
||||
EAST, WEST -> listOf(UP, DOWN, NORTH, SOUTH)
|
||||
else -> emptyList()
|
||||
}
|
||||
|
||||
val limit = 1000
|
||||
val block = state.block
|
||||
return pos.floodFill(floodFaces, limit) { it.getBlock(world) === block }.takeIf { it.size < limit }.orEmpty()
|
||||
}
|
||||
|
||||
private var lastLeftClickHit: BlockRayTraceResult? = null
|
||||
|
||||
@SubscribeEvent
|
||||
fun onLeftClickBlock(e: LeftClickBlock) {
|
||||
val world = e.world
|
||||
|
||||
if (isHoldingBuildStick(e.player) && !world.isRemote) {
|
||||
lastLeftClickHit = MC.instance.objectMouseOver as? BlockRayTraceResult
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onBlockBreak(e: BreakEvent) {
|
||||
val world = e.world
|
||||
|
||||
if (isHoldingBuildStick(e.player) && !world.isRemote) {
|
||||
val hit = lastLeftClickHit ?: return
|
||||
|
||||
for (pos in getBuildStickBlocks(world, e.pos, e.state, hit.face)) {
|
||||
pos.removeBlock(world)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onRightClickBlock(e: RightClickBlock) {
|
||||
val world = e.world
|
||||
val player = e.player
|
||||
|
||||
if (isHoldingBuildStick(player) && !world.isRemote) {
|
||||
val state = e.pos.getState(world)
|
||||
val face = e.face!!
|
||||
|
||||
val place = (player.getHeldItem(OFF_HAND).item as? BlockItem)?.block?.defaultState ?: state
|
||||
|
||||
for (pos in getBuildStickBlocks(world, e.pos, state, face)) {
|
||||
val offset = pos.offset(face)
|
||||
|
||||
if (offset.isAir(world)) {
|
||||
offset.setState(world, place)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
fun onRenderOverlay(e: DrawHighlightEvent.HighlightBlock) {
|
||||
val player = MC.player!!
|
||||
|
||||
if (isHoldingBuildStick(player)) {
|
||||
val hit = MC.instance.objectMouseOver as? BlockRayTraceResult ?: return
|
||||
val world = player.world
|
||||
val center = hit.pos
|
||||
val info = e.info
|
||||
|
||||
val matrix = e.matrix.last.matrix
|
||||
val builder = e.buffers.getBuffer(RENDER_TYPE_LINE)
|
||||
|
||||
for (pos in getBuildStickBlocks(world, center, center.getState(world), hit.face)) {
|
||||
val x = pos.x - info.projectedView.x
|
||||
val y = pos.y - info.projectedView.y
|
||||
val z = pos.z - info.projectedView.z
|
||||
|
||||
val shape = pos.getState(world).getShape(world, pos, ISelectionContext.forEntity(info.renderViewEntity))
|
||||
|
||||
shape.forEachEdge { x1, y1, z1, x2, y2, z2 ->
|
||||
builder.pos(matrix, (x1 + x).toFloat(), (y1 + y).toFloat(), (z1 + z).toFloat()).color(1F, 1F, 1F, 1F).endVertex()
|
||||
builder.pos(matrix, (x2 + x).toFloat(), (y2 + y).toFloat(), (z2 + z).toFloat()).color(1F, 1F, 1F, 1F).endVertex()
|
||||
}
|
||||
}
|
||||
|
||||
e.isCanceled = true
|
||||
}
|
||||
}
|
||||
}
|
42
modules/debug/src/main/java/chylex/hee/client/DebugMenu.kt
Normal file
42
modules/debug/src/main/java/chylex/hee/client/DebugMenu.kt
Normal file
@@ -0,0 +1,42 @@
|
||||
package chylex.hee.client
|
||||
|
||||
import chylex.hee.client.util.MC
|
||||
import chylex.hee.debug.benchmark.TerritoryGenerationBenchmarkScreen
|
||||
import chylex.hee.util.color.RGB
|
||||
import com.mojang.blaze3d.matrix.MatrixStack
|
||||
import net.minecraft.client.gui.screen.Screen
|
||||
import net.minecraft.client.gui.widget.button.Button
|
||||
import net.minecraft.util.text.StringTextComponent
|
||||
import net.minecraftforge.client.event.InputEvent.KeyInputEvent
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
import org.lwjgl.glfw.GLFW
|
||||
|
||||
object DebugMenu {
|
||||
@SubscribeEvent
|
||||
fun onKeyPressed(e: KeyInputEvent) {
|
||||
if (e.action != GLFW.GLFW_RELEASE) {
|
||||
return
|
||||
}
|
||||
|
||||
if (e.key == GLFW.GLFW_KEY_F12) {
|
||||
MC.instance.displayGuiScreen(DebugMenuScreen(MC.currentScreen))
|
||||
}
|
||||
}
|
||||
|
||||
private class DebugMenuScreen(private val parentScreen: Screen?) : Screen(StringTextComponent("HEE 2 Debug")) {
|
||||
override fun init() {
|
||||
addButton(Button(width / 2 - 100, 36, 200, 20, StringTextComponent("Territory Generation Benchmark")) { MC.instance.displayGuiScreen(TerritoryGenerationBenchmarkScreen(this)) })
|
||||
addButton(Button(width / 2 - 100, height - 40, 200, 20, StringTextComponent("Close")) { closeScreen() })
|
||||
}
|
||||
|
||||
override fun render(matrix: MatrixStack, mouseX: Int, mouseY: Int, partialTicks: Float) {
|
||||
renderBackground(matrix)
|
||||
drawCenteredString(matrix, font, title, width / 2, 15, RGB(255u).i)
|
||||
super.render(matrix, mouseX, mouseY, partialTicks)
|
||||
}
|
||||
|
||||
override fun closeScreen() {
|
||||
MC.instance.displayGuiScreen(parentScreen)
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
package chylex.hee.client
|
||||
|
||||
import chylex.hee.client.util.MC
|
||||
import net.minecraftforge.client.event.InputEvent.KeyInputEvent
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
import org.lwjgl.glfw.GLFW
|
||||
|
||||
object GameModeToggle {
|
||||
@SubscribeEvent
|
||||
fun onKeyPressed(e: KeyInputEvent) {
|
||||
if (e.action != GLFW.GLFW_PRESS) {
|
||||
return
|
||||
}
|
||||
|
||||
if (e.key == GLFW.GLFW_KEY_GRAVE_ACCENT) {
|
||||
val player = MC.player ?: return
|
||||
|
||||
if (player.isCreative) {
|
||||
val ctrl = (e.modifiers and GLFW.GLFW_MOD_CONTROL) != 0
|
||||
player.sendChatMessage(if (ctrl) "/gamemode spectator" else "/gamemode survival")
|
||||
}
|
||||
else {
|
||||
player.sendChatMessage("/gamemode creative")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
package chylex.hee.client
|
||||
|
||||
import chylex.hee.client.render.TerritoryRenderer
|
||||
import chylex.hee.client.util.MC
|
||||
import chylex.hee.game.world.isInEndDimension
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent
|
||||
|
||||
object TerritoryVoidDebug {
|
||||
@SubscribeEvent
|
||||
fun onRenderGameOverlayText(e: RenderGameOverlayEvent.Text) {
|
||||
if (MC.settings.showDebugInfo && MC.player?.isInEndDimension == true) {
|
||||
with(e.left) {
|
||||
add("")
|
||||
add("End Void Factor: ${"%.3f".format(TerritoryRenderer.currentVoidFactor)}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
71
modules/debug/src/main/java/chylex/hee/debug/Debug.kt
Normal file
71
modules/debug/src/main/java/chylex/hee/debug/Debug.kt
Normal file
@@ -0,0 +1,71 @@
|
||||
package chylex.hee.debug
|
||||
|
||||
import chylex.hee.HEE
|
||||
import chylex.hee.client.BuildStick
|
||||
import chylex.hee.client.DebugMenu
|
||||
import chylex.hee.client.GameModeToggle
|
||||
import chylex.hee.client.TerritoryVoidDebug
|
||||
import chylex.hee.game.block.BlockScaffoldingDebug
|
||||
import chylex.hee.game.command.client.CommandClientDebugToggles
|
||||
import chylex.hee.game.command.client.CommandClientScaffolding
|
||||
import chylex.hee.game.command.server.CommandServerInstability
|
||||
import chylex.hee.game.command.server.CommandServerStructure
|
||||
import chylex.hee.game.command.server.CommandServerTerritory
|
||||
import chylex.hee.game.command.server.CommandServerTestWorld
|
||||
import chylex.hee.system.IDebugModule
|
||||
import chylex.hee.util.forge.Side
|
||||
import chylex.hee.util.forge.Sided
|
||||
import chylex.hee.util.forge.SubscribeAllEvents
|
||||
import chylex.hee.util.forge.SubscribeEvent
|
||||
import net.minecraftforge.client.event.GuiOpenEvent
|
||||
import net.minecraftforge.common.MinecraftForge
|
||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus.MOD
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent
|
||||
|
||||
@SubscribeAllEvents(modid = HEE.ID, bus = MOD)
|
||||
internal object Debug : IDebugModule {
|
||||
init {
|
||||
HEE.debug = true
|
||||
HEE.debugModule = this
|
||||
}
|
||||
|
||||
override val clientCommands
|
||||
get() = listOf(
|
||||
CommandClientScaffolding,
|
||||
CommandClientDebugToggles
|
||||
)
|
||||
|
||||
override val serverCommands
|
||||
get() = listOf(
|
||||
CommandServerInstability,
|
||||
CommandServerStructure,
|
||||
CommandServerTerritory,
|
||||
CommandServerTestWorld
|
||||
)
|
||||
|
||||
override val scaffoldingBlockBehavior
|
||||
get() = BlockScaffoldingDebug
|
||||
|
||||
@SubscribeEvent
|
||||
fun onClientSetup(@Suppress("UNUSED_PARAMETER") e: FMLClientSetupEvent) {
|
||||
initializeClient()
|
||||
}
|
||||
|
||||
@Sided(Side.CLIENT)
|
||||
private fun initializeClient() {
|
||||
if (HEE.debug) {
|
||||
MinecraftForge.EVENT_BUS.register(DebugMenu)
|
||||
MinecraftForge.EVENT_BUS.register(BuildStick)
|
||||
MinecraftForge.EVENT_BUS.register(GameModeToggle)
|
||||
MinecraftForge.EVENT_BUS.register(TerritoryVoidDebug)
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(object : Any() {
|
||||
@SubscribeEvent
|
||||
fun onGuiOpen(@Suppress("UNUSED_PARAMETER") e: GuiOpenEvent) {
|
||||
PowerShell.maximizeWindow()
|
||||
MinecraftForge.EVENT_BUS.unregister(this)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
26
modules/debug/src/main/java/chylex/hee/debug/PowerShell.kt
Normal file
26
modules/debug/src/main/java/chylex/hee/debug/PowerShell.kt
Normal file
@@ -0,0 +1,26 @@
|
||||
package chylex.hee.debug
|
||||
|
||||
import chylex.hee.game.Environment
|
||||
import chylex.hee.util.forge.Side
|
||||
import org.apache.commons.lang3.SystemUtils
|
||||
import java.io.File
|
||||
import java.lang.management.ManagementFactory
|
||||
|
||||
internal object PowerShell {
|
||||
private fun canExecutePowershell(scriptName: String): Boolean {
|
||||
return SystemUtils.IS_OS_WINDOWS && Environment.side == Side.CLIENT && File(scriptName).exists()
|
||||
}
|
||||
|
||||
fun setClipboardContents(file: File) {
|
||||
if (canExecutePowershell("filecopy.ps1")) {
|
||||
ProcessBuilder("powershell.exe", "-ExecutionPolicy", "Unrestricted", "-Sta", "-File", "filecopy.ps1", file.absolutePath).start()
|
||||
}
|
||||
}
|
||||
|
||||
fun maximizeWindow() {
|
||||
if (canExecutePowershell("maximize.ps1")) {
|
||||
val pid = ManagementFactory.getRuntimeMXBean().name.split("@")[0]
|
||||
ProcessBuilder("powershell.exe", "-ExecutionPolicy", "Unrestricted", "-File", "maximize.ps1", pid).start()
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,80 @@
|
||||
package chylex.hee.debug.benchmark
|
||||
|
||||
import chylex.hee.HEE
|
||||
import chylex.hee.client.util.MC
|
||||
import chylex.hee.game.Environment
|
||||
import chylex.hee.game.territory.TerritoryType
|
||||
import chylex.hee.game.world.generation.structure.world.SegmentedWorld
|
||||
import chylex.hee.util.color.RGB
|
||||
import com.mojang.blaze3d.matrix.MatrixStack
|
||||
import net.minecraft.client.gui.screen.Screen
|
||||
import net.minecraft.client.gui.widget.button.Button
|
||||
import net.minecraft.util.text.StringTextComponent
|
||||
import net.minecraft.util.text.TranslationTextComponent
|
||||
import net.minecraft.world.World
|
||||
import java.util.Random
|
||||
|
||||
class TerritoryGenerationBenchmarkScreen(private val parentScreen: Screen) : Screen(StringTextComponent("Territory Generation Benchmark")) {
|
||||
private val generated = mutableListOf<SegmentedWorld>()
|
||||
|
||||
override fun init() {
|
||||
try {
|
||||
Environment.getDimension(World.OVERWORLD)
|
||||
} catch (e: NullPointerException) {
|
||||
println("Must be in a world!")
|
||||
closeScreen()
|
||||
return
|
||||
}
|
||||
|
||||
val x = width / 2 - 100
|
||||
addButton(Button(x, 36, 200, 20, StringTextComponent("(All)")) { runAll() })
|
||||
|
||||
for ((index, territory) in TerritoryType.ALL.withIndex()) {
|
||||
val y = 36 + (22 * (index + 1))
|
||||
addButton(Button(x, y, 200, 20, TranslationTextComponent(territory.translationKey)) { runOnce(territory) })
|
||||
}
|
||||
|
||||
addButton(Button(x, height - 40, 200, 20, StringTextComponent("Close")) { closeScreen() })
|
||||
}
|
||||
|
||||
override fun render(matrix: MatrixStack, mouseX: Int, mouseY: Int, partialTicks: Float) {
|
||||
renderBackground(matrix)
|
||||
drawCenteredString(matrix, font, title, width / 2, 15, RGB(255u).i)
|
||||
super.render(matrix, mouseX, mouseY, partialTicks)
|
||||
}
|
||||
|
||||
override fun closeScreen() {
|
||||
MC.instance.displayGuiScreen(parentScreen)
|
||||
}
|
||||
|
||||
private fun runAll() {
|
||||
generated.clear()
|
||||
|
||||
for (territory in TerritoryType.ALL) {
|
||||
if (territory.gen === TerritoryType.Companion.GeneratorDummy) {
|
||||
continue
|
||||
}
|
||||
|
||||
for (seed in 0L until 5L) {
|
||||
runImpl(territory, seed)
|
||||
}
|
||||
}
|
||||
|
||||
HEE.log.info("[TerritoryGenerationBenchmarkScreen] done!")
|
||||
}
|
||||
|
||||
private fun runOnce(territory: TerritoryType) {
|
||||
generated.clear()
|
||||
runImpl(territory, 0L)
|
||||
}
|
||||
|
||||
private fun runImpl(territory: TerritoryType, seed: Long) {
|
||||
HEE.log.info("[TerritoryGenerationBenchmarkScreen] generating " + territory.name)
|
||||
|
||||
val timeStart = System.currentTimeMillis()
|
||||
generated.add(territory.generate(Random(seed)).first)
|
||||
val timeEnd = System.currentTimeMillis()
|
||||
|
||||
HEE.log.info("[TerritoryGenerationBenchmarkScreen] finished in ${timeEnd - timeStart} ms")
|
||||
}
|
||||
}
|
@@ -0,0 +1,102 @@
|
||||
package chylex.hee.game.block
|
||||
|
||||
import chylex.hee.debug.PowerShell
|
||||
import chylex.hee.game.Environment
|
||||
import chylex.hee.game.block.components.IPlayerUseBlockComponent
|
||||
import chylex.hee.game.command.client.CommandClientScaffolding
|
||||
import chylex.hee.game.world.generation.structure.file.StructureFile
|
||||
import chylex.hee.game.world.generation.util.WorldToStructureWorldAdapter
|
||||
import chylex.hee.game.world.util.getBlock
|
||||
import chylex.hee.game.world.util.offsetUntilExcept
|
||||
import chylex.hee.util.math.BoundingBox
|
||||
import chylex.hee.util.math.Pos
|
||||
import net.minecraft.block.BlockState
|
||||
import net.minecraft.block.Blocks
|
||||
import net.minecraft.entity.player.PlayerEntity
|
||||
import net.minecraft.nbt.CompressedStreamTools
|
||||
import net.minecraft.util.ActionResultType
|
||||
import net.minecraft.util.ActionResultType.FAIL
|
||||
import net.minecraft.util.ActionResultType.SUCCESS
|
||||
import net.minecraft.util.Direction
|
||||
import net.minecraft.util.Direction.DOWN
|
||||
import net.minecraft.util.Direction.EAST
|
||||
import net.minecraft.util.Direction.NORTH
|
||||
import net.minecraft.util.Direction.SOUTH
|
||||
import net.minecraft.util.Direction.UP
|
||||
import net.minecraft.util.Direction.WEST
|
||||
import net.minecraft.util.Hand
|
||||
import net.minecraft.util.Util
|
||||
import net.minecraft.util.math.BlockPos
|
||||
import net.minecraft.util.text.StringTextComponent
|
||||
import net.minecraft.util.text.TextFormatting
|
||||
import net.minecraft.world.World
|
||||
import java.nio.file.Files
|
||||
|
||||
object BlockScaffoldingDebug : IPlayerUseBlockComponent {
|
||||
override fun use(state: BlockState, world: World, pos: BlockPos, player: PlayerEntity, hand: Hand): ActionResultType {
|
||||
if (world.isRemote && player.isSneaking && !player.abilities.isFlying) {
|
||||
val palette = CommandClientScaffolding.currentPalette
|
||||
|
||||
if (palette == null) {
|
||||
player.sendMessage(StringTextComponent("No structure set."), Util.DUMMY_UUID)
|
||||
return FAIL
|
||||
}
|
||||
|
||||
val minPos = findMinPos(world, pos)?.let { findMinPos(world, it) } // double pass to find min from any side
|
||||
val maxPos = minPos?.let { findMaxPos(world, it) }
|
||||
|
||||
if (minPos == null || maxPos == null) {
|
||||
player.sendMessage(StringTextComponent("Could not find structure boundaries."), Util.DUMMY_UUID)
|
||||
return FAIL
|
||||
}
|
||||
|
||||
val box = BoundingBox(minPos, maxPos)
|
||||
val serverWorld = Environment.getDimension(world.dimensionKey)
|
||||
|
||||
val (structureTag, missingMappings) = StructureFile.save(WorldToStructureWorldAdapter(serverWorld, serverWorld.rand, box.min), box.size, palette, state.block)
|
||||
val structureFile = Files.createTempDirectory("HardcoreEnderExpansion_Structure_").resolve(CommandClientScaffolding.currentFile).toFile()
|
||||
|
||||
CompressedStreamTools.write(structureTag, structureFile)
|
||||
PowerShell.setClipboardContents(structureFile)
|
||||
|
||||
if (missingMappings.isNotEmpty()) {
|
||||
player.sendMessage(StringTextComponent("Missing mappings for states:"), Util.DUMMY_UUID)
|
||||
|
||||
for (missingMapping in missingMappings) {
|
||||
player.sendMessage(StringTextComponent(" - ${TextFormatting.GRAY}$missingMapping"), Util.DUMMY_UUID)
|
||||
}
|
||||
}
|
||||
|
||||
player.sendMessage(StringTextComponent("Generated structure file of ${box.size}."), Util.DUMMY_UUID)
|
||||
return SUCCESS
|
||||
}
|
||||
|
||||
return FAIL
|
||||
}
|
||||
|
||||
// Helpers
|
||||
|
||||
private fun find(world: World, pos: BlockPos?, direction: Direction): BlockPos? {
|
||||
return pos?.offsetUntilExcept(direction, 0..255) { it.getBlock(world) === Blocks.AIR }
|
||||
}
|
||||
|
||||
private fun findMinPos(world: World, pos: BlockPos): BlockPos? {
|
||||
val bottomPos = find(world, pos, DOWN)
|
||||
|
||||
val y = bottomPos?.y
|
||||
val x = find(world, bottomPos, WEST)?.x
|
||||
val z = find(world, bottomPos, NORTH)?.z
|
||||
|
||||
return if (x == null || y == null || z == null) null else Pos(x, y, z)
|
||||
}
|
||||
|
||||
private fun findMaxPos(world: World, pos: BlockPos): BlockPos? {
|
||||
val topPos = find(world, pos, UP)
|
||||
|
||||
val y = topPos?.y
|
||||
val x = find(world, topPos, EAST)?.x
|
||||
val z = find(world, topPos, SOUTH)?.z
|
||||
|
||||
return if (x == null || y == null || z == null) null else Pos(x, y, z)
|
||||
}
|
||||
}
|
@@ -1,14 +1,15 @@
|
||||
package chylex.hee.commands.client
|
||||
package chylex.hee.game.command.client
|
||||
|
||||
import chylex.hee.client.render.TerritoryRenderer
|
||||
import chylex.hee.commands.IClientCommand
|
||||
import chylex.hee.game.world.territory.TerritoryVoid
|
||||
import chylex.hee.init.ModBlocks
|
||||
import chylex.hee.game.block.BlockScaffolding
|
||||
import chylex.hee.game.command.IClientCommand
|
||||
import chylex.hee.game.territory.TerritoryVoid
|
||||
import net.minecraft.command.CommandSource
|
||||
import net.minecraft.util.text.StringTextComponent
|
||||
|
||||
object CommandDebugToggles : IClientCommand {
|
||||
object CommandClientDebugToggles : IClientCommand {
|
||||
override val name = "debug"
|
||||
override val description = "access to debug toggles"
|
||||
|
||||
private var debug = false
|
||||
|
||||
@@ -22,8 +23,8 @@ object CommandDebugToggles : IClientCommand {
|
||||
sender.sendFeedback(StringTextComponent("Territory debugging ${if (debug) "enabled" else "disabled"}."), false)
|
||||
}
|
||||
else if (name == "scaffolding") {
|
||||
ModBlocks.SCAFFOLDING.enableShape = !ModBlocks.SCAFFOLDING.enableShape
|
||||
sender.sendFeedback(StringTextComponent("Scaffolding shape ${if (ModBlocks.SCAFFOLDING.enableShape) "enabled" else "disabled"}."), false)
|
||||
BlockScaffolding.enableShape = !BlockScaffolding.enableShape
|
||||
sender.sendFeedback(StringTextComponent("Scaffolding shape ${if (BlockScaffolding.enableShape) "enabled" else "disabled"}."), false)
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,19 +1,20 @@
|
||||
package chylex.hee.commands.client
|
||||
package chylex.hee.game.command.client
|
||||
|
||||
import chylex.hee.commands.IClientCommand
|
||||
import chylex.hee.commands.server.CommandDebugStructure
|
||||
import chylex.hee.game.command.IClientCommand
|
||||
import chylex.hee.game.command.server.CommandServerStructure
|
||||
import net.minecraft.command.CommandSource
|
||||
import net.minecraft.util.text.StringTextComponent
|
||||
import java.util.prefs.Preferences
|
||||
|
||||
object CommandClientScaffolding : IClientCommand {
|
||||
override val name = "scaffolding"
|
||||
override val description = "sets current structure palette"
|
||||
|
||||
private val data
|
||||
get() = Preferences.userRoot().node("chylex-hee-scaffolding")
|
||||
|
||||
val currentPalette
|
||||
get() = data.get("Structure", null)?.let(CommandDebugStructure.structureDescriptions::get)?.PALETTE
|
||||
get() = data.get("Structure", null)?.let(CommandServerStructure.structureDescriptions::get)?.PALETTE
|
||||
|
||||
val currentFile
|
||||
get() = data.get("File", "")!!.ifBlank { "structure.nbt" }
|
||||
@@ -21,7 +22,7 @@ object CommandClientScaffolding : IClientCommand {
|
||||
override fun executeCommand(sender: CommandSource, args: Array<String>) {
|
||||
val structure = args.getOrNull(0) ?: return
|
||||
|
||||
if (!CommandDebugStructure.structureDescriptions.containsKey(structure)) {
|
||||
if (!CommandServerStructure.structureDescriptions.containsKey(structure)) {
|
||||
sender.sendFeedback(StringTextComponent("Unknown structure."), false)
|
||||
return
|
||||
}
|
@@ -1,12 +1,12 @@
|
||||
package chylex.hee.commands.server
|
||||
package chylex.hee.game.command.server
|
||||
|
||||
import chylex.hee.commands.ICommand
|
||||
import chylex.hee.commands.executes
|
||||
import chylex.hee.commands.getInt
|
||||
import chylex.hee.game.command.ICommand
|
||||
import chylex.hee.game.command.util.executes
|
||||
import chylex.hee.game.command.util.getInt
|
||||
import chylex.hee.game.mechanics.instability.Instability
|
||||
import chylex.hee.game.mechanics.instability.dimension.DimensionInstabilityNull
|
||||
import chylex.hee.game.mechanics.instability.dimension.IDimensionInstability
|
||||
import chylex.hee.game.world.Pos
|
||||
import chylex.hee.util.math.Pos
|
||||
import com.mojang.brigadier.arguments.IntegerArgumentType.integer
|
||||
import com.mojang.brigadier.builder.ArgumentBuilder
|
||||
import com.mojang.brigadier.context.CommandContext
|
||||
@@ -15,8 +15,9 @@ import net.minecraft.command.Commands.argument
|
||||
import net.minecraft.command.Commands.literal
|
||||
import net.minecraft.util.text.StringTextComponent
|
||||
|
||||
object CommandDebugInstability : ICommand {
|
||||
object CommandServerInstability : ICommand {
|
||||
override val name = "instability"
|
||||
override val description = "utilities for instability"
|
||||
|
||||
override fun register(builder: ArgumentBuilder<CommandSource, *>) {
|
||||
val execModify = this::executeModify
|
@@ -1,24 +1,25 @@
|
||||
package chylex.hee.commands.server
|
||||
package chylex.hee.game.command.server
|
||||
|
||||
import chylex.hee.commands.ICommand
|
||||
import chylex.hee.commands.arguments.ValidatedStringArgument.Companion.validatedString
|
||||
import chylex.hee.commands.executes
|
||||
import chylex.hee.commands.getLong
|
||||
import chylex.hee.commands.getString
|
||||
import chylex.hee.commands.returning
|
||||
import chylex.hee.game.world.Pos
|
||||
import chylex.hee.game.world.feature.energyshrine.EnergyShrinePieces
|
||||
import chylex.hee.game.world.feature.obsidiantower.ObsidianTowerPieces
|
||||
import chylex.hee.game.world.feature.stronghold.StrongholdPieces
|
||||
import chylex.hee.game.world.feature.tombdungeon.TombDungeonPieces
|
||||
import chylex.hee.game.command.ICommand
|
||||
import chylex.hee.game.command.argument.ValidatedStringArgument.Companion.validatedString
|
||||
import chylex.hee.game.command.util.executes
|
||||
import chylex.hee.game.command.util.getLong
|
||||
import chylex.hee.game.command.util.getString
|
||||
import chylex.hee.game.command.util.simpleCommand
|
||||
import chylex.hee.game.world.generation.IBlockPicker.Single
|
||||
import chylex.hee.game.world.generation.WorldToStructureWorldAdapter
|
||||
import chylex.hee.game.world.math.PosXZ
|
||||
import chylex.hee.game.world.math.Transform
|
||||
import chylex.hee.game.world.structure.IStructurePieceFromFile
|
||||
import chylex.hee.game.world.structure.StructureFile
|
||||
import chylex.hee.game.world.structure.StructureFiles
|
||||
import chylex.hee.game.world.structure.world.TransformedStructureWorld
|
||||
import chylex.hee.game.world.generation.feature.energyshrine.EnergyShrinePieces
|
||||
import chylex.hee.game.world.generation.feature.obsidiantower.ObsidianTowerPieces
|
||||
import chylex.hee.game.world.generation.feature.stronghold.StrongholdPieces
|
||||
import chylex.hee.game.world.generation.feature.tombdungeon.TombDungeonPieces
|
||||
import chylex.hee.game.world.generation.structure.file.IStructurePieceFromFile
|
||||
import chylex.hee.game.world.generation.structure.file.StructureFile
|
||||
import chylex.hee.game.world.generation.structure.file.StructureFiles
|
||||
import chylex.hee.game.world.generation.structure.world.TransformedStructureWorld
|
||||
import chylex.hee.game.world.generation.util.WorldToStructureWorldAdapter
|
||||
import chylex.hee.game.world.util.Transform
|
||||
import chylex.hee.init.ModBlocks
|
||||
import chylex.hee.util.math.Pos
|
||||
import chylex.hee.util.math.PosXZ
|
||||
import com.mojang.brigadier.arguments.LongArgumentType.longArg
|
||||
import com.mojang.brigadier.builder.ArgumentBuilder
|
||||
import com.mojang.brigadier.context.CommandContext
|
||||
@@ -30,7 +31,7 @@ import net.minecraft.util.Rotation
|
||||
import net.minecraft.util.text.StringTextComponent
|
||||
import java.util.Random
|
||||
|
||||
object CommandDebugStructure : ICommand {
|
||||
object CommandServerStructure : ICommand {
|
||||
val structureDescriptions = mapOf(
|
||||
"stronghold" to StrongholdPieces,
|
||||
"energyshrine" to EnergyShrinePieces,
|
||||
@@ -39,6 +40,7 @@ object CommandDebugStructure : ICommand {
|
||||
)
|
||||
|
||||
override val name = "structure"
|
||||
override val description = "utilities for custom structures"
|
||||
|
||||
override fun register(builder: ArgumentBuilder<CommandSource, *>) {
|
||||
val execPieces = this::executePieces
|
||||
@@ -68,22 +70,22 @@ object CommandDebugStructure : ICommand {
|
||||
)
|
||||
}
|
||||
|
||||
private fun executeResetCache(ctx: CommandContext<CommandSource>) = returning(1) {
|
||||
private fun executeResetCache(ctx: CommandContext<CommandSource>) = simpleCommand {
|
||||
StructureFiles.resetCache()
|
||||
ctx.source.sendFeedback(StringTextComponent("Done."), false)
|
||||
}
|
||||
|
||||
private fun executePieces(ctx: CommandContext<CommandSource>, transforms: List<Transform>) = returning(1) {
|
||||
private fun executePieces(ctx: CommandContext<CommandSource>, transforms: List<Transform>) = simpleCommand {
|
||||
val world = ctx.source.world
|
||||
val pos = Pos(ctx.source.pos)
|
||||
|
||||
val structure = structureDescriptions.getValue(ctx.getString("structure"))
|
||||
var x = 0
|
||||
|
||||
for(piece in structure.ALL_PIECES) {
|
||||
for (piece in structure.ALL_PIECES) {
|
||||
val size = piece.size
|
||||
|
||||
for((index, transform) in transforms.withIndex()) {
|
||||
for ((index, transform) in transforms.withIndex()) {
|
||||
val adaptedWorld = WorldToStructureWorldAdapter(world, world.rand, pos.add(x, index * (size.y + 2), -size.centerZ))
|
||||
val transformedWorld = TransformedStructureWorld(adaptedWorld, size, transform)
|
||||
|
||||
@@ -95,7 +97,7 @@ object CommandDebugStructure : ICommand {
|
||||
}
|
||||
}
|
||||
|
||||
private fun executePiecesDev(ctx: CommandContext<CommandSource>, hasTransformArg: Boolean) = returning(1) {
|
||||
private fun executePiecesDev(ctx: CommandContext<CommandSource>, hasTransformArg: Boolean) = simpleCommand {
|
||||
val world = ctx.source.world
|
||||
val pos = Pos(ctx.source.pos)
|
||||
|
||||
@@ -105,7 +107,7 @@ object CommandDebugStructure : ICommand {
|
||||
val transformArg = if (hasTransformArg) ctx.getString("transform") else "0"
|
||||
val mirror = transformArg[0] == 'M'
|
||||
|
||||
val transform = when(transformArg.trimStart('M')) {
|
||||
val transform = when (transformArg.trimStart('M')) {
|
||||
"0" -> Transform(Rotation.NONE, mirror)
|
||||
"90" -> Transform(Rotation.CLOCKWISE_90, mirror)
|
||||
"180" -> Transform(Rotation.CLOCKWISE_180, mirror)
|
||||
@@ -113,12 +115,12 @@ object CommandDebugStructure : ICommand {
|
||||
else -> return 0
|
||||
}
|
||||
|
||||
for(piece in structure.ALL_PIECES) {
|
||||
for (piece in structure.ALL_PIECES) {
|
||||
if (piece is IStructurePieceFromFile) {
|
||||
val adaptedWorld = WorldToStructureWorldAdapter(world, world.rand, pos.add(x, 0, -piece.size.centerZ))
|
||||
val transformedWorld = TransformedStructureWorld(adaptedWorld, piece.size, transform)
|
||||
|
||||
StructureFile.spawn(transformedWorld, piece, structure.PALETTE)
|
||||
StructureFile.spawn(transformedWorld, piece, structure.PALETTE, ModBlocks.SCAFFOLDING)
|
||||
x += transform(piece.size).x + 2
|
||||
}
|
||||
}
|
||||
@@ -131,7 +133,7 @@ object CommandDebugStructure : ICommand {
|
||||
val rand = Random(if (hasSeedArg) ctx.getLong("seed") else world.rand.nextLong())
|
||||
val world = WorldToStructureWorldAdapter(world, rand, Pos(pos).subtract(structure.STRUCTURE_SIZE.centerPos))
|
||||
|
||||
for(attempt in 1..100) {
|
||||
for (attempt in 1..100) {
|
||||
val builder = structure.STRUCTURE_BUILDER.build(rand)
|
||||
|
||||
if (builder != null) {
|
@@ -1,30 +1,31 @@
|
||||
package chylex.hee.commands.server
|
||||
package chylex.hee.game.command.server
|
||||
|
||||
import chylex.hee.commands.ICommand
|
||||
import chylex.hee.commands.executes
|
||||
import chylex.hee.commands.getLong
|
||||
import chylex.hee.game.world.FLAG_REPLACE_NO_DROPS
|
||||
import chylex.hee.game.world.FLAG_SYNC_CLIENT
|
||||
import chylex.hee.game.world.Pos
|
||||
import chylex.hee.game.world.component1
|
||||
import chylex.hee.game.world.component2
|
||||
import chylex.hee.game.world.getState
|
||||
import chylex.hee.game.command.ICommand
|
||||
import chylex.hee.game.command.util.executes
|
||||
import chylex.hee.game.command.util.getLong
|
||||
import chylex.hee.game.territory.system.TerritoryInstance
|
||||
import chylex.hee.game.world.isEndDimension
|
||||
import chylex.hee.game.world.math.Transform
|
||||
import chylex.hee.game.world.setState
|
||||
import chylex.hee.game.world.territory.TerritoryInstance
|
||||
import chylex.hee.system.migration.EntityPlayer
|
||||
import chylex.hee.game.world.util.FLAG_REPLACE_NO_DROPS
|
||||
import chylex.hee.game.world.util.FLAG_SYNC_CLIENT
|
||||
import chylex.hee.game.world.util.Transform
|
||||
import chylex.hee.game.world.util.getState
|
||||
import chylex.hee.game.world.util.setState
|
||||
import chylex.hee.util.math.Pos
|
||||
import chylex.hee.util.math.component1
|
||||
import chylex.hee.util.math.component2
|
||||
import com.mojang.brigadier.arguments.LongArgumentType.longArg
|
||||
import com.mojang.brigadier.builder.ArgumentBuilder
|
||||
import com.mojang.brigadier.context.CommandContext
|
||||
import net.minecraft.command.CommandSource
|
||||
import net.minecraft.command.Commands.argument
|
||||
import net.minecraft.command.Commands.literal
|
||||
import net.minecraft.entity.player.PlayerEntity
|
||||
import net.minecraft.util.text.StringTextComponent
|
||||
import java.util.Random
|
||||
|
||||
object CommandDebugTerritory : ICommand {
|
||||
object CommandServerTerritory : ICommand {
|
||||
override val name = "territory"
|
||||
override val description = "utilities for territories"
|
||||
|
||||
override fun register(builder: ArgumentBuilder<CommandSource, *>) {
|
||||
val execRegenerate = this::executeRegenerate
|
||||
@@ -71,15 +72,15 @@ object CommandDebugTerritory : ICommand {
|
||||
val startChunkBlockX = startChunkX * 16
|
||||
val startChunkBlockZ = startChunkZ * 16
|
||||
|
||||
for(chunkX in startChunkX until (startChunkX + chunks))
|
||||
for(chunkZ in startChunkZ until (startChunkZ + chunks)) {
|
||||
for (chunkX in startChunkX until (startChunkX + chunks))
|
||||
for (chunkZ in startChunkZ until (startChunkZ + chunks)) {
|
||||
val chunk = world.getChunk(chunkX, chunkZ)
|
||||
|
||||
for(entity in chunk.entityLists.flatMap { it }.filter { it !is EntityPlayer }) {
|
||||
for (entity in chunk.entityLists.flatMap { it }.filter { it !is PlayerEntity }) {
|
||||
entity.remove()
|
||||
}
|
||||
|
||||
for(tilePos in chunk.tileEntitiesPos) {
|
||||
for (tilePos in chunk.tileEntitiesPos) {
|
||||
world.removeTileEntity(tilePos)
|
||||
}
|
||||
|
||||
@@ -87,7 +88,7 @@ object CommandDebugTerritory : ICommand {
|
||||
val chunkBlockZ = chunkZ * 16
|
||||
val internalOffset = Pos(chunkBlockX - startChunkBlockX, 0, chunkBlockZ - startChunkBlockZ)
|
||||
|
||||
for(blockY in 0 until height) for(blockX in 0..15) for(blockZ in 0..15) {
|
||||
for (blockY in 0 until height) for (blockX in 0..15) for (blockZ in 0..15) {
|
||||
val state = constructed.getState(internalOffset.add(blockX, blockY, blockZ))
|
||||
|
||||
Pos(chunkBlockX + blockX, bottomOffset + blockY, chunkBlockZ + blockZ).let {
|
||||
@@ -98,7 +99,7 @@ object CommandDebugTerritory : ICommand {
|
||||
}
|
||||
}
|
||||
|
||||
for((triggerPos, trigger) in constructed.getTriggers()) {
|
||||
for ((triggerPos, trigger) in constructed.getTriggers()) {
|
||||
trigger.realize(world, triggerPos.add(startChunkBlockX, bottomOffset, startChunkBlockZ), Transform.NONE)
|
||||
}
|
||||
|
@@ -1,20 +1,21 @@
|
||||
package chylex.hee.commands.server
|
||||
package chylex.hee.game.command.server
|
||||
|
||||
import chylex.hee.commands.CommandExecutionFunction
|
||||
import chylex.hee.commands.ICommand
|
||||
import chylex.hee.commands.returning
|
||||
import chylex.hee.game.command.ICommand
|
||||
import chylex.hee.game.command.util.CommandExecutionFunction
|
||||
import chylex.hee.game.command.util.simpleCommand
|
||||
import com.mojang.brigadier.builder.ArgumentBuilder
|
||||
import com.mojang.brigadier.context.CommandContext
|
||||
import net.minecraft.command.CommandSource
|
||||
|
||||
object CommandDebugTestWorld : ICommand, CommandExecutionFunction {
|
||||
object CommandServerTestWorld : ICommand, CommandExecutionFunction {
|
||||
override val name = "testworld"
|
||||
override val description = "converts overworld into a test world"
|
||||
|
||||
override fun register(builder: ArgumentBuilder<CommandSource, *>) {
|
||||
builder.executes(this)
|
||||
}
|
||||
|
||||
override fun run(ctx: CommandContext<CommandSource>) = returning(1) {
|
||||
override fun run(ctx: CommandContext<CommandSource>) = simpleCommand {
|
||||
val source = ctx.source
|
||||
|
||||
with(source.server.commandManager) {
|
7
modules/debug/src/main/resources/pack.mcmeta
Normal file
7
modules/debug/src/main/resources/pack.mcmeta
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"pack": {
|
||||
"description": "Hardcore Ender Expansion 2 (Debug Library)",
|
||||
"pack_format": 6,
|
||||
"_comment": ""
|
||||
}
|
||||
}
|
31
modules/system/build.gradle
Normal file
31
modules/system/build.gradle
Normal file
@@ -0,0 +1,31 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url = "https://files.minecraftforge.net/maven" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: forge_gradle_version, changing: true
|
||||
classpath group: "org.jetbrains.kotlin", name: "kotlin-gradle-plugin", version: kotlin_version
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: "net.minecraftforge.gradle"
|
||||
|
||||
minecraft {
|
||||
mappings channel: "snapshot", version: rootProject.mapping_version
|
||||
setAccessTransformers(rootProject.access_transformers)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "net.minecraftforge:forge:" + mc_version + "-" + forge_version
|
||||
implementation project(":util")
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes([
|
||||
"FMLModType": "LIBRARY"
|
||||
])
|
||||
}
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
package chylex.hee
|
||||
|
||||
import chylex.hee.proxy.ISidedProxy
|
||||
import chylex.hee.system.facades.Resource
|
||||
import chylex.hee.game.Resource
|
||||
import chylex.hee.system.IDebugModule
|
||||
import net.minecraft.util.RegistryKey
|
||||
import net.minecraft.util.registry.Registry
|
||||
import net.minecraft.world.World
|
||||
@@ -12,7 +12,10 @@ object HEE {
|
||||
const val ID = "hee"
|
||||
|
||||
lateinit var version: String
|
||||
lateinit var proxy: ISidedProxy
|
||||
|
||||
@JvmField
|
||||
var debug = false
|
||||
var debugModule: IDebugModule? = null
|
||||
|
||||
val log: Logger = LogManager.getLogger("HardcoreEnderExpansion")
|
||||
val dim: RegistryKey<World> = RegistryKey.getOrCreateKey(Registry.WORLD_KEY, Resource.Custom("end"))
|
@@ -1,8 +1,8 @@
|
||||
package chylex.hee.client
|
||||
|
||||
import chylex.hee.HEE
|
||||
import chylex.hee.system.facades.Resource
|
||||
import chylex.hee.system.migration.supply
|
||||
import chylex.hee.game.Resource
|
||||
import chylex.hee.util.forge.supply
|
||||
import net.minecraft.client.Minecraft
|
||||
import net.minecraft.resources.IPackFinder
|
||||
import net.minecraft.resources.IPackNameDecorator
|
||||
@@ -15,6 +15,8 @@ import net.minecraftforge.fml.packs.ResourcePackLoader
|
||||
import java.util.function.Consumer
|
||||
|
||||
object VanillaResourceOverrides : IPackFinder {
|
||||
const val PACK_NAME = "Hardcore Ender Expansion 2"
|
||||
|
||||
fun register() {
|
||||
// Minecraft is null when running datagen, but I cannot move this to FMLClientSetupEvent because it only runs after all resource packs are initialized
|
||||
with(Minecraft.getInstance() ?: return) {
|
||||
@@ -26,15 +28,18 @@ object VanillaResourceOverrides : IPackFinder {
|
||||
val delegate = ResourcePackLoader.getResourcePackFor(HEE.ID).get()
|
||||
val supplier = supply<IResourcePack>(Pack(delegate))
|
||||
|
||||
output.accept(ResourcePackInfo.createResourcePack("HEE 2", true /* isAlwaysEnabled */, supplier, factory, Priority.TOP, IPackNameDecorator.BUILTIN)!!)
|
||||
output.accept(ResourcePackInfo.createResourcePack(PACK_NAME, true /* isAlwaysEnabled */, supplier, factory, Priority.TOP, IPackNameDecorator.BUILTIN)!!)
|
||||
}
|
||||
|
||||
private class Pack(delegate: IResourcePack) : IResourcePack by delegate {
|
||||
override fun getName() = "Hardcore Ender Expansion 2"
|
||||
override fun getName() = PACK_NAME
|
||||
override fun isHidden() = true // minecraft doesn't remember the order across restarts anyway
|
||||
|
||||
override fun getResourceNamespaces(type: ResourcePackType): MutableSet<String> {
|
||||
return mutableSetOf(Resource.NAMESPACE_VANILLA)
|
||||
return if (type == ResourcePackType.CLIENT_RESOURCES)
|
||||
mutableSetOf(Resource.NAMESPACE_VANILLA)
|
||||
else
|
||||
mutableSetOf()
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,10 +1,10 @@
|
||||
package chylex.hee.client.color
|
||||
|
||||
import chylex.hee.client.MC
|
||||
import chylex.hee.system.color.HCL
|
||||
import chylex.hee.system.forge.Side
|
||||
import chylex.hee.system.forge.Sided
|
||||
import chylex.hee.system.math.offsetTowards
|
||||
import chylex.hee.client.util.MC
|
||||
import chylex.hee.util.color.space.HCL
|
||||
import chylex.hee.util.forge.Side
|
||||
import chylex.hee.util.forge.Sided
|
||||
import chylex.hee.util.math.lerp
|
||||
|
||||
@Sided(Side.CLIENT)
|
||||
class ColorTransition(private val defaultColor: HCL, private val transitionDuration: Float) {
|
||||
@@ -72,8 +72,8 @@ class ColorTransition(private val defaultColor: HCL, private val transitionDurat
|
||||
|
||||
return HCL(
|
||||
hue = hueSource.hue,
|
||||
chroma = offsetTowards(currentFrom.chroma, transitionTo.chroma, currentProgress),
|
||||
luminance = offsetTowards(currentFrom.luminance, transitionTo.luminance, currentProgress)
|
||||
chroma = lerp(currentFrom.chroma, transitionTo.chroma, currentProgress),
|
||||
luminance = lerp(currentFrom.luminance, transitionTo.luminance, currentProgress)
|
||||
)
|
||||
}
|
||||
}
|
@@ -1,11 +1,11 @@
|
||||
package chylex.hee.client.gui.base
|
||||
package chylex.hee.client.gui.screen
|
||||
|
||||
import chylex.hee.client.render.gl.GL
|
||||
import chylex.hee.game.inventory.size
|
||||
import chylex.hee.system.color.IntColor.Companion.RGB
|
||||
import chylex.hee.system.facades.Resource
|
||||
import chylex.hee.system.forge.Side
|
||||
import chylex.hee.system.forge.Sided
|
||||
import chylex.hee.client.render.util.GL
|
||||
import chylex.hee.game.Resource
|
||||
import chylex.hee.game.inventory.util.size
|
||||
import chylex.hee.util.color.RGB
|
||||
import chylex.hee.util.forge.Side
|
||||
import chylex.hee.util.forge.Sided
|
||||
import com.mojang.blaze3d.matrix.MatrixStack
|
||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen
|
||||
import net.minecraft.entity.player.PlayerInventory
|
||||
@@ -13,7 +13,7 @@ import net.minecraft.inventory.container.ChestContainer
|
||||
import net.minecraft.util.text.ITextComponent
|
||||
|
||||
@Sided(Side.CLIENT)
|
||||
abstract class GuiBaseChestContainer<T : ChestContainer>(container: T, inventory: PlayerInventory, title: ITextComponent) : ContainerScreen<T>(container, inventory, title) {
|
||||
abstract class AbstractChestContainerScreen<T : ChestContainer>(container: T, inventory: PlayerInventory, title: ITextComponent) : ContainerScreen<T>(container, inventory, title) {
|
||||
private companion object {
|
||||
private val TEX_BACKGROUND = Resource.Vanilla("textures/gui/container/generic_54.png")
|
||||
private val COLOR_TEXT = RGB(64u).i
|
@@ -1,10 +1,10 @@
|
||||
package chylex.hee.client.gui.base
|
||||
package chylex.hee.client.gui.screen
|
||||
|
||||
import chylex.hee.client.render.gl.GL
|
||||
import chylex.hee.game.container.base.ContainerBaseCustomInventory
|
||||
import chylex.hee.system.color.IntColor.Companion.RGB
|
||||
import chylex.hee.system.forge.Side
|
||||
import chylex.hee.system.forge.Sided
|
||||
import chylex.hee.client.render.util.GL
|
||||
import chylex.hee.game.container.AbstractCustomInventoryContainer
|
||||
import chylex.hee.util.color.RGB
|
||||
import chylex.hee.util.forge.Side
|
||||
import chylex.hee.util.forge.Sided
|
||||
import com.mojang.blaze3d.matrix.MatrixStack
|
||||
import net.minecraft.client.gui.screen.inventory.ContainerScreen
|
||||
import net.minecraft.entity.player.PlayerInventory
|
||||
@@ -12,7 +12,7 @@ import net.minecraft.util.ResourceLocation
|
||||
import net.minecraft.util.text.ITextComponent
|
||||
|
||||
@Sided(Side.CLIENT)
|
||||
abstract class GuiBaseCustomInventory<T : ContainerBaseCustomInventory<*>>(container: T, inventory: PlayerInventory, title: ITextComponent) : ContainerScreen<T>(container, inventory, title) {
|
||||
abstract class AbstractCustomInventoryScreen<T : AbstractCustomInventoryContainer<*>>(container: T, inventory: PlayerInventory, title: ITextComponent) : ContainerScreen<T>(container, inventory, title) {
|
||||
private companion object {
|
||||
private val COLOR_TEXT = RGB(64u).i
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
package chylex.hee.client.render
|
||||
|
||||
import chylex.hee.system.forge.Side
|
||||
import chylex.hee.system.forge.Sided
|
||||
import chylex.hee.util.forge.Side
|
||||
import chylex.hee.util.forge.Sided
|
||||
import com.mojang.blaze3d.matrix.MatrixStack
|
||||
import net.minecraft.client.Minecraft
|
||||
import net.minecraft.client.world.ClientWorld
|
@@ -1,4 +1,4 @@
|
||||
package chylex.hee.client.render.gl
|
||||
package chylex.hee.client.render
|
||||
|
||||
import com.mojang.blaze3d.platform.GlStateManager.DestFactor
|
||||
import com.mojang.blaze3d.platform.GlStateManager.SourceFactor
|
@@ -1,13 +1,10 @@
|
||||
package chylex.hee.client.render.territory
|
||||
package chylex.hee.client.render.world
|
||||
|
||||
import chylex.hee.client.MC
|
||||
import chylex.hee.client.render.TerritoryRenderer
|
||||
import chylex.hee.client.render.gl.GL
|
||||
import chylex.hee.system.facades.Resource
|
||||
import chylex.hee.system.forge.Side
|
||||
import chylex.hee.system.forge.Sided
|
||||
import chylex.hee.system.math.Vec3
|
||||
import chylex.hee.system.math.remapRange
|
||||
import chylex.hee.client.render.util.GL
|
||||
import chylex.hee.game.Resource
|
||||
import chylex.hee.util.forge.Side
|
||||
import chylex.hee.util.forge.Sided
|
||||
import chylex.hee.util.math.Vec3
|
||||
import com.mojang.blaze3d.matrix.MatrixStack
|
||||
import net.minecraft.client.Minecraft
|
||||
import net.minecraft.client.renderer.RenderHelper
|
||||
@@ -16,22 +13,9 @@ import net.minecraft.client.renderer.vertex.DefaultVertexFormats
|
||||
import net.minecraft.client.world.ClientWorld
|
||||
import net.minecraftforge.client.ISkyRenderHandler
|
||||
import org.lwjgl.opengl.GL11.GL_QUADS
|
||||
import kotlin.math.pow
|
||||
|
||||
abstract class AbstractEnvironmentRenderer : ISkyRenderHandler {
|
||||
companion object {
|
||||
val currentSkyAlpha
|
||||
@Sided(Side.CLIENT)
|
||||
get() = remapRange(TerritoryRenderer.VOID_FACTOR_VALUE, (-1F)..(0.5F), (1F)..(0F)).coerceIn(0F, 1F)
|
||||
|
||||
val currentFogDensityMp
|
||||
@Sided(Side.CLIENT)
|
||||
get() = 1F + (9F * remapRange(TerritoryRenderer.VOID_FACTOR_VALUE, (-0.5F)..(1F), (0F)..(1F)).coerceIn(0F, 1F).pow(1.5F))
|
||||
|
||||
val currentRenderDistanceMp
|
||||
@Sided(Side.CLIENT)
|
||||
get() = MC.settings.renderDistanceChunks.let { if (it > 12) 0F else (1F - (it / 16.5F)).pow((it - 1) * 0.25F) }
|
||||
|
||||
val DEFAULT_TEXTURE = Resource.Custom("textures/environment/white.png")
|
||||
val DEFAULT_COLOR = Vec3.xyz(1.0)
|
||||
const val DEFAULT_ALPHA = 1F
|
@@ -1,14 +1,14 @@
|
||||
package chylex.hee.client.render.territory
|
||||
package chylex.hee.client.render.world
|
||||
|
||||
import chylex.hee.system.forge.Side
|
||||
import chylex.hee.system.forge.Sided
|
||||
import chylex.hee.util.forge.Side
|
||||
import chylex.hee.util.forge.Sided
|
||||
import com.mojang.blaze3d.matrix.MatrixStack
|
||||
import net.minecraft.client.world.ClientWorld
|
||||
|
||||
class MultiRenderer(private vararg val renderers: AbstractEnvironmentRenderer) : AbstractEnvironmentRenderer() {
|
||||
@Sided(Side.CLIENT)
|
||||
override fun render(world: ClientWorld, matrix: MatrixStack, partialTicks: Float) {
|
||||
for(renderer in renderers) {
|
||||
for (renderer in renderers) {
|
||||
renderer.render(world, matrix, partialTicks)
|
||||
}
|
||||
}
|
@@ -0,0 +1,88 @@
|
||||
package chylex.hee.client.text
|
||||
|
||||
sealed class LocalizationStrategy {
|
||||
abstract fun localize(key: String): String?
|
||||
|
||||
object Default : LocalizationStrategy() {
|
||||
private val nonCapitalizedWords = setOf("of", "and")
|
||||
|
||||
override fun localize(key: String): String {
|
||||
return key.split('_').joinToString(" ") {
|
||||
if (nonCapitalizedWords.contains(it)) it else it.replaceFirstChar(Char::titlecaseChar)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
open class ReplaceWords(private val wrapped: LocalizationStrategy, private val toReplace: String, private val replacement: String?) : LocalizationStrategy() {
|
||||
constructor(toReplace: String, replacement: String?) : this(Default, toReplace, replacement)
|
||||
|
||||
override fun localize(key: String): String? {
|
||||
val localized = wrapped.localize(key) ?: return null
|
||||
val words = localized.split(' ').toMutableList()
|
||||
val toDelete = this.toReplace.split(' ')
|
||||
|
||||
for (index in words.indices) {
|
||||
if (toDelete.withIndex().all { (offset, word) -> words[index + offset] == word }) {
|
||||
words.subList(index, index + toDelete.size).clear()
|
||||
replacement?.let { words.add(index, it) }
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return words.joinToString(" ")
|
||||
}
|
||||
}
|
||||
|
||||
class DeleteWords(wrapped: LocalizationStrategy, toDelete: String) : ReplaceWords(wrapped, toDelete, null) {
|
||||
constructor(toDelete: String) : this(Default, toDelete)
|
||||
}
|
||||
|
||||
class Parenthesized(private val wrapped: LocalizationStrategy = Default, private val wordCount: Int, private val wordOffset: Int = 0, private val fromStart: Boolean = false) : LocalizationStrategy() {
|
||||
override fun localize(key: String): String? {
|
||||
val localized = wrapped.localize(key) ?: return null
|
||||
val words = localized.split(' ').toMutableList()
|
||||
|
||||
val firstIndex = if (fromStart) wordOffset else words.size - wordOffset - wordCount
|
||||
val lastIndex = firstIndex + wordCount - 1
|
||||
if (firstIndex < 0 || lastIndex > words.lastIndex) {
|
||||
return localized
|
||||
}
|
||||
|
||||
words[firstIndex] = '(' + words[firstIndex]
|
||||
words[lastIndex] = words[lastIndex] + ')'
|
||||
|
||||
return words.joinToString(" ")
|
||||
}
|
||||
}
|
||||
|
||||
class MoveToBeginning(private val wrapped: LocalizationStrategy = Default, private val wordCount: Int, private val wordOffset: Int = 0, private val fromStart: Boolean = false) : LocalizationStrategy() {
|
||||
override fun localize(key: String): String? {
|
||||
val localized = wrapped.localize(key) ?: return null
|
||||
val words = localized.split(' ').toMutableList()
|
||||
|
||||
val firstIndex = if (fromStart) wordOffset else words.size - wordOffset - wordCount
|
||||
if (firstIndex < 0 || firstIndex + wordCount > words.size) {
|
||||
return localized
|
||||
}
|
||||
|
||||
val subList = words.subList(firstIndex, firstIndex + wordCount)
|
||||
val movedWords = subList.toList()
|
||||
|
||||
subList.clear()
|
||||
words.addAll(0, movedWords)
|
||||
return words.joinToString(" ")
|
||||
}
|
||||
}
|
||||
|
||||
class Custom(private val localized: String) : LocalizationStrategy() {
|
||||
override fun localize(key: String): String {
|
||||
return localized
|
||||
}
|
||||
}
|
||||
|
||||
object None : LocalizationStrategy() {
|
||||
override fun localize(key: String): String? {
|
||||
return null
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,18 +1,29 @@
|
||||
package chylex.hee.proxy
|
||||
package chylex.hee.game
|
||||
|
||||
import chylex.hee.system.forge.Side
|
||||
import chylex.hee.client.util.MC
|
||||
import chylex.hee.util.forge.Side
|
||||
import net.minecraft.entity.player.PlayerEntity
|
||||
import net.minecraft.loot.LootTable
|
||||
import net.minecraft.server.MinecraftServer
|
||||
import net.minecraft.util.RegistryKey
|
||||
import net.minecraft.util.ResourceLocation
|
||||
import net.minecraft.world.World
|
||||
import net.minecraft.world.server.ServerWorld
|
||||
import net.minecraftforge.fml.DistExecutor
|
||||
import net.minecraftforge.fml.DistExecutor.SafeCallable
|
||||
import net.minecraftforge.fml.loading.FMLEnvironment
|
||||
import net.minecraftforge.fml.server.ServerLifecycleHooks
|
||||
|
||||
object Environment {
|
||||
val side: Side = FMLEnvironment.dist
|
||||
|
||||
@Suppress("ConvertLambdaToReference")
|
||||
fun getClientSidePlayer(): PlayerEntity? {
|
||||
return DistExecutor.safeCallWhenOn(Side.CLIENT) {
|
||||
SafeCallable<PlayerEntity?> { MC.player }
|
||||
}
|
||||
}
|
||||
|
||||
fun getServer(): MinecraftServer {
|
||||
return ServerLifecycleHooks.getCurrentServer()
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
package chylex.hee.system
|
||||
package chylex.hee.game
|
||||
|
||||
// UPDATE 1.15
|
||||
// UPDATE 1.16
|
||||
|
||||
/**
|
||||
* Contains magic numbers and other constants which cannot be easily accessed using code, and must be reviewed before updating Minecraft versions.
|
||||
@@ -16,7 +16,7 @@ object MagicValues {
|
||||
/**
|
||||
* Default player damage added to [IItemTier.getAttackDamage][net.minecraft.item.IItemTier.getAttackDamage].
|
||||
*
|
||||
* Found in [PlayerEntity.registerAttributes][net.minecraft.entity.player.PlayerEntity.registerAttributes] (+ 1F).
|
||||
* Found in [PlayerEntity.registerAttributes][net.minecraft.entity.player.PlayerEntity.func_234570_el_] (+ 1F).
|
||||
*/
|
||||
const val PLAYER_HAND_DAMAGE = 1F
|
||||
|
45
modules/system/src/main/java/chylex/hee/game/Resource.kt
Normal file
45
modules/system/src/main/java/chylex/hee/game/Resource.kt
Normal file
@@ -0,0 +1,45 @@
|
||||
package chylex.hee.game
|
||||
|
||||
import chylex.hee.HEE
|
||||
import chylex.hee.system.isVanilla
|
||||
import chylex.hee.system.path
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.item.Item
|
||||
import net.minecraft.util.IItemProvider
|
||||
import net.minecraft.util.ResourceLocation
|
||||
|
||||
object Resource {
|
||||
const val NAMESPACE_VANILLA = "minecraft"
|
||||
|
||||
fun Vanilla(path: String) = ResourceLocation(NAMESPACE_VANILLA, path)
|
||||
fun Custom(path: String) = ResourceLocation(HEE.ID, path)
|
||||
|
||||
fun isVanilla(location: ResourceLocation) = location.namespace == NAMESPACE_VANILLA
|
||||
fun isCustom(location: ResourceLocation) = location.namespace == HEE.ID
|
||||
|
||||
operator fun invoke(path: String, isVanilla: Boolean): ResourceLocation {
|
||||
return if (isVanilla) Vanilla(path) else Custom(path)
|
||||
}
|
||||
|
||||
val IItemProvider.locationPrefix
|
||||
get() = when (this) {
|
||||
is Block -> "block/"
|
||||
is Item -> "item/"
|
||||
else -> throw IllegalArgumentException()
|
||||
}
|
||||
|
||||
val IItemProvider.location
|
||||
get() = when (this) {
|
||||
is Block -> Resource(this.locationPrefix + this.path, this.isVanilla)
|
||||
is Item -> Resource(this.locationPrefix + this.path, this.isVanilla)
|
||||
else -> throw IllegalArgumentException()
|
||||
}
|
||||
|
||||
fun IItemProvider.location(suffix: String): ResourceLocation {
|
||||
return when (this) {
|
||||
is Block -> Resource(this.locationPrefix + this.path + suffix, this.isVanilla)
|
||||
is Item -> Resource(this.locationPrefix + this.path + suffix, this.isVanilla)
|
||||
else -> throw IllegalArgumentException()
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
package chylex.hee.game.block
|
||||
|
||||
import chylex.hee.game.block.properties.BlockBuilder
|
||||
import chylex.hee.game.block.properties.BlockDrop
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.loot.LootTables
|
||||
|
||||
open class HeeBlock(builder: BlockBuilder) : Block(builder.p), IHeeBlock { // TODO abstract
|
||||
override val drop
|
||||
get() = if (lootTable == LootTables.EMPTY) BlockDrop.Nothing else BlockDrop.Self
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
package chylex.hee.game.block
|
||||
|
||||
import net.minecraft.block.Block
|
||||
|
||||
abstract class HeeBlock2(properties: Properties) : Block(properties), IHeeBlock
|
@@ -0,0 +1,229 @@
|
||||
package chylex.hee.game.block
|
||||
|
||||
import chylex.hee.game.block.builder.HeeBlockComponents
|
||||
import chylex.hee.game.world.util.getBlock
|
||||
import chylex.hee.util.forge.Side
|
||||
import chylex.hee.util.forge.Sided
|
||||
import chylex.hee.util.forge.asBool
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.block.BlockRenderType
|
||||
import net.minecraft.block.BlockState
|
||||
import net.minecraft.client.util.ITooltipFlag
|
||||
import net.minecraft.entity.Entity
|
||||
import net.minecraft.entity.EntitySpawnPlacementRegistry.PlacementType
|
||||
import net.minecraft.entity.EntityType
|
||||
import net.minecraft.entity.LivingEntity
|
||||
import net.minecraft.entity.player.PlayerEntity
|
||||
import net.minecraft.item.BlockItemUseContext
|
||||
import net.minecraft.item.ItemStack
|
||||
import net.minecraft.loot.LootContext
|
||||
import net.minecraft.state.StateContainer.Builder
|
||||
import net.minecraft.tileentity.TileEntity
|
||||
import net.minecraft.util.ActionResultType
|
||||
import net.minecraft.util.Direction
|
||||
import net.minecraft.util.Hand
|
||||
import net.minecraft.util.Mirror
|
||||
import net.minecraft.util.Rotation
|
||||
import net.minecraft.util.math.BlockPos
|
||||
import net.minecraft.util.math.BlockRayTraceResult
|
||||
import net.minecraft.util.math.RayTraceResult
|
||||
import net.minecraft.util.math.shapes.ISelectionContext
|
||||
import net.minecraft.util.math.shapes.VoxelShape
|
||||
import net.minecraft.util.text.ITextComponent
|
||||
import net.minecraft.world.Explosion
|
||||
import net.minecraft.world.IBlockReader
|
||||
import net.minecraft.world.IWorld
|
||||
import net.minecraft.world.IWorldReader
|
||||
import net.minecraft.world.World
|
||||
import net.minecraft.world.server.ServerWorld
|
||||
import java.util.Random
|
||||
|
||||
abstract class HeeBlockWithComponents(properties: Properties, components: HeeBlockComponents) : HeeBlock2(properties) {
|
||||
private companion object {
|
||||
private val RAND = Random()
|
||||
}
|
||||
|
||||
private val states = components.states.build()
|
||||
|
||||
private val name = components.name
|
||||
private val tooltip = components.tooltip
|
||||
|
||||
private val shape = components.shape
|
||||
private val renderType = components.renderType
|
||||
private val ambientOcclusionValue = components.ambientOcclusionValue
|
||||
private val clientEffects = components.clientEffects
|
||||
|
||||
private val drops = components.drops
|
||||
private val harvestability = components.harvestability
|
||||
private val experience = components.experience
|
||||
private val flammability = components.flammability
|
||||
|
||||
private val entity = components.entity
|
||||
private val placement = components.placement
|
||||
private val onAdded = components.onAdded
|
||||
private val onNeighborChanged = components.onNeighborChanged
|
||||
private val setStateFromNeighbor = components.setStateFromNeighbor
|
||||
|
||||
private val scheduledTick = components.scheduledTick
|
||||
private val randomTick = components.randomTick
|
||||
|
||||
private val playerUse = components.playerUse
|
||||
private val onExploded = components.onExploded
|
||||
private val onCreatureSpawning = components.onCreatureSpawning
|
||||
private val collideWithEntity = components.collideWithEntity
|
||||
|
||||
private var isAir = components.isAir
|
||||
|
||||
init {
|
||||
defaultState = states.applyDefaults(stateContainer.baseState)
|
||||
}
|
||||
|
||||
abstract override fun fillStateContainer(builder: Builder<Block, BlockState>)
|
||||
|
||||
override fun rotate(state: BlockState, rotation: Rotation): BlockState {
|
||||
return states.getRotatedState(state, rotation)
|
||||
}
|
||||
|
||||
override fun mirror(state: BlockState, mirror: Mirror): BlockState {
|
||||
return states.getMirroredState(state, mirror)
|
||||
}
|
||||
|
||||
override fun getTranslationKey(): String {
|
||||
return name?.translationKey ?: super.getTranslationKey()
|
||||
}
|
||||
|
||||
@Sided(Side.CLIENT)
|
||||
override fun addInformation(stack: ItemStack, world: IBlockReader?, lines: MutableList<ITextComponent>, flags: ITooltipFlag) {
|
||||
tooltip?.add(lines, stack, flags.isAdvanced, world)
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override fun getShape(state: BlockState, worldIn: IBlockReader, pos: BlockPos, context: ISelectionContext): VoxelShape {
|
||||
return shape?.getShape(state) ?: super.getShape(state, worldIn, pos, context)
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override fun getCollisionShape(state: BlockState, worldIn: IBlockReader, pos: BlockPos, context: ISelectionContext): VoxelShape {
|
||||
return shape?.getCollisionShape(state) ?: super.getCollisionShape(state, worldIn, pos, context)
|
||||
}
|
||||
|
||||
override fun getRaytraceShape(state: BlockState, worldIn: IBlockReader, pos: BlockPos): VoxelShape {
|
||||
return super.getRaytraceShape(state, worldIn, pos)
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override fun getRenderType(state: BlockState): BlockRenderType {
|
||||
return renderType ?: super.getRenderType(state)
|
||||
}
|
||||
|
||||
@Sided(Side.CLIENT)
|
||||
@Suppress("DEPRECATION")
|
||||
override fun getAmbientOcclusionLightValue(state: BlockState, worldIn: IBlockReader, pos: BlockPos): Float {
|
||||
return ambientOcclusionValue ?: super.getAmbientOcclusionLightValue(state, worldIn, pos)
|
||||
}
|
||||
|
||||
@Sided(Side.CLIENT)
|
||||
override fun animateTick(state: BlockState, world: World, pos: BlockPos, rand: Random) {
|
||||
clientEffects?.randomTick(state, world, pos, rand)
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override fun getDrops(state: BlockState, context: LootContext.Builder): MutableList<ItemStack> {
|
||||
return drops?.getDrops(state, context) ?: super.getDrops(state, context)
|
||||
}
|
||||
|
||||
override fun getPickBlock(state: BlockState, target: RayTraceResult, world: IBlockReader, pos: BlockPos, player: PlayerEntity): ItemStack {
|
||||
return drops?.getPickBlock(state, world, pos) ?: super.getPickBlock(state, target, world, pos, player)
|
||||
}
|
||||
|
||||
override fun canHarvestBlock(state: BlockState, world: IBlockReader, pos: BlockPos, player: PlayerEntity): Boolean {
|
||||
return harvestability?.canHarvest(player)?.asBool ?: super.canHarvestBlock(state, world, pos, player)
|
||||
}
|
||||
|
||||
override fun getExpDrop(state: BlockState, world: IWorldReader, pos: BlockPos, fortune: Int, silktouch: Int): Int {
|
||||
return experience?.getExperience((world as? World)?.rand ?: RAND) ?: 0
|
||||
}
|
||||
|
||||
override fun getFlammability(state: BlockState, world: IBlockReader, pos: BlockPos, face: Direction): Int {
|
||||
return flammability?.takeIfFlammable(state)?.flammability ?: 0
|
||||
}
|
||||
|
||||
override fun getFireSpreadSpeed(state: BlockState, world: IBlockReader, pos: BlockPos, face: Direction): Int {
|
||||
return flammability?.takeIfFlammable(state)?.fireSpread ?: 0
|
||||
}
|
||||
|
||||
override fun hasTileEntity(state: BlockState): Boolean {
|
||||
return entity != null
|
||||
}
|
||||
|
||||
override fun createTileEntity(state: BlockState, world: IBlockReader): TileEntity? {
|
||||
return entity?.create()
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override fun isValidPosition(state: BlockState, world: IWorldReader, pos: BlockPos): Boolean {
|
||||
return placement?.isPositionValid(state, world, pos) ?: super.isValidPosition(state, world, pos)
|
||||
}
|
||||
|
||||
override fun getStateForPlacement(context: BlockItemUseContext): BlockState? {
|
||||
return placement?.getPlacedState(defaultState, context.world, context.pos, context) ?: super.getStateForPlacement(context)
|
||||
}
|
||||
|
||||
override fun onBlockPlacedBy(world: World, pos: BlockPos, state: BlockState, placer: LivingEntity?, stack: ItemStack) {
|
||||
placement?.onPlacedBy(state, world, pos, placer, stack)
|
||||
}
|
||||
|
||||
override fun onBlockAdded(state: BlockState, world: World, pos: BlockPos, oldState: BlockState, isMoving: Boolean) {
|
||||
onAdded?.onAdded(state, world, pos)
|
||||
scheduledTick?.onAdded(state, world, pos, world.rand)
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override fun neighborChanged(state: BlockState, world: World, pos: BlockPos, neighborBlock: Block, neighborPos: BlockPos, isMoving: Boolean) {
|
||||
super.neighborChanged(state, world, pos, neighborBlock, neighborPos, isMoving)
|
||||
onNeighborChanged?.onNeighborChanged(state, world, pos, neighborBlock, neighborPos.getBlock(world), neighborPos)
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override fun updatePostPlacement(state: BlockState, neighborFacing: Direction, neighborState: BlockState, world: IWorld, currentPos: BlockPos, neighborPos: BlockPos): BlockState {
|
||||
return setStateFromNeighbor?.getNewState(state, world, currentPos, neighborFacing, neighborPos) ?: super.updatePostPlacement(state, neighborFacing, neighborState, world, currentPos, neighborPos)
|
||||
}
|
||||
|
||||
override fun tick(state: BlockState, world: ServerWorld, pos: BlockPos, rand: Random) {
|
||||
scheduledTick?.onTick(state, world, pos, rand)
|
||||
}
|
||||
|
||||
override fun randomTick(state: BlockState, world: ServerWorld, pos: BlockPos, rand: Random) {
|
||||
randomTick?.onTick(state, world, pos, rand)
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override fun onBlockActivated(state: BlockState, world: World, pos: BlockPos, player: PlayerEntity, hand: Hand, hit: BlockRayTraceResult): ActionResultType {
|
||||
return playerUse?.use(state, world, pos, player, hand) ?: super.onBlockActivated(state, world, pos, player, hand, hit)
|
||||
}
|
||||
|
||||
override fun canDropFromExplosion(state: BlockState, world: IBlockReader, pos: BlockPos, explosion: Explosion): Boolean {
|
||||
return onExploded?.canDrop(explosion) ?: super.canDropFromExplosion(state, world, pos, explosion)
|
||||
}
|
||||
|
||||
override fun onBlockExploded(state: BlockState, world: World, pos: BlockPos, explosion: Explosion) {
|
||||
onExploded?.onExploded(state, world, pos, explosion)
|
||||
super.onBlockExploded(state, world, pos, explosion)
|
||||
}
|
||||
|
||||
override fun canCreatureSpawn(state: BlockState, world: IBlockReader, pos: BlockPos, type: PlacementType?, entityType: EntityType<*>?): Boolean {
|
||||
return onCreatureSpawning?.canSpawn(world, pos, type, entityType)?.asBool ?: super.canCreatureSpawn(state, world, pos, type, entityType)
|
||||
}
|
||||
|
||||
override fun onEntityCollision(state: BlockState, world: World, pos: BlockPos, entity: Entity) {
|
||||
collideWithEntity?.collide(state, world, pos, entity)
|
||||
}
|
||||
|
||||
override fun isAir(state: BlockState, world: IBlockReader, pos: BlockPos): Boolean {
|
||||
return isAir ?: super.isAir(state, world, pos)
|
||||
}
|
||||
|
||||
override fun propagatesSkylightDown(state: BlockState, world: IBlockReader, pos: BlockPos): Boolean {
|
||||
return isAir == true || super.propagatesSkylightDown(state, world, pos)
|
||||
}
|
||||
}
|
@@ -0,0 +1,45 @@
|
||||
package chylex.hee.game.block
|
||||
|
||||
import chylex.hee.client.text.LocalizationStrategy
|
||||
import chylex.hee.game.block.builder.AbstractHeeBlockBuilder
|
||||
import chylex.hee.game.block.properties.BlockDrop
|
||||
import chylex.hee.game.block.properties.BlockModel
|
||||
import chylex.hee.game.block.properties.BlockRenderLayer
|
||||
import chylex.hee.game.block.properties.BlockRenderLayer.SOLID
|
||||
import chylex.hee.game.block.properties.BlockTint
|
||||
import chylex.hee.game.block.properties.IBlockStateModelSupplier
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.tags.ITag.INamedTag
|
||||
|
||||
interface IHeeBlock {
|
||||
val localization: LocalizationStrategy
|
||||
get() = LocalizationStrategy.Default
|
||||
|
||||
val localizationExtra: Map<String, String>
|
||||
get() = emptyMap()
|
||||
|
||||
val model: IBlockStateModelSupplier
|
||||
get() = BlockModel.Cube
|
||||
|
||||
val renderLayer: BlockRenderLayer
|
||||
get() = SOLID
|
||||
|
||||
val tint: BlockTint?
|
||||
get() = null
|
||||
|
||||
val drop: BlockDrop
|
||||
get() = BlockDrop.Self
|
||||
|
||||
val tags: List<INamedTag<Block>>
|
||||
get() = emptyList()
|
||||
|
||||
class FromBuilder(builder: AbstractHeeBlockBuilder<*>) : IHeeBlock {
|
||||
override val localization = builder.localization ?: super.localization
|
||||
override val localizationExtra = builder.localizationExtra.toMap()
|
||||
override val model = builder.model ?: super.model
|
||||
override val renderLayer = builder.renderLayer ?: super.renderLayer
|
||||
override val tint = builder.tint
|
||||
override val drop = builder.drop ?: super.drop
|
||||
override val tags = builder.tags.toList()
|
||||
}
|
||||
}
|
@@ -0,0 +1,149 @@
|
||||
package chylex.hee.game.block.builder
|
||||
|
||||
import chylex.hee.client.text.LocalizationStrategy
|
||||
import chylex.hee.game.block.IHeeBlock
|
||||
import chylex.hee.game.block.properties.BlockDrop
|
||||
import chylex.hee.game.block.properties.BlockHardness
|
||||
import chylex.hee.game.block.properties.BlockHarvestTool
|
||||
import chylex.hee.game.block.properties.BlockRenderLayer
|
||||
import chylex.hee.game.block.properties.BlockTint
|
||||
import chylex.hee.game.block.properties.IBlockStateModelSupplier
|
||||
import net.minecraft.block.AbstractBlock.IPositionPredicate
|
||||
import net.minecraft.block.AbstractBlock.Properties
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.block.SoundType
|
||||
import net.minecraft.block.material.Material
|
||||
import net.minecraft.block.material.MaterialColor
|
||||
import net.minecraft.tags.ITag.INamedTag
|
||||
|
||||
abstract class AbstractHeeBlockBuilder<T : Block> {
|
||||
private companion object {
|
||||
private val DEFAULT_MATERIAL = Material.Builder(MaterialColor.AIR).build()
|
||||
|
||||
private fun always(value: Boolean): IPositionPredicate {
|
||||
return IPositionPredicate { _, _, _ -> value }
|
||||
}
|
||||
}
|
||||
|
||||
var localization: LocalizationStrategy? = null
|
||||
val localizationExtra = mutableMapOf<String, String>()
|
||||
|
||||
var model: IBlockStateModelSupplier? = null
|
||||
var renderLayer: BlockRenderLayer? = null
|
||||
|
||||
var material: Material? = null
|
||||
var color: MaterialColor? = null
|
||||
var sound: SoundType? = null
|
||||
var tint: BlockTint? = null
|
||||
var light: Int? = null
|
||||
|
||||
var isSolid: Boolean? = null
|
||||
var isOpaque: Boolean? = null
|
||||
var suffocates: Boolean? = null
|
||||
var blocksVision: Boolean? = null
|
||||
|
||||
var drop: BlockDrop? = null
|
||||
var tool: BlockHarvestTool? = null
|
||||
var hardness: BlockHardness? = null
|
||||
|
||||
private val lazyComponents = lazy(::HeeBlockComponents)
|
||||
val components
|
||||
get() = lazyComponents.value
|
||||
|
||||
val tags = mutableListOf<INamedTag<Block>>()
|
||||
val interfaces = HeeBlockInterfaces()
|
||||
|
||||
fun includeFrom(source: AbstractHeeBlockBuilder<*>) {
|
||||
source.localization?.let { this.localization = it }
|
||||
this.localizationExtra.putAll(source.localizationExtra)
|
||||
|
||||
source.model?.let { this.model = it }
|
||||
source.renderLayer?.let { this.renderLayer = it }
|
||||
|
||||
source.material?.let { this.material = it }
|
||||
source.color?.let { this.color = it }
|
||||
source.sound?.let { this.sound = it }
|
||||
source.tint?.let { this.tint = it }
|
||||
source.light?.let { this.light = it }
|
||||
|
||||
source.isSolid?.let { this.isSolid = it }
|
||||
source.isOpaque?.let { this.isOpaque = it }
|
||||
source.suffocates?.let { this.suffocates = it }
|
||||
source.blocksVision?.let { this.blocksVision = it }
|
||||
|
||||
source.drop?.let { this.drop = it }
|
||||
source.tool?.let { this.tool = it }
|
||||
source.hardness?.let { this.hardness = it }
|
||||
|
||||
if (source.lazyComponents.isInitialized()) {
|
||||
this.components.includeFrom(source.components)
|
||||
}
|
||||
|
||||
this.tags.addAll(source.tags)
|
||||
this.interfaces.includeFrom(source.interfaces)
|
||||
}
|
||||
|
||||
protected val heeDelegate
|
||||
get() = object : IHeeBlock {
|
||||
override val localization = this@AbstractHeeBlockBuilder.localization ?: super.localization
|
||||
override val localizationExtra = this@AbstractHeeBlockBuilder.localizationExtra.toMap()
|
||||
override val model = this@AbstractHeeBlockBuilder.model ?: super.model
|
||||
override val renderLayer = this@AbstractHeeBlockBuilder.renderLayer ?: super.renderLayer
|
||||
override val tint = this@AbstractHeeBlockBuilder.tint
|
||||
override val drop = this@AbstractHeeBlockBuilder.drop ?: super.drop
|
||||
override val tags = this@AbstractHeeBlockBuilder.tags.toList()
|
||||
}
|
||||
|
||||
private fun buildProperties(setup: ((Properties) -> Properties)?): Properties {
|
||||
val material = material ?: DEFAULT_MATERIAL
|
||||
val color = color ?: material.color
|
||||
val tool = tool ?: BlockHarvestTool.NONE
|
||||
|
||||
var properties = Properties.create(material, color)
|
||||
|
||||
if (setup != null) {
|
||||
properties = setup(properties)
|
||||
}
|
||||
|
||||
properties = tool.applyTo(properties)
|
||||
properties = properties.apply(sound, Properties::sound)
|
||||
properties = properties.apply(light) { level -> setLightLevel { level } }
|
||||
properties = properties.apply(isOpaque) { setOpaque(always(it)) }
|
||||
properties = properties.apply(suffocates) { setSuffocates(always(it)) }
|
||||
properties = properties.apply(blocksVision) { setBlocksVision(always(it)) }
|
||||
properties = properties.apply(hardness) { it.applyTo(this) }
|
||||
|
||||
if (isSolid == false) {
|
||||
properties = properties.notSolid()
|
||||
}
|
||||
|
||||
if (!material.blocksMovement()) {
|
||||
if (isSolid == true) {
|
||||
throw UnsupportedOperationException("[AbstractHeeBlockBuilder] cannot create a block that does not block movement and is solid at the same time")
|
||||
}
|
||||
|
||||
properties = properties.doesNotBlockMovement()
|
||||
}
|
||||
|
||||
if (drop === BlockDrop.Nothing) {
|
||||
properties = properties.noDrops()
|
||||
}
|
||||
|
||||
if (lazyComponents.isInitialized() && components.randomTick != null) {
|
||||
properties = properties.tickRandomly()
|
||||
}
|
||||
|
||||
return properties
|
||||
}
|
||||
|
||||
private inline fun <T> Properties.apply(value: T?, function: Properties.(T) -> Properties): Properties {
|
||||
return if (value == null) this else function(value)
|
||||
}
|
||||
|
||||
fun build(propertiesSetup: (Properties.() -> Properties)? = null): T {
|
||||
val components = if (lazyComponents.isInitialized()) components else null
|
||||
return buildBlock(buildProperties(propertiesSetup), components)
|
||||
}
|
||||
|
||||
internal abstract fun buildBlock(properties: Properties, components: HeeBlockComponents?): T
|
||||
}
|
@@ -0,0 +1,26 @@
|
||||
package chylex.hee.game.block.builder
|
||||
|
||||
import chylex.hee.game.block.HeeBlock2
|
||||
import chylex.hee.game.block.HeeBlockWithComponents
|
||||
import chylex.hee.game.block.IHeeBlock
|
||||
import chylex.hee.game.block.interfaces.IBlockWithInterfaces
|
||||
import net.minecraft.block.AbstractBlock.Properties
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.block.BlockState
|
||||
import net.minecraft.state.StateContainer.Builder
|
||||
|
||||
open class HeeBlockBuilder : AbstractHeeBlockBuilder<HeeBlock2>() {
|
||||
override fun buildBlock(properties: Properties, components: HeeBlockComponents?): HeeBlock2 {
|
||||
if (components != null) {
|
||||
return object : HeeBlockWithComponents(properties, components), IHeeBlock by IHeeBlock.FromBuilder(this@HeeBlockBuilder), IBlockWithInterfaces by interfaces.delegate {
|
||||
override fun fillStateContainer(builder: Builder<Block, BlockState>) {
|
||||
components.states.fillContainer(builder)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return object : HeeBlock2(properties), IHeeBlock by IHeeBlock.FromBuilder(this), IBlockWithInterfaces by interfaces.delegate {}
|
||||
}
|
||||
}
|
||||
|
||||
inline fun HeeBlockBuilder(setup: HeeBlockBuilder.() -> Unit) = HeeBlockBuilder().apply(setup)
|
@@ -0,0 +1,86 @@
|
||||
package chylex.hee.game.block.builder
|
||||
|
||||
import chylex.hee.game.block.components.IBlockAddedComponent
|
||||
import chylex.hee.game.block.components.IBlockClientEffectsComponent
|
||||
import chylex.hee.game.block.components.IBlockCollideWithEntityComponent
|
||||
import chylex.hee.game.block.components.IBlockDropsComponent
|
||||
import chylex.hee.game.block.components.IBlockEntityComponent
|
||||
import chylex.hee.game.block.components.IBlockExperienceComponent
|
||||
import chylex.hee.game.block.components.IBlockExplodedComponent
|
||||
import chylex.hee.game.block.components.IBlockHarvestabilityComponent
|
||||
import chylex.hee.game.block.components.IBlockNameComponent
|
||||
import chylex.hee.game.block.components.IBlockNeighborChanged
|
||||
import chylex.hee.game.block.components.IBlockPlacementComponent
|
||||
import chylex.hee.game.block.components.IBlockRandomTickComponent
|
||||
import chylex.hee.game.block.components.IBlockScheduledTickComponent
|
||||
import chylex.hee.game.block.components.IBlockShapeComponent
|
||||
import chylex.hee.game.block.components.ICreatureSpawningOnBlockComponent
|
||||
import chylex.hee.game.block.components.IFlammableBlockComponent
|
||||
import chylex.hee.game.block.components.IPlayerUseBlockComponent
|
||||
import chylex.hee.game.block.components.ISetBlockStateFromNeighbor
|
||||
import chylex.hee.game.item.components.ITooltipComponent
|
||||
import net.minecraft.block.BlockRenderType
|
||||
|
||||
class HeeBlockComponents {
|
||||
val states = HeeBlockStates.Builder()
|
||||
|
||||
var name: IBlockNameComponent? = null
|
||||
var tooltip: ITooltipComponent? = null
|
||||
|
||||
var shape: IBlockShapeComponent? = null
|
||||
var renderType: BlockRenderType? = null
|
||||
var ambientOcclusionValue: Float? = null
|
||||
var clientEffects: IBlockClientEffectsComponent? = null
|
||||
|
||||
var drops: IBlockDropsComponent? = null
|
||||
var harvestability: IBlockHarvestabilityComponent? = null
|
||||
var experience: IBlockExperienceComponent? = null
|
||||
var flammability: IFlammableBlockComponent? = null
|
||||
|
||||
var entity: IBlockEntityComponent? = null
|
||||
var placement: IBlockPlacementComponent? = null
|
||||
var onAdded: IBlockAddedComponent? = null
|
||||
var onNeighborChanged: IBlockNeighborChanged? = null
|
||||
var setStateFromNeighbor: ISetBlockStateFromNeighbor? = null
|
||||
|
||||
var scheduledTick: IBlockScheduledTickComponent? = null
|
||||
var randomTick: IBlockRandomTickComponent? = null
|
||||
|
||||
var playerUse: IPlayerUseBlockComponent? = null
|
||||
var onExploded: IBlockExplodedComponent? = null
|
||||
var onCreatureSpawning: ICreatureSpawningOnBlockComponent? = null
|
||||
var collideWithEntity: IBlockCollideWithEntityComponent? = null
|
||||
|
||||
var isAir: Boolean? = null
|
||||
|
||||
fun includeFrom(source: HeeBlockComponents) {
|
||||
source.name?.let { this.name = it }
|
||||
source.tooltip?.let { this.tooltip = it }
|
||||
|
||||
source.shape?.let { this.shape = it }
|
||||
source.renderType?.let { this.renderType = it }
|
||||
source.ambientOcclusionValue?.let { this.ambientOcclusionValue = it }
|
||||
source.clientEffects?.let { this.clientEffects = it }
|
||||
|
||||
source.drops?.let { this.drops = it }
|
||||
source.harvestability?.let { this.harvestability = it }
|
||||
source.experience?.let { this.experience = it }
|
||||
source.flammability?.let { this.flammability = it }
|
||||
|
||||
source.entity?.let { this.entity = it }
|
||||
source.placement?.let { this.placement = it }
|
||||
source.onAdded?.let { this.onAdded = it }
|
||||
source.onNeighborChanged?.let { this.onNeighborChanged = it }
|
||||
source.setStateFromNeighbor?.let { this.setStateFromNeighbor = it }
|
||||
|
||||
source.scheduledTick?.let { this.scheduledTick = it }
|
||||
source.randomTick?.let { this.randomTick = it }
|
||||
|
||||
source.playerUse?.let { this.playerUse = it }
|
||||
source.onExploded?.let { this.onExploded = it }
|
||||
source.onCreatureSpawning?.let { this.onCreatureSpawning = it }
|
||||
source.collideWithEntity?.let { this.collideWithEntity = it }
|
||||
|
||||
source.isAir?.let { this.isAir = it }
|
||||
}
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
package chylex.hee.game.block.builder
|
||||
|
||||
import chylex.hee.game.block.interfaces.BlockInterfaceContainer
|
||||
import chylex.hee.game.block.interfaces.IBlockInterface
|
||||
import chylex.hee.game.block.interfaces.NoBlockInterfaces
|
||||
|
||||
class HeeBlockInterfaces {
|
||||
private val interfaces = mutableMapOf<Class<out IBlockInterface>, Any>()
|
||||
|
||||
internal val delegate
|
||||
get() = if (interfaces.isEmpty())
|
||||
NoBlockInterfaces
|
||||
else
|
||||
BlockInterfaceContainer(interfaces)
|
||||
|
||||
operator fun <T : IBlockInterface> set(type: Class<T>, impl: T) {
|
||||
interfaces[type] = impl
|
||||
}
|
||||
|
||||
fun includeFrom(source: HeeBlockInterfaces) {
|
||||
this.interfaces.putAll(source.interfaces)
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user