Skip to content

Commit e8ca9c7

Browse files
committed
1.0.4 for 1.21
1 parent fcafbb9 commit e8ca9c7

File tree

73 files changed

+2175
-299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2175
-299
lines changed

generator.py

Lines changed: 64 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"nether_sakura",
2727
"rubeus",
2828
"stalagnate",
29-
"wart_planks",
30-
"willow_planks"
29+
"wart",
30+
"willow"
3131
],
3232
"biomesoplenty": [
3333
"dead",
@@ -57,7 +57,7 @@
5757
"rubber",
5858
"sakura",
5959
"willow",
60-
"yucca"
60+
"yucca_palm"
6161
],
6262
"traverse": [
6363
"fir"
@@ -69,6 +69,12 @@
6969
],
7070
}
7171

72+
# some mods return empty block settings, so we force them to use oak plank data instead:
73+
naughty_mod_corner = [
74+
"terrestria",
75+
"traverse",
76+
"wilderwild"
77+
]
7278

7379
def save(file: JsonFile, path):
7480
if not os.path.exists(os.path.dirname(path)):
@@ -156,17 +162,54 @@ def add_treated_plank(m, n):
156162
}
157163
save(JsonFile(file), f"src/main/resources/data/rounded/advancement/recipes/building_blocks/compat/{m}/{t}")
158164

159-
# item tag
160-
file = JsonFile(source_path="src/main/resources/data/rounded/tags/item/treated_planks.json").data
165+
# loot table
166+
file = {
167+
"type": "minecraft:block",
168+
"pools": [
169+
{
170+
"bonus_rolls": 0.0,
171+
"conditions": [
172+
{
173+
"condition": "minecraft:survives_explosion"
174+
}
175+
],
176+
"entries": [
177+
{
178+
"type": "minecraft:item",
179+
"name": f"rounded:compat/{m}/{t}"
180+
}
181+
],
182+
"rolls": 1.0
183+
}
184+
],
185+
"random_sequence": f"rounded:blocks/compat/{m}/{t}",
186+
"fabric:load_conditions": [
187+
{
188+
"condition": "fabric:all_mods_loaded",
189+
"values": [
190+
f"{m}"
191+
]
192+
}
193+
]
194+
}
195+
save(JsonFile(file), f"src/main/resources/data/rounded/loot_table/blocks/compat/{m}/{t}.json")
196+
197+
# tags
161198
tag = {
162199
"required": False,
163200
"id": f"rounded:compat/{m}/{t}"
164201
}
165202

203+
file = JsonFile(source_path="src/main/resources/data/rounded/tags/item/treated_planks.json").data
166204
if tag not in file["values"]:
167205
file["values"].append(tag)
168206
JsonFile(file).dump(origin="./", path="src/main/resources/data/rounded/tags/item/treated_planks.json")
169207

208+
file = JsonFile(source_path="src/main/resources/data/minecraft/tags/block/mineable/axe.json").data
209+
if tag not in file["values"]:
210+
file["values"].append(tag)
211+
JsonFile(file).dump(origin="./", path="src/main/resources/data/minecraft/tags/block/mineable/axe.json")
212+
170213
# blockstate
171214
file = {
172215
"variants": {
@@ -219,13 +262,22 @@ def add_treated_plank_code(m, l):
219262
p = f"{i}_planks"
220263
t = f"treated_{p}"
221264

222-
file += f"""
223-
public static final Block {t.upper()} = new Block(
224-
AbstractBlock.Settings.copy(Registries.BLOCK.get(Identifier.of("{m}", "{p}")))
225-
);
226-
public static final Item {t.upper()}_ITEM = new BlockItem({t.upper()}, new Item.Settings());
227-
228-
"""
265+
if m in naughty_mod_corner:
266+
file += f"""
267+
public static final Block {t.upper()} = new Block(
268+
Block.Settings.copy(Registries.BLOCK.get(Identifier.of("minecraft", "oak_planks")))
269+
);
270+
public static final Item {t.upper()}_ITEM = new BlockItem({t.upper()}, new Item.Settings());
271+
272+
"""
273+
else:
274+
file += f"""
275+
public static final Block {t.upper()} = new Block(
276+
Block.Settings.copy(Registries.BLOCK.get(Identifier.of("{m}", "{p}")))
277+
);
278+
public static final Item {t.upper()}_ITEM = new BlockItem({t.upper()}, new Item.Settings());
279+
280+
"""
229281

230282
file += " public static void register() {"
231283

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"variants": {
3+
"": {
4+
"model": "rounded:block/compat/betternether/treated_wart_planks"
5+
}
6+
}
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"variants": {
3+
"": {
4+
"model": "rounded:block/compat/betternether/treated_willow_planks"
5+
}
6+
}
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"variants": {
3+
"": {
4+
"model": "rounded:block/compat/terrestria/treated_yucca_palm_planks"
5+
}
6+
}
7+
}

src/client/resources/assets/rounded/lang/en_us.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,8 @@
7171
"block.rounded.compat.traverse.treated_fir_planks": "Treated Fir Planks",
7272
"block.rounded.compat.wilderwild.treated_baobab_planks": "Treated Baobab Planks",
7373
"block.rounded.compat.wilderwild.treated_cypress_planks": "Treated Cypress Planks",
74-
"block.rounded.compat.wilderwild.treated_palm_planks": "Treated Palm Planks"
74+
"block.rounded.compat.wilderwild.treated_palm_planks": "Treated Palm Planks",
75+
"block.rounded.compat.betternether.treated_wart_planks": "Treated Wart Planks",
76+
"block.rounded.compat.betternether.treated_willow_planks": "Treated Willow Planks",
77+
"block.rounded.compat.terrestria.treated_yucca_palm_planks": "Treated Yucca Palm Planks"
7578
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:block/cube_all",
3+
"textures": {
4+
"all": "rounded:block/compat/betternether/treated_wart_planks"
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:block/cube_all",
3+
"textures": {
4+
"all": "rounded:block/compat/betternether/treated_willow_planks"
5+
}
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:block/cube_all",
3+
"textures": {
4+
"all": "rounded:block/compat/terrestria/treated_yucca_palm_planks"
5+
}
6+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"parent": "rounded:block/compat/betternether/treated_wart_planks"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"parent": "rounded:block/compat/betternether/treated_willow_planks"
3+
}

0 commit comments

Comments
 (0)