Skip to content

Commit

Permalink
Embrace Pixels, many changes in Resource Packs Code
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspirata committed Jun 9, 2024
1 parent b0fa685 commit 15aa0af
Show file tree
Hide file tree
Showing 1,562 changed files with 2,080 additions and 262 deletions.
Binary file modified Animated Textures Test.blend
Binary file not shown.
8 changes: 8 additions & 0 deletions Mcblend Source/Data.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@
"Divider": 80,
},

"powered_rail_on": {
"Middle Value": 0.2,
11: 0.5,
12: 2,
"Adder": 0.1,
"Divider": 50.0,
}

}

# Materials Categories
Expand Down
23 changes: 14 additions & 9 deletions Mcblend Source/MCB_API.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .Data import *

def InitOnStart():

if "resource_packs" not in bpy.context.scene:
bpy.context.scene["resource_packs"] = {}
update_default_pack()
Expand Down Expand Up @@ -68,35 +68,40 @@ def update_default_pack(debug=None):
resource_packs = bpy.context.scene["resource_packs"]

default_pack = "Minecraft 1.20.6"
default_path = os.path.join(resource_packs_directory, "Minecraft 1.20.6")
default_path = os.path.join(resource_packs_directory, default_pack)
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")
default_path = os.path.join(resource_packs_directory, default_pack)
resource_packs[default_pack] = {"path": (default_path), "enabled": False}

default_pack = "Better Emission"
default_path = os.path.join(resource_packs_directory, default_pack)
resource_packs[default_pack] = {"path": (default_path), "enabled": True}

default_pack = "Embrace Pixels 2.1"
default_path = os.path.join(resource_packs_directory, default_pack)
resource_packs[default_pack] = {"path": (default_path), "enabled": True}

if debug is not None:
print(f"Default Pack: {default_pack} stored in {default_path}")

def find_image(image_name, root_folder):
# Check in the directory
for dirpath, _, filenames in os.walk(root_folder):
if image_name in filenames:
return os.path.join(dirpath, image_name)

# Check in zip files within the directory
for dirpath, _, files in os.walk(root_folder):
for file in files:
if file.endswith('.zip'):
if file.endswith(('.zip', '.jar')):
with zipfile.ZipFile(os.path.join(dirpath, file), 'r') as zip_ref:
for zip_info in zip_ref.infolist():
if os.path.basename(zip_info.filename) == image_name:
extract_path = os.path.join(main_directory, 'Resource Packs', os.path.splitext(file)[0])
extracted_file_path = zip_ref.extract(zip_info, extract_path)
return extracted_file_path

# Check if root folder is a zip file
if root_folder.endswith('.zip'):

if root_folder.endswith(('.zip', '.jar')):
with zipfile.ZipFile(root_folder, 'r') as zip_ref:
for zip_info in zip_ref.infolist():
if os.path.basename(zip_info.filename) == image_name:
Expand Down
Binary file modified Mcblend Source/Materials/Materials.blend
Binary file not shown.
480 changes: 259 additions & 221 deletions Mcblend Source/Materials/Materials.py

Large diffs are not rendered by default.

44 changes: 42 additions & 2 deletions Mcblend Source/Properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class ResourcePackProperties(PropertyGroup):
default=True,
)

textures: BoolProperty(
name="Textures",
textures_settings: BoolProperty(
name="Textures Settings",
default=False,
)

Expand All @@ -60,6 +60,36 @@ class ResourcePackProperties(PropertyGroup):
default=True,
)

s_settings: BoolProperty(
name="Specular Settings",
default=False,
)

roughness: BoolProperty(
name="Use Roughness",
default=True,
)

metallic: BoolProperty(
name="Use Metallic",
default=True,
)

sss: BoolProperty(
name="Use SSS",
default=True,
)

specular: BoolProperty(
name="Use Specular",
default=True,
)

emission: BoolProperty(
name="Use Emssion",
default=True,
)

use_e: BoolProperty(
name="Use Emission Textures",
default=True,
Expand All @@ -70,6 +100,16 @@ class ResourcePackProperties(PropertyGroup):
default=True,
)

animate_textures_settings: BoolProperty(
name="Animate Textures Settings",
default=False,
)

interpolate: BoolProperty(
name="Interpolate",
default=True,
)

only_fix_uv: BoolProperty(
name="Only Fix UV",
default=False,
Expand Down
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=black_terracotta
method=random
tiles=0-1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=blue_terracotta
method=random
tiles=0-1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
matchBlocks=minecraft:bookshelf
faces=sides
method=horizontal
tiles=0-3
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=brown_terracotta
method=random
tiles=0-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=cyan_terracotta
method=random
tiles=0-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=gray_terracotta
method=random
tiles=0-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=green_terracotta
method=random
tiles=0-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
matchTiles=hay_block_top
faces=top,bottom
method=ctm_compact
tiles=0-4
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=light_blue_terracotta
method=random
tiles=0-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=light_gray_terracotta
method=random
tiles=0-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=lime_terracotta
method=random
tiles=0-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=magenta_terracotta
method=random
tiles=0-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=orange_terracotta
method=random
tiles=0-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=pink_terracotta
method=random
tiles=0-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=purple_terracotta
method=random
tiles=0-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
matchTiles=red_sandstone
connect=tile
method=top
tiles=0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=red_terracotta
method=random
tiles=0-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
matchTiles=sandstone
connect=tile
method=top
tiles=0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=terracotta
method=random
tiles=0-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=white_terracotta
method=random
tiles=0-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
matchBlocks=yellow_terracotta
method=random
tiles=0-1
Loading

0 comments on commit 15aa0af

Please sign in to comment.