diff --git a/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 b/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 new file mode 100644 index 0000000..f5b748f --- /dev/null +++ b/src/generated/resources/.cache/103d9f3f36b01595f1aa5172191e60eff02e6924 @@ -0,0 +1,2 @@ +// 1.19.4 2023-08-09T19:55:24.8104613 Registries +c2f626799420c07b237e1a67ee82c9650001b819 data/thesideways/worldgen/configured_feature/nutroot.json diff --git a/src/generated/resources/.cache/46d468234177d6f6e177539db17116ec210dc41f b/src/generated/resources/.cache/46d468234177d6f6e177539db17116ec210dc41f new file mode 100644 index 0000000..9efd1eb --- /dev/null +++ b/src/generated/resources/.cache/46d468234177d6f6e177539db17116ec210dc41f @@ -0,0 +1,28 @@ +// 1.19.4 2023-08-09T19:35:00.2471239 Block States: thesideways +b7a968bfd572513c65ee44890d9abae80f329277 assets/thesideways/blockstates/nutroot_leaves.json +e43cb7709c816afad887fa002e09edfa3cca2323 assets/thesideways/blockstates/nutroot_log.json +95e30a56997b0a58b30a795980a667979d72cea1 assets/thesideways/blockstates/nutroot_planks.json +8782049fbfe508f7a4e324ae90a14189b900b6a5 assets/thesideways/blockstates/nutroot_sapling.json +be2cc982036e94c2d6e47206f902ed0af0e10bf9 assets/thesideways/blockstates/nutroot_wood.json +818aebb1cd3ea0a7cea0b52c9da519e6c323c718 assets/thesideways/blockstates/sideways_dirt.json +fe93a1b018663a26bb4f767f9cf79c4611d7f717 assets/thesideways/blockstates/stripped_nutroot_log.json +c76cc68072d312884b79a6cd4fd6230a66a85459 assets/thesideways/blockstates/stripped_nutroot_wood.json +80960260234c1509056c17b5511c91d47f8acd41 assets/thesideways/models/block/nutroot_leaves.json +acc8980086328d6c72b433a18fca2d31819c2249 assets/thesideways/models/block/nutroot_log.json +82a95bcc2d3e788ce87e2c5fe119d3ed4db45cd1 assets/thesideways/models/block/nutroot_log_horizontal.json +b01717fa9a908fb27280a8e920ebcecbcfbae1c7 assets/thesideways/models/block/nutroot_planks.json +9d0ada619a5e249a6e154bee401979fee3a412b3 assets/thesideways/models/block/nutroot_sapling.json +db2ed141dabc31ba8b6103c9a8d70adbe0d28913 assets/thesideways/models/block/nutroot_wood.json +54f5b2cb698a6e07d605e1e96b6546e349528e5c assets/thesideways/models/block/nutroot_wood_horizontal.json +711fce57d7b0d1ed948fa91c5a51f31be62be8fa assets/thesideways/models/block/sideways_dirt.json +8002032d3ce4dd85a5fea32116e0716f87223f0c assets/thesideways/models/block/stripped_nutroot_log.json +b93da98cd29f323fb8f0af7e5cc7fafba3c2c1f4 assets/thesideways/models/block/stripped_nutroot_log_horizontal.json +443649158cf9085ee6deada6fe02b85f9953b1f3 assets/thesideways/models/block/stripped_nutroot_wood.json +7809d72321366499cd40a5513b133e1e7db2970c assets/thesideways/models/block/stripped_nutroot_wood_horizontal.json +a4942e2eefc6e6794af37e35e785fc14f4d0412b assets/thesideways/models/item/nutroot_leaves.json +c7c93fc405a420004876d3f72e356b1bacdf89a4 assets/thesideways/models/item/nutroot_log.json +33a49cd920cc7bfbca7dbbb23cb8061842ac1cfd assets/thesideways/models/item/nutroot_planks.json +e96fa81178794b4123d39be2d03846e7bae1bfaa assets/thesideways/models/item/nutroot_wood.json +23eaaec48d2a04e1734c2627b9ffb69c78d65da5 assets/thesideways/models/item/sideways_dirt.json +8652ebc979dc8ac72c4d414af9fc64df416f1336 assets/thesideways/models/item/stripped_nutroot_log.json +639624baf9d2e86af21913ba2bc1fdaa8ebcb616 assets/thesideways/models/item/stripped_nutroot_wood.json diff --git a/src/generated/resources/.cache/50ed7adc7c0cf799be0c215b222a6d993616dd1f b/src/generated/resources/.cache/50ed7adc7c0cf799be0c215b222a6d993616dd1f new file mode 100644 index 0000000..2dd4db5 --- /dev/null +++ b/src/generated/resources/.cache/50ed7adc7c0cf799be0c215b222a6d993616dd1f @@ -0,0 +1,4 @@ +// 1.19.4 2023-08-09T20:10:50.5101126 Item Models: thesideways +29e4d8ed33d1d56e6e5d390ae0b8b8d064eeaa08 assets/thesideways/models/item/nutroot_sapling.json +604704bd3153e799487a3bdfc7e8416690ebe921 assets/thesideways/models/item/peanut_essence.json +14cb58c1df7f0cf8fe8d8a5697a62a1b620b917c assets/thesideways/models/item/peanut_juice.json diff --git a/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d b/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d new file mode 100644 index 0000000..183af0b --- /dev/null +++ b/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d @@ -0,0 +1,10 @@ +// 1.19.4 2023-08-09T20:28:46.6145124 Loot Tables +c5380fbc01cbe1a246d3771cd5a0f0685ad0c539 data/thesideways/loot_tables/blocks/nutroot_leaves.json +f428e25fedc7b3a7ff44c073ef1a016f3e4ea362 data/thesideways/loot_tables/blocks/nutroot_log.json +da900aba2d686fda35cf930073a007bbd5cb8ce3 data/thesideways/loot_tables/blocks/nutroot_planks.json +febef7f363fa62380947fd91cbd2da7cbbaa9691 data/thesideways/loot_tables/blocks/nutroot_sapling.json +7225a47c1d9b6994de97d2d46859a9bcc44f0a7e data/thesideways/loot_tables/blocks/nutroot_wood.json +60f1b1a6e6bd1b3bca01f51574d2500263428bce data/thesideways/loot_tables/blocks/sideways_dirt.json +8b370362b59a809177052e8e531e92584ac5535e data/thesideways/loot_tables/blocks/sideways_grass_block.json +b697d0a9622236862512d8db6062b6889226042e data/thesideways/loot_tables/blocks/stripped_nutroot_log.json +77915387b0d3e41ce15399ca22749123eaab3054 data/thesideways/loot_tables/blocks/stripped_nutroot_wood.json diff --git a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e new file mode 100644 index 0000000..c0acb70 --- /dev/null +++ b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e @@ -0,0 +1 @@ +// 1.19.4 2023-08-09T19:25:58.5474059 Recipes diff --git a/src/generated/resources/assets/thesideways/blockstates/nutroot_leaves.json b/src/generated/resources/assets/thesideways/blockstates/nutroot_leaves.json new file mode 100644 index 0000000..bd0aa4e --- /dev/null +++ b/src/generated/resources/assets/thesideways/blockstates/nutroot_leaves.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "thesideways:block/nutroot_leaves" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/blockstates/nutroot_log.json b/src/generated/resources/assets/thesideways/blockstates/nutroot_log.json new file mode 100644 index 0000000..dcbfa8d --- /dev/null +++ b/src/generated/resources/assets/thesideways/blockstates/nutroot_log.json @@ -0,0 +1,16 @@ +{ + "variants": { + "axis=x": { + "model": "thesideways:block/nutroot_log_horizontal", + "x": 90, + "y": 90 + }, + "axis=y": { + "model": "thesideways:block/nutroot_log" + }, + "axis=z": { + "model": "thesideways:block/nutroot_log_horizontal", + "x": 90 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/blockstates/nutroot_planks.json b/src/generated/resources/assets/thesideways/blockstates/nutroot_planks.json new file mode 100644 index 0000000..83ea720 --- /dev/null +++ b/src/generated/resources/assets/thesideways/blockstates/nutroot_planks.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "thesideways:block/nutroot_planks" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/blockstates/nutroot_sapling.json b/src/generated/resources/assets/thesideways/blockstates/nutroot_sapling.json new file mode 100644 index 0000000..da3a689 --- /dev/null +++ b/src/generated/resources/assets/thesideways/blockstates/nutroot_sapling.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "thesideways:block/nutroot_sapling" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/blockstates/nutroot_wood.json b/src/generated/resources/assets/thesideways/blockstates/nutroot_wood.json new file mode 100644 index 0000000..8082f09 --- /dev/null +++ b/src/generated/resources/assets/thesideways/blockstates/nutroot_wood.json @@ -0,0 +1,16 @@ +{ + "variants": { + "axis=x": { + "model": "thesideways:block/nutroot_wood_horizontal", + "x": 90, + "y": 90 + }, + "axis=y": { + "model": "thesideways:block/nutroot_wood" + }, + "axis=z": { + "model": "thesideways:block/nutroot_wood_horizontal", + "x": 90 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/blockstates/sideways_dirt.json b/src/generated/resources/assets/thesideways/blockstates/sideways_dirt.json new file mode 100644 index 0000000..1c7fbdb --- /dev/null +++ b/src/generated/resources/assets/thesideways/blockstates/sideways_dirt.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "thesideways:block/sideways_dirt" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/blockstates/stripped_nutroot_log.json b/src/generated/resources/assets/thesideways/blockstates/stripped_nutroot_log.json new file mode 100644 index 0000000..24f4762 --- /dev/null +++ b/src/generated/resources/assets/thesideways/blockstates/stripped_nutroot_log.json @@ -0,0 +1,16 @@ +{ + "variants": { + "axis=x": { + "model": "thesideways:block/stripped_nutroot_log_horizontal", + "x": 90, + "y": 90 + }, + "axis=y": { + "model": "thesideways:block/stripped_nutroot_log" + }, + "axis=z": { + "model": "thesideways:block/stripped_nutroot_log_horizontal", + "x": 90 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/blockstates/stripped_nutroot_wood.json b/src/generated/resources/assets/thesideways/blockstates/stripped_nutroot_wood.json new file mode 100644 index 0000000..e96f943 --- /dev/null +++ b/src/generated/resources/assets/thesideways/blockstates/stripped_nutroot_wood.json @@ -0,0 +1,16 @@ +{ + "variants": { + "axis=x": { + "model": "thesideways:block/stripped_nutroot_wood_horizontal", + "x": 90, + "y": 90 + }, + "axis=y": { + "model": "thesideways:block/stripped_nutroot_wood" + }, + "axis=z": { + "model": "thesideways:block/stripped_nutroot_wood_horizontal", + "x": 90 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/block/nutroot_leaves.json b/src/generated/resources/assets/thesideways/models/block/nutroot_leaves.json new file mode 100644 index 0000000..4a5cfa8 --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/block/nutroot_leaves.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "thesideways:block/nutroot_leaves" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/block/nutroot_log.json b/src/generated/resources/assets/thesideways/models/block/nutroot_log.json new file mode 100644 index 0000000..fab8d1b --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/block/nutroot_log.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "end": "thesideways:block/nutroot_log_top", + "side": "thesideways:block/nutroot_log" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/block/nutroot_log_horizontal.json b/src/generated/resources/assets/thesideways/models/block/nutroot_log_horizontal.json new file mode 100644 index 0000000..775315f --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/block/nutroot_log_horizontal.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column_horizontal", + "textures": { + "end": "thesideways:block/nutroot_log_top", + "side": "thesideways:block/nutroot_log" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/block/nutroot_planks.json b/src/generated/resources/assets/thesideways/models/block/nutroot_planks.json new file mode 100644 index 0000000..ed984db --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/block/nutroot_planks.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "thesideways:block/nutroot_planks" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/block/nutroot_sapling.json b/src/generated/resources/assets/thesideways/models/block/nutroot_sapling.json new file mode 100644 index 0000000..5fbd7d5 --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/block/nutroot_sapling.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cross", + "render_type": "minecraft:cutout", + "textures": { + "cross": "thesideways:block/nutroot_sapling" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/block/nutroot_wood.json b/src/generated/resources/assets/thesideways/models/block/nutroot_wood.json new file mode 100644 index 0000000..090436b --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/block/nutroot_wood.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "end": "thesideways:block/nutroot_log", + "side": "thesideways:block/nutroot_log" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/block/nutroot_wood_horizontal.json b/src/generated/resources/assets/thesideways/models/block/nutroot_wood_horizontal.json new file mode 100644 index 0000000..41534e2 --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/block/nutroot_wood_horizontal.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column_horizontal", + "textures": { + "end": "thesideways:block/nutroot_log", + "side": "thesideways:block/nutroot_log" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/thesideways/models/block/sideways_dirt.json b/src/generated/resources/assets/thesideways/models/block/sideways_dirt.json similarity index 100% rename from src/main/resources/assets/thesideways/models/block/sideways_dirt.json rename to src/generated/resources/assets/thesideways/models/block/sideways_dirt.json diff --git a/src/generated/resources/assets/thesideways/models/block/stripped_nutroot_log.json b/src/generated/resources/assets/thesideways/models/block/stripped_nutroot_log.json new file mode 100644 index 0000000..29c4786 --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/block/stripped_nutroot_log.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "end": "thesideways:block/stripped_nutroot_log_top", + "side": "thesideways:block/stripped_nutroot_log" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/block/stripped_nutroot_log_horizontal.json b/src/generated/resources/assets/thesideways/models/block/stripped_nutroot_log_horizontal.json new file mode 100644 index 0000000..07ff46f --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/block/stripped_nutroot_log_horizontal.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column_horizontal", + "textures": { + "end": "thesideways:block/stripped_nutroot_log_top", + "side": "thesideways:block/stripped_nutroot_log" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/block/stripped_nutroot_wood.json b/src/generated/resources/assets/thesideways/models/block/stripped_nutroot_wood.json new file mode 100644 index 0000000..4527e02 --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/block/stripped_nutroot_wood.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "end": "thesideways:block/stripped_nutroot_log", + "side": "thesideways:block/stripped_nutroot_log" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/block/stripped_nutroot_wood_horizontal.json b/src/generated/resources/assets/thesideways/models/block/stripped_nutroot_wood_horizontal.json new file mode 100644 index 0000000..f07b6fb --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/block/stripped_nutroot_wood_horizontal.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column_horizontal", + "textures": { + "end": "thesideways:block/stripped_nutroot_log", + "side": "thesideways:block/stripped_nutroot_log" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/item/nutroot_leaves.json b/src/generated/resources/assets/thesideways/models/item/nutroot_leaves.json new file mode 100644 index 0000000..1e11e67 --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/item/nutroot_leaves.json @@ -0,0 +1,3 @@ +{ + "parent": "thesideways:block/nutroot_leaves" +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/item/nutroot_log.json b/src/generated/resources/assets/thesideways/models/item/nutroot_log.json new file mode 100644 index 0000000..1a5f0c0 --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/item/nutroot_log.json @@ -0,0 +1,3 @@ +{ + "parent": "thesideways:block/nutroot_log" +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/item/nutroot_planks.json b/src/generated/resources/assets/thesideways/models/item/nutroot_planks.json new file mode 100644 index 0000000..d5ff0ff --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/item/nutroot_planks.json @@ -0,0 +1,3 @@ +{ + "parent": "thesideways:block/nutroot_planks" +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/item/nutroot_sapling.json b/src/generated/resources/assets/thesideways/models/item/nutroot_sapling.json new file mode 100644 index 0000000..f88804e --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/item/nutroot_sapling.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "thesideways:block/nutroot_sapling" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/item/nutroot_wood.json b/src/generated/resources/assets/thesideways/models/item/nutroot_wood.json new file mode 100644 index 0000000..13ae47c --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/item/nutroot_wood.json @@ -0,0 +1,3 @@ +{ + "parent": "thesideways:block/nutroot_wood" +} \ No newline at end of file diff --git a/src/main/resources/assets/thesideways/models/item/peanut_essence.json b/src/generated/resources/assets/thesideways/models/item/peanut_essence.json similarity index 100% rename from src/main/resources/assets/thesideways/models/item/peanut_essence.json rename to src/generated/resources/assets/thesideways/models/item/peanut_essence.json diff --git a/src/main/resources/assets/thesideways/models/item/peanut_juice.json b/src/generated/resources/assets/thesideways/models/item/peanut_juice.json similarity index 100% rename from src/main/resources/assets/thesideways/models/item/peanut_juice.json rename to src/generated/resources/assets/thesideways/models/item/peanut_juice.json diff --git a/src/main/resources/assets/thesideways/models/item/sideways_dirt.json b/src/generated/resources/assets/thesideways/models/item/sideways_dirt.json similarity index 100% rename from src/main/resources/assets/thesideways/models/item/sideways_dirt.json rename to src/generated/resources/assets/thesideways/models/item/sideways_dirt.json diff --git a/src/generated/resources/assets/thesideways/models/item/stripped_nutroot_log.json b/src/generated/resources/assets/thesideways/models/item/stripped_nutroot_log.json new file mode 100644 index 0000000..f99d2ae --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/item/stripped_nutroot_log.json @@ -0,0 +1,3 @@ +{ + "parent": "thesideways:block/stripped_nutroot_log" +} \ No newline at end of file diff --git a/src/generated/resources/assets/thesideways/models/item/stripped_nutroot_wood.json b/src/generated/resources/assets/thesideways/models/item/stripped_nutroot_wood.json new file mode 100644 index 0000000..42a97eb --- /dev/null +++ b/src/generated/resources/assets/thesideways/models/item/stripped_nutroot_wood.json @@ -0,0 +1,3 @@ +{ + "parent": "thesideways:block/stripped_nutroot_wood" +} \ No newline at end of file diff --git a/src/generated/resources/data/thesideways/loot_tables/blocks/nutroot_leaves.json b/src/generated/resources/data/thesideways/loot_tables/blocks/nutroot_leaves.json new file mode 100644 index 0000000..f881993 --- /dev/null +++ b/src/generated/resources/data/thesideways/loot_tables/blocks/nutroot_leaves.json @@ -0,0 +1,135 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:alternative", + "terms": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": [ + "minecraft:shears" + ] + } + }, + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ] + } + ], + "name": "thesideways:nutroot_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": "thesideways:nutroot_sapling" + } + ] + } + ], + "rolls": 1.0 + }, + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:inverted", + "term": { + "condition": "minecraft:alternative", + "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 + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/thesideways/loot_tables/blocks/nutroot_log.json b/src/generated/resources/data/thesideways/loot_tables/blocks/nutroot_log.json new file mode 100644 index 0000000..62f8d91 --- /dev/null +++ b/src/generated/resources/data/thesideways/loot_tables/blocks/nutroot_log.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "thesideways:nutroot_log" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/thesideways/loot_tables/blocks/nutroot_planks.json b/src/generated/resources/data/thesideways/loot_tables/blocks/nutroot_planks.json new file mode 100644 index 0000000..a5234cd --- /dev/null +++ b/src/generated/resources/data/thesideways/loot_tables/blocks/nutroot_planks.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "thesideways:nutroot_planks" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/thesideways/loot_tables/blocks/nutroot_sapling.json b/src/generated/resources/data/thesideways/loot_tables/blocks/nutroot_sapling.json new file mode 100644 index 0000000..3c287df --- /dev/null +++ b/src/generated/resources/data/thesideways/loot_tables/blocks/nutroot_sapling.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "thesideways:nutroot_sapling" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/thesideways/loot_tables/blocks/nutroot_wood.json b/src/generated/resources/data/thesideways/loot_tables/blocks/nutroot_wood.json new file mode 100644 index 0000000..01c3a91 --- /dev/null +++ b/src/generated/resources/data/thesideways/loot_tables/blocks/nutroot_wood.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "thesideways:nutroot_wood" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/thesideways/loot_tables/blocks/sideways_dirt.json b/src/generated/resources/data/thesideways/loot_tables/blocks/sideways_dirt.json similarity index 53% rename from src/main/resources/data/thesideways/loot_tables/blocks/sideways_dirt.json rename to src/generated/resources/data/thesideways/loot_tables/blocks/sideways_dirt.json index 028818c..31c35b4 100644 --- a/src/main/resources/data/thesideways/loot_tables/blocks/sideways_dirt.json +++ b/src/generated/resources/data/thesideways/loot_tables/blocks/sideways_dirt.json @@ -2,13 +2,19 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "thesideways:sideways_dirt" } - ] + ], + "rolls": 1.0 } ] } \ No newline at end of file diff --git a/src/main/resources/data/thesideways/loot_tables/blocks/sideways_grass_block.json b/src/generated/resources/data/thesideways/loot_tables/blocks/sideways_grass_block.json similarity index 100% rename from src/main/resources/data/thesideways/loot_tables/blocks/sideways_grass_block.json rename to src/generated/resources/data/thesideways/loot_tables/blocks/sideways_grass_block.json diff --git a/src/generated/resources/data/thesideways/loot_tables/blocks/stripped_nutroot_log.json b/src/generated/resources/data/thesideways/loot_tables/blocks/stripped_nutroot_log.json new file mode 100644 index 0000000..826fd0f --- /dev/null +++ b/src/generated/resources/data/thesideways/loot_tables/blocks/stripped_nutroot_log.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "thesideways:stripped_nutroot_log" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/thesideways/loot_tables/blocks/stripped_nutroot_wood.json b/src/generated/resources/data/thesideways/loot_tables/blocks/stripped_nutroot_wood.json new file mode 100644 index 0000000..148a959 --- /dev/null +++ b/src/generated/resources/data/thesideways/loot_tables/blocks/stripped_nutroot_wood.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "thesideways:stripped_nutroot_wood" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/thesideways/worldgen/configured_feature/nutroot.json b/src/generated/resources/data/thesideways/worldgen/configured_feature/nutroot.json new file mode 100644 index 0000000..79c3f44 --- /dev/null +++ b/src/generated/resources/data/thesideways/worldgen/configured_feature/nutroot.json @@ -0,0 +1,52 @@ +{ + "type": "minecraft:tree", + "config": { + "decorators": [], + "dirt_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:dirt" + } + }, + "foliage_placer": { + "type": "minecraft:blob_foliage_placer", + "height": 4, + "offset": 0, + "radius": 2 + }, + "foliage_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "thesideways:nutroot_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": "minecraft:straight_trunk_placer", + "base_height": 5, + "height_rand_a": 6, + "height_rand_b": 3 + }, + "trunk_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "thesideways:nutroot_log", + "Properties": { + "axis": "y" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/java/dev/bonnie/thesideways/TheSideways.java b/src/main/java/dev/bonnie/thesideways/TheSideways.java index 9cb08b8..f9e5b1a 100644 --- a/src/main/java/dev/bonnie/thesideways/TheSideways.java +++ b/src/main/java/dev/bonnie/thesideways/TheSideways.java @@ -51,6 +51,13 @@ private void addCreative(CreativeModeTabEvent.BuildContents event) { // BLOCKS event.accept(ModBlocks.SIDEWAYS_DIRT); event.accept(ModBlocks.SIDEWAYS_GRASS_BLOCK); + event.accept(ModBlocks.NUTROOT_LOG); + event.accept(ModBlocks.STRIPPED_NUTROOT_LOG); + event.accept(ModBlocks.NUTROOT_WOOD); + event.accept(ModBlocks.STRIPPED_NUTROOT_WOOD); + event.accept(ModBlocks.NUTROOT_PLANKS); + event.accept(ModBlocks.NUTROOT_LEAVES); + event.accept(ModBlocks.NUTROOT_SAPLING); } } diff --git a/src/main/java/dev/bonnie/thesideways/block/ModBlocks.java b/src/main/java/dev/bonnie/thesideways/block/ModBlocks.java index e78f1ea..4468a11 100644 --- a/src/main/java/dev/bonnie/thesideways/block/ModBlocks.java +++ b/src/main/java/dev/bonnie/thesideways/block/ModBlocks.java @@ -1,12 +1,17 @@ package dev.bonnie.thesideways.block; import dev.bonnie.thesideways.TheSideways; +import dev.bonnie.thesideways.block.custom.ModFlammableRotatedPillarBlock; import dev.bonnie.thesideways.item.ModItems; +import dev.bonnie.thesideways.worldgen.tree.NutrootTreeGrower; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.SoundType; +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.material.Material; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.registries.DeferredRegister; @@ -24,11 +29,66 @@ public class ModBlocks { public static final RegistryObject SIDEWAYS_DIRT = registerBlock("sideways_dirt", () -> new Block(BlockBehaviour.Properties.of(Material.DIRT) .strength(0.5f).sound(SoundType.GRAVEL).explosionResistance(0.5f))); - public static final RegistryObject SIDEWAYS_GRASS_BLOCK = registerBlock("sideways_grass_block", () -> new Block(BlockBehaviour.Properties.of(Material.DIRT) .strength(0.6f).sound(SoundType.GRASS).explosionResistance(0.6f))); + // NUTROOT LOGS & WOOD + public static final RegistryObject NUTROOT_LOG = registerBlock("nutroot_log", + () -> new ModFlammableRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.OAK_LOG) + .strength(2f).sound(SoundType.WOOD).explosionResistance(2f))); + public static final RegistryObject NUTROOT_WOOD = registerBlock("nutroot_wood", + () -> new ModFlammableRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.OAK_WOOD) + .strength(2f).sound(SoundType.WOOD).explosionResistance(2f))); + public static final RegistryObject STRIPPED_NUTROOT_LOG = registerBlock("stripped_nutroot_log", + () -> new ModFlammableRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.STRIPPED_OAK_LOG) + .strength(2f).sound(SoundType.WOOD).explosionResistance(2f))); + public static final RegistryObject STRIPPED_NUTROOT_WOOD = registerBlock("stripped_nutroot_wood", + () -> new ModFlammableRotatedPillarBlock(BlockBehaviour.Properties.copy(Blocks.STRIPPED_OAK_WOOD) + .strength(2f).sound(SoundType.WOOD).explosionResistance(2f))); + + // NUTROOT PLANK + public static final RegistryObject NUTROOT_PLANKS = registerBlock("nutroot_planks", + () -> new Block(BlockBehaviour.Properties.copy(Blocks.OAK_PLANKS) + .strength(2f).sound(SoundType.WOOD).explosionResistance(2f)) { + @Override + public boolean isFlammable(BlockState state, BlockGetter world, BlockPos pos, Direction face) { + 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 20; + } + }); + + // NUTROOT LEAVES AND SAPLING + public static final RegistryObject NUTROOT_LEAVES = registerBlock("nutroot_leaves", + () -> new LeavesBlock(BlockBehaviour.Properties.copy(Blocks.OAK_LEAVES) + .strength(0.2f).sound(SoundType.GRASS).explosionResistance(0.2f)) { + @Override + public boolean isFlammable(BlockState state, BlockGetter world, BlockPos pos, Direction face) { + return true; + } + + @Override + public int getFlammability(BlockState state, BlockGetter level, BlockPos pos, Direction direction) { + return 30; + } + + @Override + public int getFireSpreadSpeed(BlockState state, BlockGetter level, BlockPos pos, Direction direction) { + return 60; + } + }); + public static final RegistryObject NUTROOT_SAPLING = registerBlock("nutroot_sapling", + () -> new SaplingBlock(new NutrootTreeGrower(), BlockBehaviour.Properties.copy(Blocks.OAK_SAPLING))); + // HELPER FUNCTIONS private static RegistryObject registerBlock(String name, Supplier block) { diff --git a/src/main/java/dev/bonnie/thesideways/block/custom/ModFlammableRotatedPillarBlock.java b/src/main/java/dev/bonnie/thesideways/block/custom/ModFlammableRotatedPillarBlock.java new file mode 100644 index 0000000..ebdf027 --- /dev/null +++ b/src/main/java/dev/bonnie/thesideways/block/custom/ModFlammableRotatedPillarBlock.java @@ -0,0 +1,46 @@ +package dev.bonnie.thesideways.block.custom; + +import dev.bonnie.thesideways.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.jetbrains.annotations.Nullable; + +public class ModFlammableRotatedPillarBlock extends RotatedPillarBlock { + public ModFlammableRotatedPillarBlock(Properties properties) { + super(properties); + } + + @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.NUTROOT_LOG.get())) { + return ModBlocks.STRIPPED_NUTROOT_LOG.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS)); + } + if(state.is(ModBlocks.NUTROOT_WOOD.get())) { + return ModBlocks.STRIPPED_NUTROOT_WOOD.get().defaultBlockState().setValue(AXIS, state.getValue(AXIS)); + } + } + return super.getToolModifiedState(state, context, toolAction, simulate); + } +} diff --git a/src/main/java/dev/bonnie/thesideways/data_gen/DataGenerators.java b/src/main/java/dev/bonnie/thesideways/data_gen/DataGenerators.java new file mode 100644 index 0000000..ead67ab --- /dev/null +++ b/src/main/java/dev/bonnie/thesideways/data_gen/DataGenerators.java @@ -0,0 +1,29 @@ +package dev.bonnie.thesideways.data_gen; + +import dev.bonnie.thesideways.TheSideways; +import net.minecraft.core.HolderLookup; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.PackOutput; +import net.minecraftforge.common.data.ExistingFileHelper; +import net.minecraftforge.data.event.GatherDataEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; + +import java.util.concurrent.CompletableFuture; + +@Mod.EventBusSubscriber(modid = TheSideways.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD) +public class DataGenerators { + @SubscribeEvent + public static void gatherData(GatherDataEvent event) { + DataGenerator generator = event.getGenerator(); + PackOutput packOutput = generator.getPackOutput(); + ExistingFileHelper existingFileHelper = event.getExistingFileHelper(); + CompletableFuture lookupProvider = event.getLookupProvider(); + + generator.addProvider(true, new ModRecipeProvider(packOutput)); + generator.addProvider(true, ModLootTableProvider.create(packOutput)); + generator.addProvider(true, new ModBlockStateProvider(packOutput, existingFileHelper)); + generator.addProvider(true, new ModItemModelProvider(packOutput, existingFileHelper)); + generator.addProvider(event.includeServer(), new ModWorldGenProvider(packOutput, lookupProvider)); + } +} diff --git a/src/main/java/dev/bonnie/thesideways/data_gen/ModBlockLootTables.java b/src/main/java/dev/bonnie/thesideways/data_gen/ModBlockLootTables.java new file mode 100644 index 0000000..c50021b --- /dev/null +++ b/src/main/java/dev/bonnie/thesideways/data_gen/ModBlockLootTables.java @@ -0,0 +1,37 @@ +package dev.bonnie.thesideways.data_gen; + +import dev.bonnie.thesideways.block.ModBlocks; +import net.minecraft.data.loot.BlockLootSubProvider; +import net.minecraft.world.flag.FeatureFlags; +import net.minecraft.world.level.block.Block; +import net.minecraftforge.registries.RegistryObject; + +import java.util.Set; + +public class ModBlockLootTables extends BlockLootSubProvider { + public ModBlockLootTables() { + super(Set.of(), FeatureFlags.REGISTRY.allFlags()); + } + + @Override + protected void generate() { + dropSelf(ModBlocks.SIDEWAYS_DIRT.get()); + this.add(ModBlocks.SIDEWAYS_GRASS_BLOCK.get(), (block) -> + createGrassDrops(ModBlocks.SIDEWAYS_GRASS_BLOCK.get())); + + this.dropSelf(ModBlocks.NUTROOT_LOG.get()); + this.dropSelf(ModBlocks.NUTROOT_WOOD.get()); + this.dropSelf(ModBlocks.NUTROOT_PLANKS.get()); + this.dropSelf(ModBlocks.STRIPPED_NUTROOT_LOG.get()); + this.dropSelf(ModBlocks.STRIPPED_NUTROOT_WOOD.get()); + this.dropSelf(ModBlocks.NUTROOT_SAPLING.get()); + + this.add(ModBlocks.NUTROOT_LEAVES.get(), (block) -> + createLeavesDrops(block, ModBlocks.NUTROOT_SAPLING.get(), NORMAL_LEAVES_SAPLING_CHANCES)); + } + + @Override + protected Iterable getKnownBlocks() { + return ModBlocks.BLOCKS.getEntries().stream().map(RegistryObject::get)::iterator; + } +} diff --git a/src/main/java/dev/bonnie/thesideways/data_gen/ModBlockStateProvider.java b/src/main/java/dev/bonnie/thesideways/data_gen/ModBlockStateProvider.java new file mode 100644 index 0000000..5d4688a --- /dev/null +++ b/src/main/java/dev/bonnie/thesideways/data_gen/ModBlockStateProvider.java @@ -0,0 +1,49 @@ +package dev.bonnie.thesideways.data_gen; + +import dev.bonnie.thesideways.TheSideways; +import dev.bonnie.thesideways.block.ModBlocks; +import dev.bonnie.thesideways.block.custom.ModFlammableRotatedPillarBlock; +import net.minecraft.data.PackOutput; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.RotatedPillarBlock; +import net.minecraftforge.client.model.generators.BlockStateProvider; +import net.minecraftforge.common.data.ExistingFileHelper; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; + +public class ModBlockStateProvider extends BlockStateProvider { + public ModBlockStateProvider(PackOutput output, ExistingFileHelper exFileHelper) { + super(output, TheSideways.MOD_ID, exFileHelper); + } + + @Override + protected void registerStatesAndModels() { + blockWithItem(ModBlocks.SIDEWAYS_DIRT); + + logBlock(((RotatedPillarBlock) ModBlocks.NUTROOT_LOG.get())); + axisBlock((RotatedPillarBlock) ModBlocks.NUTROOT_WOOD.get(), blockTexture(ModBlocks.NUTROOT_LOG.get()), blockTexture(ModBlocks.NUTROOT_LOG.get())); + axisBlock((RotatedPillarBlock) ModBlocks.STRIPPED_NUTROOT_LOG.get(), new ResourceLocation(TheSideways.MOD_ID, "block/stripped_nutroot_log"), + new ResourceLocation(TheSideways.MOD_ID, "block/stripped_nutroot_log_top")); + axisBlock((RotatedPillarBlock) ModBlocks.STRIPPED_NUTROOT_WOOD.get(), new ResourceLocation(TheSideways.MOD_ID, "block/stripped_nutroot_log"), + new ResourceLocation(TheSideways.MOD_ID, "block/stripped_nutroot_log")); + + blockWithItem(ModBlocks.NUTROOT_PLANKS); + blockWithItem(ModBlocks.NUTROOT_LEAVES); + saplingBlock(ModBlocks.NUTROOT_SAPLING); + + simpleBlockItem(ModBlocks.NUTROOT_LOG.get(), models().withExistingParent("thesideways:nutroot_log", "minecraft:block/cube_column")); + simpleBlockItem(ModBlocks.NUTROOT_WOOD.get(), models().withExistingParent("thesideways:nutroot_wood", "minecraft:block/cube_column")); + simpleBlockItem(ModBlocks.STRIPPED_NUTROOT_LOG.get(), models().withExistingParent("thesideways:stripped_nutroot_log", "minecraft:block/cube_column")); + simpleBlockItem(ModBlocks.STRIPPED_NUTROOT_WOOD.get(), models().withExistingParent("thesideways:stripped_nutroot_wood", "minecraft:block/cube_column")); + } + + private void blockWithItem(RegistryObject blockRegistryObject) { + simpleBlockWithItem(blockRegistryObject.get(), cubeAll(blockRegistryObject.get())); + } + + private void saplingBlock(RegistryObject blockRegistryObject) { + simpleBlock(blockRegistryObject.get(), + models().cross(ForgeRegistries.BLOCKS.getKey(blockRegistryObject.get()).getPath(), blockTexture(blockRegistryObject.get())).renderType("cutout")); + } +} diff --git a/src/main/java/dev/bonnie/thesideways/data_gen/ModItemModelProvider.java b/src/main/java/dev/bonnie/thesideways/data_gen/ModItemModelProvider.java new file mode 100644 index 0000000..59f67da --- /dev/null +++ b/src/main/java/dev/bonnie/thesideways/data_gen/ModItemModelProvider.java @@ -0,0 +1,44 @@ +package dev.bonnie.thesideways.data_gen; + +import dev.bonnie.thesideways.TheSideways; +import dev.bonnie.thesideways.block.ModBlocks; +import dev.bonnie.thesideways.item.ModItems; +import net.minecraft.data.PackOutput; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import net.minecraftforge.client.model.generators.ItemModelBuilder; +import net.minecraftforge.client.model.generators.ItemModelProvider; +import net.minecraftforge.common.data.ExistingFileHelper; +import net.minecraftforge.registries.RegistryObject; + +public class ModItemModelProvider extends ItemModelProvider { + public ModItemModelProvider(PackOutput output, ExistingFileHelper existingFileHelper) { + super(output, TheSideways.MOD_ID, existingFileHelper); + } + + @Override + protected void registerModels() { + simpleItem(ModItems.PEANUT_ESSENCE); + simpleItem(ModItems.PEANUT_JUICE); + saplingItem(ModBlocks.NUTROOT_SAPLING); + } + + private ItemModelBuilder simpleItem(RegistryObject item) { + return withExistingParent(item.getId().getPath(), + new ResourceLocation("item/generated")).texture("layer0", + new ResourceLocation(TheSideways.MOD_ID, "item/" + item.getId().getPath())); + } + + private ItemModelBuilder saplingItem(RegistryObject item) { + return withExistingParent(item.getId().getPath(), + new ResourceLocation("item/generated")).texture("layer0", + new ResourceLocation(TheSideways.MOD_ID, "block/" + item.getId().getPath())); + } + + private ItemModelBuilder handheldItem(RegistryObject item) { + return withExistingParent(item.getId().getPath(), + new ResourceLocation("item/handheld")).texture("layer0", + new ResourceLocation(TheSideways.MOD_ID, "item/" + item.getId().getPath())); + } +} diff --git a/src/main/java/dev/bonnie/thesideways/data_gen/ModLootTableProvider.java b/src/main/java/dev/bonnie/thesideways/data_gen/ModLootTableProvider.java new file mode 100644 index 0000000..b57ec9d --- /dev/null +++ b/src/main/java/dev/bonnie/thesideways/data_gen/ModLootTableProvider.java @@ -0,0 +1,15 @@ +package dev.bonnie.thesideways.data_gen; + +import net.minecraft.data.PackOutput; +import net.minecraft.data.loot.LootTableProvider; +import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; + +import java.util.List; +import java.util.Set; + +public class ModLootTableProvider { + public static LootTableProvider create(PackOutput output) { + return new LootTableProvider(output, Set.of(), + List.of(new LootTableProvider.SubProviderEntry(ModBlockLootTables::new, LootContextParamSets.BLOCK))); + } +} diff --git a/src/main/java/dev/bonnie/thesideways/data_gen/ModRecipeProvider.java b/src/main/java/dev/bonnie/thesideways/data_gen/ModRecipeProvider.java new file mode 100644 index 0000000..8906bd6 --- /dev/null +++ b/src/main/java/dev/bonnie/thesideways/data_gen/ModRecipeProvider.java @@ -0,0 +1,20 @@ +package dev.bonnie.thesideways.data_gen; + +import net.minecraft.data.PackOutput; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeProvider; +import net.minecraft.data.recipes.ShapelessRecipeBuilder; +import net.minecraftforge.common.crafting.conditions.IConditionBuilder; + +import java.util.function.Consumer; + +public class ModRecipeProvider extends RecipeProvider implements IConditionBuilder { + public ModRecipeProvider(PackOutput output) { + super(output); + } + + @Override + protected void buildRecipes(Consumer consumer) { + + } +} diff --git a/src/main/java/dev/bonnie/thesideways/data_gen/ModWorldGenProvider.java b/src/main/java/dev/bonnie/thesideways/data_gen/ModWorldGenProvider.java new file mode 100644 index 0000000..27ec666 --- /dev/null +++ b/src/main/java/dev/bonnie/thesideways/data_gen/ModWorldGenProvider.java @@ -0,0 +1,20 @@ +package dev.bonnie.thesideways.data_gen; + +import dev.bonnie.thesideways.TheSideways; +import dev.bonnie.thesideways.worldgen.ModConfiguredFeatures; +import net.minecraft.core.HolderLookup; +import net.minecraft.core.RegistrySetBuilder; +import net.minecraft.core.registries.Registries; +import net.minecraft.data.PackOutput; +import net.minecraftforge.common.data.DatapackBuiltinEntriesProvider; + +import java.util.Set; +import java.util.concurrent.CompletableFuture; + +public class ModWorldGenProvider extends DatapackBuiltinEntriesProvider { + public static final RegistrySetBuilder BUILDER = new RegistrySetBuilder() + .add(Registries.CONFIGURED_FEATURE, ModConfiguredFeatures::bootstrap); + public ModWorldGenProvider(PackOutput output, CompletableFuture registries) { + super(output, registries, BUILDER, Set.of(TheSideways.MOD_ID)); + } +} diff --git a/src/main/java/dev/bonnie/thesideways/worldgen/ModConfiguredFeatures.java b/src/main/java/dev/bonnie/thesideways/worldgen/ModConfiguredFeatures.java new file mode 100644 index 0000000..47275cc --- /dev/null +++ b/src/main/java/dev/bonnie/thesideways/worldgen/ModConfiguredFeatures.java @@ -0,0 +1,38 @@ +package dev.bonnie.thesideways.worldgen; + +import dev.bonnie.thesideways.TheSideways; +import dev.bonnie.thesideways.block.ModBlocks; +import net.minecraft.core.registries.Registries; +import net.minecraft.data.worldgen.BootstapContext; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.valueproviders.ConstantInt; +import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; +import net.minecraft.world.level.levelgen.feature.Feature; +import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration; +import net.minecraft.world.level.levelgen.feature.configurations.TreeConfiguration; +import net.minecraft.world.level.levelgen.feature.featuresize.TwoLayersFeatureSize; +import net.minecraft.world.level.levelgen.feature.foliageplacers.BlobFoliagePlacer; +import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider; +import net.minecraft.world.level.levelgen.feature.trunkplacers.StraightTrunkPlacer; + +public class ModConfiguredFeatures { + public static final ResourceKey> NUTROOT_KEY = registerKey("nutroot"); + + public static void bootstrap(BootstapContext> context) { + register(context, NUTROOT_KEY, Feature.TREE, new TreeConfiguration.TreeConfigurationBuilder( + BlockStateProvider.simple(ModBlocks.NUTROOT_LOG.get()), + new StraightTrunkPlacer(5, 6, 3), + BlockStateProvider.simple(ModBlocks.NUTROOT_LEAVES.get()), + new BlobFoliagePlacer(ConstantInt.of(2), ConstantInt.of(0), 4), + new TwoLayersFeatureSize(1, 0, 2)).build()); + } + public static ResourceKey> registerKey(String name) { + return ResourceKey.create(Registries.CONFIGURED_FEATURE, new ResourceLocation(TheSideways.MOD_ID, name)); + } + + private static > void register(BootstapContext> context, + ResourceKey> key, F feature, FC configuration) { + context.register(key, new ConfiguredFeature<>(feature, configuration)); + } +} diff --git a/src/main/java/dev/bonnie/thesideways/worldgen/tree/NutrootTreeGrower.java b/src/main/java/dev/bonnie/thesideways/worldgen/tree/NutrootTreeGrower.java new file mode 100644 index 0000000..d08d659 --- /dev/null +++ b/src/main/java/dev/bonnie/thesideways/worldgen/tree/NutrootTreeGrower.java @@ -0,0 +1,16 @@ +package dev.bonnie.thesideways.worldgen.tree; + +import dev.bonnie.thesideways.worldgen.ModConfiguredFeatures; +import net.minecraft.resources.ResourceKey; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.block.grower.AbstractTreeGrower; +import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; +import org.jetbrains.annotations.Nullable; + +public class NutrootTreeGrower extends AbstractTreeGrower { + @Nullable + @Override + protected ResourceKey> getConfiguredFeature(RandomSource p_222910_, boolean p_222911_) { + return ModConfiguredFeatures.NUTROOT_KEY; + } +} diff --git a/src/main/resources/assets/thesideways/blockstates/sideways_dirt.json b/src/main/resources/assets/thesideways/blockstates/sideways_dirt.json deleted file mode 100644 index 5c10497..0000000 --- a/src/main/resources/assets/thesideways/blockstates/sideways_dirt.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variants": { - "": { "model": "thesideways:block/sideways_dirt" } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/thesideways/lang/en_us.json b/src/main/resources/assets/thesideways/lang/en_us.json index f5c0ea8..b24f3d3 100644 --- a/src/main/resources/assets/thesideways/lang/en_us.json +++ b/src/main/resources/assets/thesideways/lang/en_us.json @@ -5,6 +5,13 @@ "block.thesideways.sideways_dirt": "Sideways Dirt", "block.thesideways.sideways_grass_block": "Sideways Grass", + "block.thesideways.nutroot_log": "Nutroot Log", + "block.thesideways.stripped_nutroot_log": "Stripped Nutroot Log", + "block.thesideways.nutroot_wood": "Nutroot Wood", + "block.thesideways.stripped_nutroot_wood": "Stripped Nutroot Wood", + "block.thesideways.nutroot_planks": "Nutroot Planks", + "block.thesideways.nutroot_leaves": "Nutroot Leaves", + "block.thesideways.nutroot_sapling": "Nutroot Sapling", "creativemodetab.sideways_tab": "The Sideways" } \ No newline at end of file diff --git a/src/main/resources/assets/thesideways/textures/block/nutroot_leaves.png b/src/main/resources/assets/thesideways/textures/block/nutroot_leaves.png new file mode 100644 index 0000000..13a1815 Binary files /dev/null and b/src/main/resources/assets/thesideways/textures/block/nutroot_leaves.png differ diff --git a/src/main/resources/assets/thesideways/textures/block/nutroot_log.png b/src/main/resources/assets/thesideways/textures/block/nutroot_log.png new file mode 100644 index 0000000..933aca0 Binary files /dev/null and b/src/main/resources/assets/thesideways/textures/block/nutroot_log.png differ diff --git a/src/main/resources/assets/thesideways/textures/block/nutroot_log_top.png b/src/main/resources/assets/thesideways/textures/block/nutroot_log_top.png new file mode 100644 index 0000000..ada2269 Binary files /dev/null and b/src/main/resources/assets/thesideways/textures/block/nutroot_log_top.png differ diff --git a/src/main/resources/assets/thesideways/textures/block/nutroot_planks.png b/src/main/resources/assets/thesideways/textures/block/nutroot_planks.png new file mode 100644 index 0000000..6260b4f Binary files /dev/null and b/src/main/resources/assets/thesideways/textures/block/nutroot_planks.png differ diff --git a/src/main/resources/assets/thesideways/textures/block/nutroot_sapling.png b/src/main/resources/assets/thesideways/textures/block/nutroot_sapling.png new file mode 100644 index 0000000..7c5edaf Binary files /dev/null and b/src/main/resources/assets/thesideways/textures/block/nutroot_sapling.png differ diff --git a/src/main/resources/assets/thesideways/textures/block/stripped_nutroot_log.png b/src/main/resources/assets/thesideways/textures/block/stripped_nutroot_log.png new file mode 100644 index 0000000..c71715a Binary files /dev/null and b/src/main/resources/assets/thesideways/textures/block/stripped_nutroot_log.png differ diff --git a/src/main/resources/assets/thesideways/textures/block/stripped_nutroot_log_top.png b/src/main/resources/assets/thesideways/textures/block/stripped_nutroot_log_top.png new file mode 100644 index 0000000..1c2f446 Binary files /dev/null and b/src/main/resources/assets/thesideways/textures/block/stripped_nutroot_log_top.png differ diff --git a/src/main/resources/data/minecraft/tags/blocks/logs.json b/src/main/resources/data/minecraft/tags/blocks/logs.json new file mode 100644 index 0000000..a283ac4 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/logs.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + "thesideways:nutroot_log", + "thesideways:nutroot_wood", + "thesideways:stripped_nutroot_log", + "thesideways:stripped_nutroot_wood" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json b/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json index a22514f..e4300df 100644 --- a/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json +++ b/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json @@ -1,5 +1,10 @@ { "replace": false, "values": [ + "thesideways:nutroot_log", + "thesideways:stripped_nutroot_log", + "thesideways:stripped_nutroot_wood", + "thesideways:nutroot_wood", + "thesideways:nutroot_planks" ] } \ No newline at end of file diff --git a/src/main/resources/data/thesideways/recipes/nutroot_plank_from_log.json b/src/main/resources/data/thesideways/recipes/nutroot_plank_from_log.json new file mode 100644 index 0000000..7991613 --- /dev/null +++ b/src/main/resources/data/thesideways/recipes/nutroot_plank_from_log.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "thesideways:nutroot_log" + } + ], + "result": { + "item": "thesideways:nutroot_planks", + "count": 4 + } +} diff --git a/src/main/resources/data/thesideways/recipes/nutroot_plank_from_stripped_log.json b/src/main/resources/data/thesideways/recipes/nutroot_plank_from_stripped_log.json new file mode 100644 index 0000000..76c5bfc --- /dev/null +++ b/src/main/resources/data/thesideways/recipes/nutroot_plank_from_stripped_log.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "thesideways:stripped_nutroot_log" + } + ], + "result": { + "item": "thesideways:nutroot_planks", + "count": 4 + } +} diff --git a/src/main/resources/data/thesideways/recipes/nutroot_plank_from_stripped_wood.json b/src/main/resources/data/thesideways/recipes/nutroot_plank_from_stripped_wood.json new file mode 100644 index 0000000..bd8d7d1 --- /dev/null +++ b/src/main/resources/data/thesideways/recipes/nutroot_plank_from_stripped_wood.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "thesideways:stripped_nutroot_wood" + } + ], + "result": { + "item": "thesideways:nutroot_planks", + "count": 4 + } +} diff --git a/src/main/resources/data/thesideways/recipes/nutroot_plank_from_wood.json b/src/main/resources/data/thesideways/recipes/nutroot_plank_from_wood.json new file mode 100644 index 0000000..303f8e0 --- /dev/null +++ b/src/main/resources/data/thesideways/recipes/nutroot_plank_from_wood.json @@ -0,0 +1,12 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "thesideways:nutroot_wood" + } + ], + "result": { + "item": "thesideways:nutroot_planks", + "count": 4 + } +} diff --git a/src/main/resources/data/thesideways/recipes/sticks_from_nutroot_planks.json b/src/main/resources/data/thesideways/recipes/sticks_from_nutroot_planks.json new file mode 100644 index 0000000..a73e859 --- /dev/null +++ b/src/main/resources/data/thesideways/recipes/sticks_from_nutroot_planks.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "sticks", + "pattern": [ + "#", + "#" + ], + "key": { + "#": { + "item": "thesideways:nutroot_planks" + } + }, + "result": { + "item": "minecraft:stick", + "count": 4 + } +}