Skip to content

Commit

Permalink
Fix data
Browse files Browse the repository at this point in the history
Outdated Polymer broke one of my recipes accidentally :P
  • Loading branch information
QPCrummer committed Jun 23, 2024
1 parent 84901c5 commit f1cbf79
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 78 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.6
yarn_mappings=1.20.6+build.1
yarn_mappings=1.20.6+build.3
loader_version=0.15.11
# Mod Properties
mod_version=1.4.1
mod_version=1.4.1-hotfix.1
maven_group=com.github.tatercertified
archives_base_name=lifesteal
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.98.0+1.20.6
polymer_version=0.8.0-pre.1+1.20.6
fabric_version=0.100.2+1.20.6
polymer_version=0.8.5+1.20.6
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static <T extends Item> T ofModelled(@NotNull String path, @NotNull Item
* @return The PolymerModelData referencing the item and model.
*/
public static PolymerModelData getModelData(String path, Item mask) {
return PolymerResourcePackUtils.requestModel(mask, new Identifier(MOD_ID, "item/" + path));
return PolymerResourcePackUtils.requestModel(mask, Identifier.of(MOD_ID, "item/" + path));
}

/**
Expand All @@ -71,16 +71,7 @@ public static PolymerModelData getModelData(String path, Item mask) {
* @param item The item to register.
*/
public static void registerItem(String path, Item item) {
Registry.register(Registries.ITEM, new Identifier(MOD_ID, path), item);
}

/**
* Checks item to ensure not-null, vanilla and is {@link ArmorItem}.
*/
private static ArmorItem checkArmor(Item item) {
check(item);
if (!(item instanceof ArmorItem armorItem)) throw new IllegalArgumentException("Invalid item for armour.");
return armorItem;
Registry.register(Registries.ITEM, Identifier.of(MOD_ID, path), item);
}

/**
Expand All @@ -93,9 +84,4 @@ private static void check(Item item) {
throw new IllegalArgumentException("Non-vanilla item " + item + " (" + identifier + ")");
}
}

@FunctionalInterface
public interface QuadFunction<I1, I2, I3, I4, O> {
O invoke(I1 i1, I2 i2, I3 i3, I4 i4);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,51 @@
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"name": "lifesteal:deepslate_heart_ore",
"functions": [
{
"function": "minecraft:set_count",
"count": 1
}
],
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": 1
}
]
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
]
],
"name": "lifesteal:deepslate_heart_ore"
},
{
"type": "minecraft:item",
"name": "lifesteal:heart_dust",
"functions": [
{
"function": "minecraft:explosion_decay"
"add": false,
"count": 1.0,
"function": "minecraft:set_count"
},
{
"function": "minecraft:set_count",
"count": 1
"function": "minecraft:explosion_decay"
}
]
],
"name": "lifesteal:heart_dust"
}
]
}
]
],
"rolls": 1.0
}
]
}
],
"random_sequence": "lifesteal:blocks/deepslate_heart_ore"
}
47 changes: 24 additions & 23 deletions src/main/resources/data/lifesteal/loot_tables/blocks/heart_ore.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,51 @@
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"name": "lifesteal:heart_ore",
"functions": [
{
"function": "minecraft:set_count",
"count": 1
}
],
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": 1
}
]
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
]
],
"name": "lifesteal:heart_ore"
},
{
"type": "minecraft:item",
"name": "lifesteal:heart_dust",
"functions": [
{
"function": "minecraft:explosion_decay"
"add": false,
"count": 1.0,
"function": "minecraft:set_count"
},
{
"function": "minecraft:set_count",
"count": 1
"function": "minecraft:explosion_decay"
}
]
],
"name": "lifesteal:heart_dust"
}
]
}
]
],
"rolls": 1.0
}
]
}
],
"random_sequence": "lifesteal:blocks/heart_ore"
}
15 changes: 8 additions & 7 deletions src/main/resources/data/lifesteal/recipes/heart.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" # ",
"#%#",
" # "
],
"key": {
"#": {
"item": "lifesteal:heart_crystal"
},
"%": {
"X": {
"item": "minecraft:totem_of_undying"
}
},
"pattern": [
" # ",
"#X#",
" # "
],
"result": {
"item": "lifesteal:heart"
"count": 1,
"id": "lifesteal:heart"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
}
},
"result": {
"item": "lifesteal:heart_crystal"
"id": "lifesteal:heart_crystal"
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"ingredients": [
{
"item": "lifesteal:heart_crystal",
"count": 1
"item": "lifesteal:heart_crystal"
}
],
"result": {
"item": "lifesteal:heart_dust",
"count": 9
"count": 9,
"id": "lifesteal:heart_dust"
}
}

0 comments on commit f1cbf79

Please sign in to comment.