diff --git a/common/src/main/java/github/killarexe/copper_extension/item/RustableItem.java b/common/src/main/java/github/killarexe/copper_extension/item/RustableItem.java index 5075026..6651758 100644 --- a/common/src/main/java/github/killarexe/copper_extension/item/RustableItem.java +++ b/common/src/main/java/github/killarexe/copper_extension/item/RustableItem.java @@ -34,11 +34,12 @@ public static void rustEntityStack( ItemEntity entity, GameRules.Key oxidationGameRule, RandomSource random) { int count = stack.getCount(); - if(level.random.nextFloat() < level.getGameRules().getInt(oxidationGameRule) * BASE_CHANCE / count) { + if(random.nextFloat() < level.getGameRules().getInt(oxidationGameRule) * BASE_CHANCE / count) { Vec3 pos = entity.position(); ItemEntity newItemEntity = new ItemEntity(level, pos.x, pos.y, pos.z, new ItemStack(nextItem, count)); newItemEntity.copyPosition(entity); level.addFreshEntity(newItemEntity); + entity.kill(); } } diff --git a/common/src/main/resources/data/copper_extension/recipes/exposed_copper.json b/common/src/main/resources/data/copper_extension/recipes/exposed_copper.json index 4ea94a3..083deda 100644 --- a/common/src/main/resources/data/copper_extension/recipes/exposed_copper.json +++ b/common/src/main/resources/data/copper_extension/recipes/exposed_copper.json @@ -12,7 +12,6 @@ "###" ], "result": { - "item": "minecraft:exposed_copper" - }, - "show_notification": true + "id": "minecraft:exposed_copper" + } } \ No newline at end of file diff --git a/common/src/main/resources/data/copper_extension/recipes/oxidized_copper.json b/common/src/main/resources/data/copper_extension/recipes/oxidized_copper.json index 3039a67..a54beae 100644 --- a/common/src/main/resources/data/copper_extension/recipes/oxidized_copper.json +++ b/common/src/main/resources/data/copper_extension/recipes/oxidized_copper.json @@ -12,7 +12,6 @@ "###" ], "result": { - "item": "minecraft:oxidized_copper" - }, - "show_notification": true + "id": "minecraft:oxidized_copper" + } } \ No newline at end of file diff --git a/common/src/main/resources/data/copper_extension/recipes/waxed_copper_block.json b/common/src/main/resources/data/copper_extension/recipes/waxed_copper_block.json index 8f582ec..5a52357 100644 --- a/common/src/main/resources/data/copper_extension/recipes/waxed_copper_block.json +++ b/common/src/main/resources/data/copper_extension/recipes/waxed_copper_block.json @@ -12,7 +12,6 @@ "###" ], "result": { - "item": "minecraft:waxed_copper_block" - }, - "show_notification": true + "id": "minecraft:waxed_copper_block" + } } \ No newline at end of file diff --git a/common/src/main/resources/data/copper_extension/recipes/waxed_copper_ingot.json b/common/src/main/resources/data/copper_extension/recipes/waxed_copper_ingot.json index 82f1246..2b5154c 100644 --- a/common/src/main/resources/data/copper_extension/recipes/waxed_copper_ingot.json +++ b/common/src/main/resources/data/copper_extension/recipes/waxed_copper_ingot.json @@ -10,6 +10,6 @@ } ], "result": { - "item": "copper_extension:waxed_copper_ingot" + "id": "copper_extension:waxed_copper_ingot" } } \ No newline at end of file diff --git a/common/src/main/resources/data/copper_extension/recipes/waxed_exposed_copper.json b/common/src/main/resources/data/copper_extension/recipes/waxed_exposed_copper.json index 57d4ae0..6d6ff1f 100644 --- a/common/src/main/resources/data/copper_extension/recipes/waxed_exposed_copper.json +++ b/common/src/main/resources/data/copper_extension/recipes/waxed_exposed_copper.json @@ -12,7 +12,6 @@ "###" ], "result": { - "item": "minecraft:waxed_exposed_copper" - }, - "show_notification": true + "id": "minecraft:waxed_exposed_copper" + } } \ No newline at end of file diff --git a/common/src/main/resources/data/copper_extension/recipes/waxed_exposed_copper_ingot.json b/common/src/main/resources/data/copper_extension/recipes/waxed_exposed_copper_ingot.json index be94423..8d77994 100644 --- a/common/src/main/resources/data/copper_extension/recipes/waxed_exposed_copper_ingot.json +++ b/common/src/main/resources/data/copper_extension/recipes/waxed_exposed_copper_ingot.json @@ -10,6 +10,6 @@ } ], "result": { - "item": "copper_extension:waxed_exposed_copper_ingot" + "id": "copper_extension:waxed_exposed_copper_ingot" } } \ No newline at end of file diff --git a/common/src/main/resources/data/copper_extension/recipes/waxed_oxidized_copper.json b/common/src/main/resources/data/copper_extension/recipes/waxed_oxidized_copper.json index 29e6c69..9761bd9 100644 --- a/common/src/main/resources/data/copper_extension/recipes/waxed_oxidized_copper.json +++ b/common/src/main/resources/data/copper_extension/recipes/waxed_oxidized_copper.json @@ -12,7 +12,6 @@ "###" ], "result": { - "item": "minecraft:waxed_oxidized_copper" - }, - "show_notification": true + "id": "minecraft:waxed_oxidized_copper" + } } diff --git a/common/src/main/resources/data/copper_extension/recipes/waxed_oxidized_copper_ingot.json b/common/src/main/resources/data/copper_extension/recipes/waxed_oxidized_copper_ingot.json index 8c82b0b..589a5b7 100644 --- a/common/src/main/resources/data/copper_extension/recipes/waxed_oxidized_copper_ingot.json +++ b/common/src/main/resources/data/copper_extension/recipes/waxed_oxidized_copper_ingot.json @@ -10,6 +10,6 @@ } ], "result": { - "item": "copper_extension:waxed_oxidized_copper_ingot" + "id": "copper_extension:waxed_oxidized_copper_ingot" } } diff --git a/common/src/main/resources/data/copper_extension/recipes/waxed_weathered_copper.json b/common/src/main/resources/data/copper_extension/recipes/waxed_weathered_copper.json index b50f037..a9cef3d 100644 --- a/common/src/main/resources/data/copper_extension/recipes/waxed_weathered_copper.json +++ b/common/src/main/resources/data/copper_extension/recipes/waxed_weathered_copper.json @@ -12,7 +12,6 @@ "###" ], "result": { - "item": "minecraft:waxed_weathered_copper" - }, - "show_notification": true + "id": "minecraft:waxed_weathered_copper" + } } \ No newline at end of file diff --git a/common/src/main/resources/data/copper_extension/recipes/waxed_weathered_copper_ingot.json b/common/src/main/resources/data/copper_extension/recipes/waxed_weathered_copper_ingot.json index 9981795..fa2a50d 100644 --- a/common/src/main/resources/data/copper_extension/recipes/waxed_weathered_copper_ingot.json +++ b/common/src/main/resources/data/copper_extension/recipes/waxed_weathered_copper_ingot.json @@ -10,6 +10,6 @@ } ], "result": { - "item": "copper_extension:waxed_weathered_copper_ingot" + "id": "copper_extension:waxed_weathered_copper_ingot" } } diff --git a/common/src/main/resources/data/copper_extension/recipes/weathered_copper.json b/common/src/main/resources/data/copper_extension/recipes/weathered_copper.json index 9cddd5a..6c4fac0 100644 --- a/common/src/main/resources/data/copper_extension/recipes/weathered_copper.json +++ b/common/src/main/resources/data/copper_extension/recipes/weathered_copper.json @@ -12,7 +12,6 @@ "###" ], "result": { - "item": "minecraft:weathered_copper" - }, - "show_notification": true + "id": "minecraft:weathered_copper" + } } \ No newline at end of file diff --git a/fabric/src/main/resources/copper_extension.mixins.json b/fabric/src/main/resources/copper_extension.mixins.json new file mode 100644 index 0000000..6a30edf --- /dev/null +++ b/fabric/src/main/resources/copper_extension.mixins.json @@ -0,0 +1,15 @@ +{ + "required": true, + "minVersion": "0.8", + "package": "github.killarexe.copper_extension.fabric.mixin", + "compatibilityLevel": "JAVA_17", + "mixins": [], + "client": [ + "ItemEntityMixin", + "ItemMixin" + ], + "server": [], + "injectors": { + "defaultRequire": 1 + } +} \ No newline at end of file diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index e291978..9f96e6f 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -22,5 +22,8 @@ "depends": { "fabric": "*", "minecraft": ">=${minecraft_version}" - } + }, + "mixins": [ + "copper_extension.mixins.json" + ] } \ No newline at end of file diff --git a/neoforge/update.json b/neoforge/update.json index d1a957b..60f35c7 100644 --- a/neoforge/update.json +++ b/neoforge/update.json @@ -1,22 +1,10 @@ { "homepage": "https://github.com/Killarexe/Copper-Extension", - "1.20.1": { - "1.0.0": "Added rusted coppers, crafts and beehive feature..." - }, - "1.20.2": { - "1.1.0": "Add scrapping for copper ingots, Patch bugs.", - "1.2.0": "The Axe can now break from scrapping action" - }, - "1.20.4": { - "1.2.1": "Update to 1.20.4, Patch oxidation in inventory, Add copperOxidationChance GameRule", - "1.3.0": "Switched the project to architectury and added a new item" + "1.20.6": { + "1.3.0": "Added rusted coppers, crafts and beehive feature..." }, "promos": { - "1.20.1-lastest": "1.0.0", - "1.20.1-recommended": "1.0.0", - "1.20.2-lastest": "1.2.0", - "1.20.2-recommended": "1.2.0", - "1.20.4-lastest": "1.3.0", - "1.20.4-recommended": "1.3.0" + "1.20.6-lastest": "1.3.0", + "1.20.6-recommended": "1.3.0" } }