Made plant creation consistent with BehaviourBuilders
This commit is contained in:
parent
c340d575c5
commit
f259496ba0
56 changed files with 363 additions and 396 deletions
|
@ -1,8 +1,9 @@
|
|||
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.registry.EndBlocks;
|
||||
import org.betterx.betterend.interfaces.survives.SurvivesOnRutiscus;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.util.RandomSource;
|
||||
|
@ -11,8 +12,8 @@ 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.BlockBehaviour;
|
||||
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;
|
||||
|
@ -21,17 +22,17 @@ import com.google.common.collect.Lists;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class BoluxMushroomBlock extends EndPlantBlock {
|
||||
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().lightLevel((bs)->10));
|
||||
super(BehaviourBuilders
|
||||
.createPlant(MapColor.COLOR_ORANGE)
|
||||
.ignitedByLava()
|
||||
.lightLevel((bs) -> 10)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isTerrain(BlockState state) {
|
||||
return state.is(EndBlocks.RUTISCUS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue