Skip to content

Commit

Permalink
Add heat particles, melt down placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
ICY105 committed Jan 22, 2024
1 parent 85a4a8d commit 432d394
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

execute if block ~ ~ ~ minecraft:barrier run setblock ~ ~ ~ minecraft:air

execute if score @s mechanization.time matches 1.. run data remove block -30000000 0 1602 Items
execute if score @s mechanization.time matches 1.. run data modify block -30000000 0 1602 Items append from entity @s item.tag.fuel_rod
execute if score @s mechanization.time matches 1.. run loot spawn ~ ~ ~ mine -30000000 0 1602 minecraft:air{drop_contents: 1b}

tag @s remove mechanization.reactor_core
function mechanization:base/utils/break_machine_t2

execute rotated 0 90 positioned ^ ^ ^1 align xyz as @e[tag=mechanization.reactor_core,dx=0,dy=0,dz=0] run function mechanization:nuclear/blocks/reactor_core/remove_fuel_2
execute rotated 0 -90 positioned ^ ^ ^1 align xyz as @e[tag=mechanization.reactor_core,dx=0,dy=0,dz=0] run function mechanization:nuclear/blocks/reactor_core/remove_fuel_2

execute rotated 0 90 positioned ^ ^ ^1 align xyz as @e[tag=mechanization.reactor_core,dx=0,dy=0,dz=0] run function mechanization:nuclear/blocks/reactor_core/update_model
execute rotated 0 -90 positioned ^ ^ ^1 align xyz as @e[tag=mechanization.reactor_core,dx=0,dy=0,dz=0] run function mechanization:nuclear/blocks/reactor_core/update_model
function mechanization:base/utils/break_block/break_machine_t2
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ scoreboard players operation @s mechanization.data -= #heat_total mechanization.
execute unless score @s mechanization.data matches 20.. run scoreboard players set @s mechanization.data 20

# heat display
execute if score @s mechanization.data matches 2000.. run particle minecraft:flame ~ ~1 ~ 0.2 0.2 0.2 0.1 10
execute if score @s mechanization.data matches 600..1099 run particle minecraft:white_smoke ~ ~-0.3 ~ 0.4 0 0.4 0 15
execute if score @s mechanization.data matches 1100..1400 run particle minecraft:smoke ~ ~-0.3 ~ 0.4 0 0.4 0 15
execute if score @s mechanization.data matches 1500..1700 run particle minecraft:large_smoke ~ ~-0.3 ~ 0.4 0 0.4 0 15
execute if score @s mechanization.data matches 1800.. run particle minecraft:flame ~ ~ ~ 0.4 0.1 0.4 0 15

# generate neutrons
execute unless entity @s[tag=mechanization.reactor_core.uranium] unless entity @s[tag=mechanization.reactor_core.mox] unless score @s mechanization.fluid.in matches 1.. run return fail
Expand All @@ -47,3 +50,7 @@ execute store result entity @s item.tag.fuel_rod.tag.mechanization.fuel int 1 ru
scoreboard players operation #max_fuel mechanization.data = @s mechanization.time
scoreboard players operation #max_fuel mechanization.data *= #cons.100000 mechanization.data
execute if score #fuel mechanization.data >= #max_fuel mechanization.data run function mechanization:nuclear/blocks/reactor_core/deplete_fuel

# melt down
execute if score @s mechanization.data matches 2001.. run setblock ~ ~ ~ minecraft:lava
execute if score @s mechanization.data matches 2001.. run function mechanization:nuclear/blocks/reactor_core/break_hard

0 comments on commit 432d394

Please sign in to comment.