Recipes & leaves fixes

This commit is contained in:
paulevsGitch 2020-10-22 16:00:58 +03:00
parent 73fb181ffb
commit be67e059f8
3 changed files with 23 additions and 0 deletions

View file

@ -1,16 +1,23 @@
package ru.betterend.blocks;
import java.util.List;
import com.google.common.collect.Lists;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Material;
import net.minecraft.block.ShapeContext;
import net.minecraft.item.ItemStack;
import net.minecraft.loot.context.LootContext;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.world.BlockView;
import ru.betterend.blocks.basis.BlockPlant;
import ru.betterend.registry.BlockRegistry;
import ru.betterend.util.MHelper;
public class BlockEndLotusFlower extends BlockPlant {
private static final VoxelShape SHAPE_OUTLINE = Block.createCuboidShape(2, 0, 2, 14, 14, 14);
@ -39,4 +46,10 @@ public class BlockEndLotusFlower extends BlockPlant {
public VoxelShape getCollisionShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ePos) {
return SHAPE_COLLISION;
}
@Override
public List<ItemStack> getDroppedStacks(BlockState state, LootContext.Builder builder) {
int count = MHelper.randRange(1, 2, MHelper.RANDOM);
return Lists.newArrayList(new ItemStack(BlockRegistry.END_LOTUS_SEED, count));
}
}