SoniEx2
New Member
All (or at least most) of this, from the Block class:
Should be moved onto Components.
Code:
// Overall behavioural
private boolean liquid;
private boolean attachmentAllowed = true;
private boolean replacementAllowed;
private int hardness = 3;
private boolean supportRequired;
private EnumBooleanMap<Side> fullSide = new EnumBooleanMap<>(Side.class);
private BlockSounds sounds;
// Special rendering flags (TODO: clean this up)
private boolean water;
private boolean lava;
private boolean grass;
private boolean ice;
// Rendering related
private BlockMeshGenerator meshGenerator = new BlockMeshGeneratorSingleShape(this);
private boolean translucent;
private boolean doubleSided;
private boolean shadowCasting = true;
private boolean waving;
private byte luminance;
private Vector3f tint = new Vector3f(0, 0, 0);
private Map<BlockPart, BlockColorSource> colorSource = Maps.newEnumMap(BlockPart.class);
private Map<BlockPart, Vector4f> colorOffsets = Maps.newEnumMap(BlockPart.class);
// Collision related
private boolean penetrable;
private boolean targetable = true;
private boolean climbable;
// Physics
private float mass = 10;
private boolean debrisOnDestroy = true;
// Entity integration
private Prefab prefab;
private boolean keepActive;
private EntityRef entity = EntityRef.NULL;
private boolean lifecycleEventsRequired;
// Inventory settings
private boolean directPickup;
private boolean stackable = true;
private BlockAppearance primaryAppearance = new BlockAppearance();
// TODO: Remove once liquids have nicer generation
private Map<Side, BlockMeshPart> loweredLiquidMesh = Maps.newEnumMap(Side.class);
/* Collision */
private CollisionShape collisionShape;
private Vector3f collisionOffset;
private AABB bounds = AABB.createEmpty();