Block constructors refactoring

This commit is contained in:
paulevsGitch 2021-12-04 05:46:16 +03:00
parent d6faafd4c0
commit 3dacd0727f
18 changed files with 146 additions and 84 deletions

View file

@ -1,7 +1,6 @@
package ru.bclib.blocks;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.Level;
@ -19,12 +18,13 @@ public abstract class BasePlantWithAgeBlock extends BasePlantBlock {
public static final IntegerProperty AGE = BlockProperties.AGE;
public BasePlantWithAgeBlock() {
this(FabricBlockSettings.of(Material.PLANT)
.breakByTool(FabricToolTags.SHEARS)
.breakByHand(true)
.sound(SoundType.GRASS)
.randomTicks()
.noCollission());
this(
FabricBlockSettings.of(Material.PLANT)
.breakByHand(true)
.sound(SoundType.GRASS)
.randomTicks()
.noCollission()
);
}
public BasePlantWithAgeBlock(Properties settings) {