Skip to content

Commit

Permalink
Lazy Biome Color Fix for Redstone
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspirata committed Jul 16, 2024
1 parent 883d85f commit ec9ccb1
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
9 changes: 5 additions & 4 deletions Mcblend Source/Materials/Materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ def fix_world():
for n in connected_nodes:
if n.type == "TEX_IMAGE" and n.image:
image_texture_node = n
debugger(connected_nodes)

if node.type == "GROUP":
if "Lazy Biome Color Fix" == node.node_tree.name:
Expand Down Expand Up @@ -198,7 +197,7 @@ def fix_world():
if WProperties.lazy_biome_fix:
material_parts = image_texture_node.image.name.lower().replace(".png", "").replace("-", "_").split("_")

if any(part in material_parts for part in ("grass", "water", "leaves", "stem")) and all(part not in material_parts for part in ("cherry", "side")):
if any(part in material_parts for part in ("grass", "water", "leaves", "stem")) or ("redstone" and "dust" in material_parts) and all(part not in material_parts for part in ("cherry", "side")):
if lbcf_node is None:
if "Lazy Biome Color Fix" not in bpy.data.node_groups:
try:
Expand All @@ -217,7 +216,10 @@ def fix_world():
material.node_tree.links.new(lbcf_node.outputs[0], PBSDF.inputs["Base Color"])

if "water" in material_parts:
lbcf_node.inputs["Water"].default_value = True
lbcf_node.inputs["Mode"].default_value = 2

if "redstone" in material_parts:
lbcf_node.inputs["Mode"].default_value = 3
else:
Absolute_Solver("m002", slot)
else:
Expand Down Expand Up @@ -496,7 +498,6 @@ def setproceduralpbr():
for n in connected_nodes:
if n.type == "TEX_IMAGE" and n.image:
image = n.image
debugger(connected_nodes)

if node.type == "BUMP":
bump_node = node
Expand Down
Binary file modified Mcblend Source/Materials/Nodes.blend
Binary file not shown.
5 changes: 2 additions & 3 deletions Mcblend Source/Resource_Packs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
def get_resource_packs():
return bpy.context.scene["resource_packs"]

def set_resource_packs(resource_packs, debug=None):
def set_resource_packs(resource_packs):
bpy.context.scene["resource_packs"] = resource_packs

if debug is not None:
print(f"Resource Packs: {bpy.context.scene['resource_packs']}")
debugger(f"Resource Packs: {bpy.context.scene['resource_packs']}")

Launchers = {
"Mojang": ".minecraft\\versions",
Expand Down
Binary file modified Mcblend.blend
Binary file not shown.
Binary file added tex/MWO_redstone_dust_angled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tex/MWO_redstone_dust_line1_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tex/redstone_dust_line1_y.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ec9ccb1

Please sign in to comment.