/** * This component is added by the authority to temporary block entities so that they can persist for a bit while the block is being damaged. */ @ForceBlockActive public class BlockDamagedComponent implements Component { }
/** */ @ForceBlockActive(retainUnalteredOnBlockChange = true) public class RetainedOnBlockChangeComponent implements Component { public int value; public RetainedOnBlockChangeComponent() { } public RetainedOnBlockChangeComponent(int value) { this.value = value; } }
/** */ @ForceBlockActive public class ForceBlockActiveComponent implements Component { }
@ForceBlockActive public class TimedExplosionComponent implements Component { public long fuseTimeMs; }
@ForceBlockActive public final class DelayedActionComponent implements Component { private Map<String, Long> actionIdsWakeUp = new HashMap<>();
@ForceBlockActive public final class PeriodicActionComponent implements Component { private Map<String, Long> actionIdsWakeUp = new HashMap<>();
/** */ @ForceBlockActive public class TriggerComponent implements Component { @Replicate public CollisionGroup collisionGroup = StandardCollisionGroup.SENSOR; @Replicate public List<CollisionGroup> detectGroups = Lists.<CollisionGroup>newArrayList(StandardCollisionGroup.DEFAULT); }
/** * Allows an entity to store items. * */ @ForceBlockActive public final class InventoryComponent implements Component, ReplicationCheck { public boolean privateToOwner = true; @Replicate @Owns public List<EntityRef> itemSlots = Lists.newArrayList(); public InventoryComponent() { } public InventoryComponent(int numSlots) { for (int i = 0; i < numSlots; ++i) { itemSlots.add(EntityRef.NULL); } } @Override public boolean shouldReplicate(FieldMetadata<?, ?> field, boolean initial, boolean toOwner) { return !privateToOwner || toOwner; } }
/** */ @ForceBlockActive public final class MeshComponent implements VisualComponent { @Replicate public Mesh mesh; @Replicate public Material material; // TODO: This should be a setting on the material @Replicate public boolean translucent; // Use this for the mesh to light itself. Useful for held lights where the point light is inside the mesh. @Replicate public float selfLuminance; public boolean hideFromOwner; // TODO: Some sort of Texture + Shader type? //public String material; // This should be elsewhere I think, probably in the material @Replicate public Color color = Color.WHITE; }
@ForceBlockActive public class SkeletalMeshComponent implements VisualComponent { public SkeletalMesh mesh;
@ForceBlockActive public class RigidBodyComponent implements Component { @Replicate