use of slimeknights.tconstruct.library.recipe.modifiers.spilling.effects.CureEffectsSpillingEffect in project TinkersConstruct by SlimeKnights.
the class ModifierRecipeProvider method addSpillingRecipes.
private void addSpillingRecipes(Consumer<FinishedRecipe> consumer) {
String folder = "tools/spilling/";
// vanilla
SpillingRecipeBuilder.forFluid(Fluids.WATER, FluidAttributes.BUCKET_VOLUME / 20).addEffect(new DamageSpillingEffect(LivingEntityPredicate.WATER_SENSITIVE, DamageType.PIERCING, 2f)).addEffect(ExtinguishSpillingEffect.INSTANCE).save(consumer, modResource(folder + "water"));
SpillingRecipeBuilder.forFluid(Fluids.LAVA, FluidAttributes.BUCKET_VOLUME / 20).addEffect(new DamageSpillingEffect(LivingEntityPredicate.NOT_FIRE_IMMUNE, DamageType.FIRE, 2f)).addEffect(new SetFireSpillingEffect(10)).save(consumer, modResource(folder + "lava"));
SpillingRecipeBuilder.forFluid(Tags.Fluids.MILK, FluidAttributes.BUCKET_VOLUME / 10).addEffect(new CureEffectsSpillingEffect(new ItemStack(Items.MILK_BUCKET))).addEffect(StrongBonesModifier.SPILLING_EFFECT).save(consumer, modResource(folder + "milk"));
// blaze - more damage, less fire
SpillingRecipeBuilder.forFluid(TinkerFluids.blazingBlood.getLocalTag(), FluidAttributes.BUCKET_VOLUME / 20).addEffect(new DamageSpillingEffect(LivingEntityPredicate.NOT_FIRE_IMMUNE, DamageType.FIRE, 3f)).addEffect(new SetFireSpillingEffect(5)).save(consumer, prefix(TinkerFluids.blazingBlood, folder));
// slime
int slimeballPiece = FluidValues.SLIMEBALL / 5;
// earth - lucky
SpillingRecipeBuilder.forFluid(TinkerFluids.earthSlime.getForgeTag(), slimeballPiece).addEffect(new EffectSpillingEffect(MobEffects.LUCK, 15, 1)).addEffect(new EffectSpillingEffect(MobEffects.MOVEMENT_SLOWDOWN, 15, 1)).save(consumer, prefix(TinkerFluids.earthSlime, folder));
// sky - jump boost
SpillingRecipeBuilder.forFluid(TinkerFluids.skySlime.getLocalTag(), slimeballPiece).addEffect(new EffectSpillingEffect(MobEffects.JUMP, 20, 1)).addEffect(new EffectSpillingEffect(MobEffects.MOVEMENT_SLOWDOWN, 15, 1)).save(consumer, prefix(TinkerFluids.skySlime, folder));
// ender - levitation
SpillingRecipeBuilder.forFluid(TinkerFluids.enderSlime.getLocalTag(), slimeballPiece).addEffect(new EffectSpillingEffect(MobEffects.LEVITATION, 5, 1)).addEffect(new EffectSpillingEffect(MobEffects.MOVEMENT_SLOWDOWN, 15, 1)).save(consumer, prefix(TinkerFluids.enderSlime, folder));
// slimelike
// blood - food
SpillingRecipeBuilder.forFluid(TinkerFluids.blood.getLocalTag(), slimeballPiece).addEffect(new RestoreHungerSpillingEffect(1, 0.2f)).addEffect(new EffectSpillingEffect(MobEffects.DIG_SLOWDOWN, 10, 1)).save(consumer, prefix(TinkerFluids.blood, folder));
// venom - poison
SpillingRecipeBuilder.forFluid(TinkerFluids.venom.getLocalTag(), slimeballPiece).addEffect(new EffectSpillingEffect(MobEffects.POISON, 25, 1)).save(consumer, prefix(TinkerFluids.venom, folder));
// magma - fire resistance
SpillingRecipeBuilder.forFluid(TinkerFluids.magma.getForgeTag(), slimeballPiece).addEffect(new EffectSpillingEffect(MobEffects.FIRE_RESISTANCE, 25, 1)).save(consumer, prefix(TinkerFluids.magma, folder));
// soul - slowness and blindness
SpillingRecipeBuilder.forFluid(TinkerFluids.liquidSoul.getLocalTag(), slimeballPiece).addEffect(new EffectSpillingEffect(MobEffects.MOVEMENT_SLOWDOWN, 25, 2)).addEffect(new EffectSpillingEffect(MobEffects.BLINDNESS, 5, 1)).save(consumer, prefix(TinkerFluids.liquidSoul, folder));
// ender - teleporting
SpillingRecipeBuilder.forFluid(TinkerFluids.moltenEnder.getForgeTag(), FluidAttributes.BUCKET_VOLUME / 20).addEffect(new DamageSpillingEffect(DamageType.MAGIC, 1f)).addEffect(TeleportSpillingEffect.INSTANCE).save(consumer, prefix(TinkerFluids.moltenEnder, folder));
// multi-recipes
SpillingRecipeBuilder.forFluid(TinkerTags.Fluids.GLASS_SPILLING, FluidAttributes.BUCKET_VOLUME / 10).addEffect(new DamageSpillingEffect(LivingEntityPredicate.NOT_FIRE_IMMUNE, DamageType.FIRE, 1f)).addEffect(new SetFireSpillingEffect(3)).save(consumer, modResource(folder + "glass"));
SpillingRecipeBuilder.forFluid(TinkerTags.Fluids.CLAY_SPILLING, FluidAttributes.BUCKET_VOLUME / 20).addEffect(new DamageSpillingEffect(LivingEntityPredicate.NOT_FIRE_IMMUNE, DamageType.FIRE, 1.5f)).addEffect(new SetFireSpillingEffect(3)).save(consumer, modResource(folder + "clay"));
SpillingRecipeBuilder.forFluid(TinkerTags.Fluids.CHEAP_METAL_SPILLING, FluidValues.NUGGET).addEffect(new DamageSpillingEffect(LivingEntityPredicate.NOT_FIRE_IMMUNE, DamageType.FIRE, 1.5f)).addEffect(new SetFireSpillingEffect(7)).save(consumer, modResource(folder + "metal_cheap"));
SpillingRecipeBuilder.forFluid(TinkerTags.Fluids.AVERAGE_METAL_SPILLING, FluidValues.NUGGET).addEffect(new DamageSpillingEffect(LivingEntityPredicate.NOT_FIRE_IMMUNE, DamageType.FIRE, 2f)).addEffect(new SetFireSpillingEffect(7)).save(consumer, modResource(folder + "metal_average"));
SpillingRecipeBuilder.forFluid(TinkerTags.Fluids.EXPENSIVE_METAL_SPILLING, FluidValues.NUGGET).addEffect(new DamageSpillingEffect(LivingEntityPredicate.NOT_FIRE_IMMUNE, DamageType.FIRE, 2.5f)).addEffect(new SetFireSpillingEffect(7)).save(consumer, modResource(folder + "metal_expensive"));
// gold applies magic
SpillingRecipeBuilder.forFluid(TinkerFluids.moltenGold.getForgeTag(), FluidValues.NUGGET).addEffect(new DamageSpillingEffect(DamageType.MAGIC, 2f)).addEffect(new SetFireSpillingEffect(3)).save(consumer, prefix(TinkerFluids.moltenGold, folder));
// pig iron fills you up magic
SpillingRecipeBuilder.forFluid(TinkerFluids.moltenPigIron.getLocalTag(), FluidValues.NUGGET).addEffect(new RestoreHungerSpillingEffect(2, 0.3f)).addEffect(new SetFireSpillingEffect(2)).save(consumer, prefix(TinkerFluids.moltenPigIron, folder));
// uranium also does poison
SpillingRecipeBuilder.forFluid(TinkerFluids.moltenUranium.getLocalTag(), FluidValues.NUGGET).addEffect(new DamageSpillingEffect(LivingEntityPredicate.NOT_FIRE_IMMUNE, DamageType.FIRE, 1.5f)).addEffect(new EffectSpillingEffect(MobEffects.POISON, 10, 1)).addEffect(new SetFireSpillingEffect(3)).save(consumer, prefix(TinkerFluids.moltenUranium, folder));
// potion fluid compat
ResourceLocation potionTag = new ResourceLocation("forge", "potion");
// standard potion is 250 mb, but we want a smaller number. For the effects, we really want to divide into 4 pieces
SpillingRecipeBuilder.forFluid(FluidIngredient.of(FluidTags.createOptional(potionTag), FluidAttributes.BUCKET_VOLUME / 8)).addEffect(new PotionFluidEffect(0.5f, TagPredicate.ANY)).save(withCondition(consumer, new NotCondition(new FluidTagEmptyCondition(potionTag))), modResource(folder + "potion_fluid"));
// create has three types of bottles stored on their fluid, react to it to boost
Function<String, TagPredicate> createBottle = value -> {
CompoundTag compound = new CompoundTag();
compound.putString("Bottle", value);
return new TagPredicate(compound);
};
String create = "create";
SpillingRecipeBuilder.forFluid(FluidNameIngredient.of(new ResourceLocation(create, "potion"), FluidAttributes.BUCKET_VOLUME / 8)).addEffect(new PotionFluidEffect(0.25f, createBottle.apply("REGULAR"))).addEffect(new PotionFluidEffect(0.5f, createBottle.apply("SPLASH"))).addEffect(new PotionFluidEffect(1f, createBottle.apply("LINGERING"))).save(withCondition(consumer, modLoaded(create)), modResource(folder + "create_potion_fluid"));
}
Aggregations