Compare commits
20 Commits
23-village
...
44-dimensi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9c8ce9ea9 | ||
|
|
c5a594acca | ||
|
|
ecb50eb94a | ||
|
|
95d70c649f | ||
|
|
f8592e53e7 | ||
|
|
7962df9847 | ||
|
|
54fbc3c9b8 | ||
|
|
c8c818e3a6 | ||
|
|
1953584c1d | ||
|
|
6cf30919c9 | ||
|
|
1913df4cc4 | ||
|
|
31150720f8 | ||
|
|
ebe192ee05 | ||
|
|
cca4154b93 | ||
|
|
8c989e0174 | ||
|
|
3a6aa1140d | ||
|
|
bfd445c5a2 | ||
|
|
3df4bc942e | ||
|
|
23db75e368 | ||
|
|
d59ec7e69b |
17
build.gradle
17
build.gradle
@@ -4,6 +4,7 @@ plugins {
|
||||
id 'maven-publish'
|
||||
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
|
||||
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
|
||||
id 'org.spongepowered.mixin' version '0.7-SNAPSHOT' apply true
|
||||
}
|
||||
|
||||
version = mod_version
|
||||
@@ -153,6 +154,11 @@ repositories {
|
||||
// flatDir {
|
||||
// dir 'libs'
|
||||
// }
|
||||
maven {
|
||||
// location of the maven that hosts JEI files since January 2023
|
||||
name = "Jared's maven"
|
||||
url = "https://maven.blamejared.com/"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -169,6 +175,14 @@ dependencies {
|
||||
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}")
|
||||
// runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}")
|
||||
|
||||
// compile against the JEI API but do not include it at runtime
|
||||
compileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}"))
|
||||
compileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-forge-api:${jei_version}"))
|
||||
// at runtime, use the full JEI jar for Forge
|
||||
runtimeOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-forge:${jei_version}"))
|
||||
|
||||
implementation fg.deobf("com.github.glitchfiend:TerraBlender-forge:${minecraft_version}-${terrablender_version}")
|
||||
|
||||
// Example mod dependency using a mod jar from ./libs with a flat dir repository
|
||||
// This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar
|
||||
// The group id is ignored when searching -- in this case, it is "blank"
|
||||
@@ -189,7 +203,8 @@ def replaceProperties = [
|
||||
forge_version: forge_version, forge_version_range: forge_version_range,
|
||||
loader_version_range: loader_version_range,
|
||||
mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
|
||||
mod_authors: mod_authors, mod_description: mod_description
|
||||
mod_authors: mod_authors, mod_description: mod_description,
|
||||
terrablender_version_range: terrablender_version_range
|
||||
]
|
||||
processResources {
|
||||
inputs.properties replaceProperties
|
||||
|
||||
@@ -38,6 +38,13 @@ mapping_channel=parchment
|
||||
mapping_version=2023.06.26-1.20.1
|
||||
|
||||
|
||||
## Dependency Properties
|
||||
jei_version=15.2.0.27
|
||||
|
||||
terrablender_version=3.0.0.169
|
||||
terrablender_version_range=[3.0.0.169,)
|
||||
|
||||
|
||||
## Mod Properties
|
||||
|
||||
# The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63}
|
||||
|
||||
@@ -6,6 +6,7 @@ pluginManagement {
|
||||
url = 'https://maven.minecraftforge.net/'
|
||||
}
|
||||
maven { url = 'https://maven.parchmentmc.org' }
|
||||
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
// 1.20.1 2023-11-15T19:29:59.7609744 Registries
|
||||
26aeb220454dd70d2b1bb9c817a822697fb41c32 data/tutorialmod/dimension/kaupendim.json
|
||||
e241e971aacde6f4d0236c622c99d6c9caeb981e data/tutorialmod/dimension_type/kaupendim_type.json
|
||||
51c9eccab97082d42b64f544d2177b5d81ad7822 data/tutorialmod/forge/biome_modifier/add_end_sapphire_ore.json
|
||||
64776d3eaf666ec57a7e039d2d4b5801202f71c5 data/tutorialmod/forge/biome_modifier/add_nether_sapphire_ore.json
|
||||
6e10223d8ca98f02feea2da07585014b7a38b1e4 data/tutorialmod/forge/biome_modifier/add_sapphire_ore.json
|
||||
7abbc38508270c3ef909f11615161f9ff69837f7 data/tutorialmod/forge/biome_modifier/add_tree_pine.json
|
||||
0035d9c75212e96cccaec16bb237fb0d6b98fe08 data/tutorialmod/worldgen/biome/test_biome.json
|
||||
71c606e75851b75cbba5b8f0682fcf5b5af6df8e data/tutorialmod/worldgen/configured_feature/end_sapphire_ore.json
|
||||
5ad8ebc3f43d28d4e7f41e38e69091f380cde75b data/tutorialmod/worldgen/configured_feature/nether_sapphire_ore.json
|
||||
a4f8bd2fb532c269b5a7e4f8322c0f822cb46cdc data/tutorialmod/worldgen/configured_feature/pine.json
|
||||
3140610638959ece0452c2a069c9fa692a226df7 data/tutorialmod/worldgen/configured_feature/sapphire_ore.json
|
||||
ed1b40ecc19f0d412a0e946711f16b3dd96c6c57 data/tutorialmod/worldgen/placed_feature/end_sapphire_ore_placed.json
|
||||
b70fdacdec25aaea052275a8a7f26ad1ceace755 data/tutorialmod/worldgen/placed_feature/nether_sapphire_ore_placed.json
|
||||
86bbe99a604a7e18d1019a448fbff5c39c772714 data/tutorialmod/worldgen/placed_feature/pine_placed.json
|
||||
4f295d3438c738394526d339a5e7bb87f509e53c data/tutorialmod/worldgen/placed_feature/sapphire_ore_placed.json
|
||||
@@ -1,10 +1,18 @@
|
||||
// 1.20.1 2023-08-25T20:00:29.1439601 Item Models: tutorialmod
|
||||
// 1.20.1 2023-11-06T18:06:15.8639603 Item Models: tutorialmod
|
||||
f746b64540daf2ab6302b3ec01a78490c48fc10b assets/tutorialmod/models/item/bar_brawl_music_disc.json
|
||||
d3e9cad00ae44c9319dfbb411667eb4a09a63e57 assets/tutorialmod/models/item/catmint.json
|
||||
6126e26da373f9113d9e9be875b14a0d13857444 assets/tutorialmod/models/item/corn.json
|
||||
4c5c277fa6360b149d6c3ab20584fcc4450cda27 assets/tutorialmod/models/item/corn_seeds.json
|
||||
798aa8856a8439e5ead445b62c2c79a11612c545 assets/tutorialmod/models/item/dice.json
|
||||
93719e53df04c62d91023fe733206eb93b7aac86 assets/tutorialmod/models/item/metal_detector.json
|
||||
d07710d2ac53c1f602f0c1f40f9a7d42bdb1092b assets/tutorialmod/models/item/pine_boat.json
|
||||
0e6c1cfbeb70a4ffd5b097ec1a6562763b8aa577 assets/tutorialmod/models/item/pine_chest_boat.json
|
||||
d56de8e6898d1c12a15eca045badafe1947aa387 assets/tutorialmod/models/item/pine_cone.json
|
||||
cc52097289735fa3c312f004171f0d07f77ba56d assets/tutorialmod/models/item/pine_hanging_sign.json
|
||||
4aad615a7bd676201b4db5780432359b04ecd639 assets/tutorialmod/models/item/pine_sapling.json
|
||||
b564249959d6cdff702afd910fd5e76553f9fc06 assets/tutorialmod/models/item/pine_sign.json
|
||||
d24305376f58c1ef118279a5c8f5b087a07b1d47 assets/tutorialmod/models/item/raw_sapphire.json
|
||||
63ec6c618a3a23eab4cab9c52d7d3250de9b516e assets/tutorialmod/models/item/rhino_spawn_egg.json
|
||||
0a16bffc527696b64e4304b7efccfda93e2b9422 assets/tutorialmod/models/item/sapphire.json
|
||||
72e891dd0d4eeff5cd14ecf7f4740f6ba5e7017b assets/tutorialmod/models/item/sapphire_axe.json
|
||||
4c7ede3e69b2d6ae39f0373cb461b96f53f14b41 assets/tutorialmod/models/item/sapphire_boots.json
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
// 1.20.1 2023-08-07T09:00:54.5654219 Tags for minecraft:item mod id tutorialmod
|
||||
// 1.20.1 2023-10-09T09:11:10.9792109 Tags for minecraft:item mod id tutorialmod
|
||||
526ec127a145db02975e7ec564384fa0a5389523 data/minecraft/tags/items/creeper_drop_music_discs.json
|
||||
c2b83641ed55fb63151b60b22efaa8a05b24629b data/minecraft/tags/items/logs_that_burn.json
|
||||
526ec127a145db02975e7ec564384fa0a5389523 data/minecraft/tags/items/music_discs.json
|
||||
6d2298526792ca18d84ed50a4b4d452e95f613e4 data/minecraft/tags/items/planks.json
|
||||
2514998bb25494de346fa0d088b7e216d8165efd data/minecraft/tags/items/trimmable_armor.json
|
||||
|
||||
@@ -1,9 +1,20 @@
|
||||
// 1.20.1 2023-08-25T20:00:29.1439601 Block States: tutorialmod
|
||||
// 1.20.1 2023-11-15T19:29:59.7619786 Block States: tutorialmod
|
||||
4f6f6f43eb03fe4d9e5ce223f245812e0d7eae93 assets/tutorialmod/blockstates/catmint.json
|
||||
d537bf85846bd7eeffa314408c867cc1a7d531d5 assets/tutorialmod/blockstates/corn_crop.json
|
||||
a3ad172be3e203ff6840db063558f809a86ca15a assets/tutorialmod/blockstates/deepslate_sapphire_ore.json
|
||||
890efea75d7398469e0d7d5704472303c35fae62 assets/tutorialmod/blockstates/end_stone_sapphire_ore.json
|
||||
ff720ea0aea021144b8557786f6e7f9dead2fd78 assets/tutorialmod/blockstates/gem_polishing_station.json
|
||||
596765e65e592a2678d93f5eb4be193439fb33e9 assets/tutorialmod/blockstates/mod_portal.json
|
||||
0198f629d0db6eb40ebd91067bbe631626116b54 assets/tutorialmod/blockstates/nether_sapphire_ore.json
|
||||
f948710d8934e2dc304504a928d05dd957567e3c assets/tutorialmod/blockstates/pine_hanging_sign.json
|
||||
b56d75abb778cdd35622d3977f825c2693e38777 assets/tutorialmod/blockstates/pine_leaves.json
|
||||
5615a2f4b8decb7e8e2bfef02d2e10cf95182e57 assets/tutorialmod/blockstates/pine_log.json
|
||||
5a66e6c840d559e83f821cae22a3e48dd3785af1 assets/tutorialmod/blockstates/pine_planks.json
|
||||
a740784be884f7cc30cc509927211305a61b2884 assets/tutorialmod/blockstates/pine_sapling.json
|
||||
d0a7ce9a217fbb7bc2987645c5f4898c8d93258e assets/tutorialmod/blockstates/pine_sign.json
|
||||
f948710d8934e2dc304504a928d05dd957567e3c assets/tutorialmod/blockstates/pine_wall_hanging_sign.json
|
||||
d0a7ce9a217fbb7bc2987645c5f4898c8d93258e assets/tutorialmod/blockstates/pine_wall_sign.json
|
||||
7f5690b866f0d2eec4954f4df7f48d210216227e assets/tutorialmod/blockstates/pine_wood.json
|
||||
55ae2b8c248ffe83a87a26b6c0f87c784f9049db assets/tutorialmod/blockstates/potted_catmint.json
|
||||
2f46112fe9e6610ea4c37e87e511da1849b54274 assets/tutorialmod/blockstates/raw_sapphire_block.json
|
||||
d02d1f6c412fc7b220ed18e30956d68f9a29bbb3 assets/tutorialmod/blockstates/sapphire_block.json
|
||||
@@ -19,6 +30,8 @@ f0189f740d5f66bdbf03bf833b7f89a0439615f8 assets/tutorialmod/blockstates/sapphire
|
||||
2af36ae7d141d045a91f520bcc8da0c216bf2ccb assets/tutorialmod/blockstates/sapphire_wall.json
|
||||
7e439f9c39ea91be588ddc78cf4cd903b5b9cb70 assets/tutorialmod/blockstates/sound_block.json
|
||||
e7f53e64f659401806aad6003e5356aac69c0a08 assets/tutorialmod/blockstates/strawberry_crop.json
|
||||
f6cd970826455b9f20c34835c56579f2cde3f2f8 assets/tutorialmod/blockstates/stripped_pine_log.json
|
||||
c127412131c229accf94ac23dc4565b5039f7cf6 assets/tutorialmod/blockstates/stripped_pine_wood.json
|
||||
20a742ea61b61bfcdcce006fd7b87dd9ad257a2f assets/tutorialmod/models/block/catmint.json
|
||||
1052548f03dcd89a42fba5f0b6255dbb94ccc937 assets/tutorialmod/models/block/corn_stage_0.json
|
||||
2c3b6838a486dcc1685dc9909d0bd7dbcdadd587 assets/tutorialmod/models/block/corn_stage_1.json
|
||||
@@ -31,7 +44,17 @@ cf760df02741eab6d508ac36d3ffecdef636ce0a assets/tutorialmod/models/block/corn_st
|
||||
55ed2caa3126b780e9a064f6a73f009a802e85fb assets/tutorialmod/models/block/corn_stage_8.json
|
||||
f98cb6175399c28ce46a77b4e68664303bc2c3d3 assets/tutorialmod/models/block/deepslate_sapphire_ore.json
|
||||
0c40efccb23d85e5bdf98a041a64a110359aed7c assets/tutorialmod/models/block/end_stone_sapphire_ore.json
|
||||
13fed721433921cd2b79654bdd3bdc84ff763fd3 assets/tutorialmod/models/block/mod_portal.json
|
||||
5df59719eaf8bf42bcfeee7e2154e96a044c2703 assets/tutorialmod/models/block/nether_sapphire_ore.json
|
||||
16d5376450465fabb63cdad8d3bd11bb9d9a9ce9 assets/tutorialmod/models/block/pine_hanging_sign.json
|
||||
fe5a2155456cabb8f67e4afcb4a55b01fec6e87e assets/tutorialmod/models/block/pine_leaves.json
|
||||
834bd48f42f632324bbdd52d47b17f5bf5bda70e assets/tutorialmod/models/block/pine_log.json
|
||||
5f3487986c44906dbe95e549af4c31671a506916 assets/tutorialmod/models/block/pine_log_horizontal.json
|
||||
dad917938a34a1cfbf24dedfb00622a33fe0ca39 assets/tutorialmod/models/block/pine_planks.json
|
||||
0b6daeb42f48148a2c73a9e5823388dd842e98e6 assets/tutorialmod/models/block/pine_sapling.json
|
||||
16d5376450465fabb63cdad8d3bd11bb9d9a9ce9 assets/tutorialmod/models/block/pine_sign.json
|
||||
429f7ef8fd5aa8b440239307ad7228404a709630 assets/tutorialmod/models/block/pine_wood.json
|
||||
204ad0bc802884ab0b9a7e7c4ecbd9b87b15aaea assets/tutorialmod/models/block/pine_wood_horizontal.json
|
||||
9c70f1f42c44d3c9344dfa19467f7131bc66610b assets/tutorialmod/models/block/potted_catmint.json
|
||||
44cf187b6c956a3e79927dd84615b47b1bfe4ff0 assets/tutorialmod/models/block/raw_sapphire_block.json
|
||||
7fbf9623622901217c1f548068b550115551eb45 assets/tutorialmod/models/block/sapphire_block.json
|
||||
@@ -72,12 +95,24 @@ b6bd6b99d1b444b7f23c3ff006f58fe5db405ca1 assets/tutorialmod/models/block/strawbe
|
||||
4bea81641ddb82a0a78e324c05ddb794ffcd8cb4 assets/tutorialmod/models/block/strawberry_stage3.json
|
||||
d980ad62eb5f6b15090ea6557bc28483ad68f0ff assets/tutorialmod/models/block/strawberry_stage4.json
|
||||
b14b9dd2aa2d96cbbb4d20f9d0741c1bf4476786 assets/tutorialmod/models/block/strawberry_stage5.json
|
||||
d9f1262cb586a131f4ef9e6b15e1d052f934349c assets/tutorialmod/models/block/stripped_pine_log.json
|
||||
2b4f1f0bdcad4f90690d4971294b54c6873de8c0 assets/tutorialmod/models/block/stripped_pine_log_horizontal.json
|
||||
5c07883b8c76ffc56a4fde9747936c0098866c0c assets/tutorialmod/models/block/stripped_pine_wood.json
|
||||
04534c445561ed2adeed241368439b9951780a3b assets/tutorialmod/models/block/stripped_pine_wood_horizontal.json
|
||||
71616f74a5e0922f50c9869941f63040b82c0499 assets/tutorialmod/models/item/catmint.json
|
||||
251495c94fbf35dd43cd773e6cf31533a8b72f09 assets/tutorialmod/models/item/deepslate_sapphire_ore.json
|
||||
bf5cdde3dfa3effdde9c4358ecb01c39922d7945 assets/tutorialmod/models/item/end_stone_sapphire_ore.json
|
||||
c6fe90ee84600fb9c1f42a398459a0d8b38fe198 assets/tutorialmod/models/item/gem_polishing_station.json
|
||||
2ca3a24e36047206a627f88e98669476f48ec27f assets/tutorialmod/models/item/mod_portal.json
|
||||
81ecae58cc575e9ce9d7f21881bbccb6bbfb4432 assets/tutorialmod/models/item/nether_sapphire_ore.json
|
||||
2edec443a236a702d91b370bfa43f0dd789c7a6e assets/tutorialmod/models/item/pine_leaves.json
|
||||
f8a200f45709b5a3e854d5d6885a848e58c7a355 assets/tutorialmod/models/item/pine_log.json
|
||||
85005a9e827addf56424def15ec7987b034d7bf6 assets/tutorialmod/models/item/pine_planks.json
|
||||
674ee7daf5f3e9a4d0fb1f75f819615a90fa1378 assets/tutorialmod/models/item/pine_wood.json
|
||||
1a7f76b967a6270a0443871f08ca1a655740a97d assets/tutorialmod/models/item/potted_catmint.json
|
||||
a7f864f8f8c67b25b34627c0dd8357e96b5d5c79 assets/tutorialmod/models/item/raw_sapphire_block.json
|
||||
2bf7f614770184be679bb0313dc04832b7fdd577 assets/tutorialmod/models/item/sapphire_block.json
|
||||
9607e08401cad098096f2d09cf41f23d6af6217a assets/tutorialmod/models/item/sapphire_ore.json
|
||||
e1bcffd5dcbfb758a3668455d04d23c6efda02cf assets/tutorialmod/models/item/sound_block.json
|
||||
ca27487cce3f5da1b4ea2be229b9505558ddedb1 assets/tutorialmod/models/item/stripped_pine_log.json
|
||||
56b45a746bbd034511b81ff2691de0ac85a842e7 assets/tutorialmod/models/item/stripped_pine_wood.json
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
// 1.20.1 2023-08-25T20:00:29.1418946 Loot Tables
|
||||
// 1.20.1 2023-11-06T18:06:15.8619605 Loot Tables
|
||||
a5308914890f4fbc6d39248caa834f368767be60 data/tutorialmod/loot_tables/blocks/catmint.json
|
||||
6c9ebf0160580ee21535fe3b1a2a5cd808cacb89 data/tutorialmod/loot_tables/blocks/corn_crop.json
|
||||
3655045aeb4e2ae62e9069b0db07927965a12389 data/tutorialmod/loot_tables/blocks/deepslate_sapphire_ore.json
|
||||
629bc7af98fd6a08d902f9c3e46896fc09101f43 data/tutorialmod/loot_tables/blocks/end_stone_sapphire_ore.json
|
||||
ae181fa3b2781be60d3127b43d33111085e53d7d data/tutorialmod/loot_tables/blocks/gem_polishing_station.json
|
||||
c615daffa6bb4a20fd0f4d36534331bdbeff2746 data/tutorialmod/loot_tables/blocks/nether_sapphire_ore.json
|
||||
5f94b65dcbf37334c21f047aeb09ef79fec31527 data/tutorialmod/loot_tables/blocks/pine_hanging_sign.json
|
||||
befc4d03c67d36d5c138d8cddcecfc8df012db06 data/tutorialmod/loot_tables/blocks/pine_leaves.json
|
||||
57ab8e1b21c0ed7823cb47210e9090f0e37ffd1a data/tutorialmod/loot_tables/blocks/pine_log.json
|
||||
5e3fbaa8cb61660404a2a4449ab965d1c7940aa2 data/tutorialmod/loot_tables/blocks/pine_planks.json
|
||||
1079f59358183cb7e8e371b06fed2da7707c19b5 data/tutorialmod/loot_tables/blocks/pine_sapling.json
|
||||
77451c5f7832bb7f84de7dde5c63e7b12166b7ee data/tutorialmod/loot_tables/blocks/pine_sign.json
|
||||
fb237c9790deb10ab0a5451a29e59a845a03cc05 data/tutorialmod/loot_tables/blocks/pine_wall_hanging_sign.json
|
||||
c4b29231ba536f986ca20b0258504d012b6be167 data/tutorialmod/loot_tables/blocks/pine_wall_sign.json
|
||||
0203579282aad7eb6c08abcf49145eec1bc33914 data/tutorialmod/loot_tables/blocks/pine_wood.json
|
||||
64ba5568715cb39bbac17bf9a847cf65f79bec13 data/tutorialmod/loot_tables/blocks/potted_catmint.json
|
||||
81e9322ae4c5141fd110a8f87cc92d7af008fd1e data/tutorialmod/loot_tables/blocks/raw_sapphire_block.json
|
||||
d844cbb192590a5e4278fd1a5c5906e40c594e24 data/tutorialmod/loot_tables/blocks/sapphire_block.json
|
||||
@@ -19,3 +29,5 @@ b28a6c67228e945ebc84f0e867152b34facd8b16 data/tutorialmod/loot_tables/blocks/sap
|
||||
900d403a6e84cc3d247e16f5dcb1fcf8802436a8 data/tutorialmod/loot_tables/blocks/sapphire_wall.json
|
||||
4a8cfacccc2c162b32d7ced097c65185c5c5bc88 data/tutorialmod/loot_tables/blocks/sound_block.json
|
||||
1f5745e65cfe5db7b41fcdf352e1a9f3378f9874 data/tutorialmod/loot_tables/blocks/strawberry_crop.json
|
||||
8f124ad7aafb89b6a6bac5f235a72348c85ef7f5 data/tutorialmod/loot_tables/blocks/stripped_pine_log.json
|
||||
c8e86fd6e644f2c0abfad143c43bbc294422c416 data/tutorialmod/loot_tables/blocks/stripped_pine_wood.json
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
// 1.20.1 2023-08-07T08:23:43.2856618 Tags for minecraft:block mod id tutorialmod
|
||||
// 1.20.1 2023-10-09T09:11:10.9781945 Tags for minecraft:block mod id tutorialmod
|
||||
f7d4d746a89ba9704d89651d20d3b89098acdabd data/forge/tags/blocks/needs_netherite_tool.json
|
||||
eb9c3bd4f434cd2ee198618689887868a03fc824 data/minecraft/tags/blocks/fences.json
|
||||
0f23036eb868569b86c1fbde92de4c816b9df411 data/minecraft/tags/blocks/fence_gates.json
|
||||
c2b83641ed55fb63151b60b22efaa8a05b24629b data/minecraft/tags/blocks/logs_that_burn.json
|
||||
2c39ba5cecb79889f7925f62f972246a014552c8 data/minecraft/tags/blocks/mineable/pickaxe.json
|
||||
b3dcb63d0640cd401308394400173ca7cb485665 data/minecraft/tags/blocks/needs_diamond_tool.json
|
||||
025f458e5a24d4a0256cb9712e83d703d819dfdb data/minecraft/tags/blocks/needs_iron_tool.json
|
||||
3a36f7f5f9de0d3325f1f444b84aa41eedfac5fc data/minecraft/tags/blocks/needs_stone_tool.json
|
||||
6d2298526792ca18d84ed50a4b4d452e95f613e4 data/minecraft/tags/blocks/planks.json
|
||||
39afac99ef2666de5a9686ccfc15e6f7611922c8 data/minecraft/tags/blocks/walls.json
|
||||
031ec7111c8b7c57f798acd0b3605ceb1912498b data/tutorialmod/tags/blocks/metal_detector_valuables.json
|
||||
047901bdc4a4ba4a4f71e4ed5689a158c75088e3 data/tutorialmod/tags/blocks/needs_sapphire_tool.json
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
// 1.20.1 2023-08-28T12:32:21.1985044 Tags for minecraft:point_of_interest_type mod id tutorialmod
|
||||
83f1c4f1a14965cf8c4c3a99edb0f816c3115ee6 data/minecraft/tags/point_of_interest_type/acquirable_job_site.json
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "tutorialmod:block/gem_polishing_station"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "tutorialmod:block/mod_portal"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "tutorialmod:block/pine_hanging_sign"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "tutorialmod:block/pine_leaves"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"variants": {
|
||||
"axis=x": {
|
||||
"model": "tutorialmod:block/pine_log_horizontal",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"axis=y": {
|
||||
"model": "tutorialmod:block/pine_log"
|
||||
},
|
||||
"axis=z": {
|
||||
"model": "tutorialmod:block/pine_log_horizontal",
|
||||
"x": 90
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "tutorialmod:block/pine_planks"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "tutorialmod:block/pine_sapling"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "tutorialmod:block/pine_sign"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "tutorialmod:block/pine_hanging_sign"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "tutorialmod:block/pine_sign"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"variants": {
|
||||
"axis=x": {
|
||||
"model": "tutorialmod:block/pine_wood_horizontal",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"axis=y": {
|
||||
"model": "tutorialmod:block/pine_wood"
|
||||
},
|
||||
"axis=z": {
|
||||
"model": "tutorialmod:block/pine_wood_horizontal",
|
||||
"x": 90
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"variants": {
|
||||
"axis=x": {
|
||||
"model": "tutorialmod:block/stripped_pine_log_horizontal",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"axis=y": {
|
||||
"model": "tutorialmod:block/stripped_pine_log"
|
||||
},
|
||||
"axis=z": {
|
||||
"model": "tutorialmod:block/stripped_pine_log_horizontal",
|
||||
"x": 90
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"variants": {
|
||||
"axis=x": {
|
||||
"model": "tutorialmod:block/stripped_pine_wood_horizontal",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"axis=y": {
|
||||
"model": "tutorialmod:block/stripped_pine_wood"
|
||||
},
|
||||
"axis=z": {
|
||||
"model": "tutorialmod:block/stripped_pine_wood_horizontal",
|
||||
"x": 90
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "tutorialmod:block/mod_portal"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"textures": {
|
||||
"particle": "tutorialmod:block/pine_planks"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/leaves",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures": {
|
||||
"all": "tutorialmod:block/pine_leaves"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_column",
|
||||
"textures": {
|
||||
"end": "tutorialmod:block/pine_log_top",
|
||||
"side": "tutorialmod:block/pine_log"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_column_horizontal",
|
||||
"textures": {
|
||||
"end": "tutorialmod:block/pine_log_top",
|
||||
"side": "tutorialmod:block/pine_log"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "tutorialmod:block/pine_planks"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/cross",
|
||||
"render_type": "minecraft:cutout",
|
||||
"textures": {
|
||||
"cross": "tutorialmod:block/pine_sapling"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"textures": {
|
||||
"particle": "tutorialmod:block/pine_planks"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_column",
|
||||
"textures": {
|
||||
"end": "tutorialmod:block/pine_log",
|
||||
"side": "tutorialmod:block/pine_log"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_column_horizontal",
|
||||
"textures": {
|
||||
"end": "tutorialmod:block/pine_log",
|
||||
"side": "tutorialmod:block/pine_log"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_column",
|
||||
"textures": {
|
||||
"end": "tutorialmod:block/stripped_pine_log_top",
|
||||
"side": "tutorialmod:block/stripped_pine_log"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_column_horizontal",
|
||||
"textures": {
|
||||
"end": "tutorialmod:block/stripped_pine_log_top",
|
||||
"side": "tutorialmod:block/stripped_pine_log"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_column",
|
||||
"textures": {
|
||||
"end": "tutorialmod:block/stripped_pine_log",
|
||||
"side": "tutorialmod:block/stripped_pine_log"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"parent": "minecraft:block/cube_column_horizontal",
|
||||
"textures": {
|
||||
"end": "tutorialmod:block/stripped_pine_log",
|
||||
"side": "tutorialmod:block/stripped_pine_log"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "tutorialmod:item/bar_brawl_music_disc"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "tutorialmod:item/dice"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tutorialmod:block/gem_polishing_station"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tutorialmod:block/mod_portal"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "tutorialmod:item/pine_boat"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "tutorialmod:item/pine_chest_boat"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "tutorialmod:item/pine_hanging_sign"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tutorialmod:block/pine_leaves"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tutorialmod:block/pine_log"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tutorialmod:block/pine_planks"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "tutorialmod:block/pine_sapling"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "tutorialmod:item/pine_sign"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tutorialmod:block/pine_wood"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "minecraft:item/template_spawn_egg"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tutorialmod:block/stripped_pine_log"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"parent": "tutorialmod:block/stripped_pine_wood"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"values": [
|
||||
"tutorialmod:pine_log",
|
||||
"tutorialmod:pine_wood",
|
||||
"tutorialmod:stripped_pine_log",
|
||||
"tutorialmod:stripped_pine_wood"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"tutorialmod:pine_planks"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"tutorialmod:bar_brawl_music_disc"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"values": [
|
||||
"tutorialmod:pine_log",
|
||||
"tutorialmod:pine_wood",
|
||||
"tutorialmod:stripped_pine_log",
|
||||
"tutorialmod:stripped_pine_wood"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"tutorialmod:bar_brawl_music_disc"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"values": [
|
||||
"tutorialmod:pine_planks"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"id": "tutorialmod:sound_poi",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"type": "tutorialmod:kaupendim_type",
|
||||
"generator": {
|
||||
"type": "minecraft:noise",
|
||||
"biome_source": {
|
||||
"type": "minecraft:multi_noise",
|
||||
"biomes": [
|
||||
{
|
||||
"biome": "tutorialmod:test_biome",
|
||||
"parameters": {
|
||||
"continentalness": 0.0,
|
||||
"depth": 0.0,
|
||||
"erosion": 0.0,
|
||||
"humidity": 0.0,
|
||||
"offset": 0.0,
|
||||
"temperature": 0.0,
|
||||
"weirdness": 0.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"biome": "minecraft:birch_forest",
|
||||
"parameters": {
|
||||
"continentalness": 0.0,
|
||||
"depth": 0.0,
|
||||
"erosion": 0.2,
|
||||
"humidity": 0.2,
|
||||
"offset": 0.0,
|
||||
"temperature": 0.1,
|
||||
"weirdness": 0.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"biome": "minecraft:ocean",
|
||||
"parameters": {
|
||||
"continentalness": 0.1,
|
||||
"depth": 0.0,
|
||||
"erosion": 0.1,
|
||||
"humidity": 0.6,
|
||||
"offset": 0.0,
|
||||
"temperature": 0.3,
|
||||
"weirdness": 0.0
|
||||
}
|
||||
},
|
||||
{
|
||||
"biome": "minecraft:dark_forest",
|
||||
"parameters": {
|
||||
"continentalness": 0.2,
|
||||
"depth": 0.0,
|
||||
"erosion": 0.1,
|
||||
"humidity": 0.3,
|
||||
"offset": 0.0,
|
||||
"temperature": 0.4,
|
||||
"weirdness": 0.0
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"settings": "minecraft:amplified"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"ambient_light": 1.0,
|
||||
"bed_works": true,
|
||||
"coordinate_scale": 1.0,
|
||||
"effects": "minecraft:overworld",
|
||||
"fixed_time": 12000,
|
||||
"has_ceiling": false,
|
||||
"has_raids": false,
|
||||
"has_skylight": false,
|
||||
"height": 256,
|
||||
"infiniburn": "#minecraft:infiniburn_overworld",
|
||||
"logical_height": 256,
|
||||
"min_y": 0,
|
||||
"monster_spawn_block_light_limit": 0,
|
||||
"monster_spawn_light_level": 0,
|
||||
"natural": false,
|
||||
"piglin_safe": false,
|
||||
"respawn_anchor_works": false,
|
||||
"ultrawarm": false
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"type": "forge:add_features",
|
||||
"biomes": "#minecraft:is_end",
|
||||
"features": "tutorialmod:end_sapphire_ore_placed",
|
||||
"step": "underground_ores"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"type": "forge:add_features",
|
||||
"biomes": "#minecraft:is_nether",
|
||||
"features": "tutorialmod:nether_sapphire_ore_placed",
|
||||
"step": "underground_ores"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"type": "forge:add_features",
|
||||
"biomes": "#minecraft:is_overworld",
|
||||
"features": "tutorialmod:sapphire_ore_placed",
|
||||
"step": "underground_ores"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"type": "forge:add_features",
|
||||
"biomes": "#forge:is_plains",
|
||||
"features": "tutorialmod:pine_placed",
|
||||
"step": "vegetal_decoration"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tutorialmod:gem_polishing_station"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tutorialmod:blocks/gem_polishing_station"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tutorialmod:pine_hanging_sign"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tutorialmod:blocks/pine_hanging_sign"
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:alternatives",
|
||||
"children": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:any_of",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"items": [
|
||||
"minecraft:shears"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"name": "tutorialmod:pine_leaves"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
},
|
||||
{
|
||||
"chances": [
|
||||
0.05,
|
||||
0.0625,
|
||||
0.083333336,
|
||||
0.1
|
||||
],
|
||||
"condition": "minecraft:table_bonus",
|
||||
"enchantment": "minecraft:fortune"
|
||||
}
|
||||
],
|
||||
"name": "tutorialmod:pine_sapling"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
},
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:inverted",
|
||||
"term": {
|
||||
"condition": "minecraft:any_of",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"items": [
|
||||
"minecraft:shears"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"condition": "minecraft:match_tool",
|
||||
"predicate": {
|
||||
"enchantments": [
|
||||
{
|
||||
"enchantment": "minecraft:silk_touch",
|
||||
"levels": {
|
||||
"min": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"conditions": [
|
||||
{
|
||||
"chances": [
|
||||
0.02,
|
||||
0.022222223,
|
||||
0.025,
|
||||
0.033333335,
|
||||
0.1
|
||||
],
|
||||
"condition": "minecraft:table_bonus",
|
||||
"enchantment": "minecraft:fortune"
|
||||
}
|
||||
],
|
||||
"functions": [
|
||||
{
|
||||
"add": false,
|
||||
"count": {
|
||||
"type": "minecraft:uniform",
|
||||
"max": 2.0,
|
||||
"min": 1.0
|
||||
},
|
||||
"function": "minecraft:set_count"
|
||||
},
|
||||
{
|
||||
"function": "minecraft:explosion_decay"
|
||||
}
|
||||
],
|
||||
"name": "minecraft:stick"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tutorialmod:blocks/pine_leaves"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tutorialmod:pine_log"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tutorialmod:blocks/pine_log"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tutorialmod:pine_planks"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tutorialmod:blocks/pine_planks"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tutorialmod:pine_sapling"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tutorialmod:blocks/pine_sapling"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tutorialmod:pine_sign"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tutorialmod:blocks/pine_sign"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tutorialmod:pine_hanging_sign"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tutorialmod:blocks/pine_wall_hanging_sign"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tutorialmod:pine_sign"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tutorialmod:blocks/pine_wall_sign"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tutorialmod:pine_wood"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tutorialmod:blocks/pine_wood"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tutorialmod:stripped_pine_log"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tutorialmod:blocks/stripped_pine_log"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"pools": [
|
||||
{
|
||||
"bonus_rolls": 0.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "tutorialmod:stripped_pine_wood"
|
||||
}
|
||||
],
|
||||
"rolls": 1.0
|
||||
}
|
||||
],
|
||||
"random_sequence": "tutorialmod:blocks/stripped_pine_wood"
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
{
|
||||
"carvers": {
|
||||
"air": [
|
||||
"minecraft:cave",
|
||||
"minecraft:cave_extra_underground",
|
||||
"minecraft:canyon"
|
||||
]
|
||||
},
|
||||
"downfall": 0.8,
|
||||
"effects": {
|
||||
"fog_color": 2269670,
|
||||
"foliage_color": 13763580,
|
||||
"grass_color": 8324092,
|
||||
"mood_sound": {
|
||||
"block_search_extent": 8,
|
||||
"offset": 2.0,
|
||||
"sound": "minecraft:ambient.cave",
|
||||
"tick_delay": 6000
|
||||
},
|
||||
"music": {
|
||||
"max_delay": 24000,
|
||||
"min_delay": 12000,
|
||||
"replace_current_music": false,
|
||||
"sound": "tutorialmod:bar_brawl"
|
||||
},
|
||||
"sky_color": 3197208,
|
||||
"water_color": 15216187,
|
||||
"water_fog_color": 12524326
|
||||
},
|
||||
"features": [
|
||||
[],
|
||||
[
|
||||
"minecraft:lake_lava_underground",
|
||||
"minecraft:lake_lava_surface"
|
||||
],
|
||||
[
|
||||
"minecraft:amethyst_geode",
|
||||
"minecraft:forest_rock"
|
||||
],
|
||||
[
|
||||
"minecraft:monster_room",
|
||||
"minecraft:monster_room_deep"
|
||||
],
|
||||
[],
|
||||
[],
|
||||
[
|
||||
"minecraft:ore_dirt",
|
||||
"minecraft:ore_gravel",
|
||||
"minecraft:ore_granite_upper",
|
||||
"minecraft:ore_granite_lower",
|
||||
"minecraft:ore_diorite_upper",
|
||||
"minecraft:ore_diorite_lower",
|
||||
"minecraft:ore_andesite_upper",
|
||||
"minecraft:ore_andesite_lower",
|
||||
"minecraft:ore_tuff",
|
||||
"minecraft:ore_coal_upper",
|
||||
"minecraft:ore_coal_lower",
|
||||
"minecraft:ore_iron_upper",
|
||||
"minecraft:ore_iron_middle",
|
||||
"minecraft:ore_iron_small",
|
||||
"minecraft:ore_gold",
|
||||
"minecraft:ore_gold_lower",
|
||||
"minecraft:ore_redstone",
|
||||
"minecraft:ore_redstone_lower",
|
||||
"minecraft:ore_diamond",
|
||||
"minecraft:ore_diamond_large",
|
||||
"minecraft:ore_diamond_buried",
|
||||
"minecraft:ore_lapis",
|
||||
"minecraft:ore_lapis_buried",
|
||||
"minecraft:ore_copper",
|
||||
"minecraft:underwater_magma",
|
||||
"minecraft:ore_gold_extra"
|
||||
],
|
||||
[],
|
||||
[
|
||||
"minecraft:spring_water",
|
||||
"minecraft:spring_lava"
|
||||
],
|
||||
[
|
||||
"minecraft:glow_lichen",
|
||||
"minecraft:forest_flowers",
|
||||
"minecraft:patch_large_fern",
|
||||
"minecraft:trees_plains",
|
||||
"minecraft:brown_mushroom_normal",
|
||||
"minecraft:red_mushroom_normal",
|
||||
"minecraft:patch_sugar_cane",
|
||||
"minecraft:patch_pumpkin",
|
||||
"tutorialmod:pine_placed"
|
||||
],
|
||||
[
|
||||
"minecraft:freeze_top_layer"
|
||||
]
|
||||
],
|
||||
"has_precipitation": true,
|
||||
"spawn_costs": {},
|
||||
"spawners": {
|
||||
"ambient": [
|
||||
{
|
||||
"type": "minecraft:bat",
|
||||
"maxCount": 8,
|
||||
"minCount": 8,
|
||||
"weight": 10
|
||||
}
|
||||
],
|
||||
"axolotls": [],
|
||||
"creature": [
|
||||
{
|
||||
"type": "tutorialmod:rhino",
|
||||
"maxCount": 5,
|
||||
"minCount": 3,
|
||||
"weight": 2
|
||||
},
|
||||
{
|
||||
"type": "minecraft:wolf",
|
||||
"maxCount": 4,
|
||||
"minCount": 4,
|
||||
"weight": 5
|
||||
},
|
||||
{
|
||||
"type": "minecraft:sheep",
|
||||
"maxCount": 4,
|
||||
"minCount": 4,
|
||||
"weight": 12
|
||||
},
|
||||
{
|
||||
"type": "minecraft:pig",
|
||||
"maxCount": 4,
|
||||
"minCount": 4,
|
||||
"weight": 10
|
||||
},
|
||||
{
|
||||
"type": "minecraft:chicken",
|
||||
"maxCount": 4,
|
||||
"minCount": 4,
|
||||
"weight": 10
|
||||
},
|
||||
{
|
||||
"type": "minecraft:cow",
|
||||
"maxCount": 4,
|
||||
"minCount": 4,
|
||||
"weight": 8
|
||||
}
|
||||
],
|
||||
"misc": [],
|
||||
"monster": [
|
||||
{
|
||||
"type": "minecraft:spider",
|
||||
"maxCount": 4,
|
||||
"minCount": 4,
|
||||
"weight": 100
|
||||
},
|
||||
{
|
||||
"type": "minecraft:zombie",
|
||||
"maxCount": 4,
|
||||
"minCount": 4,
|
||||
"weight": 95
|
||||
},
|
||||
{
|
||||
"type": "minecraft:zombie_villager",
|
||||
"maxCount": 1,
|
||||
"minCount": 1,
|
||||
"weight": 5
|
||||
},
|
||||
{
|
||||
"type": "minecraft:skeleton",
|
||||
"maxCount": 4,
|
||||
"minCount": 4,
|
||||
"weight": 100
|
||||
},
|
||||
{
|
||||
"type": "minecraft:creeper",
|
||||
"maxCount": 4,
|
||||
"minCount": 4,
|
||||
"weight": 100
|
||||
},
|
||||
{
|
||||
"type": "minecraft:slime",
|
||||
"maxCount": 4,
|
||||
"minCount": 4,
|
||||
"weight": 100
|
||||
},
|
||||
{
|
||||
"type": "minecraft:enderman",
|
||||
"maxCount": 4,
|
||||
"minCount": 1,
|
||||
"weight": 10
|
||||
},
|
||||
{
|
||||
"type": "minecraft:witch",
|
||||
"maxCount": 1,
|
||||
"minCount": 1,
|
||||
"weight": 5
|
||||
}
|
||||
],
|
||||
"underground_water_creature": [
|
||||
{
|
||||
"type": "minecraft:glow_squid",
|
||||
"maxCount": 6,
|
||||
"minCount": 4,
|
||||
"weight": 10
|
||||
}
|
||||
],
|
||||
"water_ambient": [],
|
||||
"water_creature": []
|
||||
},
|
||||
"temperature": 0.7
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"type": "minecraft:ore",
|
||||
"config": {
|
||||
"discard_chance_on_air_exposure": 0.0,
|
||||
"size": 9,
|
||||
"targets": [
|
||||
{
|
||||
"state": {
|
||||
"Name": "tutorialmod:end_stone_sapphire_ore"
|
||||
},
|
||||
"target": {
|
||||
"block": "minecraft:end_stone",
|
||||
"predicate_type": "minecraft:block_match"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"type": "minecraft:ore",
|
||||
"config": {
|
||||
"discard_chance_on_air_exposure": 0.0,
|
||||
"size": 9,
|
||||
"targets": [
|
||||
{
|
||||
"state": {
|
||||
"Name": "tutorialmod:nether_sapphire_ore"
|
||||
},
|
||||
"target": {
|
||||
"block": "minecraft:netherrack",
|
||||
"predicate_type": "minecraft:block_match"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"type": "minecraft:tree",
|
||||
"config": {
|
||||
"decorators": [],
|
||||
"dirt_provider": {
|
||||
"type": "minecraft:simple_state_provider",
|
||||
"state": {
|
||||
"Name": "minecraft:dirt"
|
||||
}
|
||||
},
|
||||
"foliage_placer": {
|
||||
"type": "tutorialmod:pine_foliage_placer",
|
||||
"height": 3,
|
||||
"offset": 2,
|
||||
"radius": 3
|
||||
},
|
||||
"foliage_provider": {
|
||||
"type": "minecraft:simple_state_provider",
|
||||
"state": {
|
||||
"Name": "tutorialmod:pine_leaves",
|
||||
"Properties": {
|
||||
"distance": "7",
|
||||
"persistent": "false",
|
||||
"waterlogged": "false"
|
||||
}
|
||||
}
|
||||
},
|
||||
"force_dirt": false,
|
||||
"ignore_vines": false,
|
||||
"minimum_size": {
|
||||
"type": "minecraft:two_layers_feature_size",
|
||||
"limit": 1,
|
||||
"lower_size": 0,
|
||||
"upper_size": 2
|
||||
},
|
||||
"trunk_placer": {
|
||||
"type": "tutorialmod:pine_trunk_placer",
|
||||
"base_height": 5,
|
||||
"height_rand_a": 4,
|
||||
"height_rand_b": 3
|
||||
},
|
||||
"trunk_provider": {
|
||||
"type": "minecraft:simple_state_provider",
|
||||
"state": {
|
||||
"Name": "tutorialmod:pine_log",
|
||||
"Properties": {
|
||||
"axis": "y"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"type": "minecraft:ore",
|
||||
"config": {
|
||||
"discard_chance_on_air_exposure": 0.0,
|
||||
"size": 9,
|
||||
"targets": [
|
||||
{
|
||||
"state": {
|
||||
"Name": "tutorialmod:sapphire_ore"
|
||||
},
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:stone_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": {
|
||||
"Name": "tutorialmod:deepslate_sapphire_ore"
|
||||
},
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:deepslate_ore_replaceables"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"feature": "tutorialmod:end_sapphire_ore",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": 12
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:height_range",
|
||||
"height": {
|
||||
"type": "minecraft:uniform",
|
||||
"max_inclusive": {
|
||||
"absolute": 80
|
||||
},
|
||||
"min_inclusive": {
|
||||
"absolute": -64
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"feature": "tutorialmod:nether_sapphire_ore",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": 12
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:height_range",
|
||||
"height": {
|
||||
"type": "minecraft:uniform",
|
||||
"max_inclusive": {
|
||||
"absolute": 80
|
||||
},
|
||||
"min_inclusive": {
|
||||
"absolute": -64
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"feature": "tutorialmod:pine",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": {
|
||||
"type": "minecraft:weighted_list",
|
||||
"distribution": [
|
||||
{
|
||||
"data": 3,
|
||||
"weight": 9
|
||||
},
|
||||
{
|
||||
"data": 5,
|
||||
"weight": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:surface_water_depth_filter",
|
||||
"max_water_depth": 0
|
||||
},
|
||||
{
|
||||
"type": "minecraft:heightmap",
|
||||
"heightmap": "OCEAN_FLOOR"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:block_predicate_filter",
|
||||
"predicate": {
|
||||
"type": "minecraft:would_survive",
|
||||
"state": {
|
||||
"Name": "tutorialmod:pine_sapling",
|
||||
"Properties": {
|
||||
"stage": "0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"feature": "tutorialmod:sapphire_ore",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": 12
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:height_range",
|
||||
"height": {
|
||||
"type": "minecraft:uniform",
|
||||
"max_inclusive": {
|
||||
"absolute": 80
|
||||
},
|
||||
"min_inclusive": {
|
||||
"absolute": -64
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,9 +2,29 @@ package net.kaupenjoe.tutorialmod;
|
||||
|
||||
import com.mojang.logging.LogUtils;
|
||||
import net.kaupenjoe.tutorialmod.block.ModBlocks;
|
||||
import net.kaupenjoe.tutorialmod.block.entity.ModBlockEntities;
|
||||
import net.kaupenjoe.tutorialmod.entity.ModEntities;
|
||||
import net.kaupenjoe.tutorialmod.entity.client.ModBoatRenderer;
|
||||
import net.kaupenjoe.tutorialmod.entity.client.RhinoRenderer;
|
||||
import net.kaupenjoe.tutorialmod.item.ModCreativeModTabs;
|
||||
import net.kaupenjoe.tutorialmod.item.ModItems;
|
||||
import net.kaupenjoe.tutorialmod.loot.ModLootModifiers;
|
||||
import net.kaupenjoe.tutorialmod.recipe.ModRecipes;
|
||||
import net.kaupenjoe.tutorialmod.screen.GemPolishingStationScreen;
|
||||
import net.kaupenjoe.tutorialmod.screen.ModMenuTypes;
|
||||
import net.kaupenjoe.tutorialmod.sound.ModSounds;
|
||||
import net.kaupenjoe.tutorialmod.util.ModWoodTypes;
|
||||
import net.kaupenjoe.tutorialmod.villager.ModVillagers;
|
||||
import net.kaupenjoe.tutorialmod.worldgen.biome.ModTerrablender;
|
||||
import net.kaupenjoe.tutorialmod.worldgen.biome.surface.ModSurfaceRules;
|
||||
import net.kaupenjoe.tutorialmod.worldgen.tree.ModFoliagePlacers;
|
||||
import net.kaupenjoe.tutorialmod.worldgen.tree.ModTrunkPlacerTypes;
|
||||
import net.minecraft.client.gui.screens.MenuScreens;
|
||||
import net.minecraft.client.renderer.Sheets;
|
||||
import net.minecraft.client.renderer.entity.EntityRenderer;
|
||||
import net.minecraft.client.renderer.entity.EntityRenderers;
|
||||
import net.minecraft.client.renderer.entity.ThrownItemRenderer;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.item.CreativeModeTabs;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.FlowerPotBlock;
|
||||
@@ -19,6 +39,7 @@ import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import org.slf4j.Logger;
|
||||
import terrablender.api.SurfaceRuleManager;
|
||||
|
||||
// The value here should match an entry in the META-INF/mods.toml file
|
||||
@Mod(TutorialMod.MOD_ID)
|
||||
@@ -35,6 +56,19 @@ public class TutorialMod {
|
||||
ModBlocks.register(modEventBus);
|
||||
|
||||
ModLootModifiers.register(modEventBus);
|
||||
ModVillagers.register(modEventBus);
|
||||
|
||||
ModSounds.register(modEventBus);
|
||||
ModEntities.register(modEventBus);
|
||||
|
||||
ModBlockEntities.register(modEventBus);
|
||||
ModMenuTypes.register(modEventBus);
|
||||
|
||||
ModRecipes.register(modEventBus);
|
||||
ModTrunkPlacerTypes.register(modEventBus);
|
||||
|
||||
ModFoliagePlacers.register(modEventBus);
|
||||
ModTerrablender.registerBiomes();
|
||||
|
||||
modEventBus.addListener(this::commonSetup);
|
||||
|
||||
@@ -45,6 +79,8 @@ public class TutorialMod {
|
||||
private void commonSetup(final FMLCommonSetupEvent event) {
|
||||
event.enqueueWork(() -> {
|
||||
((FlowerPotBlock) Blocks.FLOWER_POT).addPlant(ModBlocks.CATMINT.getId(), ModBlocks.POTTED_CATMINT);
|
||||
|
||||
SurfaceRuleManager.addSurfaceRules(SurfaceRuleManager.RuleCategory.OVERWORLD, MOD_ID, ModSurfaceRules.makeRules());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -66,7 +102,15 @@ public class TutorialMod {
|
||||
public static class ClientModEvents {
|
||||
@SubscribeEvent
|
||||
public static void onClientSetup(FMLClientSetupEvent event) {
|
||||
Sheets.addWoodType(ModWoodTypes.PINE);
|
||||
|
||||
EntityRenderers.register(ModEntities.RHINO.get(), RhinoRenderer::new);
|
||||
EntityRenderers.register(ModEntities.MOD_BOAT.get(), pContext -> new ModBoatRenderer(pContext, false));
|
||||
EntityRenderers.register(ModEntities.MOD_CHEST_BOAT.get(), pContext -> new ModBoatRenderer(pContext, true));
|
||||
|
||||
EntityRenderers.register(ModEntities.DICE_PROJECTILE.get(), ThrownItemRenderer::new);
|
||||
|
||||
MenuScreens.register(ModMenuTypes.GEM_POLISHING_MENU.get(), GemPolishingStationScreen::new);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
package net.kaupenjoe.tutorialmod.block;
|
||||
|
||||
import net.kaupenjoe.tutorialmod.TutorialMod;
|
||||
import net.kaupenjoe.tutorialmod.block.custom.CornCropBlock;
|
||||
import net.kaupenjoe.tutorialmod.block.custom.SoundBlock;
|
||||
import net.kaupenjoe.tutorialmod.block.custom.StrawberryCropBlock;
|
||||
import net.kaupenjoe.tutorialmod.block.custom.*;
|
||||
import net.kaupenjoe.tutorialmod.item.ModItems;
|
||||
import net.kaupenjoe.tutorialmod.sound.ModSounds;
|
||||
import net.kaupenjoe.tutorialmod.util.ModWoodTypes;
|
||||
import net.kaupenjoe.tutorialmod.worldgen.tree.PineTreeGrower;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.util.valueproviders.UniformInt;
|
||||
import net.minecraft.world.effect.MobEffects;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.*;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.BlockSetType;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
@@ -43,7 +48,7 @@ public class ModBlocks {
|
||||
.strength(5f).requiresCorrectToolForDrops(), UniformInt.of(3, 7)));
|
||||
|
||||
public static final RegistryObject<Block> SOUND_BLOCK = registerBlock("sound_block",
|
||||
() -> new SoundBlock(BlockBehaviour.Properties.copy(Blocks.IRON_BLOCK)));
|
||||
() -> new SoundBlock(BlockBehaviour.Properties.copy(Blocks.IRON_BLOCK).sound(ModSounds.SOUND_BLOCK_SOUNDS)));
|
||||
|
||||
public static final RegistryObject<Block> SAPPHIRE_STAIRS = registerBlock("sapphire_stairs",
|
||||
() -> new StairBlock(() -> ModBlocks.SAPPHIRE_BLOCK.get().defaultBlockState(),
|
||||
@@ -86,6 +91,76 @@ public class ModBlocks {
|
||||
BlockBehaviour.Properties.copy(Blocks.POTTED_ALLIUM).noOcclusion()));
|
||||
|
||||
|
||||
public static final RegistryObject<Block> GEM_POLISHING_STATION = registerBlock("gem_polishing_station",
|
||||
() -> new GemPolishingStationBlock(BlockBehaviour.Properties.copy(Blocks.IRON_BLOCK).noOcclusion()));
|
||||
|
||||
public static final RegistryObject<Block> PINE_LOG = registerBlock("pine_log",
|
||||
() -> new ModFlammableRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.OAK_LOG).strength(3f)));
|
||||
public static final RegistryObject<Block> PINE_WOOD = registerBlock("pine_wood",
|
||||
() -> new ModFlammableRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.OAK_WOOD).strength(3f)));
|
||||
public static final RegistryObject<Block> STRIPPED_PINE_LOG = registerBlock("stripped_pine_log",
|
||||
() -> new ModFlammableRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.STRIPPED_OAK_LOG).strength(3f)));
|
||||
public static final RegistryObject<Block> STRIPPED_PINE_WOOD = registerBlock("stripped_pine_wood",
|
||||
() -> new ModFlammableRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.STRIPPED_OAK_WOOD).strength(3f)));
|
||||
|
||||
public static final RegistryObject<Block> PINE_PLANKS = registerBlock("pine_planks",
|
||||
() -> new Block(BlockBehaviour.Properties.copy(Blocks.OAK_PLANKS)) {
|
||||
@Override
|
||||
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||
return 5;
|
||||
}
|
||||
});
|
||||
public static final RegistryObject<Block> PINE_LEAVES = registerBlock("pine_leaves",
|
||||
() -> new LeavesBlock(BlockBehaviour.Properties.copy(Blocks.OAK_LEAVES)){
|
||||
@Override
|
||||
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||
return 60;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||
return 30;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
public static final RegistryObject<Block> PINE_SIGN = BLOCKS.register("pine_sign",
|
||||
() -> new ModStandingSignBlock(BlockBehaviour.Properties.copy(Blocks.OAK_SIGN), ModWoodTypes.PINE));
|
||||
public static final RegistryObject<Block> PINE_WALL_SIGN = BLOCKS.register("pine_wall_sign",
|
||||
() -> new ModWallSignBlock(BlockBehaviour.Properties.copy(Blocks.OAK_WALL_SIGN), ModWoodTypes.PINE));
|
||||
|
||||
public static final RegistryObject<Block> PINE_HANGING_SIGN = BLOCKS.register("pine_hanging_sign",
|
||||
() -> new ModHangingSignBlock(BlockBehaviour.Properties.copy(Blocks.OAK_HANGING_SIGN), ModWoodTypes.PINE));
|
||||
public static final RegistryObject<Block> PINE_WALL_HANGING_SIGN = BLOCKS.register("pine_wall_hanging_sign",
|
||||
() -> new ModWallHangingSignBlock(BlockBehaviour.Properties.copy(Blocks.OAK_WALL_HANGING_SIGN), ModWoodTypes.PINE));
|
||||
|
||||
|
||||
public static final RegistryObject<Block> DICE_BLOCK = BLOCKS.register("dice_block",
|
||||
() -> new DiceBlock(BlockBehaviour.Properties.copy(Blocks.STONE).noLootTable()));
|
||||
|
||||
|
||||
public static final RegistryObject<Block> PINE_SAPLING = registerBlock("pine_sapling",
|
||||
() -> new SaplingBlock(new PineTreeGrower(), BlockBehaviour.Properties.copy(Blocks.OAK_SAPLING)));
|
||||
|
||||
public static final RegistryObject<Block> MOD_PORTAL = registerBlock("mod_portal",
|
||||
() -> new ModPortalBlock(BlockBehaviour.Properties.copy(Blocks.STONE).noLootTable().noOcclusion().noCollission()));
|
||||
|
||||
|
||||
private static <T extends Block> RegistryObject<T> registerBlock(String name, Supplier<T> block) {
|
||||
RegistryObject<T> toReturn = BLOCKS.register(name, block);
|
||||
registerBlockItem(name, toReturn);
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package net.kaupenjoe.tutorialmod.block.custom;
|
||||
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.level.block.state.properties.DirectionProperty;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class DiceBlock extends Block {
|
||||
public static DirectionProperty FACING = DirectionProperty.create("number",
|
||||
Direction.UP,
|
||||
Direction.NORTH,
|
||||
Direction.EAST,
|
||||
Direction.SOUTH,
|
||||
Direction.WEST,
|
||||
Direction.DOWN);
|
||||
|
||||
public DiceBlock(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext placeContext) {
|
||||
return this.defaultBlockState().setValue(FACING, getRandomDirection());
|
||||
}
|
||||
|
||||
public BlockState getRandomBlockState() {
|
||||
return this.defaultBlockState().setValue(FACING, getRandomDirection());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
private Direction getRandomDirection() {
|
||||
Direction[] dirs = new Direction[] {
|
||||
Direction.UP,
|
||||
Direction.NORTH,
|
||||
Direction.EAST,
|
||||
Direction.SOUTH,
|
||||
Direction.WEST,
|
||||
Direction.DOWN
|
||||
};
|
||||
|
||||
return dirs[RandomSource.create().nextIntBetweenInclusive(0, dirs.length-1)];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package net.kaupenjoe.tutorialmod.block.custom;
|
||||
|
||||
import net.kaupenjoe.tutorialmod.block.entity.GemPolishingStationBlockEntity;
|
||||
import net.kaupenjoe.tutorialmod.block.entity.ModBlockEntities;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.BaseEntityBlock;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.RenderShape;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityTicker;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraftforge.network.NetworkHooks;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class GemPolishingStationBlock extends BaseEntityBlock {
|
||||
public static final VoxelShape SHAPE = Block.box(0, 0, 0, 16, 12, 16);
|
||||
|
||||
public GemPolishingStationBlock(Properties pProperties) {
|
||||
super(pProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) {
|
||||
return SHAPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RenderShape getRenderShape(BlockState pState) {
|
||||
return RenderShape.MODEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState pNewState, boolean pIsMoving) {
|
||||
if (pState.getBlock() != pNewState.getBlock()) {
|
||||
BlockEntity blockEntity = pLevel.getBlockEntity(pPos);
|
||||
if (blockEntity instanceof GemPolishingStationBlockEntity) {
|
||||
((GemPolishingStationBlockEntity) blockEntity).drops();
|
||||
}
|
||||
}
|
||||
|
||||
super.onRemove(pState, pLevel, pPos, pNewState, pIsMoving);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) {
|
||||
if (!pLevel.isClientSide()) {
|
||||
BlockEntity entity = pLevel.getBlockEntity(pPos);
|
||||
if(entity instanceof GemPolishingStationBlockEntity) {
|
||||
NetworkHooks.openScreen(((ServerPlayer)pPlayer), (GemPolishingStationBlockEntity)entity, pPos);
|
||||
} else {
|
||||
throw new IllegalStateException("Our Container provider is missing!");
|
||||
}
|
||||
}
|
||||
|
||||
return InteractionResult.sidedSuccess(pLevel.isClientSide());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) {
|
||||
return new GemPolishingStationBlockEntity(pPos, pState);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level pLevel, BlockState pState, BlockEntityType<T> pBlockEntityType) {
|
||||
if(pLevel.isClientSide()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return createTickerHelper(pBlockEntityType, ModBlockEntities.GEM_POLISHING_BE.get(),
|
||||
(pLevel1, pPos, pState1, pBlockEntity) -> pBlockEntity.tick(pLevel1, pPos, pState1));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package net.kaupenjoe.tutorialmod.block.custom;
|
||||
|
||||
import net.kaupenjoe.tutorialmod.block.ModBlocks;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.AxeItem;
|
||||
import net.minecraft.world.item.context.UseOnContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.RotatedPillarBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraftforge.common.ToolAction;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class ModFlammableRotatedPillarBlock extends RotatedPillarBlock {
|
||||
public ModFlammableRotatedPillarBlock(Properties pProperties) {
|
||||
super(pProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlammable(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) {
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable BlockState getToolModifiedState(BlockState state, UseOnContext context, ToolAction toolAction, boolean simulate) {
|
||||
if(context.getItemInHand().getItem() instanceof AxeItem) {
|
||||
if(state.is(ModBlocks.PINE_LOG.get())) {
|
||||
return ModBlocks.STRIPPED_PINE_LOG.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS));
|
||||
}
|
||||
|
||||
if(state.is(ModBlocks.PINE_WOOD.get())) {
|
||||
return ModBlocks.STRIPPED_PINE_WOOD.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS));
|
||||
}
|
||||
}
|
||||
|
||||
return super.getToolModifiedState(state, context, toolAction, simulate);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package net.kaupenjoe.tutorialmod.block.custom;
|
||||
|
||||
import net.kaupenjoe.tutorialmod.block.entity.ModHangingSignBlockEntity;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.block.CeilingHangingSignBlock;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.WoodType;
|
||||
|
||||
public class ModHangingSignBlock extends CeilingHangingSignBlock {
|
||||
public ModHangingSignBlock(Properties pProperties, WoodType pType) {
|
||||
super(pProperties, pType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) {
|
||||
return new ModHangingSignBlockEntity(pPos, pState);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package net.kaupenjoe.tutorialmod.block.custom;
|
||||
|
||||
import net.kaupenjoe.tutorialmod.worldgen.dimension.ModDimensions;
|
||||
import net.kaupenjoe.tutorialmod.worldgen.portal.ModTeleporter;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
|
||||
public class ModPortalBlock extends Block {
|
||||
public ModPortalBlock(Properties pProperties) {
|
||||
super(pProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) {
|
||||
if (pPlayer.canChangeDimensions()) {
|
||||
handleKaupenPortal(pPlayer, pPos);
|
||||
return InteractionResult.SUCCESS;
|
||||
} else {
|
||||
return InteractionResult.CONSUME;
|
||||
}
|
||||
}
|
||||
|
||||
private void handleKaupenPortal(Entity player, BlockPos pPos) {
|
||||
if (player.level() instanceof ServerLevel serverlevel) {
|
||||
MinecraftServer minecraftserver = serverlevel.getServer();
|
||||
ResourceKey<Level> resourcekey = player.level().dimension() == ModDimensions.KAUPENDIM_LEVEL_KEY ?
|
||||
Level.OVERWORLD : ModDimensions.KAUPENDIM_LEVEL_KEY;
|
||||
|
||||
ServerLevel portalDimension = minecraftserver.getLevel(resourcekey);
|
||||
if (portalDimension != null && !player.isPassenger()) {
|
||||
if(resourcekey == ModDimensions.KAUPENDIM_LEVEL_KEY) {
|
||||
player.changeDimension(portalDimension, new ModTeleporter(pPos, true));
|
||||
} else {
|
||||
player.changeDimension(portalDimension, new ModTeleporter(pPos, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package net.kaupenjoe.tutorialmod.block.custom;
|
||||
|
||||
import net.kaupenjoe.tutorialmod.block.entity.ModSignBlockEntity;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.block.StandingSignBlock;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.WoodType;
|
||||
|
||||
public class ModStandingSignBlock extends StandingSignBlock {
|
||||
public ModStandingSignBlock(Properties pProperties, WoodType pType) {
|
||||
super(pProperties, pType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) {
|
||||
return new ModSignBlockEntity(pPos, pState);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package net.kaupenjoe.tutorialmod.block.custom;
|
||||
|
||||
import net.kaupenjoe.tutorialmod.block.entity.ModHangingSignBlockEntity;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.block.WallHangingSignBlock;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.WoodType;
|
||||
|
||||
public class ModWallHangingSignBlock extends WallHangingSignBlock {
|
||||
public ModWallHangingSignBlock(Properties pProperties, WoodType pType) {
|
||||
super(pProperties, pType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) {
|
||||
return new ModHangingSignBlockEntity(pPos, pState);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package net.kaupenjoe.tutorialmod.block.custom;
|
||||
|
||||
import net.kaupenjoe.tutorialmod.block.entity.ModSignBlockEntity;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.block.WallSignBlock;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.properties.WoodType;
|
||||
|
||||
public class ModWallSignBlock extends WallSignBlock {
|
||||
public ModWallSignBlock(Properties pProperties, WoodType pType) {
|
||||
super(pProperties, pType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) {
|
||||
return new ModSignBlockEntity(pPos, pState);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,221 @@
|
||||
package net.kaupenjoe.tutorialmod.block.entity;
|
||||
|
||||
import net.kaupenjoe.tutorialmod.item.ModItems;
|
||||
import net.kaupenjoe.tutorialmod.recipe.GemPolishingRecipe;
|
||||
import net.kaupenjoe.tutorialmod.screen.GemPolishingStationMenu;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
import net.minecraft.network.protocol.game.ClientGamePacketListener;
|
||||
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
|
||||
import net.minecraft.world.Container;
|
||||
import net.minecraft.world.Containers;
|
||||
import net.minecraft.world.MenuProvider;
|
||||
import net.minecraft.world.SimpleContainer;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.inventory.ContainerData;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.ItemStackHandler;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public class GemPolishingStationBlockEntity extends BlockEntity implements MenuProvider {
|
||||
private final ItemStackHandler itemHandler = new ItemStackHandler(2) {
|
||||
@Override
|
||||
protected void onContentsChanged(int slot) {
|
||||
setChanged();
|
||||
if(!level.isClientSide()) {
|
||||
level.sendBlockUpdated(getBlockPos(), getBlockState(), getBlockState(), 3);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private static final int INPUT_SLOT = 0;
|
||||
private static final int OUTPUT_SLOT = 1;
|
||||
|
||||
private LazyOptional<IItemHandler> lazyItemHandler = LazyOptional.empty();
|
||||
|
||||
protected final ContainerData data;
|
||||
private int progress = 0;
|
||||
private int maxProgress = 78;
|
||||
|
||||
public GemPolishingStationBlockEntity(BlockPos pPos, BlockState pBlockState) {
|
||||
super(ModBlockEntities.GEM_POLISHING_BE.get(), pPos, pBlockState);
|
||||
this.data = new ContainerData() {
|
||||
@Override
|
||||
public int get(int pIndex) {
|
||||
return switch (pIndex) {
|
||||
case 0 -> GemPolishingStationBlockEntity.this.progress;
|
||||
case 1 -> GemPolishingStationBlockEntity.this.maxProgress;
|
||||
default -> 0;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set(int pIndex, int pValue) {
|
||||
switch (pIndex) {
|
||||
case 0 -> GemPolishingStationBlockEntity.this.progress = pValue;
|
||||
case 1 -> GemPolishingStationBlockEntity.this.maxProgress = pValue;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public ItemStack getRenderStack() {
|
||||
if(itemHandler.getStackInSlot(OUTPUT_SLOT).isEmpty()) {
|
||||
return itemHandler.getStackInSlot(INPUT_SLOT);
|
||||
} else {
|
||||
return itemHandler.getStackInSlot(OUTPUT_SLOT);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull <T> LazyOptional<T> getCapability(@NotNull Capability<T> cap, @Nullable Direction side) {
|
||||
if(cap == ForgeCapabilities.ITEM_HANDLER) {
|
||||
return lazyItemHandler.cast();
|
||||
}
|
||||
|
||||
return super.getCapability(cap, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
super.onLoad();
|
||||
lazyItemHandler = LazyOptional.of(() -> itemHandler);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidateCaps() {
|
||||
super.invalidateCaps();
|
||||
lazyItemHandler.invalidate();
|
||||
}
|
||||
|
||||
public void drops() {
|
||||
SimpleContainer inventory = new SimpleContainer(itemHandler.getSlots());
|
||||
for(int i = 0; i < itemHandler.getSlots(); i++) {
|
||||
inventory.setItem(i, itemHandler.getStackInSlot(i));
|
||||
}
|
||||
Containers.dropContents(this.level, this.worldPosition, inventory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getDisplayName() {
|
||||
return Component.translatable("block.tutorialmod.gem_polishing_station");
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public AbstractContainerMenu createMenu(int pContainerId, Inventory pPlayerInventory, Player pPlayer) {
|
||||
return new GemPolishingStationMenu(pContainerId, pPlayerInventory, this, this.data);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void saveAdditional(CompoundTag pTag) {
|
||||
pTag.put("inventory", itemHandler.serializeNBT());
|
||||
pTag.putInt("gem_polishing_station.progress", progress);
|
||||
|
||||
super.saveAdditional(pTag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load(CompoundTag pTag) {
|
||||
super.load(pTag);
|
||||
itemHandler.deserializeNBT(pTag.getCompound("inventory"));
|
||||
progress = pTag.getInt("gem_polishing_station.progress");
|
||||
}
|
||||
|
||||
public void tick(Level pLevel, BlockPos pPos, BlockState pState) {
|
||||
if(hasRecipe()) {
|
||||
increaseCraftingProgress();
|
||||
setChanged(pLevel, pPos, pState);
|
||||
|
||||
if(hasProgressFinished()) {
|
||||
craftItem();
|
||||
resetProgress();
|
||||
}
|
||||
} else {
|
||||
resetProgress();
|
||||
}
|
||||
}
|
||||
|
||||
private void resetProgress() {
|
||||
progress = 0;
|
||||
}
|
||||
|
||||
private void craftItem() {
|
||||
Optional<GemPolishingRecipe> recipe = getCurrentRecipe();
|
||||
ItemStack result = recipe.get().getResultItem(null);
|
||||
|
||||
this.itemHandler.extractItem(INPUT_SLOT, 1, false);
|
||||
|
||||
this.itemHandler.setStackInSlot(OUTPUT_SLOT, new ItemStack(result.getItem(),
|
||||
this.itemHandler.getStackInSlot(OUTPUT_SLOT).getCount() + result.getCount()));
|
||||
}
|
||||
|
||||
private boolean hasRecipe() {
|
||||
Optional<GemPolishingRecipe> recipe = getCurrentRecipe();
|
||||
|
||||
if(recipe.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
ItemStack result = recipe.get().getResultItem(getLevel().registryAccess());
|
||||
|
||||
return canInsertAmountIntoOutputSlot(result.getCount()) && canInsertItemIntoOutputSlot(result.getItem());
|
||||
}
|
||||
|
||||
private Optional<GemPolishingRecipe> getCurrentRecipe() {
|
||||
SimpleContainer inventory = new SimpleContainer(this.itemHandler.getSlots());
|
||||
for(int i = 0; i < itemHandler.getSlots(); i++) {
|
||||
inventory.setItem(i, this.itemHandler.getStackInSlot(i));
|
||||
}
|
||||
|
||||
return this.level.getRecipeManager().getRecipeFor(GemPolishingRecipe.Type.INSTANCE, inventory, level);
|
||||
}
|
||||
|
||||
private boolean canInsertItemIntoOutputSlot(Item item) {
|
||||
return this.itemHandler.getStackInSlot(OUTPUT_SLOT).isEmpty() || this.itemHandler.getStackInSlot(OUTPUT_SLOT).is(item);
|
||||
}
|
||||
|
||||
private boolean canInsertAmountIntoOutputSlot(int count) {
|
||||
return this.itemHandler.getStackInSlot(OUTPUT_SLOT).getCount() + count <= this.itemHandler.getStackInSlot(OUTPUT_SLOT).getMaxStackSize();
|
||||
}
|
||||
|
||||
private boolean hasProgressFinished() {
|
||||
return progress >= maxProgress;
|
||||
}
|
||||
|
||||
private void increaseCraftingProgress() {
|
||||
progress++;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Packet<ClientGamePacketListener> getUpdatePacket() {
|
||||
return ClientboundBlockEntityDataPacket.create(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundTag getUpdateTag() {
|
||||
return saveWithoutMetadata();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package net.kaupenjoe.tutorialmod.block.entity;
|
||||
|
||||
import net.kaupenjoe.tutorialmod.TutorialMod;
|
||||
import net.kaupenjoe.tutorialmod.block.ModBlocks;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
public class ModBlockEntities {
|
||||
public static final DeferredRegister<BlockEntityType<?>> BLOCK_ENTITIES =
|
||||
DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, TutorialMod.MOD_ID);
|
||||
|
||||
public static final RegistryObject<BlockEntityType<GemPolishingStationBlockEntity>> GEM_POLISHING_BE =
|
||||
BLOCK_ENTITIES.register("gem_polishing_be", () ->
|
||||
BlockEntityType.Builder.of(GemPolishingStationBlockEntity::new,
|
||||
ModBlocks.GEM_POLISHING_STATION.get()).build(null));
|
||||
|
||||
|
||||
public static final RegistryObject<BlockEntityType<ModSignBlockEntity>> MOD_SIGN =
|
||||
BLOCK_ENTITIES.register("mod_sign", () ->
|
||||
BlockEntityType.Builder.of(ModSignBlockEntity::new,
|
||||
ModBlocks.PINE_SIGN.get(), ModBlocks.PINE_WALL_SIGN.get()).build(null));
|
||||
|
||||
public static final RegistryObject<BlockEntityType<ModHangingSignBlockEntity>> MOD_HANGING_SIGN =
|
||||
BLOCK_ENTITIES.register("mod_hanging_sign", () ->
|
||||
BlockEntityType.Builder.of(ModHangingSignBlockEntity::new,
|
||||
ModBlocks.PINE_HANGING_SIGN.get(), ModBlocks.PINE_WALL_HANGING_SIGN.get()).build(null));
|
||||
|
||||
|
||||
public static void register(IEventBus eventBus) {
|
||||
BLOCK_ENTITIES.register(eventBus);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package net.kaupenjoe.tutorialmod.block.entity;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.entity.SignBlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class ModHangingSignBlockEntity extends SignBlockEntity {
|
||||
public ModHangingSignBlockEntity(BlockPos pPos, BlockState pBlockState) {
|
||||
super(ModBlockEntities.MOD_HANGING_SIGN.get(), pPos, pBlockState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntityType<?> getType() {
|
||||
return ModBlockEntities.MOD_HANGING_SIGN.get();
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user