Skip to content

Commit

Permalink
Bare Bones, Some Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspirata committed Jun 7, 2024
1 parent 1dd01f6 commit 7015f0f
Show file tree
Hide file tree
Showing 2,995 changed files with 973 additions and 7 deletions.
4 changes: 4 additions & 0 deletions Mcblend Source/MCB_API.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ def update_default_pack(debug=None):
default_pack = "Minecraft 1.20.6"
default_path = os.path.join(resource_packs_directory, "Minecraft 1.20.6")
resource_packs[default_pack] = {"path": (default_path), "enabled": True}

default_pack = "Bare Bones 1.20.6"
default_path = os.path.join(resource_packs_directory, "Bare Bones 1.20.6")
resource_packs[default_pack] = {"path": (default_path), "enabled": False}

if debug is not None:
print(f"Default Pack: {default_pack} stored in {default_path}")
Expand Down
22 changes: 17 additions & 5 deletions Mcblend Source/Materials/Materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ def apply_resources():

counter += 1

# Naming Err
try:
bpy.data.node_groups[f"Texture Animator.{counter}"].name = f"Animated; {image_texture.replace('.png', '')}"
Texture_Animator.node_tree = bpy.data.node_groups[f"Animated; {image_texture.replace('.png', '')}"]
Expand All @@ -594,12 +595,14 @@ def apply_resources():
for node in Texture_Animator.node_tree.nodes:
if node.type == "TEX_IMAGE":
node.image = bpy.data.images[image_texture]

else:
Texture_Animator.node_tree = Current_node_tree

material.node_tree.links.new(Texture_Animator.outputs["Color"], PBSDF.inputs["Base Color"])
material.node_tree.links.new(Texture_Animator.outputs["Alpha"], PBSDF.inputs["Alpha"])

if image_texture_node != None:
material.node_tree.nodes.remove(image_texture_node)
else:
if Texture_Animator is None:
if "Texture Animator" not in bpy.data.node_groups:
Expand Down Expand Up @@ -642,8 +645,11 @@ def apply_resources():
if new_normal_image_path:
if not normal_texture_node:
normal_texture_node = material.node_tree.nodes.new("ShaderNodeTexImage")
# Исправить при случае, что существует только аниматор
normal_texture_node.location = (image_texture_node.location.x, image_texture_node.location.y - 562)
if image_texture_node != None:
normal_texture_node.location = (image_texture_node.location.x, image_texture_node.location.y - 562)

elif Texture_Animator != None:
normal_texture_node.location = (Texture_Animator.location.x, Texture_Animator.location.y - 562)
normal_texture_node.interpolation = "Closest"

if normal_image_name in bpy.data.images:
Expand Down Expand Up @@ -683,7 +689,10 @@ def apply_resources():
if new_specular_image_path:
if not specular_texture_node:
specular_texture_node = material.node_tree.nodes.new("ShaderNodeTexImage")
specular_texture_node.location = (image_texture_node.location.x, image_texture_node.location.y - 760)
if image_texture_node != None:
specular_texture_node.location = (image_texture_node.location.x, image_texture_node.location.y - 760)
elif Texture_Animator != None:
specular_texture_node.location = (Texture_Animator.location.x, Texture_Animator.location.y - 760)
specular_texture_node.interpolation = "Closest"

if specular_image_name in bpy.data.images:
Expand Down Expand Up @@ -732,7 +741,10 @@ def apply_resources():
if new_emission_image_path:
if not emission_texture_node:
emission_texture_node = material.node_tree.nodes.new("ShaderNodeTexImage")
emission_texture_node.location = (image_texture_node.location.x, image_texture_node.location.y - 760)
if image_texture_node != None:
emission_texture_node.location = (image_texture_node.location.x, image_texture_node.location.y - 760)
elif Texture_Animator != None:
emission_texture_node.location = (Texture_Animator.location.x, Texture_Animator.location.y - 760)
emission_texture_node.interpolation = "Closest"

if emission_image_name in bpy.data.images:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "black_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "blue_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "brown_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "cyan_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "dirt" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": [
{ "model": "block/dirt_path" }
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"normal": [
{ "model": "block/grass", "weight": 1 }
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"variants": {
"snowy=false":
{ "model": "block/grass_block" },
"snowy=true":
{ "model": "block/grass_block_snow" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "gray_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "green_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "light_blue_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "lime_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "magenta_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"variants": {
"snowy=false": [
{ "model": "block/mycelium" }
],
"snowy=true": { "model": "block/grass_block_snow" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "orange_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "pink_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "purple_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "red_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "red_sand" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "sand" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "silver_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "stone" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "white_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"variants": {
"normal":
{ "model": "yellow_concrete_powder" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"ambientocclusion": true,
"textures": {
"particle": "#crop"
},
"elements": [
{ "from": [ 4, -1, 0 ],
"to": [ 4, 15, 16 ],
"shade": false,
"faces": {
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "#crop" },
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "#crop" }
}
},
{ "from": [ 12, -1, 0 ],
"to": [ 12, 15, 16 ],
"shade": false,
"faces": {
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "#crop" },
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "#crop" }
}
},
{ "from": [ 0, -1, 4 ],
"to": [ 16, 15, 4 ],
"shade": false,
"faces": {
"north": { "uv": [ 0, 0, 16, 16 ], "texture": "#crop" },
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#crop" }
}
},
{ "from": [ 0, -1, 12 ],
"to": [ 16, 15, 12 ],
"shade": false,
"faces": {
"north": { "uv": [ 0, 0, 16, 16 ], "texture": "#crop" },
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#crop" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ "parent": "block/block",
"ambientocclusion": true,
"textures": {
"particle": "block/dirt",
"top": "block/dirt_path_top",
"side": "block/dirt_path_side",
"bottom": "block/dirt"
},
"elements": [
{ "from": [ 0, 0, 0 ],
"to": [ 16, 15, 16 ],
"shade": true,
"faces": {
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#bottom", "cullface": "down" },
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#top" },
"north": { "uv": [ 0, 1, 16, 16 ], "texture": "#side", "cullface": "north" },
"south": { "uv": [ 0, 1, 16, 16 ], "texture": "#side", "cullface": "south" },
"west": { "uv": [ 0, 1, 16, 16 ], "texture": "#side", "cullface": "west" },
"east": { "uv": [ 0, 1, 16, 16 ], "texture": "#side", "cullface": "east" }
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "block/tinted_cross",
"textures": {
"cross": "block/fern"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "block/tinted_cross",
"textures": {
"cross": "block/grass"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "block/tinted_cross",
"textures": {
"cross": "block/large_fern_bottom"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "block/tinted_cross",
"textures": {
"cross": "block/large_fern_top"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "block/tinted_cross",
"textures": {
"cross": "block/tall_grass_bottom"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "block/tinted_cross",
"textures": {
"cross": "block/tall_grass_top"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"ambientocclusion": true,
"textures": {
"particle": "#torch"
},
"elements": [
{ "from": [ 7, 0, 7 ],
"to": [ 9, 10, 9 ],
"shade": true,
"faces": {
"down": { "uv": [ 7, 13, 9, 15 ], "texture": "#torch" },
"up": { "uv": [ 7, 6, 9, 8 ], "texture": "#torch" }
}
},
{ "from": [ 7, 0, 0 ],
"to": [ 9, 16, 16 ],
"shade": true,
"faces": {
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" },
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" }
}
},
{ "from": [ 0, 0, 7 ],
"to": [ 16, 16, 9 ],
"shade": true,
"faces": {
"north": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" },
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#torch" }
}
}
]
}
Loading

0 comments on commit 7015f0f

Please sign in to comment.