public void onActivateBlock(OnActivatedComponent event, EntityRef entity) {
BlockComponent block = entity.getComponent(BlockComponent.class);
EntityRef oldEntity = blockEntityLookup.put(new Vector3i(block.getPosition()), entity);
// If this is a client, then an existing block entity may exist. Destroy it.
if (oldEntity != null && !Objects.equal(oldEntity, entity)) {
oldEntity.destroy();
}
}
@ReceiveEvent(components = {BlockComponent.class})
public void onDeactivateBlock(BeforeDeactivateComponent event, EntityRef entity) {