Missing textures, shaders

This commit is contained in:
paulevsGitch 2020-12-10 21:36:13 +03:00
parent 5c05b74d52
commit 6de1d29ffc
16 changed files with 63 additions and 1 deletions

View file

@ -2,7 +2,11 @@ package ru.betterend.blocks;
import java.util.Random;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.block.BlockState;
import net.minecraft.block.Material;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.state.property.Properties;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockPos.Mutable;
@ -15,6 +19,16 @@ import ru.betterend.util.BlocksHelper;
import ru.betterend.util.MHelper;
public class BlockGlowingPillarSeed extends BlockPlantWithAge {
public BlockGlowingPillarSeed() {
super(FabricBlockSettings.of(Material.PLANT)
.luminance((state) -> { return state.get(AGE) * 3 + 3; })
.breakByTool(FabricToolTags.SHEARS)
.sounds(BlockSoundGroup.GRASS)
.breakByHand(true)
.ticksRandomly()
.noCollision());
}
@Override
public void growAdult(StructureWorldAccess world, Random random, BlockPos pos) {
int height = MHelper.randRange(1, 2, random);

View file

@ -18,7 +18,7 @@ public abstract class BlockPlantWithAge extends BlockPlant {
public static final IntProperty AGE = IntProperty.of("age", 0, 3);
public BlockPlantWithAge() {
super(FabricBlockSettings.of(Material.PLANT)
this(FabricBlockSettings.of(Material.PLANT)
.breakByTool(FabricToolTags.SHEARS)
.sounds(BlockSoundGroup.GRASS)
.breakByHand(true)
@ -26,6 +26,10 @@ public abstract class BlockPlantWithAge extends BlockPlant {
.noCollision());
}
public BlockPlantWithAge(FabricBlockSettings settings) {
super(settings);
}
@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> stateManager) {
stateManager.add(AGE);