Skip to content

Commit

Permalink
Fix saturation duration
Browse files Browse the repository at this point in the history
  • Loading branch information
Mechalopa committed Jan 2, 2025
1 parent 62f9f6b commit a979161
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 40 deletions.
64 changes: 32 additions & 32 deletions src/main/java/com/github/mechalopa/jafohana/registry/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,38 @@ public class ModBlocks
{
private static final DeferredRegister<Block> REGISTRY = DeferredRegister.create(Registries.BLOCK, JAFOhana.MODID);

public static final Supplier<Block> DAYFLOWER = REGISTRY.register("dayflower", () -> new ModFlowerBlock(MobEffects.WATER_BREATHING, 5));
public static final Supplier<Block> EVENING_PRIMROSE = REGISTRY.register("evening_primrose", () -> new ModFlowerBlock(MobEffects.NIGHT_VISION, 5));
public static final Supplier<Block> MILK_VETCH = REGISTRY.register("milk_vetch", () -> new ModFlowerBlock(MobEffects.REGENERATION, 8));
public static final Supplier<Block> FORGET_ME_NOT = REGISTRY.register("forget_me_not", () -> new ModFlowerBlock(MobEffects.INVISIBILITY, 8));
public static final Supplier<Block> YELLOW_AFRICAN_DAISY = REGISTRY.register("yellow_african_daisy", () -> new ModFlowerBlock(MobEffects.DAMAGE_RESISTANCE, 4));
public static final Supplier<Block> PINK_AFRICAN_DAISY = REGISTRY.register("pink_african_daisy", () -> new ModFlowerBlock(MobEffects.DAMAGE_RESISTANCE, 4));
public static final Supplier<Block> WHITE_AFRICAN_DAISY = REGISTRY.register("white_african_daisy", () -> new ModFlowerBlock(MobEffects.DAMAGE_RESISTANCE, 4));
public static final Supplier<Block> BLACK_TULIP = REGISTRY.register("black_tulip", () -> new ModFlowerBlock(MobEffects.WEAKNESS, 9));
public static final Supplier<Block> GREEN_TULIP = REGISTRY.register("green_tulip", () -> new ModFlowerBlock(MobEffects.WEAKNESS, 9));
public static final Supplier<Block> BLOOD_RED_IRIS = REGISTRY.register("blood_red_iris", () -> new ModFlowerBlock(MobEffects.POISON, 12));
public static final Supplier<Block> BLUEBELL = REGISTRY.register("bluebell", () -> new ModFlowerBlock(MobEffects.REGENERATION, 8));
public static final Supplier<Block> RED_SNAPDRAGON = REGISTRY.register("red_snapdragon", () -> new ModFlowerBlock(MobEffects.DAMAGE_BOOST, 4));
public static final Supplier<Block> YELLOW_SNAPDRAGON = REGISTRY.register("yellow_snapdragon", () -> new ModFlowerBlock(MobEffects.DAMAGE_BOOST, 4));
public static final Supplier<Block> PINK_SNAPDRAGON = REGISTRY.register("pink_snapdragon", () -> new ModFlowerBlock(MobEffects.DAMAGE_BOOST, 4));
public static final Supplier<Block> WHITE_EGRET_ORCHID = REGISTRY.register("white_egret_orchid", () -> new ModFlowerBlock(MobEffects.SLOW_FALLING, 5));
public static final Supplier<Block> ORANGE_SPIDER_LILY = REGISTRY.register("orange_spider_lily", () -> new ModFlowerBlock(MobEffects.POISON, 12));
public static final Supplier<Block> DANCING_LADIES_GINGER = REGISTRY.register("dancing_ladies_ginger", () -> new ModFlowerBlock(MobEffects.MOVEMENT_SPEED, 5));
public static final Supplier<Block> FIREBALL_LILY = REGISTRY.register("fireball_lily", () -> new ModFlowerBlock(MobEffects.FIRE_RESISTANCE, 4));
public static final Supplier<Block> SPATHIPHYLLUM = REGISTRY.register("spathiphyllum", () -> new ModFlowerBlock(MobEffects.MOVEMENT_SPEED, 5));
public static final Supplier<Block> PURPLE_PANSY = REGISTRY.register("purple_pansy", () -> new ModFlowerBlock(MobEffects.CONFUSION, 9));
public static final Supplier<Block> WHITE_PANSY = REGISTRY.register("white_pansy", () -> new ModFlowerBlock(MobEffects.CONFUSION, 9));
public static final Supplier<Block> YELLOW_PANSY = REGISTRY.register("yellow_pansy", () -> new ModFlowerBlock(MobEffects.CONFUSION, 9));
public static final Supplier<Block> CREEPANSY = REGISTRY.register("creepansy", () -> new ModFlowerBlock(MobEffects.DAMAGE_BOOST, 4));
public static final Supplier<Block> SNOWDROP = REGISTRY.register("snowdrop", () -> new ModFlowerBlock(MobEffects.POISON, 12));
public static final Supplier<Block> WINTER_HEATH = REGISTRY.register("winter_heath", () -> new ModFlowerBlock(MobEffects.WEAKNESS, 9));
public static final Supplier<Block> BLUE_DAISY = REGISTRY.register("blue_daisy", () -> new ModFlowerBlock(MobEffects.MOVEMENT_SPEED, 5));
public static final Supplier<Block> CRIMSON_CLOVER = REGISTRY.register("crimson_clover", () -> new CrimsonCloverBlock(MobEffects.FIRE_RESISTANCE, 4));
public static final Supplier<Block> WHEEL_LILY = REGISTRY.register("wheel_lily", () -> new ModFlowerBlock(MobEffects.SATURATION, 7));
public static final Supplier<Block> MAGENTA_SPOTTED_BELLFLOWER = REGISTRY.register("magenta_spotted_bellflower", () -> new ModFlowerBlock(MobEffects.NIGHT_VISION, 5));
public static final Supplier<Block> WHITE_SPOTTED_BELLFLOWER = REGISTRY.register("white_spotted_bellflower", () -> new ModFlowerBlock(MobEffects.NIGHT_VISION, 5));
public static final Supplier<Block> RED_SPIDER_LILY = REGISTRY.register("red_spider_lily", () -> new RedSpiderLilyBlock(MobEffects.POISON, 12));
public static final Supplier<Block> BELLS_OF_IRELAND = REGISTRY.register("bells_of_ireland", () -> new MediumFlowerBlock(MobEffects.SATURATION, 7));
public static final Supplier<Block> DAYFLOWER = REGISTRY.register("dayflower", () -> new ModFlowerBlock(MobEffects.WATER_BREATHING, 5.0F));
public static final Supplier<Block> EVENING_PRIMROSE = REGISTRY.register("evening_primrose", () -> new ModFlowerBlock(MobEffects.NIGHT_VISION, 5.0F));
public static final Supplier<Block> MILK_VETCH = REGISTRY.register("milk_vetch", () -> new ModFlowerBlock(MobEffects.REGENERATION, 8.0F));
public static final Supplier<Block> FORGET_ME_NOT = REGISTRY.register("forget_me_not", () -> new ModFlowerBlock(MobEffects.INVISIBILITY, 8.0F));
public static final Supplier<Block> YELLOW_AFRICAN_DAISY = REGISTRY.register("yellow_african_daisy", () -> new ModFlowerBlock(MobEffects.DAMAGE_RESISTANCE, 4.0F));
public static final Supplier<Block> PINK_AFRICAN_DAISY = REGISTRY.register("pink_african_daisy", () -> new ModFlowerBlock(MobEffects.DAMAGE_RESISTANCE, 4.0F));
public static final Supplier<Block> WHITE_AFRICAN_DAISY = REGISTRY.register("white_african_daisy", () -> new ModFlowerBlock(MobEffects.DAMAGE_RESISTANCE, 4.0F));
public static final Supplier<Block> BLACK_TULIP = REGISTRY.register("black_tulip", () -> new ModFlowerBlock(MobEffects.WEAKNESS, 9.0F));
public static final Supplier<Block> GREEN_TULIP = REGISTRY.register("green_tulip", () -> new ModFlowerBlock(MobEffects.WEAKNESS, 9.0F));
public static final Supplier<Block> BLOOD_RED_IRIS = REGISTRY.register("blood_red_iris", () -> new ModFlowerBlock(MobEffects.POISON, 12.0F));
public static final Supplier<Block> BLUEBELL = REGISTRY.register("bluebell", () -> new ModFlowerBlock(MobEffects.REGENERATION, 8.0F));
public static final Supplier<Block> RED_SNAPDRAGON = REGISTRY.register("red_snapdragon", () -> new ModFlowerBlock(MobEffects.DAMAGE_BOOST, 4.0F));
public static final Supplier<Block> YELLOW_SNAPDRAGON = REGISTRY.register("yellow_snapdragon", () -> new ModFlowerBlock(MobEffects.DAMAGE_BOOST, 4.0F));
public static final Supplier<Block> PINK_SNAPDRAGON = REGISTRY.register("pink_snapdragon", () -> new ModFlowerBlock(MobEffects.DAMAGE_BOOST, 4.0F));
public static final Supplier<Block> WHITE_EGRET_ORCHID = REGISTRY.register("white_egret_orchid", () -> new ModFlowerBlock(MobEffects.SLOW_FALLING, 5.0F));
public static final Supplier<Block> ORANGE_SPIDER_LILY = REGISTRY.register("orange_spider_lily", () -> new ModFlowerBlock(MobEffects.POISON, 12.0F));
public static final Supplier<Block> DANCING_LADIES_GINGER = REGISTRY.register("dancing_ladies_ginger", () -> new ModFlowerBlock(MobEffects.MOVEMENT_SPEED, 5.0F));
public static final Supplier<Block> FIREBALL_LILY = REGISTRY.register("fireball_lily", () -> new ModFlowerBlock(MobEffects.FIRE_RESISTANCE, 4.0F));
public static final Supplier<Block> SPATHIPHYLLUM = REGISTRY.register("spathiphyllum", () -> new ModFlowerBlock(MobEffects.MOVEMENT_SPEED, 5.0F));
public static final Supplier<Block> PURPLE_PANSY = REGISTRY.register("purple_pansy", () -> new ModFlowerBlock(MobEffects.CONFUSION, 9.0F));
public static final Supplier<Block> WHITE_PANSY = REGISTRY.register("white_pansy", () -> new ModFlowerBlock(MobEffects.CONFUSION, 9.0F));
public static final Supplier<Block> YELLOW_PANSY = REGISTRY.register("yellow_pansy", () -> new ModFlowerBlock(MobEffects.CONFUSION, 9.0F));
public static final Supplier<Block> CREEPANSY = REGISTRY.register("creepansy", () -> new ModFlowerBlock(MobEffects.DAMAGE_BOOST, 4.0F));
public static final Supplier<Block> SNOWDROP = REGISTRY.register("snowdrop", () -> new ModFlowerBlock(MobEffects.POISON, 12.0F));
public static final Supplier<Block> WINTER_HEATH = REGISTRY.register("winter_heath", () -> new ModFlowerBlock(MobEffects.WEAKNESS, 9.0F));
public static final Supplier<Block> BLUE_DAISY = REGISTRY.register("blue_daisy", () -> new ModFlowerBlock(MobEffects.MOVEMENT_SPEED, 5.0F));
public static final Supplier<Block> CRIMSON_CLOVER = REGISTRY.register("crimson_clover", () -> new CrimsonCloverBlock(MobEffects.FIRE_RESISTANCE, 4.0F));
public static final Supplier<Block> WHEEL_LILY = REGISTRY.register("wheel_lily", () -> new ModFlowerBlock(MobEffects.SATURATION, 0.35F));
public static final Supplier<Block> MAGENTA_SPOTTED_BELLFLOWER = REGISTRY.register("magenta_spotted_bellflower", () -> new ModFlowerBlock(MobEffects.NIGHT_VISION, 5.0F));
public static final Supplier<Block> WHITE_SPOTTED_BELLFLOWER = REGISTRY.register("white_spotted_bellflower", () -> new ModFlowerBlock(MobEffects.NIGHT_VISION, 5.0F));
public static final Supplier<Block> RED_SPIDER_LILY = REGISTRY.register("red_spider_lily", () -> new RedSpiderLilyBlock(MobEffects.POISON, 12.0F));
public static final Supplier<Block> BELLS_OF_IRELAND = REGISTRY.register("bells_of_ireland", () -> new MediumFlowerBlock(MobEffects.SATURATION, 0.35F));
public static final Supplier<Block> ORANGE_MARIGOLD = REGISTRY.register("orange_marigold", () -> new ModTallFlowerBlock());
public static final Supplier<Block> YELLOW_MARIGOLD = REGISTRY.register("yellow_marigold", () -> new ModTallFlowerBlock());
public static final Supplier<Block> GLORIOSA = REGISTRY.register("gloriosa", () -> new ModTallFlowerBlock());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public class CrimsonCloverBlock extends ModFlowerBlock
{
public static final BooleanProperty ON_NYLIUM = ModBlockStateProperties.ON_NYLIUM;

public CrimsonCloverBlock(Holder<MobEffect> effect, int effectDuration)
public CrimsonCloverBlock(Holder<MobEffect> effect, float seconds)
{
super(effect, effectDuration);
super(effect, seconds);
this.registerDefaultState(this.stateDefinition.any().setValue(ON_NYLIUM, false));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public class MediumFlowerBlock extends ModFlowerBlock
{
protected static final VoxelShape SHAPE = Block.box(5.0D, 0.0D, 5.0D, 11.0D, 14.0D, 11.0D);

public MediumFlowerBlock(Holder<MobEffect> effect, int effectDuration)
public MediumFlowerBlock(Holder<MobEffect> effect, float seconds)
{
super(effect, effectDuration);
super(effect, seconds);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

public class ModFlowerBlock extends FlowerBlock
{
public ModFlowerBlock(Holder<MobEffect> effect, int effectDuration)
public ModFlowerBlock(Holder<MobEffect> effect, float seconds)
{
super(effect, effectDuration, BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).noCollission().instabreak().sound(SoundType.GRASS).offsetType(BlockBehaviour.OffsetType.XZ).pushReaction(PushReaction.DESTROY));
super(effect, seconds, BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).noCollission().instabreak().sound(SoundType.GRASS).offsetType(BlockBehaviour.OffsetType.XZ).pushReaction(PushReaction.DESTROY));
}

public boolean isReallyFlammable(BlockState state, BlockGetter getter, BlockPos pos, Direction direction)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

public class RedSpiderLilyBlock extends MediumFlowerBlock
{
public RedSpiderLilyBlock(Holder<MobEffect> effect, int effectDuration)
public RedSpiderLilyBlock(Holder<MobEffect> effect, float seconds)
{
super(effect, effectDuration);
super(effect, seconds);
}

@Override
Expand Down

0 comments on commit a979161

Please sign in to comment.