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,11 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.BehaviourBuilders;
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourPlant;
|
||||
import org.betterx.bclib.blocks.BaseDoublePlantBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.blocks.basis.EndPlantBlock;
|
||||
import org.betterx.betterend.interfaces.survives.SurvivesOnJungleMossOrMycelium;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -11,18 +14,14 @@ import net.minecraft.util.RandomSource;
|
|||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.MapColor;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
public class TwistedUmbrellaMossBlock extends EndPlantBlock {
|
||||
public class TwistedUmbrellaMossBlock extends EndPlantBlock implements BehaviourPlant, SurvivesOnJungleMossOrMycelium {
|
||||
public TwistedUmbrellaMossBlock() {
|
||||
super(11);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isTerrain(BlockState state) {
|
||||
return state.is(EndBlocks.END_MOSS) || state.is(EndBlocks.END_MYCELIUM) || state.is(EndBlocks.JUNGLE_MOSS);
|
||||
super(BehaviourBuilders.createPlant(MapColor.COLOR_BLUE).lightLevel((state) -> 12));
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue