block cleanup #6

This commit is contained in:
Sen 2025-06-21 14:04:15 +02:00
parent 9a6abe495c
commit 7b25e6181e
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
27 changed files with 263 additions and 214 deletions

View file

@ -6,6 +6,7 @@ import common.block.Block;
import common.block.Rotatable;
import common.block.Material;
import common.block.SoundType;
import common.collect.Lists;
import common.color.Colorizer;
import common.entity.npc.EntityNPC;
import common.entity.types.EntityLiving;
@ -35,6 +36,7 @@ import common.world.AWorldServer;
public class BlockDoublePlant extends BlockBush implements Rotatable, IGrowable
{
public static final PropertyEnum<BlockDoublePlant.EnumBlockHalf> HALF = PropertyEnum.<BlockDoublePlant.EnumBlockHalf>create("half", BlockDoublePlant.EnumBlockHalf.class);
public static final BlockDoublePlant[] PLANTS = new BlockDoublePlant[EnumPlantType.values().length];
private final EnumPlantType type;
@ -45,6 +47,7 @@ public class BlockDoublePlant extends BlockBush implements Rotatable, IGrowable
this.setDefaultState(this.getBaseState().withProperty(HALF, BlockDoublePlant.EnumBlockHalf.LOWER).withProperty(FACING, Facing.NORTH));
this.setHardness(0.0F);
this.setStepSound(SoundType.GRASS);
PLANTS[type.ordinal()] = this;
}
public EnumPlantType getType() {