From b6ec1c8570dfa765a95fa47ac5c870af753b8461 Mon Sep 17 00:00:00 2001 From: eerussianguy Date: Wed, 2 Oct 2024 20:34:23 -0400 Subject: [PATCH] write the book, update several recipes and loot items based on feedback. --- resources/data.py | 4 + resources/generate_book.py | 75 +++++++++++---- resources/generate_resources.py | 2 +- resources/lang/en_us.json | 52 ++++++++++ resources/recipes.py | 3 +- .../client/screen/HellforgeScreen.java | 3 +- .../beneath/common/blocks/BeneathBlocks.java | 24 +++++ .../common/blocks/NetherSaplingBlock.java | 51 ++++++++++ .../beneath/common/blocks/Stem.java | 6 ++ .../eerussianguy/beneath/misc/PortalUtil.java | 10 +- .../textures/entity/water_wheel/crimson.png | Bin 0 -> 2103 bytes .../textures/entity/water_wheel/warped.png | Bin 0 -> 2103 bytes .../field_guide/en_us/categories/beneath.json | 7 ++ .../en_us/entries/beneath/beneath.json | 17 ++++ .../en_us/entries/beneath/burpflower.json | 21 +++++ .../en_us/entries/beneath/crops.json | 54 +++++++++++ .../en_us/entries/beneath/curious_blocks.json | 81 ++++++++++++++++ .../en_us/entries/beneath/hellforge.json | 51 ++++++++++ .../entries/beneath/ores_and_minerals.json | 89 ++++++++++++++++++ .../en_us/entries/beneath/unposter.json | 17 ++++ .../en_us/entries/beneath/water.json | 22 +++++ .../advancements/crafting/unposter.json | 35 +++++++ .../beneath/recipes/crafting/hellbricks.json | 3 + .../beneath/recipes/crafting/unposter.json | 23 +++++ .../loot_tables/blocks/crimson_nylium.json | 45 +++++++++ .../minecraft/loot_tables/blocks/lantern.json | 36 +++++++ .../loot_tables/blocks/soul_lantern.json | 36 +++++++ .../loot_tables/blocks/warped_nylium.json | 45 +++++++++ 28 files changed, 781 insertions(+), 31 deletions(-) create mode 100644 resources/lang/en_us.json create mode 100644 src/main/java/com/eerussianguy/beneath/common/blocks/NetherSaplingBlock.java create mode 100644 src/main/resources/assets/beneath/textures/entity/water_wheel/crimson.png create mode 100644 src/main/resources/assets/beneath/textures/entity/water_wheel/warped.png create mode 100644 src/main/resources/assets/tfc/patchouli_books/field_guide/en_us/categories/beneath.json create mode 100644 src/main/resources/assets/tfc/patchouli_books/field_guide/en_us/entries/beneath/beneath.json create mode 100644 src/main/resources/assets/tfc/patchouli_books/field_guide/en_us/entries/beneath/burpflower.json create mode 100644 src/main/resources/assets/tfc/patchouli_books/field_guide/en_us/entries/beneath/crops.json create mode 100644 src/main/resources/assets/tfc/patchouli_books/field_guide/en_us/entries/beneath/curious_blocks.json create mode 100644 src/main/resources/assets/tfc/patchouli_books/field_guide/en_us/entries/beneath/hellforge.json create mode 100644 src/main/resources/assets/tfc/patchouli_books/field_guide/en_us/entries/beneath/ores_and_minerals.json create mode 100644 src/main/resources/assets/tfc/patchouli_books/field_guide/en_us/entries/beneath/unposter.json create mode 100644 src/main/resources/assets/tfc/patchouli_books/field_guide/en_us/entries/beneath/water.json create mode 100644 src/main/resources/data/beneath/advancements/crafting/unposter.json create mode 100644 src/main/resources/data/beneath/recipes/crafting/unposter.json create mode 100644 src/main/resources/data/minecraft/loot_tables/blocks/crimson_nylium.json create mode 100644 src/main/resources/data/minecraft/loot_tables/blocks/lantern.json create mode 100644 src/main/resources/data/minecraft/loot_tables/blocks/soul_lantern.json create mode 100644 src/main/resources/data/minecraft/loot_tables/blocks/warped_nylium.json diff --git a/resources/data.py b/resources/data.py index cc572b1..050732e 100644 --- a/resources/data.py +++ b/resources/data.py @@ -18,6 +18,8 @@ def generate(rm: ResourceManager): ### LOOT ### rm.block_loot('minecraft:netherrack', loot_tables.alternatives({'name': 'minecraft:netherrack', 'conditions': [{'condition': 'tfc:is_isolated'}]}, '2-4 beneath:nether_pebble')) + rm.block_loot('minecraft:crimson_nylium', loot_tables.alternatives({'name': 'minecraft:crimson_nylium', 'conditions': [{'condition': 'tfc:is_isolated'}]}, '2-4 beneath:nether_pebble')) + rm.block_loot('minecraft:warped_nylium', loot_tables.alternatives({'name': 'minecraft:warped_nylium', 'conditions': [{'condition': 'tfc:is_isolated'}]}, '2-4 beneath:nether_pebble')) rm.block_loot('minecraft:basalt', loot_tables.alternatives({'name': 'minecraft:basalt', 'conditions': [{'condition': 'tfc:is_isolated'}]}, '2-4 tfc:rock/loose/basalt')) rm.block_loot('minecraft:gilded_blackstone', 'minecraft:blackstone', {'name': 'beneath:gold_chunk', 'conditions': [loot_tables.random_chance(0.25)]}) rm.block_loot('minecraft:gold_block', '3-6 beneath:gold_chunk') @@ -25,6 +27,8 @@ def generate(rm: ResourceManager): rm.block_loot('minecraft:crimson_roots', loot_tables.alternatives({'name': 'minecraft:crimson_roots', 'conditions': [loot_tables.match_tag('forge:shears')]}, {'name': 'beneath:crimson_straw', 'conditions': [loot_tables.match_tag('tfc:sharp_tools')]}, {'name': 'beneath:seeds/crimson_roots', 'conditions': [loot_tables.random_chance(0.1)]})) rm.block_loot('minecraft:warped_roots', loot_tables.alternatives({'name': 'minecraft:warped_roots', 'conditions': [loot_tables.match_tag('forge:shears')]}, {'name': 'beneath:warped_straw', 'conditions': [loot_tables.match_tag('tfc:sharp_tools')]}, {'name': 'beneath:seeds/warped_roots', 'conditions': [loot_tables.random_chance(0.1)]})) rm.block_loot('minecraft:bone_block', '1-3 minecraft:bone_meal') + rm.block_loot('minecraft:lantern', 'tfc:lamp_glass', 'tfc:metal/bars/wrought_iron') + rm.block_loot('minecraft:soul_lantern', 'tfc:lamp_glass', 'tfc:metal/bars/wrought_iron') rm.block_loot('minecraft:gravel', { 'conditions': [loot_tables.silk_touch()], 'name': 'tfc:rock/gravel/basalt' diff --git a/resources/generate_book.py b/resources/generate_book.py index 619d4d9..3c10d4e 100644 --- a/resources/generate_book.py +++ b/resources/generate_book.py @@ -61,31 +61,66 @@ def main(translate_lang: str, local_minecraft_dir: Optional[str], validate: bool print('Copying %s book into local instance at: %s' % (translate_lang, LocalInstance.INSTANCE_DIR)) make_book(rm, I18n(translate_lang, validate), local_instance=True) - -# def main(): -# for language in BOOK_LANGUAGES: -# rm = ResourceManager('tfc', '../src/main/resources') -# i18n = I18n.create(language) -# -# print('Writing book %s' % language) -# make_book(rm, i18n) -# -# i18n.flush() -# -# if LocalInstance.wrap(rm) and language == 'en_us': -# print('Copying into local instance at: %s' % LocalInstance.INSTANCE_DIR) -# make_book(rm, I18n.create('en_us'), local_instance=True) -# -# print('Done') - def make_book(rm: ResourceManager, i18n: I18n, local_instance: bool = False, reverse_translate: bool = False): book = Book(rm, 'field_guide', {}, i18n, local_instance, reverse_translate) - book.category('beneath', 'Beneath', 'All about what is Beneath', 'beneath:cursecoal', is_sorted=True, entries=( - entry('beneath', 'What Lies Beneath', 'beneath:textures/item/cursecoal.png', pages=( - text('XXX'), + book.category('beneath', 'Beneath', 'All about what lies Beneath', 'beneath:ore/blackstone_sylvite', is_sorted=False, entries=( + entry('beneath', 'What Lies Beneath', 'beneath:warped_thatch', pages=( + text('For years, the tranquility of the overworld was all you knew. It was difficult, yes, but the sun came out; the birds chirped in the morning; and there was not a bit of $(thing)magic$(). One day, you decided that this was not enough. You dreamed of a cursed world, with strange creatures, danger beyond imagination, and unfathomable riches to exploit. That world is Beneath you.'), + text('The world of Beneath is a lot like the underworld that you are familiar with, but in the style of TerraFirmaCraft. Trees grow there, and you will find rocks on the ground that you can make into tools. Some things have been removed, some are replaced, and plenty of new content has been added. One thing is for certain: you must work harder to survive.'), + )), + entry('ores_and_minerals', 'Ores and Minerals', 'beneath:ore/normal_nether_gold', pages=( + text('Beneath the overworld, you will still find ore veins to exploit. It is important to note that $(thing)Netherrack$() does not collapse, like raw stone would. However, $(thing)Blackstone$(), $(thing)Nether Bricks$(), $(thing)Cobblerack$() and miscellaneous other blocks do. Prospecting will still work Beneath the overworld.'), + block_spotlight('Nether Gold', 'Nether Gold replaces netherrack, and is common. Beneath lava, there is more gold, and richer.', 'beneath:ore/normal_nether_gold'), + block_spotlight('Cursecoal', 'Cursecoal is a powerful fuel. It replaces netherrack above level 80.', 'beneath:ore/nether_cursecoal'), + block_spotlight('Sylvite', 'Sylvite replaces basalt at any level.', 'beneath:ore/blackstone_sylvite'), + block_spotlight('Nether Quartz', 'Nether quartz replaces netherrack at all levels, and is common.', 'minecraft:nether_quartz_ore'), + empty_last_page() + )), + entry('curious_blocks', 'Curious Blocks', 'beneath:soul_clay', pages=( + non_text_first_page(), + block_spotlight('Soul Clay', 'Soul clay may be discovered in soul sand valleys. It is a source of regular clay.', 'beneath:soul_clay'), + block_spotlight('Sulfur', 'Sulfur can be broken with a shovel. Be careful, though: iron-containing items (including steel) explode in contact with sulfur!', 'beneath:sulfur'), + block_spotlight('Thatch', 'Cutting grass will yield you warped or crimson straw. This can be made into thatch, the normal way.', 'beneath:warped_thatch'), + crafting('beneath:crafting/blackstone_aqueduct', text_contents='The blackstone aqueduct allows lava to be conducted at any distance.'), + crafting('beneath:crafting/hellbricks', text_contents='Hellbricks are a building block that is also used for the Hellforge.'), + crafting('beneath:crafting/blackstone_brick', text_contents='Blackstone bricks are made like regular bricks, and that includes needing to create the brick item.'), + )), + entry('water', 'Water', 'beneath:juicer', pages=( + text('Regrettably, water is still necessary when you are Beneath. Water stored in barrels will not evaporate when you are Beneath. However, there is also the option of crafting a $(thing)Juicer$().'), + crafting('beneath:crafting/juicer', text_contents='The juicer is a drinking vessel that allows the compression of $(thing)Mushrooms$() into water. The single-slot user interface automatically processes inserted mushrooms into water.'), + text('Mushrooms spawn freely around the place Beneath the overworld. Fresh fruits may also be squeezed into water, if you have them handy.'), + empty_last_page(), + )), + entry('crops', 'Crops', 'beneath:gleamflower', pages=( + text('Soul soil may be tilled to form $(thing)Soul Farmland$(). Crops work a little differently when you are Beneath. There are five nutrients: Death, Destruction, Decay, Sorrow, and Flame. Nutrients are viewed by holding a hoe, but will not appear unless they have a value greater than zero.'), + text('Crops have a preferred nutrient: Instead of consuming it, this is the nutrient they will add to over time. The crop will happily consume the other four nutrients in order to grow. Nether crops cannot die, but still need block light to grow.'), + text('The fertilizers are as follows: $(br)$(br)Sulfur: 20% decay, 10% flame$(br)Gunpowder: 60% Destruction, 10% Flame, 40% Death$(br)Ghast Tear: 30% Sorrow$(br)Blaze Powder: 20% Flame'), + text('The fertilizers are also available in obtainable \'pure\' forms from chest loot. Crafting these together yields $(thing)Agonizing Fertilizer$(), which has them all in a neat package.'), + text('Crimson Roots (Decay) and Warped Roots (Destruction) are growable as crops. These are most useful as means of improving the nutrient quality of your soul farmland. Nether Wart (Death), found in fortresses, can also be grown as a crop.'), + block_spotlight('Gleamflower', 'The Gleamflower (Flame) can be grown as a crop, and also found in the world as a plant. It is useful as an infinite light source.', 'beneath:gleamflower'), + item_spotlight('beneath:ghost_pepper', text_contents='Ghost Peppers (Sorrow) are an edible vegetable that can be grown in the Beneath!'), empty_last_page() )), + entry('burpflower', 'Burpflowers', 'beneath:burpflower', pages=( + text('The $(thing)Burpflower$() has the power to put a helpful curse on other blocks. It can be found all around the Beneath. The Burpflower has a facing direction, which is the direction that it performs the action in. Behind it, place a $(thing)Sulfur$() block to charge it.'), + text('Soon, if there is sulfur, the burpflower will charge, and have a yellow sulfuric flower. It then soon will make a burping sound and expel sulfuric smoke. This smoke has the power to change blocks into other blocks.'), + text('First, Nether Bricks can be changed into $(thing)Hellbricks$(). Charcoal piles can be transformed into $(thing)Cursecoal Piles$(). Further, $(thing)Decay$() can be added to $(thing)Soul Farmland$().'), + empty_last_page(), + )), + entry('unposter', 'The Unposter', 'beneath:unposter', pages=( + text('The $(thing)Unposter$() is used to grow mushrooms. Mushrooms, ghast tears, and nether crops can be deposited into it. When it is by a mushroom, it will consume the items inside to multiply that mushroom in the area around it, once a day.'), + crafting('beneath:crafting/unposter'), + )), + entry('hellforge', 'The Hellforge', 'beneath:cursecoal', pages=( + text('The $(thing)Hellforge$() is a gratuitously large forge, with high capacity for fuel, products, and heating. It is constructed from Hellbricks, Cursecoal, and Blackstone Aqueducts.'), + multiblock('Hellforge', '', pattern=( + ('ZXXXZ', 'XYYYX', 'XY0YX', 'XYYYX', 'ZXXXZ'), + (' ', ' XXX ', ' XXX ', ' XXX ', ' ') + ), mapping={'Z': 'beneath:blackstone_aqueduct[fluid=lava]', 'Y': 'beneath:hellforge_side', '0': 'beneath:hellforge', 'X': 'beneath:hellbricks',}), + text('The Hellforge requires lava to flow in aqueducts in its four corners, as well as 21 hellbricks. The 3x3 center must be filled with Cursecoal piles, which then may be lit to start the forge.'), + text('The item slots of the Hellforge may contain fuel, or things to be smelted; there is no distinction. Be careful what you put in! There are also slots for melting things, as with the charcoal forge. The lava meter on the screen indicates temperature (as well as the visual movement of its items in world).') + )), )) book.build() diff --git a/resources/generate_resources.py b/resources/generate_resources.py index 0a12700..1e39a08 100644 --- a/resources/generate_resources.py +++ b/resources/generate_resources.py @@ -27,7 +27,7 @@ def write(self, path_parts: Sequence[str], data_in: Json): def main(): parser = argparse.ArgumentParser(description='Generate resources for Beneath') - rm = ResourceManager('beneath', resource_dir='../src/main/resources') + rm = ResourceManager('beneath', resource_dir='./src/main/resources') parser.add_argument('--clean', action='store_true', dest='clean', help='Clean all auto generated resources') args = parser.parse_args() diff --git a/resources/lang/en_us.json b/resources/lang/en_us.json new file mode 100644 index 0000000..234acdc --- /dev/null +++ b/resources/lang/en_us.json @@ -0,0 +1,52 @@ +{ + "Beneath": "Beneath", + "All about what lies Beneath": "All about what lies Beneath", + "What Lies Beneath": "What Lies Beneath", + "For years, the tranquility of the overworld was all you knew. It was difficult, yes, but the sun came out; the birds chirped in the morning; and there was not a bit of $(thing)magic$(). One day, you decided that this was not enough. You dreamed of a cursed world, with strange creatures, danger beyond imagination, and unfathomable riches to exploit. That world is Beneath you.": "For years, the tranquility of the overworld was all you knew. It was difficult, yes, but the sun came out; the birds chirped in the morning; and there was not a bit of $(thing)magic$(). One day, you decided that this was not enough. You dreamed of a cursed world, with strange creatures, danger beyond imagination, and unfathomable riches to exploit. That world is Beneath you.", + "The world of Beneath is a lot like the underworld that you are familiar with, but in the style of TerraFirmaCraft. Trees grow there, and you will find rocks on the ground that you can make into tools. Some things have been removed, some are replaced, and plenty of new content has been added. One thing is for certain: you must work harder to survive.": "The world of Beneath is a lot like the underworld that you are familiar with, but in the style of TerraFirmaCraft. Trees grow there, and you will find rocks on the ground that you can make into tools. Some things have been removed, some are replaced, and plenty of new content has been added. One thing is for certain: you must work harder to survive.", + "Ores and Minerals": "Ores and Minerals", + "Beneath the overworld, you will still find ore veins to exploit. It is important to note that $(thing)Netherrack$() does not collapse, like raw stone would. However, $(thing)Blackstone$(), $(thing)Nether Bricks$(), $(thing)Cobblerack$() and miscellaneous other blocks do. Prospecting will still work Beneath the overworld.": "Beneath the overworld, you will still find ore veins to exploit. It is important to note that $(thing)Netherrack$() does not collapse, like raw stone would. However, $(thing)Blackstone$(), $(thing)Nether Bricks$(), $(thing)Cobblerack$() and miscellaneous other blocks do. Prospecting will still work Beneath the overworld.", + "Nether Gold": "Nether Gold", + "Nether Gold replaces netherrack, and is common. Beneath lava, there is more gold, and richer.": "Nether Gold replaces netherrack, and is common. Beneath lava, there is more gold, and richer.", + "Cursecoal": "Cursecoal", + "Cursecoal is a powerful fuel. It replaces netherrack above level 80.": "Cursecoal is a powerful fuel. It replaces netherrack above level 80.", + "Sylvite": "Sylvite", + "Sylvite replaces basalt at any level.": "Sylvite replaces basalt at any level.", + "Nether Quartz": "Nether Quartz", + "Nether quartz replaces netherrack at all levels, and is common.": "Nether quartz replaces netherrack at all levels, and is common.", + "Curious Blocks": "Curious Blocks", + "Soul Clay": "Soul Clay", + "Soul clay may be discovered in soul sand valleys. It is a source of regular clay.": "Soul clay may be discovered in soul sand valleys. It is a source of regular clay.", + "Sulfur": "Sulfur", + "Sulfur can be broken with a shovel. Be careful, though: iron-containing items (including steel) explode in contact with sulfur!": "Sulfur can be broken with a shovel. Be careful, though: iron-containing items (including steel) explode in contact with sulfur!", + "Thatch": "Thatch", + "Cutting grass will yield you warped or crimson straw. This can be made into thatch, the normal way.": "Cutting grass will yield you warped or crimson straw. This can be made into thatch, the normal way.", + "The blackstone aqueduct allows lava to be conducted at any distance.": "The blackstone aqueduct allows lava to be conducted at any distance.", + "Hellbricks are a building block that is also used for the Hellforge.": "Hellbricks are a building block that is also used for the Hellforge.", + "Blackstone bricks are made like regular bricks, and that includes needing to create the brick item.": "Blackstone bricks are made like regular bricks, and that includes needing to create the brick item.", + "Water": "Water", + "Regrettably, water is still necessary when you are Beneath. Water stored in barrels will not evaporate when you are Beneath. However, there is also the option of crafting a $(thing)Juicer$().": "Regrettably, water is still necessary when you are Beneath. Water stored in barrels will not evaporate when you are Beneath. However, there is also the option of crafting a $(thing)Juicer$().", + "The juicer is a drinking vessel that allows the compression of $(thing)Mushrooms$() into water. The single-slot user interface automatically processes inserted mushrooms into water.": "The juicer is a drinking vessel that allows the compression of $(thing)Mushrooms$() into water. The single-slot user interface automatically processes inserted mushrooms into water.", + "Mushrooms spawn freely around the place Beneath the overworld. Fresh fruits may also be squeezed into water, if you have them handy.": "Mushrooms spawn freely around the place Beneath the overworld. Fresh fruits may also be squeezed into water, if you have them handy.", + "Crops": "Crops", + "Soul soil may be tilled to form $(thing)Soul Farmland$(). Crops work a little differently when you are Beneath. There are five nutrients: Death, Destruction, Decay, Sorrow, and Flame. Nutrients are viewed by holding a hoe, but will not appear unless they have a value greater than zero.": "Soul soil may be tilled to form $(thing)Soul Farmland$(). Crops work a little differently when you are Beneath. There are five nutrients: Death, Destruction, Decay, Sorrow, and Flame. Nutrients are viewed by holding a hoe, but will not appear unless they have a value greater than zero.", + "Crops have a preferred nutrient: Instead of consuming it, this is the nutrient they will add to over time. The crop will happily consume the other four nutrients in order to grow. Nether crops cannot die, but still need block light to grow.": "Crops have a preferred nutrient: Instead of consuming it, this is the nutrient they will add to over time. The crop will happily consume the other four nutrients in order to grow. Nether crops cannot die, but still need block light to grow.", + "The fertilizers are as follows: $(br)$(br)Sulfur: 20% decay, 10% flame$(br)Gunpowder: 60% Destruction, 10% Flame, 40% Death$(br)Ghast Tear: 30% Sorrow$(br)Blaze Powder: 20% Flame": "The fertilizers are as follows: $(br)$(br)Sulfur: 20% decay, 10% flame$(br)Gunpowder: 60% Destruction, 10% Flame, 40% Death$(br)Ghast Tear: 30% Sorrow$(br)Blaze Powder: 20% Flame", + "The fertilizers are also available in obtainable 'pure' forms from chest loot. Crafting these together yields $(thing)Agonizing Fertilizer$(), which has them all in a neat package.": "The fertilizers are also available in obtainable 'pure' forms from chest loot. Crafting these together yields $(thing)Agonizing Fertilizer$(), which has them all in a neat package.", + "Crimson Roots (Decay) and Warped Roots (Destruction) are growable as crops. These are most useful as means of improving the nutrient quality of your soul farmland. Nether Wart (Death), found in fortresses, can also be grown as a crop.": "Crimson Roots (Decay) and Warped Roots (Destruction) are growable as crops. These are most useful as means of improving the nutrient quality of your soul farmland. Nether Wart (Death), found in fortresses, can also be grown as a crop.", + "Gleamflower": "Gleamflower", + "The Gleamflower (Flame) can be grown as a crop, and also found in the world as a plant. It is useful as an infinite light source.": "The Gleamflower (Flame) can be grown as a crop, and also found in the world as a plant. It is useful as an infinite light source.", + "Ghost Peppers (Sorrow) are an edible vegetable that can be grown in the Beneath!": "Ghost Peppers (Sorrow) are an edible vegetable that can be grown in the Beneath!", + "Burpflowers": "Burpflowers", + "The $(thing)Burpflower$() has the power to put a helpful curse on other blocks. It can be found all around the Beneath. The Burpflower has a facing direction, which is the direction that it performs the action in. Behind it, place a $(thing)Sulfur$() block to charge it.": "The $(thing)Burpflower$() has the power to put a helpful curse on other blocks. It can be found all around the Beneath. The Burpflower has a facing direction, which is the direction that it performs the action in. Behind it, place a $(thing)Sulfur$() block to charge it.", + "Soon, if there is sulfur, the burpflower will charge, and have a yellow sulfuric flower. It then soon will make a burping sound and expel sulfuric smoke. This smoke has the power to change blocks into other blocks.": "Soon, if there is sulfur, the burpflower will charge, and have a yellow sulfuric flower. It then soon will make a burping sound and expel sulfuric smoke. This smoke has the power to change blocks into other blocks.", + "First, Nether Bricks can be changed into $(thing)Hellbricks$(). Charcoal piles can be transformed into $(thing)Cursecoal Piles$(). Further, $(thing)Decay$() can be added to $(thing)Soul Farmland$().": "First, Nether Bricks can be changed into $(thing)Hellbricks$(). Charcoal piles can be transformed into $(thing)Cursecoal Piles$(). Further, $(thing)Decay$() can be added to $(thing)Soul Farmland$().", + "The Unposter": "The Unposter", + "The $(thing)Unposter$() is used to grow mushrooms. Mushrooms, ghast tears, and nether crops can be deposited into it. When it is by a mushroom, it will consume the items inside to multiply that mushroom in the area around it, once a day.": "The $(thing)Unposter$() is used to grow mushrooms. Mushrooms, ghast tears, and nether crops can be deposited into it. When it is by a mushroom, it will consume the items inside to multiply that mushroom in the area around it, once a day.", + "The Hellforge": "The Hellforge", + "The $(thing)Hellforge$() is a gratuitously large forge, with high capacity for fuel, products, and heating. It is constructed from Hellbricks, Cursecoal, and Blackstone Aqueducts.": "The $(thing)Hellforge$() is a gratuitously large forge, with high capacity for fuel, products, and heating. It is constructed from Hellbricks, Cursecoal, and Blackstone Aqueducts.", + "Hellforge": "Hellforge", + "": "", + "The Hellforge requires lava to flow in aqueducts in its four corners, as well as 21 hellbricks. The 3x3 center must be filled with Cursecoal piles, which then may be lit to start the forge.": "The Hellforge requires lava to flow in aqueducts in its four corners, as well as 21 hellbricks. The 3x3 center must be filled with Cursecoal piles, which then may be lit to start the forge.", + "The item slots of the Hellforge may contain fuel, or things to be smelted; there is no distinction. Be careful what you put in! There are also slots for melting things, as with the charcoal forge. The lava meter on the screen indicates temperature (as well as the visual movement of its items in world).": "The item slots of the Hellforge may contain fuel, or things to be smelted; there is no distinction. Be careful what you put in! There are also slots for melting things, as with the charcoal forge. The lava meter on the screen indicates temperature (as well as the visual movement of its items in world)." +} \ No newline at end of file diff --git a/resources/recipes.py b/resources/recipes.py index 2815fb0..54bd881 100644 --- a/resources/recipes.py +++ b/resources/recipes.py @@ -25,8 +25,9 @@ def generate(rm: ResourceManager): damage_shapeless(rm, 'crafting/cracked_blackstone_bricks', ('minecraft:polished_blackstone_bricks', '#tfc:hammers'), 'minecraft:cracked_polished_blackstone_bricks').with_advancement('minecraft:polished_blackstone_bricks') rm.crafting_shapeless('crafting/agonizing_fertilizer', tuple('beneath:pure_%s' % n for n in NUTRIENTS), 'beneath:agonizing_fertilizer').with_advancement('beneath:pure_flame') rm.crafting_shapeless('crafting/cursed_hide_change', ('beneath:cursed_hide', 'tfc:powder/flux', 'tfc:powder/flux', 'minecraft:white_dye'), 'tfc:large_raw_hide').with_advancement('beneath:cursed_hide') - rm.crafting_shapeless('crafting/hellbricks', ('minecraft:nether_bricks', 'minecraft:magma_cream'), 'beneath:hellbricks').with_advancement('minecraft:magma_cream') + rm.crafting_shapeless('crafting/hellbricks', ('minecraft:nether_bricks', 'minecraft:magma_cream', 'beneath:sulfur'), 'beneath:hellbricks').with_advancement('minecraft:magma_cream') damage_shapeless(rm, 'crafting/juicer', ('#forge:leather', '#forge:leather', '#forge:leather', '#tfc:knives', '#forge:rods/wooden'), 'beneath:juicer').with_advancement('#forge:leather') + rm.crafting_shaped('crafting/unposter', ['XYX', 'XXX', 'ZZZ'], {'X': 'beneath:wood/lumber/crimson', 'Z': 'beneath:wood/lumber/warped', 'Y': 'tfc:composter'}, 'beneath:unposter').with_advancement('beneath:wood/lumber/crimson') ### HEATING RECIPES ### metal_data = TFC_METALS['gold'] diff --git a/src/main/java/com/eerussianguy/beneath/client/screen/HellforgeScreen.java b/src/main/java/com/eerussianguy/beneath/client/screen/HellforgeScreen.java index 1c13ae4..168522e 100644 --- a/src/main/java/com/eerussianguy/beneath/client/screen/HellforgeScreen.java +++ b/src/main/java/com/eerussianguy/beneath/client/screen/HellforgeScreen.java @@ -8,6 +8,7 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.Mth; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.level.material.Fluids; import net.minecraftforge.fluids.FluidStack; @@ -32,7 +33,7 @@ public HellforgeScreen(HellforgeContainer container, Inventory playerInventory, protected void renderBg(GuiGraphics poseStack, float partialTicks, int mouseX, int mouseY) { super.renderBg(poseStack, partialTicks, mouseX, mouseY); - int width = (int) (105 * blockEntity.getTemperature() / Heat.maxVisibleTemperature()); + final int width = (int) Mth.clamp(blockEntity.getTemperature() / Heat.maxVisibleTemperature(), 0, 105); if (width > 0) { final TextureAtlasSprite sprite = RenderHelpers.getAndBindFluidSprite(new FluidStack(Fluids.LAVA, 100)); diff --git a/src/main/java/com/eerussianguy/beneath/common/blocks/BeneathBlocks.java b/src/main/java/com/eerussianguy/beneath/common/blocks/BeneathBlocks.java index 27142fc..4de600a 100644 --- a/src/main/java/com/eerussianguy/beneath/common/blocks/BeneathBlocks.java +++ b/src/main/java/com/eerussianguy/beneath/common/blocks/BeneathBlocks.java @@ -10,6 +10,7 @@ import com.eerussianguy.beneath.common.items.BeneathItems; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.EntityType; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; @@ -25,6 +26,7 @@ import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; import net.minecraft.world.level.block.state.properties.WoodType; import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.level.pathfinder.BlockPathTypes; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; @@ -33,6 +35,7 @@ import net.dries007.tfc.client.TFCSounds; import net.dries007.tfc.common.blockentities.LoomBlockEntity; import net.dries007.tfc.common.blockentities.TFCBlockEntities; +import net.dries007.tfc.common.blockentities.rotation.WaterWheelBlockEntity; import net.dries007.tfc.common.blocks.CharcoalPileBlock; import net.dries007.tfc.common.blocks.ExtendedProperties; import net.dries007.tfc.common.blocks.TFCBlocks; @@ -42,9 +45,13 @@ import net.dries007.tfc.common.blocks.rock.MossSpreadingBlock; import net.dries007.tfc.common.blocks.rock.Ore; import net.dries007.tfc.common.blocks.rock.RockSpikeBlock; +import net.dries007.tfc.common.blocks.rotation.AxleBlock; +import net.dries007.tfc.common.blocks.rotation.WaterWheelBlock; +import net.dries007.tfc.common.blocks.rotation.WindmillBlock; import net.dries007.tfc.common.blocks.wood.TFCCeilingHangingSignBlock; import net.dries007.tfc.common.blocks.wood.TFCLeavesBlock; import net.dries007.tfc.common.blocks.wood.TFCLoomBlock; +import net.dries007.tfc.common.blocks.wood.TFCSaplingBlock; import net.dries007.tfc.common.blocks.wood.TFCStandingSignBlock; import net.dries007.tfc.common.blocks.wood.TFCWallHangingSignBlock; import net.dries007.tfc.common.blocks.wood.TFCWallSignBlock; @@ -114,9 +121,26 @@ public static Supplier createWood(Stem stem, Wood.BlockType blockType) { return () -> new WartLeavesBlock(ExtendedProperties.of().mapColor(MapColor.PLANT).strength(0.5F).sound(SoundType.WART_BLOCK).defaultInstrument().randomTicks().noOcclusion().isViewBlocking(TFCBlocks::never).flammableLikeLeaves(), stem.autumnIndex(), stem.getBlock(stem.fallenLeaves()), stem.getBlock(stem.twig()), stem == Stem.CRIMSON ? 0xb01735 : 0x18a5ba); } + if (blockType == Wood.BlockType.SAPLING) + { + return () -> new NetherSaplingBlock(stem.tree(), ExtendedProperties.of(MapColor.PLANT).noCollission().randomTicks().strength(0).sound(SoundType.GRASS).flammableLikeLeaves().blockEntity(TFCBlockEntities.TICK_COUNTER), stem::daysToGrow, false); + } + if (blockType == Wood.BlockType.AXLE) + { + return () -> new AxleBlock(woodProperties(stem).noOcclusion().strength(2.5F).flammableLikeLogs().pushReaction(PushReaction.DESTROY).blockEntity(TFCBlockEntities.AXLE), stem.getBlockCasted(Wood.BlockType.WINDMILL), planksTexture(stem)); + } + if (blockType == Wood.BlockType.WATER_WHEEL) + { + return () -> new WaterWheelBlock(woodProperties(stem).strength(9.0F).noOcclusion().blockEntity(TFCBlockEntities.WATER_WHEEL).ticks(WaterWheelBlockEntity::serverTick, WaterWheelBlockEntity::clientTick), stem.getBlockCasted(Wood.BlockType.AXLE), Beneath.identifier("textures/entity/water_wheel/" + stem.getSerializedName() + ".png")); + } return blockType.create(stem); } + private static ResourceLocation planksTexture(RegistryWood wood) + { + return Beneath.identifier("block/wood/planks/" + wood.getSerializedName()); + } + private static ExtendedProperties woodProperties(RegistryWood wood) { return ExtendedProperties.of(wood.woodColor()).sound(SoundType.WOOD); diff --git a/src/main/java/com/eerussianguy/beneath/common/blocks/NetherSaplingBlock.java b/src/main/java/com/eerussianguy/beneath/common/blocks/NetherSaplingBlock.java new file mode 100644 index 0000000..15c9e6b --- /dev/null +++ b/src/main/java/com/eerussianguy/beneath/common/blocks/NetherSaplingBlock.java @@ -0,0 +1,51 @@ +package com.eerussianguy.beneath.common.blocks; + +import java.util.function.Supplier; + +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.block.state.BlockState; + +import net.dries007.tfc.common.blockentities.TickCounterBlockEntity; +import net.dries007.tfc.common.blocks.ExtendedProperties; +import net.dries007.tfc.common.blocks.wood.TFCSaplingBlock; +import net.dries007.tfc.config.TFCConfig; +import net.dries007.tfc.util.Helpers; +import net.dries007.tfc.util.calendar.ICalendar; +import net.dries007.tfc.world.feature.tree.TFCTreeGrower; + +public class NetherSaplingBlock extends TFCSaplingBlock +{ + public NetherSaplingBlock(TFCTreeGrower tree, ExtendedProperties properties, Supplier days, boolean sand) + { + super(tree, properties, days, sand); + } + + @Override + @SuppressWarnings("deprecation") + public void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) + { + if (random.nextInt(7) == 0) + { + if (!level.isAreaLoaded(pos, 1)) + { + return; + } + if (level.getBlockEntity(pos) instanceof TickCounterBlockEntity counter) + { + if (counter.getTicksSinceUpdate() > ICalendar.TICKS_IN_DAY * getDaysToGrow() * TFCConfig.SERVER.globalSaplingGrowthModifier.get()) + { + this.advanceTree(level, pos, state.setValue(STAGE, 1), random); + } + } + } + } + + @Override + protected boolean mayPlaceOn(BlockState state, BlockGetter level, BlockPos pos) + { + return Helpers.isBlock(state.getBlock(), BeneathBlockTags.NETHER_BUSH_PLANTABLE_ON); + } +} diff --git a/src/main/java/com/eerussianguy/beneath/common/blocks/Stem.java b/src/main/java/com/eerussianguy/beneath/common/blocks/Stem.java index a65247f..dde68fe 100644 --- a/src/main/java/com/eerussianguy/beneath/common/blocks/Stem.java +++ b/src/main/java/com/eerussianguy/beneath/common/blocks/Stem.java @@ -95,6 +95,12 @@ public Supplier getBlock(Wood.BlockType type) return BeneathBlocks.WOODS.get(this).get(type); } + @SuppressWarnings("unchecked") + public Supplier getBlockCasted(Wood.BlockType type) + { + return (Supplier) this.getBlock(type); + } + @Override public BlockSetType getBlockSet() { diff --git a/src/main/java/com/eerussianguy/beneath/misc/PortalUtil.java b/src/main/java/com/eerussianguy/beneath/misc/PortalUtil.java index 87c6d7e..f0b3d2a 100644 --- a/src/main/java/com/eerussianguy/beneath/misc/PortalUtil.java +++ b/src/main/java/com/eerussianguy/beneath/misc/PortalUtil.java @@ -12,7 +12,6 @@ import net.minecraft.world.entity.monster.Zoglin; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.Item; -import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.AbstractSkullBlock; @@ -34,7 +33,7 @@ public final class PortalUtil { public static void onLivingDeath(LivingDeathEvent event) { - if (event.getSource().getEntity() instanceof Player player && isPlayerDressedAppropriately(player) && player.getMainHandItem().getItem() instanceof ScytheItem) + if (event.getSource().getEntity() instanceof Player player && player.getMainHandItem().getItem() instanceof ScytheItem) { final LivingEntity deadEntity = event.getEntity(); final Level level = player.level(); @@ -47,7 +46,7 @@ public static void onLivingDeath(LivingDeathEvent event) level.explode(null, pos.getX(), pos.getY(), pos.getZ(), 10, true, Level.ExplosionInteraction.BLOCK); if (level instanceof ServerLevel server) { - for (int i = 0; i < 10; i++) + for (int i = 0; i < 8; i++) { final Zoglin zoglin = EntityType.ZOGLIN.create(level); if (zoglin != null) @@ -115,9 +114,4 @@ public static boolean isGoodOffering(LevelAccessor level, BlockPos pos, BlockSta return false; } - public static boolean isPlayerDressedAppropriately(Player player) - { - return player.getInventory().getArmor(3).getItem() == Items.CARVED_PUMPKIN; - } - } diff --git a/src/main/resources/assets/beneath/textures/entity/water_wheel/crimson.png b/src/main/resources/assets/beneath/textures/entity/water_wheel/crimson.png new file mode 100644 index 0000000000000000000000000000000000000000..0b350f0364df513c2c96f56a191c283fc8369a1c GIT binary patch literal 2103 zcmYL~c|6oxAIHyc#uhPlqMIz$Q<3GCHD*YrDKzM+kiF~)*<)rzmy+mu$d;jn3?nYe zGRQJxDe7kIjk!tE3`4Ta7(CO{vz*sC=kxlU@ArGY@7L@6ani8%Xi0GuaR7iM=9IOg zK=D787+kP_XJ&B)0!28YtpIso_ng2eV{Ol!6ex0!jmpM&0a&Hw<>MvS%PxtPLv*NHgxA+d)&j#JxrU*K(I&i!?T9K{{4 zF~;zP9i--Fr=Mm=*g8bg($66+!?%8KhO|Bu0mt+il5)RC((-XbDru5nel^Qjboy>a!Ff?x8_x3LI1=0crB#WC^5hZ=+V`iM+sn3_fkJ zRoB#v<|!cFyun*>iyW%nI$|6mzEunGpL{WEHB+YIsqvU?u6%SqSekU^6?~MCfme!D8!lsl3&L^YF5W41!G}BoawkxCA;zjvNxQfl#gzse@oFI?5 z&UefGja1SWIlVlRJr?_wx)R?f`=Hz+PY}w2$ znUn(YMEiDeI3-Btc1~hAm!OTD!SFDsm_J@?V-JH*vQ1t zn=S`M@CJ;w06tCxf1E^w@AarCv|hWHdv&P&nZtkZ#|m5 z@$p?Fmcen#yPRbGN)u4fgEaz#lEK*|WIEb>HUij@m|9Iq@1o{J<1QIg2VLsRTFn|^ zzw<4*OHgww3?J2@*h0*+)SA*yJ)*e&0x-jRGL*g+@k8ZrF7On=cRBy2ERlZsbl4X% z2keE2=1`idXa_w0tCijq4A0oNqh-MKBd`C}7oHU8Lo8m4+`74|kGw=)1HQi^uMwwz z$$oEpV`#r=XUy4WW@p$_$Qf1ka!bsje7BsIn%T_hZ@jsU>*%Lwh4e??2@ED{`K)@l zQf$9|TelfB=~6a56M&cML#=y<5|l6Ib&F^SkcX5#R8{D?`wxI|XTH+xTqgJjxPV-~jtASQDD2zrccv9&U5h>8KuV8*+K!*_)SKW7cyZK)WnM-*OujlG(1%)%8IPyztIqJ$DCsi?z_TR33!(9c_`hrPoB4zY=i*H$WGbqvhNBd$fCjUb7G-n)X+t;7 zIAnZfrP2N0RQE&bPV`SB3jgG}>Aqb}SQIrVDDjhI*Yb*;fBM?@KOScxxvw?4p2`b8 ztG}E{->!=zG;l6eWd#Izu^jtv>>H7&OW*|F{S9U&;hO8R6LhHguTn_I7-0D8rCgVz zU=CqCzcF1=5L-Sh@o;>N=HulK9wC|aoO`6}b0zsYxWFm3dnvKd1&-X+o{L8Dpgr!+ zl@q!nZ(h1DGI{IaAJSRETdZQg;j@6fwqsW87j52TY&|Rdw=XJ*sl-h$< z2zk*JK}DQx9fSp#A}Pf{+RK}5GezJ*$EWJQsa)nNA&N6?4zPx=)%FxMuPqrKjju$w z)0}|4#Wxu00mR3`{M5J;Aj6^-<0T@U$lKF1hJKhj?Iu>A^6Z!wo1gz-gKG$GN2uHC z)D0J2j=UNSSZm96AB~kdhOC0@0KHKk3T6y?K;rcQsn^+}17D5v(-SSlp|Z5b7}wHI#9%w%qjCO>=W^nf6)f{2 z?0e|J3c8bgnj5^Gw|PSqbT<-6YI(~#b&7!`DAk%Q?8*I+DL>l~lN*UBSyIHSX9a0@ zyxHLH@2-d#yG2!v+ArIv((Z&KUQW2Is?x@oSKOCM+X5V}mj!%bc=zKg;lTj02{D%8 zJ*(Fghio%eKKS5J3!BjAKfNMIn0uR0tYR`(J7y=d2DymFeHYBOvTZ;PyIsbA)MO?2 O*a7CGy*1g&GwEMgJ^APW literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/beneath/textures/entity/water_wheel/warped.png b/src/main/resources/assets/beneath/textures/entity/water_wheel/warped.png new file mode 100644 index 0000000000000000000000000000000000000000..8167ec178fca41304b4ade6c34a21880f0fe0a46 GIT binary patch literal 2103 zcmYL~c|6qH8^_Og#uhPlqD!H=mHpnVVJw-Z(4ebA_OfToHezNhT}qoPa13v zs;Xky{VF*@l@Ky=7A0Y9)z=8RbZu^ay&ar)lKe<5E(GN8-Rg3bF&x0rUBPn3bV9W* z{|!7d7=-H%JNI<;eQ4^;;-80$OAbou*3W&C7H=P)g5-zxLiHI~s+rn6g!iIGQZ?+L z-Ao=vr|_*-^cqGJ^u>Z~&s&wDRo=I)aH%vShgh#adXO)s!+YGPv1;>t_(aWs&YYZ; z5hqIq1-f{QIC68cY~+Zc7CzZB%*Fa;iWU#;EylcJORPbH*9G$$(X_90t&b*5OdWlu zPQ&(#Nx#@Nd4#mp+zQ>)sgszRIM z<$`~`W~F@G!MgcWi*>UFJB8+u%4Lmxx#@Hq!HJ- zuDKsw0Y1aiFW3;mz)GV*rlkJyf!xBTaj-nBOqB8uX8)3#q1egdLd@A>7gayP68|#0 z$_yXRjUd%cma-0Paz~Zl01LQy3rLtl)KQMy1@do2>BQ_AHe3NY!7sHveZeSOGIK{F zr9k+hfTM888|WsJRt}kLr+ZA?BH@&FG|R%5FXf^swFxxi3ZB5b2~Pjx6{l<=2!YFd&@{`%Gqm z0}#;!N>dctml47~iz5d-~*<01$CT|M5UA`CPJ2lq$EL6w))^OOxp#O?`0`$vnvy;Q)zLR=*I zFd1QbbFbZC+Gps1NS#Pi4K5bG{_JSGD4Xz3g&DiSmmM4Z_*J@xBkXfx-6#+O*S+LX+2O(*-QtepP57?K3tte0!jgs-`8KDS>f!;#}i&KLdwAg6Z3$5HG5b1z}uCB z!haMnW21!+j`_aS8Bdn|@7c!|(4-J zCfTkF*2PcN_gqsf&wsD*CTmV*+y}>Fxg5xBFgF;b)}*SN3l@Y57BCS!qQE;z!5^#4 z=m@