Skip to content

Commit

Permalink
Extra recipes
Browse files Browse the repository at this point in the history
- Add chocolate melting, honey liquification, and honey compacting
recipes
- Create honey tag field and use Forge's milk tag field
- Make fluid fields final
- Closes Creators-of-Create#1845
  • Loading branch information
PepperCode1 committed Jun 26, 2021
1 parent de929ef commit 737b7ad
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 33 deletions.
3 changes: 3 additions & 0 deletions src/generated/resources/.cache/cache
Original file line number Diff line number Diff line change
Expand Up @@ -2860,6 +2860,7 @@ f7879d404d7a848d818278b4e788f285a9087e63 data/create/recipes/compacting/blaze_ca
27c23592d8fec03072a04544d3598ca9b1c798ff data/create/recipes/compacting/chocolate.json
7b2ef15dd28d1d8a450ea49a82dfb361d1adde4c data/create/recipes/compacting/diorite_from_flint.json
7657603e95ccf83dd0d4b104635db66e531d092a data/create/recipes/compacting/granite_from_flint.json
739a1d004c4be50cda2d706a64b797f66c3ca9c8 data/create/recipes/compacting/honey.json
b187def3a843505ab42db301f5374043d90605d6 data/create/recipes/crafting/appliances/copper_backtank.json
c077375d16b4505e52548613fbc9356993556e6b data/create/recipes/crafting/appliances/crafting_blueprint.json
9ad82ac5ce02654b7af7f1a570a6b2c01e140da3 data/create/recipes/crafting/appliances/diving_boots.json
Expand Down Expand Up @@ -3377,8 +3378,10 @@ b3cc5e61bab40ca6135dc1f706f3ab447e9f78bf data/create/recipes/mixing/andesite_all
ce9dc7dacb85cb23a7187c19a115b40e597ad36b data/create/recipes/mixing/andesite_alloy_from_zinc.json
3417f9399ce0fb32fc4bce94c772b40d780c9006 data/create/recipes/mixing/brass_ingot.json
ab602a53a5d8d057aad910dd1c5529cde2d587ab data/create/recipes/mixing/chocolate.json
d3bf74bb3826cf2dccaf7377b8b3e0fdaa38f1aa data/create/recipes/mixing/chocolate_melting.json
0e29b4ce13750aab5a60ae54cbec8776569b35e0 data/create/recipes/mixing/chromatic_compound.json
d9a3dff1288d675ab812eef1eb73cb27dcc71bd2 data/create/recipes/mixing/crushed_brass.json
ffba306dbb52e4d7afeaec183b92821dbc402a7c data/create/recipes/mixing/honey.json
cd9a78454bce20cf3557f5c44febae77ebd43e54 data/create/recipes/mixing/lava_from_cobble.json
0f89b3f2d81585591513619b8d1e8694eb874316 data/create/recipes/mixing/tea.json
1998c6f84f871d6da58ec29d729401d18f8f1aa1 data/create/recipes/mossy_andesite_from_andesite_stonecutting.json
Expand Down
14 changes: 14 additions & 0 deletions src/generated/resources/data/create/recipes/compacting/honey.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"type": "create:compacting",
"ingredients": [
{
"fluidTag": "forge:honey",
"amount": 1000
}
],
"results": [
{
"item": "minecraft:honey_block"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": "create:mixing",
"ingredients": [
{
"item": "create:bar_of_chocolate"
}
],
"results": [
{
"fluid": "create:chocolate",
"amount": 250
}
],
"heatRequirement": "heated"
}
15 changes: 15 additions & 0 deletions src/generated/resources/data/create/recipes/mixing/honey.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"type": "create:mixing",
"ingredients": [
{
"item": "minecraft:honey_block"
}
],
"results": [
{
"fluid": "create:honey",
"amount": 1000
}
],
"heatRequirement": "heated"
}
16 changes: 9 additions & 7 deletions src/main/java/com/simibubi/create/AllFluids.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import javax.annotation.Nullable;

import com.simibubi.create.AllTags.AllFluidTags;
import com.simibubi.create.content.contraptions.fluids.VirtualFluid;
import com.simibubi.create.content.contraptions.fluids.potion.PotionFluid;
import com.simibubi.create.content.contraptions.fluids.potion.PotionFluid.PotionFluidAttributes;
Expand All @@ -18,29 +19,30 @@
import net.minecraft.world.IBlockDisplayReader;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.Tags;
import net.minecraftforge.fluids.FluidAttributes;
import net.minecraftforge.fluids.ForgeFlowingFluid;

public class AllFluids {

private static final CreateRegistrate REGISTRATE = Create.registrate();

public static FluidEntry<PotionFluid> POTION =
public static final FluidEntry<PotionFluid> POTION =
REGISTRATE.virtualFluid("potion", PotionFluidAttributes::new, PotionFluid::new)
.lang(f -> "fluid.create.potion", "Potion")
.register();

public static FluidEntry<VirtualFluid> TEA = REGISTRATE.virtualFluid("tea")
public static final FluidEntry<VirtualFluid> TEA = REGISTRATE.virtualFluid("tea")
.lang(f -> "fluid.create.tea", "Builder's Tea")
.tag(AllTags.forgeFluidTag("tea"))
.register();

public static FluidEntry<VirtualFluid> MILK = REGISTRATE.virtualFluid("milk")
public static final FluidEntry<VirtualFluid> MILK = REGISTRATE.virtualFluid("milk")
.lang(f -> "fluid.create.milk", "Milk")
.tag(AllTags.forgeFluidTag("milk"))
.tag(Tags.Fluids.MILK)
.register();

public static FluidEntry<ForgeFlowingFluid.Flowing> HONEY =
public static final FluidEntry<ForgeFlowingFluid.Flowing> HONEY =
REGISTRATE.standardFluid("honey", NoColorFluidAttributes::new)
.lang(f -> "fluid.create.honey", "Honey")
.attributes(b -> b.viscosity(500)
Expand All @@ -49,13 +51,13 @@ public class AllFluids {
.tickRate(25)
.slopeFindDistance(3)
.explosionResistance(100f))
.tag(AllTags.forgeFluidTag("honey"))
.tag(AllFluidTags.HONEY.tag)
.bucket()
.properties(p -> p.maxStackSize(1))
.build()
.register();

public static FluidEntry<ForgeFlowingFluid.Flowing> CHOCOLATE =
public static final FluidEntry<ForgeFlowingFluid.Flowing> CHOCOLATE =
REGISTRATE.standardFluid("chocolate", NoColorFluidAttributes::new)
.lang(f -> "fluid.create.chocolate", "Chocolate")
.tag(AllTags.forgeFluidTag("chocolate"))
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/simibubi/create/AllTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ public void includeIn(AllItemTags parent) {
}

public static enum AllFluidTags {
NO_INFINITE_DRAINING
NO_INFINITE_DRAINING,
HONEY(FORGE)

;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.simibubi.create.AllFluids;
import com.simibubi.create.AllItems;
import com.simibubi.create.AllRecipeTypes;
import com.simibubi.create.AllTags.AllFluidTags;
import com.simibubi.create.content.palettes.AllPaletteBlocks;

import net.minecraft.block.Blocks;
Expand All @@ -21,9 +22,6 @@ public class CompactingRecipeGen extends ProcessingRecipeGen {
.require(Items.RED_SAND)
.output(Blocks.GRANITE, 1)),

CHOCOLATE = create("chocolate", b -> b.require(AllFluids.CHOCOLATE.get(), 250)
.output(AllItems.BAR_OF_CHOCOLATE.get(), 1)),

DIORITE = create("diorite_from_flint", b -> b.require(Items.FLINT)
.require(Items.FLINT)
.require(Fluids.LAVA, 100)
Expand All @@ -36,10 +34,16 @@ public class CompactingRecipeGen extends ProcessingRecipeGen {
.require(Items.GRAVEL)
.output(Blocks.ANDESITE, 1)),

CHOCOLATE = create("chocolate", b -> b.require(AllFluids.CHOCOLATE.get(), 250)
.output(AllItems.BAR_OF_CHOCOLATE.get(), 1)),

BLAZE_CAKE = create("blaze_cake", b -> b.require(Tags.Items.EGGS)
.require(Items.SUGAR)
.require(AllItems.CINDER_FLOUR.get())
.output(AllItems.BLAZE_CAKE_BASE.get(), 1))
.output(AllItems.BLAZE_CAKE_BASE.get(), 1)),

HONEY = create("honey", b -> b.require(AllFluidTags.HONEY.tag, 1000)
.output(Items.HONEY_BLOCK, 1))

;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ public class EmptyingRecipeGen extends ProcessingRecipeGen {
/*
* potion/water bottles are handled internally
*/

GeneratedRecipe

HONEY_BOTTLE = create("honey_bottle", b -> b
.require(Items.HONEY_BOTTLE)
.output(AllFluids.HONEY.get(), 250)
.output(Items.GLASS_BOTTLE)),
BUILDERS_TEA = create("builders_tea", b -> b
.require(AllItems.BUILDERS_TEA.get())
.output(AllFluids.TEA.get(), 250)
.output(Items.GLASS_BOTTLE)),
HONEY_BOTTLE = create("honey_bottle", b -> b
.require(Items.HONEY_BOTTLE)
.output(AllFluids.HONEY.get(), 250)
.output(Items.GLASS_BOTTLE)),

BUILDERS_TEA = create("builders_tea", b -> b
.require(AllItems.BUILDERS_TEA.get())
.output(AllFluids.TEA.get(), 250)
.output(Items.GLASS_BOTTLE)),

MILK_BUCKET = create("milk_bucket", b -> b
.require(Items.MILK_BUCKET)
.output(AllFluids.MILK.get(), 1000)
.output(Items.BUCKET))
MILK_BUCKET = create("milk_bucket", b -> b
.require(Items.MILK_BUCKET)
.output(AllFluids.MILK.get(), 1000)
.output(Items.BUCKET))

;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
import com.simibubi.create.AllFluids;
import com.simibubi.create.AllItems;
import com.simibubi.create.AllRecipeTypes;
import com.simibubi.create.AllTags;
import com.simibubi.create.AllTags.AllFluidTags;
import com.simibubi.create.content.contraptions.fluids.potion.PotionFluidHandler;

import net.minecraft.data.DataGenerator;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.Items;
import net.minecraft.potion.Potions;
import net.minecraftforge.common.Tags;

public class FillingRecipeGen extends ProcessingRecipeGen {

GeneratedRecipe

HONEY_BOTTLE = create("honey_bottle", b -> b.require(AllTags.forgeFluidTag("honey"), 250)
HONEY_BOTTLE = create("honey_bottle", b -> b.require(AllFluidTags.HONEY.tag, 250)
.require(Items.GLASS_BOTTLE)
.output(Items.HONEY_BOTTLE)),

Expand All @@ -27,11 +28,11 @@ public class FillingRecipeGen extends ProcessingRecipeGen {
.require(AllItems.BLAZE_CAKE_BASE.get())
.output(AllItems.BLAZE_CAKE.get())),

HONEYED_APPLE = create("honeyed_apple", b -> b.require(AllTags.forgeFluidTag("honey"), 250)
HONEYED_APPLE = create("honeyed_apple", b -> b.require(AllFluidTags.HONEY.tag, 250)
.require(Items.APPLE)
.output(AllItems.HONEYED_APPLE.get())),

SWEET_ROLL = create("sweet_roll", b -> b.require(AllTags.forgeFluidTag("milk"), 250)
SWEET_ROLL = create("sweet_roll", b -> b.require(Tags.Fluids.MILK, 250)
.require(Items.BREAD)
.output(AllItems.SWEET_ROLL.get())),

Expand All @@ -55,7 +56,7 @@ public class FillingRecipeGen extends ProcessingRecipeGen {
.require(AllItems.CINDER_FLOUR.get())
.output(Items.GLOWSTONE_DUST)),

MILK_BUCKET = create("milk_bucket", b -> b.require(AllTags.forgeFluidTag("milk"), 1000)
MILK_BUCKET = create("milk_bucket", b -> b.require(Tags.Fluids.MILK, 1000)
.require(Items.BUCKET)
.output(Items.MILK_BUCKET))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,25 @@ public class MixingRecipeGen extends ProcessingRecipeGen {
.requiresHeat(HeatCondition.SUPERHEATED)),

TEA = create("tea", b -> b.require(Fluids.WATER, 250)
.require(AllTags.forgeFluidTag("milk"), 250)
.require(Tags.Fluids.MILK, 250)
.require(ItemTags.LEAVES)
.output(AllFluids.TEA.get(), 500)
.requiresHeat(HeatCondition.HEATED)),

CHOCOLATE = create("chocolate", b -> b.require(AllTags.forgeFluidTag("milk"), 250)
CHOCOLATE = create("chocolate", b -> b.require(Tags.Fluids.MILK, 250)
.require(Items.SUGAR)
.require(Items.COCOA_BEANS)
.output(AllFluids.CHOCOLATE.get(), 250)
.requiresHeat(HeatCondition.HEATED)),

CHOCOLATE_MELTING = create("chocolate_melting", b -> b.require(AllItems.BAR_OF_CHOCOLATE.get())
.output(AllFluids.CHOCOLATE.get(), 250)
.requiresHeat(HeatCondition.HEATED)),

HONEY = create("honey", b -> b.require(Items.HONEY_BLOCK)
.output(AllFluids.HONEY.get(), 1000)
.requiresHeat(HeatCondition.HEATED)),

BRASS_INGOT = create("brass_ingot", b -> b.require(I.copper())
.require(I.zinc())
.output(AllItems.BRASS_INGOT.get(), 2)
Expand Down

0 comments on commit 737b7ad

Please sign in to comment.