From d65ee31f34f73ed104a3d1294fa55b6b8c16a3ee Mon Sep 17 00:00:00 2001 From: SweetySweetingtonsSweets Date: Tue, 16 Sep 2025 18:46:33 -0400 Subject: [PATCH 1/3] Create liquid_Master.js --- liquid_Master.js | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 liquid_Master.js diff --git a/liquid_Master.js b/liquid_Master.js new file mode 100644 index 00000000..4db37967 --- /dev/null +++ b/liquid_Master.js @@ -0,0 +1,60 @@ +if (!elements.categories.custom) { + elements.categories.custom = "custom"; +} + +elements.hello_test = { + color: "#ff00ff", + behavior: behaviors.POWDER, + category: "custom", + state: "solid", +}; + + +// Ensure category exists +if (!elements.categories.special) { + elements.categories.special = "special"; +} + +elements.liquefier = { + color: "#33ccff", + behavior: behaviors.POWDER, // stays in place better than liquid + category: "liquids", + state: "solid", + density: 2000, + tick: function(pixel) { + const dirs = [ + [0,1], [0,-1], [1,0], [-1,0], + [1,1], [-1,1], [1,-1], [-1,-1] + ]; + for (const [dx,dy] of dirs) { + const x = pixel.x+dx; + const y = pixel.y+dy; + if (outOfBounds(x,y)) continue; + + const target = pixelMap[x][y]; + if (!target) continue; + if (target.element === "liquefier") continue; + + const liquidName = target.element + "_liquid"; + + // Define the "liquid" version if missing + if (!elements[liquidName]) { + let baseColor = elements[target.element]?.color || "#654321"; + if (Array.isArray(baseColor)) baseColor = baseColor[0]; + + elements[liquidName] = { + color: [baseColor, "#3399ff"], // tint + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", + density: 1050, + viscosity: 8, + isFood: elements[target.element]?.isFood || false, + }; + } + + // Turn neighbor into its liquid version + changePixel(target, liquidName); + } + }, +}; From b8254e9b4a30e69febc3e2d9a6715f1e92423881 Mon Sep 17 00:00:00 2001 From: SweetySweetingtonsSweets Date: Tue, 16 Sep 2025 18:48:42 -0400 Subject: [PATCH 2/3] Create liquid_Master.js --- mods/liquid_Master.js | 60 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 mods/liquid_Master.js diff --git a/mods/liquid_Master.js b/mods/liquid_Master.js new file mode 100644 index 00000000..4db37967 --- /dev/null +++ b/mods/liquid_Master.js @@ -0,0 +1,60 @@ +if (!elements.categories.custom) { + elements.categories.custom = "custom"; +} + +elements.hello_test = { + color: "#ff00ff", + behavior: behaviors.POWDER, + category: "custom", + state: "solid", +}; + + +// Ensure category exists +if (!elements.categories.special) { + elements.categories.special = "special"; +} + +elements.liquefier = { + color: "#33ccff", + behavior: behaviors.POWDER, // stays in place better than liquid + category: "liquids", + state: "solid", + density: 2000, + tick: function(pixel) { + const dirs = [ + [0,1], [0,-1], [1,0], [-1,0], + [1,1], [-1,1], [1,-1], [-1,-1] + ]; + for (const [dx,dy] of dirs) { + const x = pixel.x+dx; + const y = pixel.y+dy; + if (outOfBounds(x,y)) continue; + + const target = pixelMap[x][y]; + if (!target) continue; + if (target.element === "liquefier") continue; + + const liquidName = target.element + "_liquid"; + + // Define the "liquid" version if missing + if (!elements[liquidName]) { + let baseColor = elements[target.element]?.color || "#654321"; + if (Array.isArray(baseColor)) baseColor = baseColor[0]; + + elements[liquidName] = { + color: [baseColor, "#3399ff"], // tint + behavior: behaviors.LIQUID, + category: "liquids", + state: "liquid", + density: 1050, + viscosity: 8, + isFood: elements[target.element]?.isFood || false, + }; + } + + // Turn neighbor into its liquid version + changePixel(target, liquidName); + } + }, +}; From a74e2b9a91a19fbe83d33433f61eb4eed3b2e7ea Mon Sep 17 00:00:00 2001 From: slweeb <91897291+slweeb@users.noreply.github.com> Date: Tue, 23 Sep 2025 11:33:31 -0400 Subject: [PATCH 3/3] Delete duplicate liquid_Master.js --- liquid_Master.js | 60 ------------------------------------------------ 1 file changed, 60 deletions(-) delete mode 100644 liquid_Master.js diff --git a/liquid_Master.js b/liquid_Master.js deleted file mode 100644 index 4db37967..00000000 --- a/liquid_Master.js +++ /dev/null @@ -1,60 +0,0 @@ -if (!elements.categories.custom) { - elements.categories.custom = "custom"; -} - -elements.hello_test = { - color: "#ff00ff", - behavior: behaviors.POWDER, - category: "custom", - state: "solid", -}; - - -// Ensure category exists -if (!elements.categories.special) { - elements.categories.special = "special"; -} - -elements.liquefier = { - color: "#33ccff", - behavior: behaviors.POWDER, // stays in place better than liquid - category: "liquids", - state: "solid", - density: 2000, - tick: function(pixel) { - const dirs = [ - [0,1], [0,-1], [1,0], [-1,0], - [1,1], [-1,1], [1,-1], [-1,-1] - ]; - for (const [dx,dy] of dirs) { - const x = pixel.x+dx; - const y = pixel.y+dy; - if (outOfBounds(x,y)) continue; - - const target = pixelMap[x][y]; - if (!target) continue; - if (target.element === "liquefier") continue; - - const liquidName = target.element + "_liquid"; - - // Define the "liquid" version if missing - if (!elements[liquidName]) { - let baseColor = elements[target.element]?.color || "#654321"; - if (Array.isArray(baseColor)) baseColor = baseColor[0]; - - elements[liquidName] = { - color: [baseColor, "#3399ff"], // tint - behavior: behaviors.LIQUID, - category: "liquids", - state: "liquid", - density: 1050, - viscosity: 8, - isFood: elements[target.element]?.isFood || false, - }; - } - - // Turn neighbor into its liquid version - changePixel(target, liquidName); - } - }, -};