neuralgia/kubejs/startup_scripts/tfg/blocks.plants.js
Pyritie 153ae76522
Feature/mars piles and layers (#1975)
* changes for some sand layer/pile stuff

* Martian wind (#1883)

* add texture for wind

* add multiple martian wind types

* fix semiheavy concurrent with tfg core

* rename wind to match convention

* fix blockstate registration error

* why is this even turned on by default

* translate code regions + placeholder bundle recipe

* add mars climate controller

* add debug stick functions

* cleanup

* add layer block models

* add jsons

* cleanup

---------

Signed-off-by: Zippity <i.wa.anderson.86@gmail.com>

* refactor

* undo bundle

* added a bunch of missing snow pile tags

* item model changes

* more snow piled tags

* add dust storm severity biome tags

* some cleanup

---------

Signed-off-by: Zippity <i.wa.anderson.86@gmail.com>
Co-authored-by: Zippity <i.wa.anderson.86@gmail.com>
2025-10-07 18:22:41 +01:00

424 lines
No EOL
11 KiB
JavaScript

// Priority: 0
"use strict";
const registerTFGCrops = (event) => {
// Earth Crops
event.create('tfg:sunflower', 'tfc:double_crop')
.translationKey('block.tfg.sunflower')
.soundType('crop')
.nutrient('nitrogen')
.stages(4)
.doubleStages(2)
.hardness(0.4)
.growthModifier(0.8)
.tagBlock('minecraft:mineable/hoe')
.tagBlock('minecraft:flowers')
.productItem(product => {
product.texture('tfg:item/sunflower_product')
})
.seedItem(seed => {
seed.texture('tfg:item/sunflower_seed')
})
.deadBlock(dead => {
dead.hardness(0.2)
dead.soundType('crop')
dead.tagBlock('minecraft:mineable/hoe')
})
event.create('tfg:sunflower_wild', 'tfc:wild_crop')
.type('double')
.soundType('crop')
.seeds('tfg:sunflower_seeds')
.food('tfg:sunflower_product')
.hardness(0.2)
.tagBoth('tfc:wild_crops')
.tagBlock('minecraft:mineable/hoe')
.tagBlock('minecraft:flowers')
.tagBlock('tfc:can_be_snow_piled')
.tagItem('c:hidden_from_recipe_viewers')
event.create('tfg:rapeseed', 'tfc:double_crop')
.translationKey('block.tfg.rapeseed')
.soundType('crop')
.nutrient('phosphorous')
.stages(3)
.doubleStages(3)
.hardness(0.4)
.tagBlock('minecraft:mineable/hoe')
.tagBlock('minecraft:flowers')
.deadBlock(dead => {
dead.hardness(0.2)
dead.soundType('crop')
dead.tagBlock('minecraft:mineable/hoe')
})
event.create('tfg:rapeseed_wild', 'tfc:wild_crop')
.type('double')
.soundType('crop')
.seeds('tfg:rapeseed_seeds')
.food('tfg:rapeseed_product')
.hardness(0.2)
.tagBoth('tfc:wild_crops')
.tagBlock('minecraft:mineable/hoe')
.tagBlock('minecraft:flowers')
.tagBlock('tfc:can_be_snow_piled')
.tagItem('c:hidden_from_recipe_viewers')
event.create('tfg:flax', 'tfc:double_crop')
.translationKey('block.tfg.flax')
.soundType('crop')
.nutrient('nitrogen')
.stages(5)
.doubleStages(3)
.hardness(0.4)
.growthModifier(1.2)
.expiryModifier(1.2)
.tagBlock('minecraft:mineable/hoe')
.productItem(product => {
product.texture('tfg:item/flax_product')
product.tag('tfc:scrapable')
})
.seedItem(seed => {
seed.texture('tfg:item/flax_seed')
})
.deadBlock(dead => {
dead.hardness(0.2)
dead.soundType('crop')
dead.tagBlock('minecraft:mineable/hoe')
})
event.create('tfg:flax_wild', 'tfc:wild_crop')
.type('double')
.soundType('crop')
.seeds('tfg:flax_seeds')
.food('tfg:flax_product')
.hardness(0.2)
.tagBoth('tfc:wild_crops')
.tagBlock('minecraft:mineable/hoe')
.tagBlock('tfc:can_be_snow_piled')
.tagItem('c:hidden_from_recipe_viewers')
// Mars Crops
event.create('betterend:amber_root', 'tfc:crop')
.soundType('crop')
.nutrient('phosphorous')
.stages(3)
.hardness(0.4)
.tagBlock('minecraft:mineable/hoe')
.productItem(product => {
product.food(food => {
food.hunger(4)
food.saturation(1)
})
})
.deadBlock(dead => {
dead.hardness(0.2)
dead.soundType('crop')
dead.tagBlock('minecraft:mineable/hoe')
dead.box(2, 0, 2, 14, 6, 14)
})
event.create('betterend:amber_root_wild', 'tfc:wild_crop')
.type('default')
.soundType('crop')
.seeds('betterend:amber_root_seeds')
.food('betterend:amber_root_product')
.hardness(0.2)
.tagBoth('tfc:wild_crops')
.tagBlock('minecraft:mineable/hoe')
.tagBlock('tfc:can_be_snow_piled')
.tagItem('c:hidden_from_recipe_viewers')
event.create('betterend:blossom_berry', 'tfc:crop')
.soundType('crop')
.nutrient('potassium')
.stages(3)
.hardness(0.4)
.tagBlock('minecraft:mineable/hoe')
.productItem(product => {
product.food(food => {
food.hunger(5)
food.saturation(1)
})
})
.deadBlock(dead => {
dead.hardness(0.2)
dead.soundType('crop')
dead.tagBlock('minecraft:mineable/hoe')
dead.box(2, 0, 2, 14, 9, 14)
})
event.create('betterend:blossom_berry_wild', 'tfc:wild_crop')
.type('default')
.soundType('crop')
.seeds('betterend:blossom_berry_seeds')
.food('betterend:blossom_berry_product')
.hardness(0.2)
.tagBoth('tfc:wild_crops')
.tagBlock('minecraft:mineable/hoe')
.tagBlock('tfc:can_be_snow_piled')
.tagItem('c:hidden_from_recipe_viewers')
event.create('betterend:cave_pumpkin')
.soundType('cherry_wood')
.tagBlock('minecraft:mineable/axe')
.tagBlock('minecraft:mineable/hoe')
.mapColor('color_red')
.lightLevel(0.85)
.requiresTool(false)
.fullBlock(false)
.opaque(false)
.notSolid()
event.create('betterend:cave_pumpkin_plant', 'tfc:spreading_crop')
.soundType('crop')
.nutrient('nitrogen')
.stages(3)
.hardness(0.4)
.tagBlock('minecraft:mineable/hoe')
.deadBlock(dead => {
dead.hardness(0.2)
dead.soundType('crop')
dead.tagBlock('minecraft:mineable/hoe')
dead.box(2, 0, 2, 14, 9, 14)
})
.fruitBlock('betterend:cave_pumpkin')
.textureAt(0, "betterend:block/cave_pumpkin_stem_0")
.textureAt(1, "betterend:block/cave_pumpkin_stem_1")
.textureAt(2, "betterend:block/cave_pumpkin_stem_2")
.textureAt(3, "betterend:block/cave_pumpkin_stem_3")
.texture("side", "betterend:block/cave_pumpkin_stem_3_side")
event.create('betterend:cave_pumpkin_wild', 'tfc:wild_crop')
.type('spreading')
.soundType('crop')
.spreadingFruitBlock('betterend:cave_pumpkin')
.seeds('betterend:cave_pumpkin_seeds')
.hardness(0.2)
.tagBoth('tfc:wild_crops')
.tagBlock('minecraft:mineable/hoe')
.tagBlock('tfc:can_be_snow_piled')
.tagItem('c:hidden_from_recipe_viewers')
event.create('betterend:chorus_mushroom', 'tfc:crop')
.translationKey('block.betterend.chorus_mushroom')
.soundType('nether_wart')
.nutrient('phosphorous')
.stages(3)
.hardness(0.4)
.tagBlock('minecraft:mineable/hoe')
.box(2, 0, 2, 14, 4, 14)
.productItem(product => {
product.food(food => {
food.hunger(2)
food.saturation(1)
food.effect('minecraft:hunger', 30 * 20, 0, 1)
food.effect('minecraft:weakness', 30 * 20, 0, 1)
})
})
.deadBlock(dead => {
dead.hardness(0.2)
dead.box(2, 0, 2, 14, 4, 14)
dead.soundType('nether_wart')
dead.tagBlock('minecraft:mineable/hoe')
})
event.create('betterend:chorus_mushroom_wild', 'tfc:wild_crop')
.type('default')
.box(2, 0, 2, 14, 4, 14)
.translationKey('block.betterend.chorus_mushroom_wild')
.soundType('nether_wart')
.seeds('betterend:chorus_mushroom_seeds')
.food('betterend:chorus_mushroom_product')
.hardness(0.2)
.tagBoth('tfc:wild_crops')
.tagBlock('minecraft:mineable/hoe')
.tagBlock('tfc:can_be_snow_piled')
.tagItem('c:hidden_from_recipe_viewers')
event.create('betterend:shadow_berry', 'tfc:crop')
.soundType('crop')
.box(2, 0, 2, 14, 3, 14)
.nutrient('potassium')
.stages(3)
.hardness(0.4)
.tagBlock('minecraft:mineable/hoe')
.productItem(product => {
product.food(food => {
food.hunger(5)
food.saturation(1)
food.effect('minecraft:poison', 5 * 20, 0, 1)
})
})
.deadBlock(dead => {
dead.hardness(0.2)
dead.soundType('crop')
dead.tagBlock('minecraft:mineable/hoe')
dead.box(2, 0, 2, 14, 3, 14)
})
event.create('betterend:shadow_berry_wild', 'tfc:wild_crop')
.type('default')
.box(2, 0, 2, 14, 3, 14)
.soundType('crop')
.seeds('betterend:shadow_berry_seeds')
.food('betterend:shadow_berry_product')
.hardness(0.2)
.tagBoth('tfc:wild_crops')
.tagBlock('minecraft:mineable/hoe')
.tagBlock('tfc:can_be_snow_piled')
.tagItem('c:hidden_from_recipe_viewers')
event.create('betterend:bolux_mushroom', 'tfc:crop')
.soundType('nether_wart')
.box(2, 0, 2, 14, 5, 14)
.nutrient('phosphorous')
.stages(3)
.hardness(0.4)
.tagBlock('minecraft:mineable/hoe')
.productItem(product => {
product.food(food => {
food.hunger(2)
food.saturation(1)
food.effect('tfc:thirst', 60 * 20, 0, 1)
food.effect('minecraft:nausea', 30 * 20, 0, 1)
})
})
.deadBlock(dead => {
dead.hardness(0.2)
dead.soundType('nether_wart')
dead.tagBlock('minecraft:mineable/hoe')
dead.box(2, 0, 2, 14, 5, 14)
})
event.create('betterend:bolux_mushroom_wild', 'tfc:wild_crop')
.box(2, 0, 2, 14, 5, 14)
.type('default')
.soundType('nether_wart')
.seeds('betterend:bolux_mushroom_seeds')
.food('betterend:bolux_mushroom_product')
.hardness(0.2)
.tagBoth('tfc:wild_crops')
.tagBlock('minecraft:mineable/hoe')
.tagBlock('tfc:can_be_snow_piled')
.tagItem('c:hidden_from_recipe_viewers')
// Mars Saplings
event.create('tfg:saplings/crimson', 'tfc:sapling')
.features('tfg:mars/tree/crimson')
.tagBoth('minecraft:saplings')
.tagBlock('tfg:do_not_destroy_in_space')
.tagBlock('tfc:can_be_snow_piled')
.growthDays(6)
.soundType('nether_wart')
.defaultCutout()
.noCollision()
event.create('tfg:saplings/warped', 'tfc:sapling')
.features('tfg:mars/tree/warped')
.tagBoth('minecraft:saplings')
.tagBlock('tfg:do_not_destroy_in_space')
.tagBlock('tfc:can_be_snow_piled')
.growthDays(6)
.soundType('nether_wart')
.defaultCutout()
.noCollision()
event.create('tfg:saplings/alphacene', 'tfc:sapling')
.features('species:alphacene_mushroom')
.tagBoth('minecraft:saplings')
.tagBlock('tfg:do_not_destroy_in_space')
.tagBlock('tfc:can_be_snow_piled')
.growthDays(3)
.soundType('nether_wart')
.defaultCutout()
.noCollision()
event.create('tfg:saplings/strophar', 'tfc:sapling')
.features('tfg:mars/tree/strophar_mini')
.tagBoth('minecraft:saplings')
.tagBlock('tfg:do_not_destroy_in_space')
.tagBlock('tfc:can_be_snow_piled')
.growthDays(7)
.soundType('nether_wart')
.defaultCutout()
.noCollision()
event.create('tfg:saplings/aeronos', 'tfc:sapling')
.features('tfg:mars/tree/aeronos_mini')
.tagBoth('minecraft:saplings')
.tagBlock('tfg:do_not_destroy_in_space')
.tagBlock('tfc:can_be_snow_piled')
.growthDays(9)
.soundType('nether_wart')
.defaultCutout()
.noCollision()
event.create('tfg:saplings/glacian', 'tfc:sapling')
.features('tfg:mars/tree/glacian_mini')
.tagBoth('minecraft:saplings')
.tagBlock('tfg:do_not_destroy_in_space')
.tagBlock('tfc:can_be_snow_piled')
.growthDays(9)
.soundType('nether_wart')
.defaultCutout()
.noCollision()
// Glacian tree stuff
event.create('tfg:glacian_leaves', 'tfc:leaves')
.soundType('azalea_leaves')
.tagBlock('minecraft:mineable/hoe')
.tagBlock('tfg:do_not_destroy_in_space')
.mapColor('snow')
.seasonalColors(false)
.fallenLeaves(leaves => {
leaves.noCollision()
leaves.notSolid()
leaves.defaultCutout()
leaves.soundType('azalea_leaves')
leaves.tagBlock('minecraft:mineable/hoe')
leaves.tagBlock('minecraft:replaceable')
leaves.noDynamicTinting()
leaves.models((modelType, generator) => {
if (modelType.layers != 8) {
generator.parent("tfc:block/groundcover/fallen_leaves_height" + modelType.height);
generator.texture("all", "ad_astra:block/glacian_leaves");
} else {
generator.parent("ad_astra:block/glacian_leaves");
}
})
})
event.create('tfg:glacian_wood', 'tfc:log')
.tagBoth('minecraft:logs')
.tagItem('minecraft:logs_that_burn')
.tagItem('ad_astra:glacian_logs')
.tagBlock('minecraft:mineable/axe')
.soundType('wood')
.stripped(stripped => {
stripped.tagBoth('minecraft:logs')
stripped.tagItem('minecraft:logs_that_burn')
stripped.tagItem('ad_astra:glacian_logs')
stripped.tagBlock('minecraft:mineable/axe')
stripped.soundType('wood')
})
event.create('tfg:glacian_log', 'tfc:log')
.tagBoth('minecraft:logs')
.tagBoth('c:hidden_from_recipe_viewers')
.soundType('wood')
.stripped(stripped => {
stripped.tagBoth('minecraft:logs')
stripped.tagBoth('c:hidden_from_recipe_viewers')
stripped.soundType('wood')
})
}