From 5aeafa9f2364d8fbd73acaf9ffca9e50b5ef3a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A6mer?= <78032176+BigGaemer@users.noreply.github.com> Date: Mon, 17 Mar 2025 13:40:39 +0200 Subject: [PATCH 1/4] added sylt --- .../assets/terraoriginum/lang/en_us.json | 4 ++++ .../data/origins/origin_layers/origin.json | 1 + .../data/terraoriginum/origins/sylt.json | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 src/main/resources/data/terraoriginum/origins/sylt.json diff --git a/src/main/resources/assets/terraoriginum/lang/en_us.json b/src/main/resources/assets/terraoriginum/lang/en_us.json index fc297ea..bb701e0 100644 --- a/src/main/resources/assets/terraoriginum/lang/en_us.json +++ b/src/main/resources/assets/terraoriginum/lang/en_us.json @@ -133,6 +133,10 @@ "power.terraoriginum.lato-powers/tall.name": "Tall", "power.terraoriginum.lato-powers/tall.description": "You are half a block taller.", + //-----Sylt-----// + "origin.terraoriginum.sylt.name": "Sylt", + "origin.terraoriginum.sylt.description": "A Lato, but shorter and without the extended reach.", + //-----Mync-----// "origin.terraoriginum.mync.name": "Mync", "origin.terraoriginum.mync.description": "Myncs are blind Latos. They can't teleport like regular Latos but are stronger than most Latos.", diff --git a/src/main/resources/data/origins/origin_layers/origin.json b/src/main/resources/data/origins/origin_layers/origin.json index e62f9f4..33f0525 100644 --- a/src/main/resources/data/origins/origin_layers/origin.json +++ b/src/main/resources/data/origins/origin_layers/origin.json @@ -17,6 +17,7 @@ "terraoriginum:muckunde", "terraoriginum:blight", "terraoriginum:munch", + "terraoriginum:sylt", { "condition": { "type": "origins:equipped_item", diff --git a/src/main/resources/data/terraoriginum/origins/sylt.json b/src/main/resources/data/terraoriginum/origins/sylt.json new file mode 100644 index 0000000..a66479b --- /dev/null +++ b/src/main/resources/data/terraoriginum/origins/sylt.json @@ -0,0 +1,18 @@ +{ + "powers": [ + "terraoriginum:lato-powers/lato_blooded", + "terraoriginum:lato-powers/twelve_hearts", + "terraoriginum:lato-powers/natural_armor", + "terraoriginum:lato-powers/tailwind", + "terraoriginum:lato-powers/rage", + "terraoriginum:lato-powers/rage_addition", + "terraoriginum:lato-powers/perfect_vision", + "terraoriginum:lato-powers/sun_damage", + "terraoriginum:lato-powers/teleport", + "terraoriginum:lato-powers/strong" + ], + "icon": "netherite_axe", + "order": 1011, + "impact": 3 + } + \ No newline at end of file From ab7831373ef3a20d33d2073d3e90f1ee865e65d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A6mer?= <78032176+BigGaemer@users.noreply.github.com> Date: Mon, 17 Mar 2025 13:47:41 +0200 Subject: [PATCH 2/4] bumped version and added changelog --- CHANGELOG | 6 +++++- gradle.properties | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index fd7fff2..9420299 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,4 +15,8 @@ - fixes to wraith hidden powers and grammar - fixed missing names and descriptions for some powers - fixed keybinds for some powers -- fixed a problem where the monarch would die on spawning \ No newline at end of file +- fixed a problem where the monarch would die on spawning + +## 1.20.1-1.0.8 +- shade invisibility no longer makes armour invisible +- added sylt \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index fc31b23..649b1cc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ yarn_mappings=1.20.1+build.10 loader_version=0.16.10 # Mod Properties -mod_version=1.20.1-1.0.7 +mod_version=1.20.1-1.0.8 maven_group=com.smithy archives_base_name=TerraOriginum From 6e2fcdce1fa3bf594d559dcef37f316de416212e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A6mer?= <78032176+BigGaemer@users.noreply.github.com> Date: Mon, 17 Mar 2025 14:05:45 +0200 Subject: [PATCH 3/4] oops'd --- src/main/resources/data/terraoriginum/origins/sylt.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/data/terraoriginum/origins/sylt.json b/src/main/resources/data/terraoriginum/origins/sylt.json index a66479b..c68e3a9 100644 --- a/src/main/resources/data/terraoriginum/origins/sylt.json +++ b/src/main/resources/data/terraoriginum/origins/sylt.json @@ -11,7 +11,7 @@ "terraoriginum:lato-powers/teleport", "terraoriginum:lato-powers/strong" ], - "icon": "netherite_axe", + "icon": "diamond_axe", "order": 1011, "impact": 3 } From 2fc20ae6d0a155fbef05a3636bd8be123dd86590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A6mer?= <78032176+BigGaemer@users.noreply.github.com> Date: Sat, 29 Mar 2025 14:49:38 +0200 Subject: [PATCH 4/4] finally --- CHANGELOG | 6 +++- gradle.properties | 2 +- .../smithy/terraoriginum/TerraOriginum.java | 3 ++ .../terraoriginum/items/ghostlyItems.java | 4 +++ .../util/LootTableModifiers.java | 30 +++++++++++++++++++ .../terraoriginum/recipes/ghostly_boots.json | 20 +++++++++++++ .../recipes/ghostly_chestplate.json | 20 +++++++++++++ .../terraoriginum/recipes/ghostly_helmet.json | 20 +++++++++++++ .../recipes/ghostly_leggings.json | 20 +++++++++++++ 9 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/smithy/terraoriginum/util/LootTableModifiers.java create mode 100644 src/main/resources/data/terraoriginum/recipes/ghostly_boots.json create mode 100644 src/main/resources/data/terraoriginum/recipes/ghostly_chestplate.json create mode 100644 src/main/resources/data/terraoriginum/recipes/ghostly_helmet.json create mode 100644 src/main/resources/data/terraoriginum/recipes/ghostly_leggings.json diff --git a/CHANGELOG b/CHANGELOG index 9420299..30956fc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,4 +19,8 @@ ## 1.20.1-1.0.8 - shade invisibility no longer makes armour invisible -- added sylt \ No newline at end of file +- added sylt + +## 1.20.1-1.0.9 +- cotton and cotton armour are now obtainable +- cotton seeds can be obtained from breaking grass \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 649b1cc..865aaab 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ yarn_mappings=1.20.1+build.10 loader_version=0.16.10 # Mod Properties -mod_version=1.20.1-1.0.8 +mod_version=1.20.1-1.0.9 maven_group=com.smithy archives_base_name=TerraOriginum diff --git a/src/main/java/com/smithy/terraoriginum/TerraOriginum.java b/src/main/java/com/smithy/terraoriginum/TerraOriginum.java index 359a6e1..902ce74 100644 --- a/src/main/java/com/smithy/terraoriginum/TerraOriginum.java +++ b/src/main/java/com/smithy/terraoriginum/TerraOriginum.java @@ -5,6 +5,7 @@ import com.smithy.terraoriginum.blocks.crucifix; import com.smithy.terraoriginum.items.*; import com.smithy.terraoriginum.registry.modEnchantments; import com.smithy.terraoriginum.registry.modPowers; +import com.smithy.terraoriginum.util.LootTableModifiers; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; @@ -30,6 +31,8 @@ public class TerraOriginum implements ModInitializer { ghostlyItems.register(); ghostlyArmourItems.register(); modPowers.register(); + + LootTableModifiers.modifyLootTables(); ItemGroupEvents.modifyEntriesEvent(ItemGroups.TOOLS).register((content) -> content.add(umbrella.UMBRELLA)); ItemGroupEvents.modifyEntriesEvent(ItemGroups.TOOLS).register((content) -> content.add(sunTotem.SUN_TOTEM)); diff --git a/src/main/java/com/smithy/terraoriginum/items/ghostlyItems.java b/src/main/java/com/smithy/terraoriginum/items/ghostlyItems.java index 378b4e6..9b2d823 100644 --- a/src/main/java/com/smithy/terraoriginum/items/ghostlyItems.java +++ b/src/main/java/com/smithy/terraoriginum/items/ghostlyItems.java @@ -1,7 +1,9 @@ package com.smithy.terraoriginum.items; import net.fabricmc.fabric.api.item.v1.FabricItemSettings; +import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; import net.minecraft.item.Item; +import net.minecraft.item.ItemGroups; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; import net.minecraft.util.Identifier; @@ -14,6 +16,8 @@ public class ghostlyItems { Registry.register(Registries.ITEM, new Identifier("terraoriginum", "ghostly_cloth"), GHOSTLY_CLOTH); + ItemGroupEvents.modifyEntriesEvent(ItemGroups.INGREDIENTS).register((content) -> content.add(GHOSTLY_CLOTH)); + } diff --git a/src/main/java/com/smithy/terraoriginum/util/LootTableModifiers.java b/src/main/java/com/smithy/terraoriginum/util/LootTableModifiers.java new file mode 100644 index 0000000..a84c3dd --- /dev/null +++ b/src/main/java/com/smithy/terraoriginum/util/LootTableModifiers.java @@ -0,0 +1,30 @@ +package com.smithy.terraoriginum.util; + +import com.smithy.terraoriginum.items.cottonItems; +import net.fabricmc.fabric.api.loot.v2.LootTableEvents; +import net.minecraft.loot.LootPool; +import net.minecraft.loot.condition.RandomChanceLootCondition; +import net.minecraft.loot.entry.ItemEntry; +import net.minecraft.loot.function.SetCountLootFunction; +import net.minecraft.loot.provider.number.ConstantLootNumberProvider; +import net.minecraft.loot.provider.number.UniformLootNumberProvider; +import net.minecraft.util.Identifier; + +public class LootTableModifiers { + private static final Identifier GRASS_ID = + new Identifier("minecraft", "blocks/grass"); + + public static void modifyLootTables() { + LootTableEvents.MODIFY.register((resourceManager, lootManager, id, tableBuilder, source) -> { + if(GRASS_ID.equals(id)) { + LootPool.Builder poolBuilder = LootPool.builder() + .rolls(ConstantLootNumberProvider.create(1)) + .conditionally(RandomChanceLootCondition.builder(0.08f)) + .with(ItemEntry.builder(cottonItems.COTTON_SEEDS)) + .apply(SetCountLootFunction.builder(UniformLootNumberProvider.create(1.0f, 1.0f)).build()); + + tableBuilder.pool(poolBuilder.build()); + } + }); + } +} diff --git a/src/main/resources/data/terraoriginum/recipes/ghostly_boots.json b/src/main/resources/data/terraoriginum/recipes/ghostly_boots.json new file mode 100644 index 0000000..d094863 --- /dev/null +++ b/src/main/resources/data/terraoriginum/recipes/ghostly_boots.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " # ", + "#E#", + " # " + ], + "key": { + "#": { + "item": "terraoriginum:ghostly_cloth" + }, + "E": { + "item": "minecraft:netherite_boots" + } + }, + "result": { + "item": "terraoriginum:ghostly_boots", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/terraoriginum/recipes/ghostly_chestplate.json b/src/main/resources/data/terraoriginum/recipes/ghostly_chestplate.json new file mode 100644 index 0000000..ad08bdd --- /dev/null +++ b/src/main/resources/data/terraoriginum/recipes/ghostly_chestplate.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " # ", + "#E#", + " # " + ], + "key": { + "#": { + "item": "terraoriginum:ghostly_cloth" + }, + "E": { + "item": "minecraft:netherite_chestplate" + } + }, + "result": { + "item": "terraoriginum:ghostly_chestplate", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/terraoriginum/recipes/ghostly_helmet.json b/src/main/resources/data/terraoriginum/recipes/ghostly_helmet.json new file mode 100644 index 0000000..fbd246d --- /dev/null +++ b/src/main/resources/data/terraoriginum/recipes/ghostly_helmet.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " # ", + "#E#", + " # " + ], + "key": { + "#": { + "item": "terraoriginum:ghostly_cloth" + }, + "E": { + "item": "minecraft:netherite_helmet" + } + }, + "result": { + "item": "terraoriginum:ghostly_helmet", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/terraoriginum/recipes/ghostly_leggings.json b/src/main/resources/data/terraoriginum/recipes/ghostly_leggings.json new file mode 100644 index 0000000..c5a4d96 --- /dev/null +++ b/src/main/resources/data/terraoriginum/recipes/ghostly_leggings.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " # ", + "#E#", + " # " + ], + "key": { + "#": { + "item": "terraoriginum:ghostly_cloth" + }, + "E": { + "item": "minecraft:netherite_leggings" + } + }, + "result": { + "item": "terraoriginum:ghostly_leggings", + "count": 1 + } +} \ No newline at end of file