Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Merge tag 'v1.8.1' into 1.20.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed May 1, 2024
2 parents 46adc53 + bbd2aab commit a7f0f88
Show file tree
Hide file tree
Showing 75 changed files with 537 additions and 290 deletions.
2 changes: 1 addition & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<p>A changelog can be found at:&nbsp;<a href="https://www.wimods.net/mo-glass/mo-glass-1-8/?mc=1.20.5&utm_source=CurseForge&utm_medium=Mo+Glass&utm_campaign=Changelog&utm_content=Mo+Glass+MC1.20.5">https://www.wimods.net/mo-glass/mo-glass-1-8/</a></p>
<p>A changelog can be found at:&nbsp;<a href="https://www.wimods.net/mo-glass/mo-glass-1-8-1/?mc=1.20.5&utm_source=CurseForge&utm_medium=Mo+Glass&utm_campaign=Changelog&utm_content=Mo+Glass+MC1.20.5">https://www.wimods.net/mo-glass/mo-glass-1-8-1/</a></p>
<p><strong>Note:</strong> This mod requires <a href="https://www.curseforge.com/minecraft/mc-mods/fabric-api/files/5280139" target="_blank" rel="noopener noreferrer">Fabric API for Minecraft 1.20.5</a>.</p>
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ loader_version=0.15.10
fabric_version=0.97.5+1.20.5

# Mod Properties
mod_version = 1.8-MC1.20.5
mod_version = 1.8.1-MC1.20.5
maven_group = net.wurstclient.glass
archives_base_name = Mo-Glass

Expand Down
107 changes: 107 additions & 0 deletions scripts/generate_recipes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# To generate recipes, place this script in the data/mo_glass/recipes folder and run it.

import os
import json

cwd = os.path.dirname(os.path.realpath(__file__))
minecraft_colors = ["white", "orange", "magenta", "light_blue", "yellow", "lime", "pink", "gray", "light_gray", "cyan", "purple", "blue", "brown", "green", "red", "black"]

slab_crafting_template = {
"type": "minecraft:crafting_shaped",
"category": "building",
"group": "stained_glass_slab",
"key": {
"#": {
"item": "minecraft:glass"
}
},
"pattern": [
"###"
],
"result": {
"count": 6,
"id": "mo_glass:glass_slab"
}
}

slab_from_glass_stonecutting_template = {
"type": "minecraft:stonecutting",
"ingredient": {
"item": "minecraft:glass"
},
"result": {
"count": 2,
"id": "mo_glass:glass_slab"
}
}

stairs_crafting_template = {
"type": "minecraft:crafting_shaped",
"category": "building",
"group": "stained_glass_stairs",
"key": {
"#": {
"item": "minecraft:glass"
}
},
"pattern": [
"# ",
"## ",
"###"
],
"result": {
"count": 4,
"id": "mo_glass:glass_stairs"
}
}

stairs_from_glass_stonecutting_template = {
"type": "minecraft:stonecutting",
"ingredient": {
"item": "minecraft:glass"
},
"result": {
"count": 1,
"id": "mo_glass:glass_stairs"
}
}

def create_recipes(block, stairs, slab):
slab_file = f"{cwd}/{slab}.json"
with open(slab_file, "w") as f:
recipe = dict(slab_crafting_template)
recipe["key"]["#"]["item"] = f"minecraft:{block}"
recipe["result"]["id"] = f"mo_glass:{slab}"
if not "stained" in block:
del recipe["group"]
json.dump(recipe, f, indent=2)
print(f"Created {slab_file}")
slab_from_glass_stonecutting_file = f"{cwd}/{slab}_from_glass_stonecutting.json"
with open(slab_from_glass_stonecutting_file, "w") as f:
recipe = dict(slab_from_glass_stonecutting_template)
recipe["ingredient"]["item"] = f"minecraft:{block}"
recipe["result"]["id"] = f"mo_glass:{slab}"
json.dump(recipe, f, indent=2)
print(f"Created {slab_from_glass_stonecutting_file}")
stairs_file = f"{cwd}/{stairs}.json"
with open(stairs_file, "w") as f:
recipe = dict(stairs_crafting_template)
recipe["key"]["#"]["item"] = f"minecraft:{block}"
recipe["result"]["id"] = f"mo_glass:{stairs}"
if not "stained" in block:
del recipe["group"]
json.dump(recipe, f, indent=2)
print(f"Created {stairs_file}")
stairs_from_glass_stonecutting_file = f"{cwd}/{stairs}_from_glass_stonecutting.json"
with open(stairs_from_glass_stonecutting_file, "w") as f:
recipe = dict(stairs_from_glass_stonecutting_template)
recipe["ingredient"]["item"] = f"minecraft:{block}"
recipe["result"]["id"] = f"mo_glass:{stairs}"
json.dump(recipe, f, indent=2)
print(f"Created {stairs_from_glass_stonecutting_file}")

create_recipes("glass", "glass_stairs", "glass_slab")
create_recipes("tinted_glass", "tinted_glass_stairs", "tinted_glass_slab")
for color in minecraft_colors:
create_recipes(f"{color}_stained_glass", f"{color}_stained_glass_stairs", f"{color}_stained_glass_slab")
input("Done! Press enter to exit.")
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"###"
],
"category": "building",
"group": "stained_glass_slab",
"key": {
"#": {
"item": "minecraft:black_stained_glass"
}
},
"pattern": [
"###"
],
"result": {
"item": "mo_glass:black_stained_glass_slab",
"count": 6
"count": 6,
"id": "mo_glass:black_stained_glass_slab"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"ingredient": {
"item": "minecraft:black_stained_glass"
},
"result": "mo_glass:black_stained_glass_slab",
"count": 2
"result": {
"count": 2,
"id": "mo_glass:black_stained_glass_slab"
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"# ",
"## ",
"###"
],
"category": "building",
"group": "stained_glass_stairs",
"key": {
"#": {
"item": "minecraft:black_stained_glass"
}
},
"pattern": [
"# ",
"## ",
"###"
],
"result": {
"item": "mo_glass:black_stained_glass_stairs",
"count": 4
"count": 4,
"id": "mo_glass:black_stained_glass_stairs"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"ingredient": {
"item": "minecraft:black_stained_glass"
},
"result": "mo_glass:black_stained_glass_stairs",
"count": 1
"result": {
"count": 1,
"id": "mo_glass:black_stained_glass_stairs"
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"###"
],
"category": "building",
"group": "stained_glass_slab",
"key": {
"#": {
"item": "minecraft:blue_stained_glass"
}
},
"pattern": [
"###"
],
"result": {
"item": "mo_glass:blue_stained_glass_slab",
"count": 6
"count": 6,
"id": "mo_glass:blue_stained_glass_slab"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"ingredient": {
"item": "minecraft:blue_stained_glass"
},
"result": "mo_glass:blue_stained_glass_slab",
"count": 2
"result": {
"count": 2,
"id": "mo_glass:blue_stained_glass_slab"
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"# ",
"## ",
"###"
],
"category": "building",
"group": "stained_glass_stairs",
"key": {
"#": {
"item": "minecraft:blue_stained_glass"
}
},
"pattern": [
"# ",
"## ",
"###"
],
"result": {
"item": "mo_glass:blue_stained_glass_stairs",
"count": 4
"count": 4,
"id": "mo_glass:blue_stained_glass_stairs"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"ingredient": {
"item": "minecraft:blue_stained_glass"
},
"result": "mo_glass:blue_stained_glass_stairs",
"count": 1
"result": {
"count": 1,
"id": "mo_glass:blue_stained_glass_stairs"
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"###"
],
"category": "building",
"group": "stained_glass_slab",
"key": {
"#": {
"item": "minecraft:brown_stained_glass"
}
},
"pattern": [
"###"
],
"result": {
"item": "mo_glass:brown_stained_glass_slab",
"count": 6
"count": 6,
"id": "mo_glass:brown_stained_glass_slab"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"ingredient": {
"item": "minecraft:brown_stained_glass"
},
"result": "mo_glass:brown_stained_glass_slab",
"count": 2
"result": {
"count": 2,
"id": "mo_glass:brown_stained_glass_slab"
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"# ",
"## ",
"###"
],
"category": "building",
"group": "stained_glass_stairs",
"key": {
"#": {
"item": "minecraft:brown_stained_glass"
}
},
"pattern": [
"# ",
"## ",
"###"
],
"result": {
"item": "mo_glass:brown_stained_glass_stairs",
"count": 4
"count": 4,
"id": "mo_glass:brown_stained_glass_stairs"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"ingredient": {
"item": "minecraft:brown_stained_glass"
},
"result": "mo_glass:brown_stained_glass_stairs",
"count": 1
"result": {
"count": 1,
"id": "mo_glass:brown_stained_glass_stairs"
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"###"
],
"category": "building",
"group": "stained_glass_slab",
"key": {
"#": {
"item": "minecraft:cyan_stained_glass"
}
},
"pattern": [
"###"
],
"result": {
"item": "mo_glass:cyan_stained_glass_slab",
"count": 6
"count": 6,
"id": "mo_glass:cyan_stained_glass_slab"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"ingredient": {
"item": "minecraft:cyan_stained_glass"
},
"result": "mo_glass:cyan_stained_glass_slab",
"count": 2
"result": {
"count": 2,
"id": "mo_glass:cyan_stained_glass_slab"
}
}
Loading

0 comments on commit a7f0f88

Please sign in to comment.