Various other things

This commit is contained in:
ThePython 2023-05-26 09:55:55 -07:00
parent 56cd28665c
commit a3e7918f14
9 changed files with 147 additions and 40 deletions

View File

@ -32,7 +32,7 @@ All energy values are in `energy.lua`. You can also change the speed at which th
* Left-click and sneak-left-click to transmute blocks in range (two different modes with minor differences)
* Aux1-left-click to open enchanting table (MineClone only)
* Aux1-right-click to open crafting table (MineClone only)
* Ability to exchange charcoal/coal/iron/copper/tin/gold/mese/diamond by crafting (stone is always returned)
* Ability to exchange charcoal/coal/iron/copper/tin/gold/mese/diamond by crafting (the Philosopher's Stone is always returned)
I don't actually own MineCraft, meaning I don't know how the original mod (Equivalent Exchange) works. I will probably make some minor mistakes, since all I have to go on is the internet.
## Known issues:

View File

@ -14,7 +14,7 @@
Crafted with a diamond in the middle, glowstone dust in the corners, and redstone dust on the sides (MineClone)
Crafted with a diamond in the middle, tin ingots in the corners, and obsidian on the sides (Minetest Game)
Can use to craft coal into iron, mese into diamonds, etc.
Ghost blocks are now worth 0 instead of 1 (to prevent infinite energy)
Why's Ghost blocks are now worth 0 instead of 1 (to prevent infinite energy)
Fixed stairs and slabs not working in Minetest Game
Changed the recipe for the Exchange Orb
New recipe is a Philosopher's Stone in the middle, diamonds in the corners, and iron/steel ingots on the sides.
@ -22,5 +22,15 @@
Renamed images to reflect mod name change ("exchangeclone" instead of "ee" for Element Exchange)
Deleted unnecessary "config.lua"
2.1
The Energy Collector setting is now energy/second instead of second/energy to fit much higher costs than Element Exchange (default is 5 energy/s).
Fixed Exchange Orb energy value (forgot to change it after changing the recipe)
Changed constructor, deconstructor, and collector recipes and energy values to make them cheaper
The Constructor, Deconstructor, and Energy Collector are now not unbreakable in MineClone (I really should test in survival).
The Energy Collector now drops its contents when broken in MineClone.
Copper blocks are now worth 4 times as much as copper ingots instead of 9 (MineClone).
Fixed terracotta values (MineClone)
Set gravel value to 1 to match sand/stone/dirt/etc (MineClone).
Tuff, blackstone, and basalt are now transmutable (MineClone).
A couple of minor transmutation changes (MineClone).
Changed emerald value to 4096 (MineClone).
Gold cannot be crafted into diamonds using the PS; it can now be crafted into emeralds and emeralds into diamonds (MineClone).

View File

@ -164,7 +164,10 @@ minetest.register_node("exchangeclone:element_constructor", {
"exchangeclone_constructor_right.png",
"exchangeclone_constructor_right.png"
},
groups = {cracky = 2, container = 4},
groups = {cracky = 2, container = 4, pickaxey = 2},
_mcl_hardness = 3,
_mcl_blast_resistance = 6,
sounds = mcl_sounds.node_sound_metal_defaults(),
is_ground_content = false,
can_dig = can_dig,
after_dig_node = function(pos, oldnode, oldmetadata, digger)

View File

@ -55,7 +55,7 @@ local function on_timer(pos, elapsed)
local fuel_stack = inv:get_stack("main", 1)
local energy_value = 0
if fuel_stack:get_name() == "exchangeclone:exchange_orb" then
energy_value = (fuel_stack:get_meta():get_float("stored_charge") or 0) + 8452 --8452 = energy cost of orb
energy_value = (fuel_stack:get_meta():get_float("stored_charge") or 0) + 33792 --33792 = energy cost of orb
else
energy_value = exchangeclone.get_item_energy(fuel_stack:get_name())
end
@ -145,7 +145,10 @@ minetest.register_node("exchangeclone:element_deconstructor", {
"exchangeclone_deconstructor_right.png",
"exchangeclone_deconstructor_right.png"
},
groups = {cracky = 2, container = 3},
groups = {cracky = 2, container = 3, pickaxey = 2},
_mcl_hardness = 3,
_mcl_blast_resistance = 6,
sounds = mcl_sounds.node_sound_metal_defaults(),
is_ground_content = false,
can_dig = can_dig,
after_dig_node = function(pos, oldnode, oldmetadata, digger)

View File

@ -316,7 +316,6 @@ exchangeclone.mcl_energy_values = {
bedrock = 0,
deadbush = 4,
mossycobble = 9,
gravel = 3,
stick = 4,
flint = 4,
cactus = 8,
@ -342,7 +341,7 @@ exchangeclone.mcl_energy_values = {
stone_with_iron = 0,
lapis = 864,
stone_with_lapis = 0,
emerald = 1024,
emerald = 4096,
stone_with_emerald = 0,
gold_ingot = 2048,
stone_with_gold = 0,
@ -363,7 +362,7 @@ exchangeclone.mcl_energy_values = {
slimeblock = 216,
snow = 0.5,
glass = 1,
emeraldblock = 1024*9,
emeraldblock = 4096*9,
},
["mcl_droppers"] = {
dropper = 71,
@ -649,7 +648,7 @@ exchangeclone.mcl_energy_values = {
quartz_pillar = 512,
quartz_smooth = 512,
magma = 4,
netheriteblock = 663552, --quite a bit.
netheriteblock = 663552,
},
["mcl_observers"] = {
observer_off = 262,
@ -758,22 +757,23 @@ exchangeclone.mcl_energy_values = {
raw_copper = 85,
block_raw = 765,
stone_with_copper = 0,
block = 765,
block_exposed = 765,
block_oxidized = 765,
block_weathered = 765,
block_cut = 765,
block_exposed_cut = 765,
block_oxidized_cut = 765,
block_weathered_cut = 765,
waxed_block = 797,
waxed_block_exposed = 797,
waxed_block_oxidized = 797,
waxed_block_weathered = 797,
waxed_block_cut = 797,
waxed_block_exposed_cut = 797,
waxed_block_oxidized_cut = 797,
waxed_block_weathered_cut = 797,
-- TODO: If MineClone switches to 9, change blocks to 765 (and 797 for waxed)
block = 340,
block_exposed = 340,
block_oxidized = 340,
block_weathered = 340,
block_cut = 340,
block_exposed_cut = 340,
block_oxidized_cut = 340,
block_weathered_cut = 340,
waxed_block = 372,
waxed_block_exposed = 372,
waxed_block_oxidized = 372,
waxed_block_weathered = 372,
waxed_block_cut = 372,
waxed_block_exposed_cut = 372,
waxed_block_oxidized_cut = 372,
waxed_block_weathered_cut = 372,
},
["mcl_deepslate"] = {
deepslate_with_coal = 0,
@ -1168,6 +1168,24 @@ exchangeclone.mcl_energy_values = {
},
["small_why_things"] = {
craftable_barrier = 72,
},
["mcl_colorblocks"] = {
glazed_terracotta_black = 64,
glazed_terracotta_blue = 64,
glazed_terracotta_brown = 64,
glazed_terracotta_cyan = 64,
glazed_terracotta_green = 64,
glazed_terracotta_grey = 64,
glazed_terracotta_light_blue = 64,
glazed_terracotta_lime = 64,
glazed_terracotta_magenta = 64,
glazed_terracotta_orange = 64,
glazed_terracotta_pink = 64,
glazed_terracotta_purple = 64,
glazed_terracotta_red = 64,
glazed_terracotta_silver = 64,
glazed_terracotta_white = 64,
glazed_terracotta_yellow = 64
}
}
@ -1218,6 +1236,7 @@ exchangeclone.mcl_group_values = {
{"carpet", 32},
{"spawn_egg", 0},
{"useless", 0},
{"hardened_clay", 64},
{"NO_GROUP", 1},
}

View File

@ -91,7 +91,6 @@ end
local function allow_metadata_inventory_take(pos, listname, index, stack, player)
if minetest.is_protected(pos, player:get_player_name()) then
minetest.log("blocked take")
return 0
end
return stack:get_count()
@ -134,12 +133,15 @@ minetest.register_node("exchangeclone:energy_collector", {
"exchangeclone_energy_collector_right.png",
"exchangeclone_energy_collector_right.png"
},
groups = {cracky = 2, container = 2},
groups = {cracky = 2, container = 2, pickaxey = 2},
_mcl_hardness = 3,
_mcl_blast_resistance = 6,
sounds = mcl_sounds.node_sound_metal_defaults(),
is_ground_content = false,
can_dig = can_dig,
on_timer = on_timer,
on_construct = on_construct,
on_dig_node = on_dig_node,
after_dig_node = on_dig_node,
on_metadata_inventory_move = function(pos)
minetest.get_node_timer(pos):start(1)
end,

View File

@ -23,7 +23,7 @@ function exchangeclone.get_item_energy(name)
return minetest.registered_items[name].energy_value
end
exchangeclone.collector_speed = minetest.settings:get("exchangeclone.energy_collector_speed") or 10
exchangeclone.collector_speed = minetest.settings:get("exchangeclone.energy_collector_speed") or 5
dofile(default_path.."/constructor.lua")
dofile(default_path.."/deconstructor.lua")

View File

@ -33,12 +33,15 @@ exchangeclone.node_transmutations = {
["mcl_core:stone"] = "mcl_core:cobble",
["mcl_core:cobble"] = "mcl_core:stone",
["mcl_core:dirt_with_grass"] = "mcl_core:sand",
["mcl_core:podzol"] = "mcl_core:redsand",
["mcl_core:dirt"] = "mcl_core:sand",
["mcl_core:sand"] = "mcl_core:dirt_with_grass",
["mcl_core:redsand"] = "mcl_core:dirt_with_grass",
["mcl_core:redsand"] = "mcl_core:podzol",
["mcl_flowers:tallgrass"] = "mcl_core:deadbush",
["mcl_nether:netherrack"] = "mcl_core:cobble",
["mcl_core:gravel"] = "mcl_core:sandstone",
["mcl_core:sandstone"] = "mcl_core:gravel",
["mcl_core:redsandstone"] = "mcl_core:gravel",
["mcl_farming:pumpkin"] = "mcl_farming:melon",
["mcl_farming:melon"] = "mcl_farming:pumpkin",
["mcl_core:water_source"] = "mcl_core:ice",
@ -73,11 +76,14 @@ exchangeclone.node_transmutations = {
["mcl_crimson:crimson_roots"] = "mcl_crimson:warped_roots",
["mcl_nether:nether_wart_block"] = "mcl_crimson:warped_wart_block",
["mcl_core:glass"] = "mcl_core:sand",
["mcl_blackstone:blackstone"] = "mcl_blackstone:basalt",
["mcl_blackstone:basalt"] = "mcl_blackstone:blackstone",
["mcl_flowers:double_grass"] = "mcl_core:deadbush",
--["mcl_flowers:double_grass_top"] = "air",
["mcl_core:andesite"] = "mcl_core:diorite",
["mcl_core:diorite"] = "mcl_core:granite",
["mcl_core:granite"] = "mcl_core:andesite",
["mcl_core:granite"] = "mcl_deepslate:tuff",
["mcl_deepslate:tuff"] = "mcl_core:andesite",
["mcl_deepslate:deepslate"] = "mcl_deepslate:deepslate_cobbled",
["mcl_deepslate:deepslate_cobbled"] = "mcl_deepslate:deepslate",
["mcl_core:stone_with_coal"] = "mcl_deepslate:deepslate_with_coal",
@ -86,6 +92,7 @@ exchangeclone.node_transmutations = {
["mcl_core:stone_with_gold"] = "mcl_deepslate:deepslate_with_gold",
["mcl_core:stone_with_emerald"] = "mcl_deepslate:deepslate_with_emerald",
["mcl_core:stone_with_redstone"] = "mcl_deepslate:deepslate_with_redstone",
["mcl_core:stone_with_redstone_lit"] = "mcl_deepslate:deepslate_with_redstone_lit",
["mcl_core:stone_with_diamond"] = "mcl_deepslate:deepslate_with_diamond",
["mcl_copper:stone_with_copper"] = "mcl_deepslate:deepslate_with_copper",
["mcl_deepslate:deepslate_with_coal"] = "mcl_core:stone_with_coal",
@ -98,6 +105,7 @@ exchangeclone.node_transmutations = {
["mcl_deepslate:deepslate_with_copper"] = "mcl_copper:stone_with_copper",
["mcl_core:bedrock"] = "mcl_core:barrier",
["mcl_core:barrier"] = "mcl_core:bedrock",
["mcl_end:end_stone"] = "mcl_nether:netherrack",
["default:stone"] = "default:cobble",
["default:desert_stone"] = "default:desert_cobble",
@ -147,11 +155,12 @@ exchangeclone.node_transmutations = {
{ --sneak+use
["mcl_core:stone"] = "mcl_core:dirt_with_grass",
["mcl_core:cobble"] = "mcl_core:dirt_with_grass",
["mcl_deepslate:deepslate"] = "mcl_core:podzol",
["mcl_deepslate:deepslate_cobbled"] = "mcl_core:podzol",
["mcl_core:sand"] = "mcl_core:cobble",
["mcl_core:redsand"] = "mcl_core:cobble",
["mcl_core:sandstone"] = "mcl_core:gravel",
["mcl_core:redsandstone"] = "mcl_core:gravel",
["mcl_core:dirt_with_grass"] = "mcl_core:cobble",
["mcl_core:podzol"] = "mcl_deepslate:deepslate_cobbled",
["mcl_core:acacialeaves"] = "mcl_core:spruceleaves",
["mcl_core:birchleaves"] = "mcl_core:acacialeaves",
["mcl_core:darkleaves"] = "mcl_core:birchleaves",
@ -166,6 +175,9 @@ exchangeclone.node_transmutations = {
["mcl_mangrove:mangrove_tree"] = "mcl_core:jungletree",
["mcl_core:tree"] = "mcl_mangrove:mangrove_tree",
["mcl_core:sprucetree"] = "mcl_core:tree",
["mcl_nether:netherrack"] = "mcl_end:end_stone",
["mcl_nether:soul_sand"] = "mcl_blackstone:soul_soil",
["mcl_blackstone:soul_soil"] = "mcl_nether:soul_sand",
["default:stone"] = "default:dirt_with_grass",
["default:cobble"] = "default:dirt_with_grass",
@ -180,6 +192,10 @@ exchangeclone.node_transmutations = {
["default:sandstone"] = "default:gravel",
["default:desert_sandstone"] = "default:gravel",
["default:silver_sandstone"] = "default:gravel",
["mcl_core:diorite"] = "mcl_core:andesite",
["mcl_core:andesite"] = "mcl_deepslate:tuff",
["mcl_deepslate:tuff"] = "mcl_core:granite",
["mcl_core:granite"] = "mcl_core:diorite",
["default:acacia_tree"] = "default:pine_tree",
["default:tree"] = "default:acacia_tree",
["default:aspen_tree"] = "default:tree",
@ -217,7 +233,8 @@ function exchangeclone.transmute_nodes(player, distance, mode)
if minetest.is_protected(new_pos, player:get_player_name()) then
minetest.record_protection_violation(new_pos, player:get_player_name())
else
minetest.swap_node(new_pos, {name = new_node})
node.name = new_node
minetest.swap_node(new_pos, node)
end
end
end
@ -525,20 +542,39 @@ minetest.register_craft({
})
minetest.register_craft({
output = "mcl_core:diamond",
output = "mcl_core:emerald",
type = "shapeless",
recipe = {
"exchangeclone:philosophers_stone",
"mcl_core:gold_ingot",
"mcl_core:gold_ingot",
"mcl_core:gold_ingot",
"mcl_core:gold_ingot",
},
replacements = {{"exchangeclone:philosophers_stone", "exchangeclone:philosophers_stone"}}
})
minetest.register_craft({
output = "mcl_core:gold_ingot 4",
output = "mcl_core:gold_ingot 2",
type = "shapeless",
recipe = {
"exchangeclone:philosophers_stone",
"mcl_core:emerald"
},
replacements = {{"exchangeclone:philosophers_stone", "exchangeclone:philosophers_stone"}}
})
minetest.register_craft({
output = "mcl_core:diamond",
type = "shapeless",
recipe = {
"exchangeclone:philosophers_stone",
"mcl_core:emerald",
"mcl_core:emerald",
},
replacements = {{"exchangeclone:philosophers_stone", "exchangeclone:philosophers_stone"}}
})
minetest.register_craft({
output = "mcl_core:emerald 2",
type = "shapeless",
recipe = {
"exchangeclone:philosophers_stone",
@ -597,3 +633,37 @@ minetest.register_craft({
},
replacements = {{"exchangeclone:philosophers_stone", "exchangeclone:philosophers_stone"}}
})
minetest.register_craft({
output = "mcl_core:lapis 2",
type = "shapeless",
recipe = {
"exchangeclone:philosophers_stone",
"mesecons_torch:redstoneblock",
"mesecons_torch:redstoneblock",
"mesecons_torch:redstoneblock",
},
replacements = {{"exchangeclone:philosophers_stone", "exchangeclone:philosophers_stone"}}
})
minetest.register_craft({
output = "mesecons:redstone 27",
type = "shapeless",
recipe = {
"exchangeclone:philosophers_stone",
"mcl_core:lapis",
"mcl_core:lapis",
},
replacements = {{"exchangeclone:philosophers_stone", "exchangeclone:philosophers_stone"}}
})
minetest.register_craft({
output = "mesecons:redstone 27",
type = "shapeless",
recipe = {
"exchangeclone:philosophers_stone",
"mcl_core:lapis",
"mcl_core:lapis",
},
replacements = {{"exchangeclone:philosophers_stone", "exchangeclone:philosophers_stone"}}
})

View File

@ -1 +1 @@
exchangeclone.energy_collector_speed (Energy Collector energy/second) int 10
exchangeclone.energy_collector_speed (Energy Collector energy/second) int 5