New tool and glass blocks

This commit is contained in:
JoseDouglas26 2024-06-09 12:11:46 -03:00
parent fd208f1477
commit cbe660857b
22 changed files with 57 additions and 13 deletions

View File

@ -0,0 +1,19 @@
local common_defs = {
glass = {
_mcl_blast_resistance = 0.3,
_mcl_hardness = 0.3,
_mcl_silk_touch_drop = true,
drawtype = "glasslike",
drop = "",
groups = {colored_blocks = 1, handy = 1},
paramtype = "light",
sounds = mcl_sounds.node_sound_glass_defaults(),
sunlight_propagates = true
}
}
for _, color in pairs(voxelibre.colors) do
local identifier = color.."_stained_glass"
voxelibre.register_block(identifier, table.copy(common_defs.glass))
end

View File

@ -1,4 +1,4 @@
local commondefs = {
local common_defs = {
concrete = {
_mcl_blast_resistance = 1.8,
_mcl_hardness = 1.8,
@ -21,31 +21,31 @@ local commondefs = {
}
local planks = {
["acacia"] = {groups = commondefs.flammable_planks_groups},
["bamboo"] = {groups = commondefs.flammable_planks_groups},
["birch"] = {groups = commondefs.flammable_planks_groups},
["cherry"] = {groups = commondefs.flammable_planks_groups},
["acacia"] = {groups = common_defs.flammable_planks_groups},
["bamboo"] = {groups = common_defs.flammable_planks_groups},
["birch"] = {groups = common_defs.flammable_planks_groups},
["cherry"] = {groups = common_defs.flammable_planks_groups},
["crimson"] = {},
["dark_oak"] = {groups = commondefs.flammable_planks_groups},
["jungle"] = {groups = commondefs.flammable_planks_groups},
["mangrove"] = {groups = commondefs.flammable_planks_groups},
["oak"] = {groups = commondefs.flammable_planks_groups},
["spruce"] = {groups = commondefs.flammable_planks_groups},
["dark_oak"] = {groups = common_defs.flammable_planks_groups},
["jungle"] = {groups = common_defs.flammable_planks_groups},
["mangrove"] = {groups = common_defs.flammable_planks_groups},
["oak"] = {groups = common_defs.flammable_planks_groups},
["spruce"] = {groups = common_defs.flammable_planks_groups},
["warped"] = {}
}
for _, color in pairs(voxelibre.colors) do
local identifier = color.."_concrete"
voxelibre.register_block(identifier, table.copy(commondefs.concrete))
voxelibre.register_block(identifier, table.copy(common_defs.concrete))
identifier = identifier.."_powder"
voxelibre.register_block(identifier, table.copy(commondefs.concrete_powder))
voxelibre.register_block(identifier, table.copy(common_defs.concrete_powder))
end
for identifier, definitions in pairs(planks) do
voxelibre.register_block(identifier.."_planks", table.merge(commondefs.planks, definitions))
voxelibre.register_block(identifier.."_planks", table.merge(common_defs.planks, definitions))
end
local blocks = {

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

View File

Before

Width:  |  Height:  |  Size: 470 B

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 B

View File

@ -0,0 +1,25 @@
import os
def rename_files():
directory = input("Path: ")
if not os.path.isdir(directory):
print("Could not find the path!")
return
prefix = input("Prefix: ")
files = os.listdir(directory)
for file in files:
if os.path.isfile(os.path.join(directory, file)):
file_name, extension = os.path.splitext(file)
if not file_name.startswith(prefix):
new_file_name = prefix + file_name + extension
os.rename(os.path.join(directory, file), os.path.join(directory, new_file_name))
print("Done!")
if __name__ == "__main__":
rename_files()