62 lines
2 KiB
Java
62 lines
2 KiB
Java
package org.betterx.betterend.blocks;
|
|
|
|
import org.betterx.bclib.behaviours.BehaviourBuilders;
|
|
import org.betterx.bclib.behaviours.interfaces.BehaviourPlant;
|
|
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
|
import org.betterx.betterend.interfaces.survives.SurvivesOnRutiscus;
|
|
|
|
import net.minecraft.core.BlockPos;
|
|
import net.minecraft.util.RandomSource;
|
|
import net.minecraft.world.item.ItemStack;
|
|
import net.minecraft.world.level.BlockGetter;
|
|
import net.minecraft.world.level.Level;
|
|
import net.minecraft.world.level.LevelReader;
|
|
import net.minecraft.world.level.block.Block;
|
|
import net.minecraft.world.level.block.state.BlockState;
|
|
import net.minecraft.world.level.material.MapColor;
|
|
import net.minecraft.world.level.storage.loot.LootParams;
|
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
|
import java.util.List;
|
|
|
|
public class BoluxMushroomBlock extends EndPlantBlock implements SurvivesOnRutiscus, BehaviourPlant {
|
|
private static final VoxelShape SHAPE = Block.box(1, 0, 1, 15, 9, 15);
|
|
|
|
public BoluxMushroomBlock() {
|
|
super(BehaviourBuilders
|
|
.createPlant(MapColor.COLOR_ORANGE)
|
|
.ignitedByLava()
|
|
.lightLevel((bs) -> 10)
|
|
);
|
|
}
|
|
|
|
|
|
@Override
|
|
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
|
return SHAPE;
|
|
}
|
|
|
|
|
|
@Override
|
|
public boolean isValidBonemealTarget(LevelReader world, BlockPos pos, BlockState state) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean isBonemealSuccess(Level world, RandomSource random, BlockPos pos, BlockState state) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public List<ItemStack> getDrops(BlockState state, LootParams.Builder builder) {
|
|
return Lists.newArrayList(new ItemStack(this));
|
|
}
|
|
|
|
@Override
|
|
public boolean isTerrain(BlockState state) {
|
|
return SurvivesOnRutiscus.super.isTerrain(state);
|
|
}
|
|
}
|