Skip to content

Commit

Permalink
- Fix knapping with nether rocks
Browse files Browse the repository at this point in the history
- Add recipes for nether bricks
- Add loot table to ruined portal
- Rename vanilla basalt to 'basalt columns'
- Fix a crash when it snows in the overworld
- Remove vanilla horse armor from some loot tables
- Reduce frequency of glowstone spikes
- Allow lava aqueducts to emit light
- Make hellforges add more heat at higher internal temperatures (like crucibles)
  • Loading branch information
eerussianguy committed May 23, 2024
1 parent 6bd63cc commit 57ee292
Show file tree
Hide file tree
Showing 20 changed files with 374 additions and 11 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
This is the first build of Beneath for 1.20.1!
# Changes

- Fix knapping with nether rocks
- Add recipes for nether bricks
- Add loot table to ruined portal
- Rename vanilla basalt to 'basalt columns'
- Fix a crash when it snows in the overworld
- Remove vanilla horse armor from some loot tables
- Reduce frequency of glowstone spikes
- Allow lava aqueducts to emit light
- Make hellforges add more heat at higher internal temperatures (like crucibles)
6 changes: 5 additions & 1 deletion resources/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Rock(NamedTuple):

SPAWN_EGG_ENTITIES = ('red_elk',)

DISABLED_VANILLA_RECIPES = ('polished_blackstone_bricks', 'polished_blackstone_button', 'polished_blackstone_pressure_plate', 'cracked_polished_blackstone_bricks')
DISABLED_VANILLA_RECIPES = ('polished_blackstone_bricks', 'polished_blackstone_button', 'polished_blackstone_pressure_plate', 'cracked_polished_blackstone_bricks', 'nether_bricks')

DEFAULT_CROPS = {
'crimson_roots': 4,
Expand All @@ -121,4 +121,8 @@ class Rock(NamedTuple):
**{'entity.beneath.chest_boat.%s' % wood: lang('%s chest boat', wood) for wood in WOODS},
}

VANILLA_OVERRIDE_LANG = {
'block.minecraft.basalt': 'Basalt Column',
'block.minecraft.polished_basalt': 'Polished Basalt Column',
}

33 changes: 31 additions & 2 deletions resources/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,33 @@ def generate(rm: ResourceManager):
))
rm.block_loot('minecraft:nether_wart', '1-3 beneath:seeds/nether_wart', {'name': 'minecraft:nether_wart', 'conditions': [loot_tables.block_state_property('minecraft:nether_wart[age=3]')]})

rm.loot('minecraft:ruined_portal', {
'rolls': uniform(1, 2),
'entries': [
weight('minecraft:obsidian', 40, 1, 2),
weight('minecraft:flint', 40, 1, 4),
weight('tfc:metal/ingot/wrought_iron', 40, 1, 4),
weight('minecraft:flint_and_steel', 40),
weight('minecraft:fire_charge', 40),
weight('beneath:gold_chunk', 15, 1, 6),
weight('minecraft:bow', 15),
weight('tfc:metal/sword/black_bronze', 15),
weight('tfc:metal/axe/black_bronze', 15),
weight('tfc:metal/shield/black_bronze', 15),
weight('tfc:metal/scythe/black_bronze', 15),
weight('tfc:metal/shovel/black_bronze', 15),
weight('tfc:metal/helmet/black_bronze', 15),
weight('tfc:metal/chestplate/black_bronze', 15),
weight('tfc:metal/boots/black_bronze', 15),
weight('tfc:metal/greaves/black_bronze', 15),
weight('tfc:metal/horse_armor/black_bronze', 3),
weight('minecraft:clock', 5),
weight('tfc:metal/ingot/gold', 5, 2, 8),
weight('minecraft:bell', 1),
weight('tfc:bronze_bell', 1),
]
}, path='chests', loot_type='minecraft:chest')

rm.loot('minecraft:nether_bridge', {
'rolls': uniform(2, 4),
'entries': [
Expand All @@ -49,8 +76,8 @@ def generate(rm: ResourceManager):
weight('tfc:metal/chestplate/wrought_iron', 5),
weight('minecraft:flint_and_steel', 5),
weight('minecraft:saddle', 10),
weight('minecraft:golden_horse_armor', 8),
weight('minecraft:iron_horse_armor', 5),
weight('tfc:metal/horse_armor/bismuth_bronze', 8),
weight('tfc:metal/horse_armor/copper', 5),
weight('minecraft:obsidian', 5, 2, 4),
weight('beneath:pure_sorrow', 1),
weight('beneath:pure_flame', 1),
Expand Down Expand Up @@ -212,6 +239,8 @@ def generate(rm: ResourceManager):

block_and_item_tag(rm, 'tfc:rock/aqueduct', 'beneath:blackstone_aqueduct')
rm.item_tag('tfc:rock_knapping', 'beneath:nether_pebble', 'beneath:blackstone_pebble')
rm.item_tag('tfc:metamorphic_rock', 'beneath:blackstone_pebble')
rm.item_tag('tfc:sedimentary_rock', 'beneath:nether_pebble')
block_and_item_tag(rm, 'minecraft:stone_bricks', 'beneath:hellbricks')

### ENTITY TAGS ###
Expand Down
4 changes: 4 additions & 0 deletions resources/generate_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from mcresources import ResourceManager, utils
from mcresources.type_definitions import Json

import constants
import woods
import assets
import recipes
Expand Down Expand Up @@ -53,6 +54,9 @@ def generate_all(rm: ResourceManager):
data.generate(rm)
world_gen.generate(rm)

vanilla_rm = ResourceManager('minecraft', resource_dir=rm.resource_dir)
vanilla_rm.lang(constants.VANILLA_OVERRIDE_LANG)
vanilla_rm.flush()

rm.flush()

Expand Down
3 changes: 2 additions & 1 deletion resources/recipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def generate(rm: ResourceManager):
rm.crafting_shaped('crafting/warped_thatch', ['XX', 'XX'], {'X': 'beneath:warped_straw'}, 'beneath:warped_thatch').with_advancement('beneath:warped_straw')
rm.crafting_shaped('crafting/blackstone', ['XX', 'XX'], {'X': 'beneath:blackstone_pebble'}, 'minecraft:blackstone').with_advancement('beneath:blackstone_pebble')
rm.crafting_shaped('crafting/blackstone_bricks', ['XMX', 'MXM', 'XMX'], {'X': 'beneath:blackstone_brick', 'M': '#tfc:mortar'}, (4, 'minecraft:polished_blackstone_bricks')).with_advancement('beneath:blackstone_brick')
rm.crafting_shaped('crafting/nether_bricks', ['XMX', 'MXM', 'XMX'], {'X': 'minecraft:nether_brick', 'M': '#tfc:mortar'}, (4, 'minecraft:nether_bricks')).with_advancement('minecraft:nether_brick')
damage_shapeless(rm, 'crafting/blackstone_brick', ('beneath:blackstone_pebble', '#tfc:chisels'), 'beneath:blackstone_brick').with_advancement('beneath:blackstone_pebble')
damage_shapeless(rm, 'crafting/nether_brick', ('beneath:nether_pebble', '#tfc:chisels'), 'minecraft:nether_brick').with_advancement('beneath:nether_pebble')
damage_shapeless(rm, 'crafting/blackstone_button', ('beneath:blackstone_brick', '#tfc:chisels'), 'minecraft:polished_blackstone_button').with_advancement('beneath:blackstone_brick')
damage_shapeless(rm, 'crafting/blackstone_plate', ('beneath:blackstone_brick', 'beneath:blackstone_brick', '#tfc:chisels'), 'minecraft:polished_blackstone_pressure_plate').with_advancement('beneath:blackstone_brick')
rm.crafting_shaped('crafting/blackstone_aqueduct', ['X X', 'MXM'], {'X': 'beneath:blackstone_brick', 'M': '#tfc:mortar'}, 'beneath:blackstone_aqueduct').with_advancement('beneath:blackstone_brick')
Expand All @@ -22,7 +24,6 @@ def generate(rm: ResourceManager):
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')


### HEATING RECIPES ###
metal_data = TFC_METALS['gold']
heat_recipe(rm, 'gold_chunk', 'beneath:gold_chunk', metal_data.melt_temperature, None, '100 tfc:metal/gold')
Expand Down
2 changes: 1 addition & 1 deletion resources/world_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

def generate(rm: ResourceManager):
configured_placed_feature(rm, 'nether_spikes', 'beneath:nether_spikes', {'raw': 'minecraft:netherrack', 'spike': 'beneath:haunted_spike'}, decorate_count(128), decorate_square(), decorate_range_10_10(), decorate_biome())
configured_placed_feature(rm, 'glowstone_spikes', 'beneath:large_nether_spikes', {'raw': 'minecraft:glowstone', 'spike': 'beneath:glowstone_spike'}, decorate_chance(3), decorate_count(32), decorate_square(), decorate_range_10_10(), decorate_biome())
configured_placed_feature(rm, 'glowstone_spikes', 'beneath:large_nether_spikes', {'raw': 'minecraft:glowstone', 'spike': 'beneath:glowstone_spike'}, decorate_chance(6), decorate_count(16), decorate_square(), decorate_range_10_10(), decorate_biome())
configured_placed_feature(rm, 'nether_pebble', 'minecraft:simple_block', {'to_place': random_property_provider('beneath:nether_pebble', 'count')}, decorate_replaceable(), decorate_would_survive('beneath:nether_pebble'), decorate_air())
configured_placed_feature(rm, 'nether_pebble_patch', 'minecraft:random_patch', random_config('beneath:nether_pebble', 16, 10, 1), decorate_chance(3), decorate_every_layer(5), decorate_biome())
configured_placed_feature(rm, 'blackstone_pebble', 'minecraft:simple_block', {'to_place': random_property_provider('beneath:blackstone_pebble', 'count')}, decorate_replaceable(), decorate_would_survive('beneath:nether_pebble'), decorate_air())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static void serverTick(Level level, BlockPos pos, BlockState state, Hellf
float itemTemp = cap.getTemperature();
if (forge.temperature > itemTemp)
{
HeatCapability.addTemp(cap, forge.temperature);
HeatCapability.addTemp(cap, 2.0F + forge.temperature * 0.0025F);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ public LavaAqueductBlock(Properties properties)
super(properties);
}

@Override
public int getLightEmission(BlockState state, BlockGetter level, BlockPos pos)
{
return state.getValue(getFluidProperty()).getFluid().getFluidType().getLightLevel();
}

@Override
public void stepOn(Level level, BlockPos pos, BlockState state, Entity entity)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ protected FallingLeafParticleMixin(ClientLevel pLevel, double pX, double pY, dou
@Inject(method = "<init>", at = @At("TAIL"), remap = false)
private void inject$init(ClientLevel level, double x, double y, double z, SpriteSet set, boolean tinted, BlockState state, CallbackInfo ci)
{
if (state == null)
return;
final Block block = state.getBlock();
if (block instanceof WartLeavesBlock wart)
{
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/assets/minecraft/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"__comment__": "This file was automatically created by mcresources",
"block.minecraft.basalt": "Basalt Column",
"block.minecraft.polished_basalt": "Polished Basalt Column"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"__comment__": "This file was automatically created by mcresources",
"parent": "minecraft:recipes/root",
"criteria": {
"has_item": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"beneath:nether_pebble"
]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "beneath:crafting/nether_brick"
}
}
},
"requirements": [
[
"has_item",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"beneath:crafting/nether_brick"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"__comment__": "This file was automatically created by mcresources",
"parent": "minecraft:recipes/root",
"criteria": {
"has_item": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"minecraft:nether_brick"
]
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "beneath:crafting/nether_bricks"
}
}
},
"requirements": [
[
"has_item",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"beneath:crafting/nether_bricks"
]
}
}
18 changes: 18 additions & 0 deletions src/main/resources/data/beneath/recipes/crafting/nether_brick.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"__comment__": "This file was automatically created by mcresources",
"type": "tfc:damage_inputs_shapeless_crafting",
"recipe": {
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "beneath:nether_pebble"
},
{
"tag": "tfc:chisels"
}
],
"result": {
"item": "minecraft:nether_brick"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"__comment__": "This file was automatically created by mcresources",
"type": "minecraft:crafting_shaped",
"pattern": [
"XMX",
"MXM",
"XMX"
],
"key": {
"X": {
"item": "minecraft:nether_brick"
},
"M": {
"tag": "tfc:mortar"
}
},
"result": {
"item": "minecraft:nether_bricks",
"count": 4
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"placement": [
{
"type": "minecraft:rarity_filter",
"chance": 3
"chance": 6
},
{
"type": "minecraft:count",
"count": 32
"count": 16
},
{
"type": "minecraft:in_square"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@
},
{
"type": "minecraft:item",
"name": "minecraft:golden_horse_armor",
"name": "tfc:metal/horse_armor/bismuth_bronze",
"weight": 8
},
{
"type": "minecraft:item",
"name": "minecraft:iron_horse_armor",
"name": "tfc:metal/horse_armor/copper",
"weight": 5
},
{
Expand Down
Loading

0 comments on commit 57ee292

Please sign in to comment.