Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,46 @@
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "creatingspace:crystal_cluster"
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"name": "creatingspace:crystal_cluster"
},
{
"type": "minecraft:item",
"functions": [
{
"enchantment": "minecraft:fortune",
"formula": "minecraft:ore_drops",
"function": "minecraft:apply_bonus"
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "creatingspace:crystal_shard"
}
]
}
],
"rolls": 1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "creatingspace:air_liquefying",
"blockInFront": "minecraft:campfire",
"dimension": "minecraft:overworld",
"ingredients": [],
"processing_time": 200,
"results": [
{
"amount": 100,
"id": "creatingspace:liquid_co2"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "creatingspace:air_liquefying",
"blockInFront": "minecraft:air",
"dimension": "minecraft:overworld",
"ingredients": [],
"processing_time": 200,
"results": [
{
"amount": 100,
"id": "creatingspace:liquid_oxygen"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public static void gatherData(GatherDataEvent event) {
generator.addProvider(true, new CSCrushingRecipeGen(output, lookupProvider, CreatingSpace.MODID));
generator.addProvider(true, new CSMixingRecipeGen(output, lookupProvider, CreatingSpace.MODID));
generator.addProvider(true, new CSWashingRecipeGen(output, lookupProvider, CreatingSpace.MODID));
generator.addProvider(true, new CSAirLiquefyingRecipeGen(output, lookupProvider));

// event.getGenerator().addProvider(true, new RegistrateDataProvider(REGISTRATE, CreatingSpace.MODID, event));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package com.rae.creatingspace.content.datagen.recipe;

import com.rae.creatingspace.CreatingSpace;
import com.rae.creatingspace.content.recipes.air_liquefying.AirLiquefyingRecipe;
import com.rae.creatingspace.content.recipes.air_liquefying.AirLiquefyingRecipeParam;
import com.rae.creatingspace.init.RecipeInit;
import com.rae.creatingspace.init.ingameobject.FluidInit;
import com.simibubi.create.api.data.recipe.ProcessingRecipeGen;
import com.simibubi.create.content.processing.recipe.ProcessingRecipeBuilder;
import com.simibubi.create.foundation.recipe.IRecipeTypeInfo;
import net.minecraft.core.HolderLookup;
import net.minecraft.data.PackOutput;
import net.minecraft.resources.ResourceLocation;

import java.util.concurrent.CompletableFuture;

public class CSAirLiquefyingRecipeGen
extends ProcessingRecipeGen<
AirLiquefyingRecipeParam,
AirLiquefyingRecipe,
AirLiquefyingRecipe.Builder<AirLiquefyingRecipe>
> {

public CSAirLiquefyingRecipeGen(PackOutput output, CompletableFuture<HolderLookup.Provider> lookup) {
super(output, lookup, CreatingSpace.MODID);
}

@Override
protected IRecipeTypeInfo getRecipeType() {
return RecipeInit.AIR_LIQUEFYING;
}

@Override
protected AirLiquefyingRecipe.Builder getBuilder(ResourceLocation id) {
return new AirLiquefyingRecipe.Builder<AirLiquefyingRecipe>(AirLiquefyingRecipe::new, id);
}

{ // instance‐initializer: declare your recipes here
GeneratedRecipe

LIQUID_O2 = create("o2_liquifying", b -> b
.blockInFront(ResourceLocation.parse("minecraft:air"))
.dimension(ResourceLocation.parse("minecraft:overworld"))
.output(FluidInit.LIQUID_OXYGEN.get(), 100)
.duration(200)
),

LIQUID_CO2 = create("co2_liquifying", b -> b
.blockInFront(ResourceLocation.parse("minecraft:campfire"))
.dimension(ResourceLocation.parse("minecraft:overworld"))
.output(FluidInit.LIQUID_CO2.get(), 100)
.duration(200)
);
// …more air‐liquefying recipes…
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ public interface Factory<R extends AirLiquefyingRecipe> extends ProcessingRecipe
R create(AirLiquefyingRecipeParam params);
}

public static class Builder<R extends AirLiquefyingRecipe> extends ProcessingRecipeBuilder<AirLiquefyingRecipeParam, R, AirLiquefyingRecipe.Builder<R>> {
public static class Builder<R extends AirLiquefyingRecipe>
extends ProcessingRecipeBuilder<AirLiquefyingRecipeParam, R, Builder<R>> {

public Builder(AirLiquefyingRecipe.Factory<R> factory, ResourceLocation recipeId) {
super(factory, recipeId);
}
Expand All @@ -133,12 +135,22 @@ protected AirLiquefyingRecipeParam createParams() {
}

@Override
public AirLiquefyingRecipe.Builder<R> self() {
public Builder<R> self() {
return this;
}

public Builder<R> blockInFront(ResourceLocation loc) {
params.blockInFront = loc;
return this;
}

public Builder<R> dimension(ResourceLocation dim) {
params.dimension = dim;
return this;
}
}


public static class Serializer<R extends AirLiquefyingRecipe> implements RecipeSerializer<R> {
private final MapCodec<R> codec;
private final StreamCodec<RegistryFriendlyByteBuf, R> streamCodec;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class AirLiquefyingRecipeParam extends ProcessingRecipeParams {
ResourceLocation.CODEC.optionalFieldOf("blockInFront", DEFAULT_EMPTY)
.forGetter( r -> r.blockInFront!=null?r.blockInFront: DEFAULT_EMPTY),
ResourceLocation.CODEC.optionalFieldOf("dimension", DEFAULT_EMPTY)
.forGetter( r -> r.dimension!=null?r.blockInFront: DEFAULT_EMPTY)
.forGetter( r -> r.dimension!=null?r.dimension: DEFAULT_EMPTY)
).apply(instance, (params, blockInFront, dimension) -> {
params.blockInFront = blockInFront;
params.dimension = dimension;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,13 @@ public class BlockInit {
.noOcclusion()
.requiresCorrectToolForDrops()
.lightLevel(state -> 5))
.loot((lt, b) -> {
HolderLookup.RegistryLookup<Enchantment> enchantmentRegistryLookup = lt.getRegistries().lookupOrThrow(Registries.ENCHANTMENT);
lt.add(b,
lt.createSilkTouchDispatchTable(b,
lt.applyExplosionDecay(b, LootItem.lootTableItem(ItemInit.CRYSTAL_SHARD.get())
.apply(ApplyBonusCount.addOreBonusCount(enchantmentRegistryLookup.getOrThrow(Enchantments.FORTUNE))))));
})
.item()
.build()
.register();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": "forge:add_features",
"type": "neoforge:add_features",
"biomes":"#creatingspace:is_moon",
"features":"creatingspace:moon_nickel_ore",
"step":"underground_ores"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": "forge:add_features",
"type": "neoforge:add_features",
"biomes":"#minecraft:is_overworld",
"features":"creatingspace:overworld_nickel_ore",
"step":"underground_ores"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
],
"results": [
{
"item": "creatingspace:engine_blueprint"
"id": "creatingspace:engine_blueprint"
}
]
},
Expand All @@ -56,12 +56,12 @@
],
"results": [
{
"item": "creatingspace:engine_blueprint"
"id": "creatingspace:engine_blueprint"
}
]
}
],
"transitionalItem": {
"item": "creatingspace:incomplete_exhaust_pack"
"id": "creatingspace:incomplete_exhaust_pack"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
],
"results": [
{
"item": "creatingspace:engine_blueprint"
"id": "creatingspace:engine_blueprint"
}
]
},
Expand All @@ -56,12 +56,12 @@
],
"results": [
{
"item": "creatingspace:engine_blueprint"
"id": "creatingspace:engine_blueprint"
}
]
}
],
"transitionalItem": {
"item": "creatingspace:incomplete_exhaust_pack"
"id": "creatingspace:incomplete_exhaust_pack"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"loops": 1,
"results": [
{
"item": "creatingspace:combustion_chamber"
"id": "creatingspace:combustion_chamber"
}
],
"sequence": [
Expand All @@ -32,7 +32,7 @@
],
"results": [
{
"item": "creatingspace:incomplete_combustion_chamber"
"id": "creatingspace:incomplete_combustion_chamber"
}
]
},
Expand All @@ -48,7 +48,7 @@
],
"results": [
{
"item": "creatingspace:incomplete_combustion_chamber"
"id": "creatingspace:incomplete_combustion_chamber"
}
]
},
Expand All @@ -64,7 +64,7 @@
],
"results": [
{
"item": "creatingspace:incomplete_combustion_chamber"
"id": "creatingspace:incomplete_combustion_chamber"
}
]
},
Expand All @@ -86,6 +86,6 @@
}
],
"transitionalItem": {
"item": "creatingspace:incomplete_combustion_chamber"
"id": "creatingspace:incomplete_combustion_chamber"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"loops": 1,
"results": [
{
"item": "creatingspace:aerospike_plug"
"id": "creatingspace:aerospike_plug"
}
],
"sequence": [
Expand All @@ -33,7 +33,7 @@
],
"results": [
{
"item": "creatingspace:incomplete_bell_nozzle"
"id": "creatingspace:incomplete_bell_nozzle"
}
]
},
Expand All @@ -49,7 +49,7 @@
],
"results": [
{
"item": "creatingspace:incomplete_bell_nozzle"
"id": "creatingspace:incomplete_bell_nozzle"
}
]
},
Expand All @@ -65,7 +65,7 @@
],
"results": [
{
"item": "creatingspace:incomplete_bell_nozzle"
"id": "creatingspace:incomplete_bell_nozzle"
}
]
},
Expand All @@ -81,7 +81,7 @@
],
"results": [
{
"item": "creatingspace:incomplete_bell_nozzle"
"id": "creatingspace:incomplete_bell_nozzle"
}
]
},
Expand All @@ -103,6 +103,6 @@
}
],
"transitionalItem": {
"item": "creatingspace:incomplete_aerospike_plug"
"id": "creatingspace:incomplete_aerospike_plug"
}
}
Loading