Skip to content

Commit

Permalink
fix for #39
Browse files Browse the repository at this point in the history
  • Loading branch information
oierbravo committed Aug 7, 2023
1 parent 701924b commit d2e5a0e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,14 @@ event.create('example_mesh','createsifter:mesh').displayName('Example Mesh').par

## CraftTweaker Integration (1.19.2)
```
//addRecipe(String name, FluidStack outputFluid,Item inputItem, int processingTime, int minimumHeat)
import mods.createsifter.SiftingManager;
<recipetype:melter:melting>.addRecipe("test_recipe",<fluid:minecraft:water> * 500,<item:minecraft:gravel>, 1000,8);
<recipetype:melter:melting>.addRecipe("test_recipe_2",<fluid:minecraft:lava> * 500,<item:minecraft:sand>, 200,2);
//addRecipe(String id, ProcessingOutput[] results, Ingredients[] input, int processingTime, boolean waterlogged, float minimumSpeed)
<recipetype:createsifter:sifting>.addRecipe("test_1",
[<item:minecraft:glowstone_dust> % 10,
<item:minecraft:gunpowder> % 50,
<item:create:cinder_flour> % 75],
[<item:minecraft:netherrack>,<item:createsifter:andesite_mesh>]
, 300, false, 1);
```
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ minecraft_version = 1.19.2
forge_version = 43.2.4
mixin_version = 0.8.5

mod_version=1.7.0.c-36
mod_version=1.7.1.c-36
modid=createsifter
author=oierbravo
display_name=Create: Sifter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

public interface SiftingRecipeSchema extends ProcessingRecipeSchema {
RecipeKey<Boolean> WATERLOGGED = BooleanComponent.BOOLEAN.key("waterlogged").optional(false);
RecipeKey<Float> MINIMUM_SPEED = NumberComponent.FLOAT.key("minimumSpeed").optional(SifterBlockEntity.DEFAULT_MINIMUM_SPEED);
class SiftingRecipeJS extends ProcessingRecipeJS {
RecipeKey<Float> MINIMUM_SPEED = NumberComponent.FLOAT.key("minimumSpeed").optional(1.0f);
class SiftingRecipeJS extends RecipeJS {
public RecipeJS waterlogged() {
return setValue(WATERLOGGED, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public List<ItemStack> rollResults(List<ProcessingOutput> rollableResults) {
public void readAdditional(JsonObject json) {
super.readAdditional(json);
waterlogged = GsonHelper.getAsBoolean(json, "waterlogged", false);
minimumSpeed = GsonHelper.getAsFloat(json, "minimumSpeed", SifterBlockEntity.DEFAULT_MINIMUM_SPEED);
minimumSpeed = GsonHelper.getAsFloat(json, "minimumSpeed", 1);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ protected SiftingRecipeParams(ResourceLocation id) {
results = NonNullList.create();
processingDuration = 0;
waterlogged = false;
minimumSpeed = SifterConfig.SIFTER_MINIMUM_SPEED.get().floatValue();
minimumSpeed = 1;
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ public class SiftingRecipeGen extends ModProcessingRecipeGen {
.output(.05f, Items.FIRE_CORAL)
.output(.05f, Items.HORN_CORAL)
.isWaterlogged()
)
;
);

public SiftingRecipeGen(DataGenerator generator) {
super(generator);
Expand Down

0 comments on commit d2e5a0e

Please sign in to comment.