From 9a77081f3acf9c26a484b257f74f067fd8d19a4b Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sun, 29 Mar 2020 00:48:18 +0100 Subject: [PATCH] Recipe tweaks - Gunpowder can now be multiplied in the mixer - Metal blocks can now be crushed back into the crushed ores. (Inefficient enough to avoid any loops) - Crushing wool in the millstone is less effective --- .../utility/data/AllItemsTagProvider.java | 22 ++++++++--------- .../foundation/utility/data/ITaggable.java | 7 ++++-- .../create/recipes/crushing/brass_block.json | 15 ++++++++++++ .../create/recipes/crushing/copper_block.json | 15 ++++++++++++ .../data/create/recipes/crushing/wool.json | 20 ++++++++++++++++ .../create/recipes/crushing/zinc_block.json | 15 ++++++++++++ .../data/create/recipes/milling/wool.json | 7 +----- .../data/create/recipes/mixing/gunpowder.json | 24 +++++++++++++++++++ 8 files changed, 105 insertions(+), 20 deletions(-) create mode 100644 src/main/resources/data/create/recipes/crushing/brass_block.json create mode 100644 src/main/resources/data/create/recipes/crushing/copper_block.json create mode 100644 src/main/resources/data/create/recipes/crushing/wool.json create mode 100644 src/main/resources/data/create/recipes/crushing/zinc_block.json create mode 100644 src/main/resources/data/create/recipes/mixing/gunpowder.json diff --git a/src/main/java/com/simibubi/create/foundation/utility/data/AllItemsTagProvider.java b/src/main/java/com/simibubi/create/foundation/utility/data/AllItemsTagProvider.java index 21d2508e2..0e8d74417 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/data/AllItemsTagProvider.java +++ b/src/main/java/com/simibubi/create/foundation/utility/data/AllItemsTagProvider.java @@ -1,21 +1,19 @@ package com.simibubi.create.foundation.utility.data; -import com.simibubi.create.AllBlocks; -import com.simibubi.create.AllItems; -import net.minecraft.block.Block; -import net.minecraft.data.BlockTagsProvider; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.ItemTagsProvider; -import net.minecraft.item.Item; -import net.minecraft.tags.BlockTags; -import net.minecraft.tags.ItemTags; -import net.minecraft.tags.Tag; -import net.minecraft.util.ResourceLocation; - import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllItems; + +import net.minecraft.data.DataGenerator; +import net.minecraft.data.ItemTagsProvider; +import net.minecraft.item.Item; +import net.minecraft.tags.ItemTags; +import net.minecraft.tags.Tag; +import net.minecraft.util.ResourceLocation; + public class AllItemsTagProvider extends ItemTagsProvider { static Map createdTags; diff --git a/src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java b/src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java index 7dc838549..37c3ca525 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java +++ b/src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java @@ -1,8 +1,10 @@ package com.simibubi.create.foundation.utility.data; -import net.minecraft.util.ResourceLocation; +import java.util.Arrays; +import java.util.Collections; +import java.util.Set; -import java.util.*; +import net.minecraft.util.ResourceLocation; public interface ITaggable> { @@ -14,6 +16,7 @@ public interface ITaggable> { return this.withTags(TagType.BLOCK, tagsIn).withTags(TagType.ITEM, tagsIn); } + @SuppressWarnings("unchecked") default T withTags(TagType type, ResourceLocation... tagsIn) { Collections.addAll(getTagSet(type), tagsIn); return (T) this; diff --git a/src/main/resources/data/create/recipes/crushing/brass_block.json b/src/main/resources/data/create/recipes/crushing/brass_block.json new file mode 100644 index 000000000..0ed80ebec --- /dev/null +++ b/src/main/resources/data/create/recipes/crushing/brass_block.json @@ -0,0 +1,15 @@ +{ + "type": "create:crushing", + "ingredients": [ + { + "tag": "forge:storage_blocks/brass" + } + ], + "results": [ + { + "item": "create:crushed_brass", + "count": 5 + } + ], + "processingTime": 400 +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crushing/copper_block.json b/src/main/resources/data/create/recipes/crushing/copper_block.json new file mode 100644 index 000000000..74d87c1ec --- /dev/null +++ b/src/main/resources/data/create/recipes/crushing/copper_block.json @@ -0,0 +1,15 @@ +{ + "type": "create:crushing", + "ingredients": [ + { + "tag": "forge:storage_blocks/copper" + } + ], + "results": [ + { + "item": "create:crushed_copper", + "count": 5 + } + ], + "processingTime": 400 +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crushing/wool.json b/src/main/resources/data/create/recipes/crushing/wool.json new file mode 100644 index 000000000..c5c7a7e7c --- /dev/null +++ b/src/main/resources/data/create/recipes/crushing/wool.json @@ -0,0 +1,20 @@ +{ + "type": "create:crushing", + "ingredients": [ + { + "tag": "minecraft:wool" + } + ], + "results": [ + { + "item": "minecraft:string", + "count": 2 + }, + { + "item": "minecraft:string", + "count": 1, + "chance": 0.5 + } + ], + "processingTime": 100 +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crushing/zinc_block.json b/src/main/resources/data/create/recipes/crushing/zinc_block.json new file mode 100644 index 000000000..4a467f028 --- /dev/null +++ b/src/main/resources/data/create/recipes/crushing/zinc_block.json @@ -0,0 +1,15 @@ +{ + "type": "create:crushing", + "ingredients": [ + { + "tag": "forge:storage_blocks/zinc" + } + ], + "results": [ + { + "item": "create:crushed_zinc", + "count": 5 + } + ], + "processingTime": 400 +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/milling/wool.json b/src/main/resources/data/create/recipes/milling/wool.json index 05984e870..26f95f7be 100644 --- a/src/main/resources/data/create/recipes/milling/wool.json +++ b/src/main/resources/data/create/recipes/milling/wool.json @@ -8,12 +8,7 @@ "results": [ { "item": "minecraft:string", - "count": 2 - }, - { - "item": "minecraft:string", - "count": 2, - "chance": 0.5 + "count": 1 } ], "processingTime": 100 diff --git a/src/main/resources/data/create/recipes/mixing/gunpowder.json b/src/main/resources/data/create/recipes/mixing/gunpowder.json new file mode 100644 index 000000000..f70301982 --- /dev/null +++ b/src/main/resources/data/create/recipes/mixing/gunpowder.json @@ -0,0 +1,24 @@ +{ + "type": "create:mixing", + "ingredients": [ + { + "tag": "minecraft:coals" + }, + { + "item": "create:crushed_zinc" + }, + { + "item": "minecraft:gunpowder" + }, + { + "item": "minecraft:blaze_powder", + "return_chance": 0.75 + } + ], + "results": [ + { + "item": "minecraft:gunpowder", + "count": 2 + } + ] +} \ No newline at end of file