This commit is contained in:
slweeb 2022-02-11 15:30:01 -05:00
commit 855a4dcbb5
7 changed files with 226 additions and 77 deletions

View File

@ -45,7 +45,7 @@ elements.neutronium = {
color: "#558bcf",
behavior: behaviors.GAS,
reactions: {
"oxygen": { "elem1":null, "elem2":"hydrogen" },
"oxygen": { "elem1":null, "elem2":"steam" },
},
category: "gases",
burn: 100,
@ -493,7 +493,7 @@ color: ["#eda724", "#f0eabd"],
behavior: behaviors.LIQUID,
category: "liquids",
reactions: {
"molten_mithril": { "elem1": "molten_mythril_mithril_alloy", "elem2":null },
"molten_mithril": { "elem1": "molten_mithril_mythril_alloy", "elem2":null },
},
density: 6855,
state: "liquid",

View File

@ -24,6 +24,7 @@ elements.coal_dust = {
};
//Chlorine only exists in the Neutronium Mod and I don't feel like recreating it, so enable NM for the full experience.
//It will soon exist in vanilla.
//Natural gas is mostly ammonia, which exists.
@ -95,9 +96,9 @@ elements.void_gas = {
elements.electric_gas = {
color: ["#3693b3", "#246e64"],
behavior: [
"M2 AND CR:electric%1|M1 AND CR:electric%1|M2 AND CR:electric%1",
"M1 AND CR:electric%1|XX |M1 AND CR:electric%1",
"M2 AND CR:electric%1|M1 AND CR:electric%1|M2 AND CR:electric%1",
"M2%2 AND CR:electric%1|M1%2 AND CR:electric%1|M2%2 AND CR:electric%1",
"M1%2 AND CR:electric%1|XX |M1%2 AND CR:electric%1",
"M2%2 AND CR:electric%1|M1%2 AND CR:electric%1|M2%2 AND CR:electric%1",
],
hardness: 0.6,
reactions: {
@ -114,31 +115,39 @@ corrosiveGasMaxHardness = 0.5
elements.corrosive_gas = {
color: ["#2929e6", "#151cad"],
behavior: [
"M2|M1|M2",
"M1|XX|M1",
"M2|M1|M2",
"M2%2|M1%2|M2%2",
"M1%2|XX |M1%2",
"M2%2|M1%2|M2%2",
],
hardness: 0.6,
tick: function(pixel) {
//delete neighbors
if(!isEmpty(pixel.x-1,pixel.y) && !outOfBounds(pixel.x-1,pixel.y)) {
if(!elements[pixelMap[pixel.x-1][pixel.y].element].hardness || elements[pixelMap[pixel.x-1][pixel.y].element].hardness <= corrosiveGasMaxHardness) {
deletePixel(pixel.x-1,pixel.y)
if(Math.random() < 0.2) {
deletePixel(pixel.x-1,pixel.y)
}
}
}
if(!isEmpty(pixel.x+1,pixel.y) && !outOfBounds(pixel.x+1,pixel.y)) {
if(!elements[pixelMap[pixel.x+1][pixel.y].element].hardness || elements[pixelMap[pixel.x+1][pixel.y].element].hardness <= corrosiveGasMaxHardness) {
deletePixel(pixel.x+1,pixel.y)
if(Math.random() < 0.2) {
deletePixel(pixel.x+1,pixel.y)
}
}
}
if(!isEmpty(pixel.x,pixel.y-1) && !outOfBounds(pixel.x,pixel.y-1)) {
if(!elements[pixelMap[pixel.x][pixel.y-1].element].hardness || elements[pixelMap[pixel.x][pixel.y-1].element].hardness <= corrosiveGasMaxHardness) {
deletePixel(pixel.x,pixel.y-1)
if(Math.random() < 0.2) {
deletePixel(pixel.x,pixel.y-1)
}
}
}
if(!isEmpty(pixel.x,pixel.y+1) && !outOfBounds(pixel.x,pixel.y+1)) {
if(!elements[pixelMap[pixel.x][pixel.y+1].element].hardness || elements[pixelMap[pixel.x][pixel.y+1].element].hardness <= corrosiveGasMaxHardness) {
deletePixel(pixel.x,pixel.y+1)
if(Math.random() < 0.2) {
deletePixel(pixel.x,pixel.y+1)
}
}
}
},
@ -258,9 +267,9 @@ finineRange = 6
elements.finine = {
color: ["#ffffec", "#fafade", "#ebebd5", "#c9c9b7", "#80806f"],
behavior: [
"M2|M1|M2",
"M1|XX|M1",
"M2|M1|M2",
"M2%2|M1%2|M2%2",
"M1%2|XX |M1%2",
"M2%2|M1%2|M2%2",
],
tick: function(pixel) {
for (let i = -2; i < 3; i++) {

View File

@ -22,5 +22,105 @@ color: ["#8c2a0a", "#783722"],
behavior: behaviors.WALL,
category: "minecraft",
state: "solid",
tempHigh: 2750
tempHigh: 2750,
stateHigh: "molten_netherrack",
};
elements.glowstone_dust = {
color: ["#d9d636", "#fffc63", "#a3a12f", "#e0dd3f"],
behavior: behaviors.POWDER,
category: "minecraft",
state: "solid",
tempHigh: 2500,
stateHigh: "molten_glowstone",
conduct: 0.975,
density: 1075
};
elements.molten_netherrack = {
name: "Nether Magma",
color: ["#f7f09c", "#faf9eb", "#ffffff", "#dcf7f7", "#86dbdb", "#1268a6"],
behavior: behaviors.LIQUID,
category: "minecraft",
state: "liquid",
tempLow: 2750,
stateLow: "netherrack",
temp: 3000,
viscosity: 1000,
density: 2305
};
elements.redstone_dust = {
color: ["#bf2424", "#f22424", "#a12020"],
behavior: behaviors.POWDER,
category: "minecraft",
state: "solid",
tempHigh: 1275,
stateHigh: "liquid_redstone",
density: 1250
};
behaviors.SOUL_SAND = [
"SA|SA|SA",
"XX|XX|XX",
"SA AND M2|SA AND M1|SA AND M2",
];
elements.soul_sand = {
color: ["#91704d", "#704e2b", "#523517"],
behavior: behaviors.SOUL_SAND,
category: "minecraft",
state: "solid",
tempHigh: 2575,
stateHigh: "soul_glass",
density: 1375,
reactions: {
"water": { "elem1":"wet_soul_sand", "elem2":null },
}
};
elements.soul_soil = {
color: ["#80664b", "#6e553b", "#5c452e"],
behavior: behaviors.SOUL_SAND,
category: "minecraft",
state: "solid",
tempHigh: 2565,
stateHigh: "soul_glass",
density: 1450,
reactions: {
"water": { "elem1":"soul_mud", "elem2":null },
}
};
elements.soul_mud = {
color: "#6e5437",
behavior: behaviors.POWDER,
category: "minecraft",
state: "solid",
tempHigh: 1985,
stateHigh: "soul_adobe",
density: 1585
};
elements.soul_glass = {
color: "#7a90c2",
behavior: behaviors.WALL,
category: "minecraft",
state: "solid",
tempHigh: 2585,
stateHigh: "molten_soul_glass",
density: 1685
};
elements.wet_soul_sand = {
color: ["#5c452e", "#856d56"],
behavior: behaviors.POWDER,
category: "minecraft",
state: "solid",
tempHigh: 150,
stateHigh: "soul_sand",
density: 1660,
};
/* unfinished but near:
Soul Adobe,
Molten Soul Glass,
Nether Quartz,
Molten Nether Quartz,
Dripstone,
Molten Dripstone,
Molten Glowstone,
Liquid Redstone,
Soul Flame,
Soul
*/

View File

@ -602,7 +602,6 @@ elements.wb1 = {
"XX|CR:water|XX",
],
category: "special",
state: "liquid",
density: 997,
hidden: true,
excludeRandom: true,
@ -645,7 +644,6 @@ elements.lb1 = {
"XX|CR:magma|XX",
],
category: "special",
state: "liquid",
density: 997,
hidden: true,
excludeRandom: true,
@ -723,66 +721,44 @@ elements.seb = {
hidden: true,
excludeRandom: true,
hardness: 0.3,
},
}
elements.netherrack = {
color: ["#802b2b","#4f1b1b","#943232"],
behavior: behaviors.POWDER,
tempHigh: 7550,
category: "land",
state: "solid",
density: 2550,
hardness: 0.07,
breakInto: ["crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","sulfur"], // and some copper, gold, iron, nickel after processing //sulfur closer to 1/7 in-game
burn: 9,
burnTime: 9007199254740995,
burnInto: "netherrack",
},
if(!enabledMods.includes("mods/minecraft.js")) {
elements.netherrack = {
color: ["#802b2b","#4f1b1b","#943232"],
behavior: behaviors.POWDER,
tempHigh: 7550,
category: "land",
state: "solid",
density: 2550,
hardness: 0.07,
breakInto: ["crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","sulfur"], // and some copper, gold, iron, nickel after processing //sulfur closer to 1/7 in-game
burn: 9,
burnTime: 9007199254740995,
burnInto: "netherrack",
}
minecraftModEnabled = false
} else if(enabledMods.includes("mods/minecraft.js")) {
minecraftModEnabled = true
}
elements.crushed_netherrack = {
color: ["#e34b46","#b04235","#73431f","#522510","#7a3326"],
behavior: behaviors.POWDER,
category:"land",
tempHigh: 7550,
stateHigh: "molten_netherrack",
state: "solid",
density: 1680,
burn: 20,
burnTime: 9007199254740995,
hardness: 0.02,
hidden: true,
},
elements.soul_sand = {
color: "#755e35",
behavior: behaviors.POWDER,
tempHigh: 3000,
stateHigh: "molten_soul_glass",
category: "land",
state: "solid",
density: 1602,
},
elements.soul_glass = {
color: ["#998060","#a18654"],
behavior: behaviors.WALL,
tempHigh: 3000,
category: "solids",
state: "solid",
density: 2500,
breakInto: "soul_glass_shard",
hidden: true,
},
elements.soul_glass_shard = {
color: ["#998060","#a18654","#8f764a"],
behavior: behaviors.POWDER,
tempHigh: 3000,
stateHigh: "molten_soul_glass",
category: "powders",
state: "solid",
density: 2500,
hidden: true,
if(!enabledMods.includes("mods/minecraft.js")) {
elements.crushed_netherrack = {
color: ["#e34b46","#b04235","#73431f","#522510","#7a3326"],
behavior: behaviors.POWDER,
category:"land",
tempHigh: 7550,
stateHigh: "molten_netherrack",
state: "solid",
density: 1680,
burn: 20,
burnTime: 9007199254740995,
hardness: 0.02,
hidden: true,
}
minecraftModEnabled = false
} else if(enabledMods.includes("mods/minecraft.js")) {
minecraftModEnabled = true
}
runAfterLoad(function() {
@ -797,6 +773,26 @@ runAfterLoad(function() {
"DL:"+eLists.FAIRY+" AND M2|XX|DL:"+eLists.FAIRY+" AND M2",
"M1|DL:"+eLists.FAIRY+"|M1",
]
}
if(minecraftModEnabled) {
elements.netherrack.hardness = 0.07
elements.netherrack.breakInto = ["crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","crushed_netherrack","sulfur"] // and some copper, gold, iron, nickel after processing //sulfur closer to 1/7 in-game
elements.netherrack.burn = 9
elements.netherrack.burnTime = 9007199254740995
elements.netherrack.burnInto = "netherrack"
elements.crushed_netherrack = {
color: ["#e34b46","#b04235","#73431f","#522510","#7a3326"],
behavior: behaviors.POWDER,
category:"land",
tempHigh: 2750,
stateHigh: "molten_netherrack",
state: "solid",
density: 1680,
burn: 20,
burnTime: 9007199254740995,
hardness: 0.02,
hidden: true,
}
}
elements.vaporized_histrelin = elements.molten_histrelin
delete elements.molten_histrelin

25
mods/slag_fix.js Normal file
View File

@ -0,0 +1,25 @@
elements.slag = {
color: ["#4b3a2d","#6a5447","#6b5b53","#675851","#78756e"],
behavior: behaviors.POWDER,
tempHigh: 1780,
stateHigh: "molten_slag",
category: "powders",
density: 2400,
state: "solid",
conduct: 0.03,
movable: true,
}
elements.molten_slag = {
color: ["#964917","#963A17","#962C00","#D46924","#D45424","#D43F00","#D6722A","#D65B2A","#D64419","#CE6E29","#CE5829","#CE4200","#F09237","#F07537","#F05800"],
behavior: behaviors.MOLTEN,
temp: 1880,
tempLow: 1780,
stateLow: "slag",
viscosity: 10000,
hidden: true,
state: "liquid",
category: "molten",
density: 2160,
conduct: 0,
}

View File

@ -56,4 +56,23 @@ elements.troll3 = {
insulate: true,
state: "solid",
excludeRandom: true,
},
elements.troll4 = {
color: "#eeeeee",
tick: function(pixel) {
for (var i = 1; i < width; i++) {
for (var j = 1; j < height; j++) {
var eeaa = (Math.floor(Math.random()*5))-2
if(Math.random() < 0.00007) { explodeAt(i,j,9+eeaa) }
if(j == height) { j == 1 }
}
if(i == height) { i == 1 }
}
},
category: "machines",
insulate: true,
hardness: 1.0,
state: "solid",
excludeRandom: true,
}

View File

@ -94,7 +94,7 @@ elements.worldgen_test = {
}
runAfterLoad(function() {
if(enabledMods.includes("mods/randomness.js")) {
if(enabledMods.includes("mods/minecraft.js")) {
elements.nether_gen_test = {
color: ["#751318","#694a20","#f0771a"],