From 96fdd6dd43203be70728f4dcae64733053716f82 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Tue, 24 Jan 2017 15:20:46 -0700 Subject: [PATCH] update readme, fix missing local declarators --- README.txt | 6 ++++-- init.lua | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.txt b/README.txt index 7a0e149..e90ea1f 100644 --- a/README.txt +++ b/README.txt @@ -7,11 +7,13 @@ This causes "source" blocks for liquids to randomly shuffle around when they don Each type of liquid can have this behaviour enabled independently of each other. By default lava is configured to flow more slowly than water, but this can be changed in the mod's settings. -Clay Springs and Ocean Loss -=========================== +Damp Clay Counters Ocean Loss +============================= If basic water is set as dynamic, it loses its "renewability" - water nodes don't replicate like they normally do. If you are concerned about the global water level dropping over time as water pours down into undersea caverns, or just generally don't like the idea of water being a finite resource (even with an ocean's worth to start with), this mod includes an optional feature that turns natural clay deposits into "springs". Clay deposits get an Active Block Modifier that checks if there's air or shallow water above them and refills them with newly spawned water source blocks. If this clay is dug out by players and reconstituted into clay blocks elsewhere, the "spring" behaviour won't occur for these - it only happens for clay spawned by mapgen while this feature is enabled. (In technical terms, when clay springs are enabled the map generator replaces generated clay with an otherwise identical "damp clay" node type that drops regular clay when dug. The ABM only affects this "damp clay" node type.) +There's also a "spring" block that's available only via the creative menu or /give command. This block has an ABM that ensures there's always a single block of water generated directly above it, regardless of where the block is placed. + Note that other than this clay spring feature and the override of water's "renewability" this mod doesn't affect any default node definitions, so any other mods dealing with liquids should still function as they did before. If you disable any of the liquid types they will just "freeze" in whatever position they were in at the time. \ No newline at end of file diff --git a/init.lua b/init.lua index 0d3a0a4..a48a988 100644 --- a/init.lua +++ b/init.lua @@ -87,7 +87,7 @@ local liquid_abm = function(liquid, flowing_liquid, chance) set_node(check_pos, node) return end - perm = all_direction_permutations[math.random(24)] + local perm = all_direction_permutations[math.random(24)] local dirs -- declare outside of loop so it won't keep entering/exiting scope for i=1,4 do dirs = perm[i] @@ -190,8 +190,8 @@ if springs then catch_up = false, action = function(pos,node) pos.y = pos.y + 1 - check_node = get_node(pos) - check_node_name = check_node.name + local check_node = get_node(pos) + local check_node_name = check_node.name if check_node_name == "air" or check_node_name == "default:water_flowing" then set_node(pos, {name="default:water_source"}) end